I am in the process of migrating an application with JSF pages to JBoss #7.4. Started experiencing couple of issues as given below. However, my application with the JSF pages works well with JBoss #6.1.
-
Was throwing an exception – This I could fix per this post by disabling ajax call: “ajax = false”.
-
Button needs to be clicked twice to call the method mentioned in an action attribute.
I have given below the code of xhtml & the calling java method. Can someone throw some light so that method will be called with a single click of the button?.
Thank you,
xhtml:
<h:form id="ifgCreatorForm" onkeypress="if (event.keyCode == 13) return false;">
<p:growl id="eventGuideGrowl" for="eventBean" sticky="true"/>
<div class="eventBar">
<span style="display:inline-block; position: absolute; width: 100%; left: 0px; text-align: center;">
<span class="eventLink eventLinkActive excludeKeepAlive">
<h:outputText value="#{msg.ifg_label}"/>
</span>
<p:commandLink id="navigateToJob" action="#{event.goToJob()}" styleClass="excludeKeepAlive" process="@this" update="eventGuideGrowl" >
<span class="eventLink excludeKeepAlive">
<h:outputText value="#{msg.job_label}"/>
</span>
</p:commandLink>
<p:commandLink id="navigateFromIfgToEvent" action="#{event.goToEvent()}" styleClass="excludeKeepAlive" process="@this" update="eventGuideGrowl" >
<span class="eventLink excludeKeepAlive">
<h:outputText value="#{msg.event_label}"/>
</span>
</p:commandLink>
</span>
<p:commandButton value="#{msg.next}" id="eventNextButton" action="#{event.goToJob()}" styleClass="eventGuideNext excludeKeepAlive" process="@this" update="eventGuideGrowl" />
</div>
Java Method:
@Named("event")
@ConversationScoped
public class EventBean implements Serializable {
public String goToJob() {
logger.info("In goToJob");
return eventGuidePageNavigation.TO_JOB.toString();
}
public String goToEvent() {
logger.info("In goToEvent");
return eventGuidePageNavigation.TO_EVENT.toString();
}
}
Suresh Bottu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.