This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Button action problem in richfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Button action problem in richfaces" Watch "Button action problem in richfaces" New topic
Author

Button action problem in richfaces

Bharat Kasodariya
Ranch Hand

Joined: Aug 19, 2011
Posts: 36
Hi,

I have created one simple master page. There is cancel button with action in that page.To execute action, I have to press cancel button two times.
Why its not working on single click.

here is jsf page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head></h:head>
<h:body>
<h:form id="productMasterForm">
<rich:panel>
<f:facet name="header">
Product Master
</f:facet>
<h:panelGrid columns="2">
<hutputLabel value="EAN" />
<h:inputText value="#{productMaster.ean}"
readonly="#{productMaster.editMode}" />
<hutputLabel value="Product Descirption" />
<h:inputText value="#{productMaster.productDesc}" />
</h:panelGrid>
<a4j:commandButton id="save" value="Save"
action="#{productMaster.addProduct}">
</a4j:commandButton>
<h:commandButton id="cancel" value="Cancel"
action="/pages/ProductList.xhtml">
</h:commandButton>
<h:message showSummary="true" showDetail="false"
style="color: red; font-weight: bold;" for="save" />
</rich:panel>
</h:form>
</h:body>
</html>

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Button action problem in richfaces