Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to call different managed beans action dynamically ?

maha laxmi
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have 2 pane tabs are there in the form.if i was in first screen(tab1) and make some changes in that screen and clicks tab2 it will ask me confirmation either ok or cancel .

if i click ok it should call ManagedBean1.edit method
if i click cancel it should call ManagedBean2.summaryList method;

so based on clicking the button it should call different managed and their methods

function validate()
flag = confirm("Do you want to save ?");

<h:form id="form1" onsubmit="return validate()">
<h:commandLink action="#{ManagedBean2.summaryList}" value="summary"></h:commandLink>
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic