why not checkboxlist?

<s:checkboxlist name="language" list="list"/>
http://struts.apache.org/2.1.2/docs/checkboxlist.html
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Thu, 20 Aug 2009 16:58:52 -0700
> From: tommy...@yahoo.com
> Subject: Re: [struts2] <s:checkbox /> problem
> To: user@struts.apache.org
> 
> Hi,
> 
> Looks like I'm still having problems with the <s:checkbox />.  I have a 
> LinkedHashMap list which I want to iterate and show the contents.  This is 
> the code for it:
> 
> <s:if test="%{!list.isEmpty}">
>     <table border="1" cellspacing="0" cellpadding="3">
>         <tr>
>             <td>ID</td>
>             <td>ISO <br />
>             Code 2</td>
>             <td>ISO <br />
>             Code 3</td>
>             <td>Name</td>
>             <td>Native Name</td>
>             <td>Active</td>
>             <td>Image</td>
>         </tr>
>         <s:iterator var="language" value="list.values">
>             <tr>
>                 <td>${language.languageId}</td>
>                 <td>${language.isoCode2}</td>
>                 <td>${language.isoCode3}</td>
>                 <td>${language.name}</td>
>                 <td>${language.nativeName}</td>
>                 <td>${language.active} <s:checkbox name="languageActive"
>                     value="%{language.active}" disabled="true" />
>                 <input type="checkbox" disabled
>                     <s:if test="%{language.active}">checked</s:if> />
>                 <input type="checkbox" disabled
>                     <c:if test="${language.active}">checked</c:if> /></td>
>                 <td>${language.image}</td>
>             </tr>
>         <tr>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>         </tr>
>         <tr>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>             <td>&nbsp;</td>
>         </tr>
>         </s:iterator>
>     </table>
> </s:if>
> 
> The only way I can get a <input type="checkbox" /> to show correctly is using 
> JSTL1.2 c tag. I've tried using just language.active without the %{} without 
> success even though the 1st <c:if test="!list.isEmpty"> works fine without 
> %{} (pls see SS http://img20.imageshack.us/img20/8029/languages.jpg ).  
> Anyone has any ideas why it doesn't work? devmode is true in struts.xml.  My 
> log4j setting is info.  The only thing I see that is above INFO is a bunch of:
> 2009-08-20 16:40:07,895  WARN [OgnlValueStack      ] Could not find property 
> [struts.actionMapping]
> 2009-08-20 16:40:07,807  WARN [OgnlValueStack      ] Could not find property 
> [templateDir]
> 2009-08-20 16:40:07,807  WARN [OgnlValueStack      ] Could not find property 
> [theme]
> 
> These WARN logs go away when devmode is false.
> 
> I've been at this for 2 days now.  I expected struts to be a learning a curve 
> but I had faster results just implementing JSTL1.2 to the same point on this 
> :(...
> 
> TIA,
> Tommy
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

_________________________________________________________________
Get back to school stuff for them and cashback for you.
http://www.bing.com/cashback?form=MSHYCB&publ=WLHMTAG&crea=TEXT_MSHYCB_BackToSchool_Cashback_BTSCashback_1x1

Reply via email to