Sign in

E-mail *, (xx@domain.com)
Password *

Register | Forgot password

Style properties

The "General Discussion" covers general questions about GX WebManager. In this forum you can discuss all topics of GX WebManager which are not covered in one of the specific forums below.

Answered
Not marked as answered yet

Forums  >  General discussion  >  Style properties


Author Style properties
bartvandijk



Posts: 11

Posted: 02-09-2010 15:02

I'm trying to insert a couple of style properties in my page.jsp.
Probably I'm missing a step of two because the properties aren't showing.

The steps I took.

1. I made a new style "JMOuders".
2. I added 2 style properties. One images property has the
label "image". One color property has the label "header_color"
3. Made a page.jsp containing:

<c:set var="currentPage" value="${presentationcontext.page}" />
<%-- background home --%>
<wm:presentationProperty label="image" var="backgroundImage" page="${currentPage}" />
<wm:presentationProperty label="header_color" var="backgroundColor" page="${currentPage}" />
${backgroundImage.url}
${backgroundColor}



4. I linked the page.jsp and style "JMOuders" to my homepage.
These both things are done correctly since the lay-out is
correct and I can change my color and image at my page.

What am I missing?

Greetings, Bart

michael



Posts: 13

Posted: 02-09-2010 17:37 Solved

Did you define the presentation properties in the xml descriptor file of the page.jsp (ie. page.xml)?

Here's an example of a style property taken from the community edition style wcb tableElementModeled.xml with colours fonts and images:

<property>
<propertyname>tableTitleBackgroundColor</propertyname>
<display-name>Tabel titel achtergrond kleur</display-name>
<datatype>Color</datatype>
<default></default>
</property>
<property>
<propertyname>tableTitleBackgroundImage</propertyname>
<display-name>Tabel titel achtergrond afbeelding</display-name>
<datatype>Image</datatype>
<default></default>
</property>
<property>
<propertyname>tableTitleFont</propertyname>
<display-name>Tabel titel lettertype</display-name>
<datatype>Font</datatype>
<default>font-family: Verdana; font-size: 12px; font-weight: bold; color :#216DBB;</default>
</property>


and use it like this:

<wm:presentationProperty var="tableTitleBackgroundColor" label="tableTitleBackgroundColor" />
<wm:presentationProperty var="tableTitleFont" label="tableTitleFont" />

williamb



Posts: 310

Posted: 03-09-2010 19:59

Bart,

If you can: try to use alternatives to 'styles'. Presentation properties are fine, but 'styles' can better be replaced by Page Meta Data WCB's. You might consider it 'deprecated', although an official statement has not been taken about this.

If you still want to use it, check the just updated Design API document for more information about the XML file Michael describes.

Back to top

New message: "Style properties"
Message:
bold boitalicd underline url quote code smile cool eek grin mad razz sad wink
 
© 2012 GX Software B.V.

Disclaimer

This website (Connect.gxsoftware.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported.  GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.