Perhaps, because  buzzlabs.view.EnumHelpers
Is not an actionbean while buzzlabs.view.FormViewHelper is ?

________________________________
From: Fabio Fonseca [mailto:draco...@gmail.com]
Sent: Friday, September 11, 2009 12:37 PM
To: Stripes Users List
Subject: [Stripes-users] options-enumeration

After losing a loooooooot of time trying to figure it out by myself, I give up.


why this line of code works:

[...]
  <s:select name="">
    <s:option value="">
      <fmt:message key="filter.siteType"/>...
    </s:option>
    <s:options-enumeration enum="buzzlabs.view.EnumHelpers.SiteType" />

Trying to populate the Select field with a ENUM. Only works when I write the 
full qualified name on the enum="" field.

while this one don't:

<s:useActionBean beanclass="buzzlabs.view.EnumHelpers" id="EnumHelper" />

  <s:select name="">
    <s:option value="">
      <fmt:message key="filter.siteType"/>...
    </s:option>
    <s:options-enumeration enum="${EnumHelper.SiteType}" />

Trying also to populate the Select field, but using the useActionBean tag like 
I did with a collection instead of a ENUM.

While still this one works too!

<s:useActionBean beanclass="buzzlabs.view.FormViewHelper" id="formHelper"/>

<fmt:message key="filter.state"/>
  <s:select name="state">
    <s:option value="">
      <fmt:message key="filter.state"/>...
    </s:option>
    <s:options-collection collection="${formHelper.geoLocation}"
      value="id" label="estado"/>
  </s:select>

Populating the select with a Collection works ok.

But why?! can't understand it!

Cheers,
Fabio
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to