Call an action onselect from Select Tag

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Call an action onselect from Select Tag

dynamicd

Can someone tell me how to call an action directly when selecting something from the Select tag.
I tried a couple of things but it didnt work.

<s:form action="SomeAction.action">
<s:select
   id="NAME"
   name="NAME"
   list="nameList.{prettyname}"
   headerKey="-1"
   headerValue="-- Please Select --"
  />
</s:form>

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Call an action onselect from Select Tag

dynamicd
I am not able to use the s:bind tag it gives me an error saying unknown tag
<s:bind sources="NAME" events="onselect" href="%{#url}" />
Reply | Threaded
Open this post in threaded view
|

Re: Call an action onselect from Select Tag

dynamicd
Here how to

<s:div >
 <s:form id="selectreport" theme="ajax" action="ShowConfigureDZ" >
<br><br>
 <s:select
   id="REPORTNAME"
   name="REPORTNAME"
   list="reportList.{prettyname}"
   onchange="dojo.event.topic.publish('showConfigure_topic');return false;"
   theme="ajax"
  />
 
   

  </s:form>
  </s:div>
 
   <s:url id="showconfigureDZ" value="/ShowConfigureDZ.action" />
  <s:div id="configureDZ" href="%{showconfigureDZ}" formId="selectreport" listenTopics="showConfigure_topic"  theme="ajax"></s:div>