سؤال

I'm using Trinidad Library.

I have commandButton that has partialSubmit=true attribute and a panel that has partialTriggers that point to that commandButton.

How can I know on the server side what is the source of the request , I mean which component fire the partial trigger?

Thanks for any help.

هل كانت مفيدة؟

المحلول 2

The information is in the request parameters map.

I took the requestParameterMap out of the ExternaContext and one of the attribute in the map was the source of the request. this can give you the form that sumbit this request.

نصائح أخرى

You have a command button like this:

<tr:commandButton styleClass="formbutton"
    id="yourId"
    partialSubmit="true" 
    textAndAccessKey="&YourText" 
    actionListener="#{yourBean.yourAction}">
</tr:commandButton> 

and a managed bean with such a function:

public void yourAction(ActionEvent event)
   {
       event.getComponent().getId();
   }
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top