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> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </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: [email protected]
For additional commands, e-mail: [email protected]