Hi Simon, Andrew

thanks for the answers,

sure, my question is confusing - I meant how to do something like:

<h:table>
<!-- its link1 -->
   <h:column>
  <h:commandLink action="actionA" actionListener="processClick">
   </h:column>

<!-- its link2 -->
   <h:column>
  <h:commandLink action="actionB" actionListener="processClick">
   </h:column>
</h:table>

So my question was how to define in processClick that user clicks on
link1 or on click 2?

you cannot put certain Id in link component - its table, so id must be
unique and its  generated by component,
and actionEvent.getComponent() returns something like "id_lnk_141413"
- sure, not very meaningful :)

So for now I have gone with separate methods for every actionListener.

Cheers,
Anton



2008/12/19 Simon Kitching <skitch...@apache.org>:
> Anton Gavazuk schrieb:
>> Hi all,
>>
>> I"m making the master-detail scenario via ActionListeners and want to
>> use the same ActionListener
>>
>> is there any "easy" way to know which link in table row performs the action?
>>
> This should be covered by most JSF textbooks.
>
> There is also a page on the myfaces wiki. This page:
>   http://wiki.apache.org/myfaces/
> has a link to here:
>  http://wiki.apache.org/myfaces/ExecutingMethodsFromLinkButtonParameters
> which hopefully answers your question.
>
> Regards,
> Simon
>
> --
> -- Emails in "mixed" posting style will be ignored
> -- (http://en.wikipedia.org/wiki/Posting_style)
>
>

Reply via email to