Skip to main content

New to liferay and jsf 2.0

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
prashrathod7
Offline
Joined: 2012-07-20

hi
i am new to liferay and jsf 2.0.
i have one managebean class having id and name as parameters. and one submit button.
i am taking the name and the id from the user using the xhtml page like {#user.name}.
i want to call the add method which is in managebean class after clicking the submit button.
how can i do it.?
i tried many things but it didnt worked.
i have also implemented actionlistener in managebean class.
how to call add method after the click of the submit button?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
ngriffin7a
Offline
Joined: 2007-01-24

Are you specifying the actionListener on the submit button? For example:

xhtml page:
<h:commandButton actionListener="#{myManagedBean.myActionListener}" value="Submit" />

java class:

@ManagedBean
@RequestScoped
public class MyManagedBean {

  public void myActionListener(ActionEvent actionEvent) {
     ...
  }
}