Jeromy, I tried as you said, but now I have the following exception:
01:02:36,640 WARN OgnlValueStack:46 - Could not find property [templateDir] 01:02:36,640 WARN OgnlValueStack:46 - Could not find property [templateDir] 01:02:36,640 WARN OgnlValueStack:46 - Could not find property [#attr.templateDir] 01:02:36,656 WARN OgnlValueStack:46 - Could not find property [templateDir] 01:02:36,656 WARN OgnlValueStack:46 - Could not find property [templateDir] 01:02:36,671 WARN OgnlValueStack:46 - Could not find property [#attr.templateDir] 01:02:36,718 ERROR FreemarkerTemplateEngine:24 - Could not load template /template/item/checkbox 01:02:36,765 ERROR UIBean:28 - error when rendering java.io.FileNotFoundException: Template /template/item/checkbox.ftl not found. Tanks for your attention! 2008/4/7, Jeromy Evans <[EMAIL PROTECTED]>: > > In addition to Wes' comment, as you're using display:table and have used > the uid attribute, the current row of the table is placed into the > PageContext. > > You can access the page context in OGNL via #attr, so your expression > becomes this: > > <s:checkbox name="checkBox" id="checkBox" value="cdUsuario" > fieldValue="%{#attr.item.id}" theme="simple" onclick="confirmAllChecked()" > /> > > > Wes Wannemacher wrote: > > > Your problem isn't OGNL in parameters, you are using EL in your > > examples. By default, EL expressions are disabled, but you could easily > > switch your expressions to OGNL. I'm guessing that if you use '%' > > instead of '$' it will probably work. If your action has a getItem(), > > and the returned object has a getId(), then %{item.id} should work, and > > if the %{ and } may not even be necessary. > > ${ triggers EL expression parsing, but this is done by the app server, > > if the TLD specifies that the attribute accepts EL (which struts tags do > > not by default, unless you change the TLD which isn't advisable). > > %{ forces OGNL expression. OGNL expression evaluation happens within the > > tag's code, so the app server knows nothing about this step. Thus, the > > TLD file's directives have nothing to do with this parsing. Many of the > > Struts 2 tag's attributes will attempt to parse parameters as OGNL by > > default, but %{ will force parsing. > > > > -Wes > > > > > > On Sun, 2008-04-06 at 21:19 -0300, Márcio Gurgel wrote: > > > > > > > Hi all, > > > > > > I was using struts 2.0.9, then I resolved to upgrade to 2.1.0. > > > I was setting a value in a checkbox like this: > > > <s:checkBox value="${currentRow.id}"/> inside a displayTag iterator. > > > > > > I read this link https://issues.apache.org/struts/browse/WW-2107 and > > > understood the situation. > > > But, is there another way to set a value in my checkBox? > > > > > > <display:table requestURI="/usuario/pesquisar.action" > > > name="listUsuPesquisa" > > > list="listUsuPesquisa" export="false" class="list" pagesize="15" > > > uid="item"> > > > > > > <display:column title='<input type="checkbox" name="selectAll" > > > id="selectAll" value="" onclick="checkAll()"/>'> > > > <s:checkbox name="checkBox" id="checkBox" value="cdUsuario" > > > fieldValue="${ > > > item.id}" theme="simple" onclick="confirmAllChecked()" /> > > > </display> > > > > > > *Exception* > > > According to TLD or attribute directive in tag file, attribute > > > fieldValue > > > does not accept any expressions > > > > > > Tanks a lot! > > > Have a nice week! > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >