java - WebObjects: Using WOConditional inside <div> -


i in situation "class" attribute of div tag should dependent on value of java binding. can done moving associated logic java class, @ moment not allowed change @ java component.

i trying out following resolve problem (using woognl):

<div class="<wo:woconditional condition = \"[cssclassdecider]\">classtouse</wo:woconditiona>" >  html static content </div> 

as can seen, trying use value of "cssclassdecider" set class.

can tell if has solved similar problem or 1 available @ wo.

it's not clear me whether cssclassdecider providing string content class attribute, or boolean drive conditional. in case, usual pattern be:

<wo:wogenericcontainer elementname="div" class="$methodreturningclassnames">   ... </wo:wogenericcontainer> 

if cssclassdecider returns conditional, this:

<wo:woconditional condition="$cssclassdecider">   <div class="classwhentrue">     ...   </div> </wo:woconditional> <wo:woconditional condition="$cssclassdecider" negate="$true">   <div class="classwhenfalse">     ...   </div> </wo:woconditional> 

if neither of solve problem, provide more information.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -