You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Manfred Geiler <ma...@gmail.com> on 2006/11/23 22:00:20 UTC

Re: Pass dropdown value as request parameter

First of all, please ask questions of that kind on the users list. Dev
list is for discussing MyFaces internal development issues.
(Replying to users, cc-ing to dev)

Regarding your question:
Just embed your selectOneMenu in a <h:form>, that's all. You do not
even need the (hidden) commandLink. Simply do a form.submit() via
JavaScript.

HTH,
Manfred



On 11/23/06, SSH <sh...@gmail.com> wrote:
>
> How can i pass the selected value of h:selectOneMenu as a request parameter
> using a hidden commandLink?? I will click this commandLink using javascript
>
> Here is how i want it:
> [code]
> <h:selectOneMenu value="#{mybean.selectedValue}"
> onchange="setSelectedVal()">
>         <f:selectItems value="#{mybean.menuItems}" />
> </h:selectOneMenu>
>
> <h:commandLink value="" action="#{mybean.action}">
>        <f:param name="param1" value="#{mybean.selectedValue}">
> </h:commandLink>
> [/code]
>
> --
> View this message in context: http://www.nabble.com/Pass-dropdown-value-as-request-parameter-tf2693257.html#a7510567
> Sent from the My Faces - Dev mailing list archive at Nabble.com.
>
>