Hi Mike,

Thanks for your quick response...

Yes I do have a Hidden 'CommandLink' in one of my columns as below,
<h:commandLink immediate="true" id="link" action="#{Bean.actionSelect}"
type="hidden" />

then I use the following javascript to  Force Submit the action of the
command link using,
document.forms['FormName'].elements['FormName:_link_hidden_'].value='FormName:dataTable:0:link'
document.forms[FormName].submit();

Because this way we are dependent on the way JSF creates ID for the
components and if ID creation logic changes with Upgrades then it will Break
the application.

So is this the Standard & proper way to do that or do we have any other way
to handle this situation ?
I wanted to ensure that I am following the norm. Hopefully you could advise
me on whats the best practice ?

Thanks,
Sunil



Mike Kienenberger wrote:
> 
> On 8/10/06, sunil m <[EMAIL PROTECTED]> wrote:
>> In my DataTable i want the user to click anywhere on the Row and execute
>> the
>> JSF action. So for that I am using the attribute, 'rowOnClick' in the
>> Datatable and using the Javascript below to submit the Form,
>> document.forms['FormName'].elements['FormName:_link_hidden_'].value='FormName:dataTable:0:commandLink'
>>
>> I am using version 1.4 snapshot. Prior to this i mean in version 1.1 the
>> commandLink Id was 'FormName:dataTable_0:commandLink' and now it has
>> changed
>> to 'FormName:dataTable:0:commandLink'.  i.e. replaced '_' with a ':' .
>>
>> Is there any other way to Submit a JSF form for an action to be executed
>> by
>> the CommandLink ? Because I don't want to be dependent on JSF internal
>> way
>> of handling
>> commmandLinks.
> 
> Create a non-displayed, non-visible command-link component in one of
> your columns and force it to submit.
> 
> http://wiki.apache.org/myfaces/JavascriptWithJavaServerFaces
> http://wiki.apache.org/myfaces/SubmitPageOnValueChange
> 
> 

-- 
View this message in context: 
http://www.nabble.com/DataTable---RowOnclick-other-options---tf2086631.html#a5751664
Sent from the My Faces - Dev forum at Nabble.com.

Reply via email to