xpages - styleClass property always gets overwritten when adding style in theme -


i using theme xpage application set global look&feel settings configuration viewroot looks this:

<control dojotheme="true">     <name>viewroot</name>     <property>         <name>pageicon</name>         <value>/favicon.ico</value>     </property>     <property>             <name>style</name>                 <value>#{javascript:                      var response = facescontext.getexternalcontext().getresponse();                     response.setheader("x-ua-compatible", "ie=8");                 }</value>             </property>             <property mode="concat">                 <name>styleclass</name>                 <value>claro</value>             </property> </control> 

although use mode="concat", thought adds (like array.concat) properties viewroot overwrites it, <body> looks this:

<body class="claro"... instead of:
<body class="xsp lotusui claro"...

i experienced problem other <controls>/<properties> well.

my current solution set property value xsp lotusui claro not claro prevent body loosing oneui/xsp styles. got idea why mode="concat" not working in example? or mode else?

i not find documentation of theme properties if got link, glad if share it.

edit: working on xpages theme @ moment got more curious , played little bit this. far can see code works fine . in tests experienced can concat style definition pre-defined styleclass. can create xpages , define body style class body-styleclass predefined within xpage:

<?xml version="1.0" encoding="utf-8"?> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" styleclass="mystyle"> <xp:button value="label" id="button1" themeid="bt"     styleclass="oink"> </xp:button> </xp:view> 

using theme can add (or multiple) styleclasses:

<control>     <name>viewroot</name>     <property mode="concat">         <name>styleclass</name>         <value>claro</value>     </property> </control> 

in scenario, want concat styleclass definition added "default" styleclass - , seems issue or conflict. so, conclusion. if there else having more , deeper insights interested in deeper insights themes , inheritance in particular.

old comment:
far know, add attribute, should set override-property of control false.

example (your code changed):

<control dojotheme="true" override="false"> <name>viewroot</name> <property>     <name>pageicon</name>     <value>/favicon.ico</value> </property> <property>         <name>style</name>             <value>#{javascript:                  var response = facescontext.getexternalcontext().getresponse();                 response.setheader("x-ua-compatible", "ie=8");             }</value>         </property>         <property mode="concat">             <name>styleclass</name>             <value>claro</value>         </property> 

hope works , helps,

michael


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -