struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sreekanth S. Nair" <sreekanth.n...@egovernments.org>
Subject Re: sj:select default value not load
Date Thu, 08 Aug 2013 05:43:12 GMT
here the value of why is representing key or value ? The value your are
providing to *value* attribute (value="%{why}"), it should always represent
the key (not the display value).

-- 
Thanks & Regards
Srikanth
Software Developer
--------------------------------
eGovernments Foundations
www.egovernments.org
Mob : 9980078913
--------------------------------


On Sat, Aug 3, 2013 at 1:30 AM, john lee <sh_thorn_bird@yahoo.com> wrote:

>
> For struts2 sj:select tag from google
>
> <s:url id="remoteurl" action="KeywordcategoryAction"/>
>                                 <sj:select
>                                         href="%{remoteurl}"
>                                         id="language"
>                                         onChangeTopics="reloadsecondlist"
>                                         name="language"
>                                         list="languageObjList"
>                                         listKey="myKey"
>                                         listValue="myValue"
>                                         emptyOption="true"
>                                         headerKey="-1"
>                                         headerValue="Select Category"
>                                         value="why"
>                                 />
>
> for above jsp file, i can retrieve the data from KeywordcategoryAction for
> no problem
>
> but, the default value(why) as defined from KeywordcategoryAction did not
> working at all
>
> I try to change from value="why" to value="%{why}", but still not working,
>
> the setting inside  KeywordcategoryAction is the following
>    ...
>     public String getWhy(String why) { return why; }
>     public void setWhy(String why) { this.why=why; }
>     why="Temperature";
>     return success;
>
>
> please advise, thanks in advance
>
> john

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message