Is there a way to set a variable using OGNL? Here's my situation. I'm looping 
over a collection, and I use a property a lot. Depending on certain conditions 
I output it in different ways. This is a block of code from my header HTML file 
:

<span jwcid="@If" condition="ognl:normalItem">
  <li><a jwcid="@PageLink" page="ognl:aPage.title"><span jwcid="@Insert" 
value="ognl:aPage.englishName" /></a>
</span>

<span jwcid="@If" condition="ognl:selectedItem">
  <li class="clsItemSelected"><span jwcid="@Insert" 
value="ognl:aPage.englishName" />
</span>

<span jwcid="@If" condition="ognl:aPage.noLink">
  <li class="normal"><span jwcid="@Insert" value="ognl:aPage.englishName" />
</span>



Now I want to add some i18n to this. So instead of using englishName, I might 
use frenchName. This aPage is a POJO, so I can't just call a getName() and have 
it call getLocale() or anything. So, what I want to do, in Pseudo code :

---
if (languageA)
 pageName = aPage.languageA;
if (languageB)
 pageName = aPage.languageB;
if (languageC)
 pageName = aPage.languageC;

<insert 3 spans from above, using value="ognl:pageName">
---



This might be a little confusing but hopefully someone is able to follow this :)

Thanks,
Greg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to