That's because the HTML spec supports query parameters for anchors -- a
button (i.e., HTML input element) does not. Query parameters are
ultimately appended to the anchor's URL, but the HTML input element does
not have such a mechanism. It may be possible to append query params to
the form action via JavaScript, but this functionality deviates from the
HTML spec. You can always do that yourself using the onClick attribute.
Dan
autozoom wrote:
> Thanks.
> If you look at the woodstock demo application, it works correctly for link
> inside data tables.
> I still don't understand why I cannot get the same to work
>
> Mauro
>
>
> Dan Labrecque wrote:
>
>> I don't believe HTML input elements support query parameters. The button
>> component does not support them, either. It has nothing to do with the
>> Javascript (i.e., the createWidgetOnLoad function). It comes down to the
>> underlying HTML element output in the page.
>>
>> Dan
>>
>> autozoom wrote:
>>
>>> I am trying to use a button column in a data table and passing a
>>> parameter
>>> using <f:param> like this:
>>> <webuijsf:tableColumn align="center" ...>
>>> <webuijsf:button
>>> actionExpression="#{osservatorio$Osservatorio.editContactButton_action}"
>>> ...>
>>> <f:param name="xxx" value="ciao"/>
>>> </webuijsf:button>
>>> </webuijsf:tableColumn>
>>>
>>>
>>> This is not working because the call to
>>> FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("xxx");
>>> in the action handler always returns null
>>>
>>> The same is working when I replace the button with a hyperlink.
>>>
>>> This seems to be because the button is rendered using a <input> tag while
>>> the hyperlink is rendered client-side using a createWidgetOnLoad()
>>>
>>> thanks
>>>
>>> Mauro
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net
>> For additional commands, e-mail: users-help_at_woodstock.dev.java.net
>>
>>
>>
>>
>
>