struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alberto A. Flores" <aaflo...@gmail.com>
Subject Re: [S2]Checkbox value
Date Thu, 13 Dec 2007 13:28:13 GMT
Yes, you can use tags within tags, but remember that the quotes are 
important:

<input name="chkUserId" type="checkbox"
      value='<s:property value="getUserId()"/>'/>

(Notice the single quotes with double quotes). I see two things wrong:

1. You are calling a method directly. the %{#userId} approach should do 
the trick (so long as it is part of your Action)
2. IMHO, I would almost guess you are missing the tag declaration on 
your JSP page. Have you added <@ taglib uri="/struts-tags" prefix="s"/>


Johannes Geppert wrote:
>>  <input name="chkUserId" 
>>         type="checkbox" 
>>     value="<s:property value="getUserId()"/>"/> 
> 
> try this version:
> <input name="chkUserId" 
>             type="checkbox" 
>             value="%{userId()}"/> 
> 
> you can't use tags in tags.
> 
> Best Regards
> Johannes Geppert
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 

-- 

Alberto A. Flores
http://www.linkedin.com/in/aflores



Mime
View raw message