Forums de discussion
IPC ActionRequest with h:selectOneRadio?
Witold Wolski, modifié il y a 11 années.
IPC ActionRequest with h:selectOneRadio?
New Member Publications: 20 Date d'inscription: 06/02/12 Publications récentes
Hello,
How can I create an ActionRequest with in h:selectOneRadio ?
When I added <f:ajax disabled="true" /> the backing bean method
Is never entered/called. How can I modify the xhtml to get an ActionRequest.
regards
Witold
How can I create an ActionRequest with in h:selectOneRadio ?
<h:form>
<h:selectoneradio value="#{workflowSubmitterMB.master}">
<f:ajax disabled="true" />
<f:selectitems value="#{workflowSubmitterMB.masters}"></f:selectitems>
</h:selectoneradio>
</h:form>
When I added <f:ajax disabled="true" /> the backing bean method
public void setMaster(String master){
this.master = master;
try {
WorkflowMaster wp = new WorkflowMaster();
wp.setMaster(master) ;
QName qName = new QName("http://ismb.ethz.ch/events",
"ipc.workflowMaster");
ExternalContext externalContext = FacesContext.getCurrentInstance()
.getExternalContext();
//ActionResponse actionResponse = (ActionResponse) externalContext
// .getResponse();
//actionResponse.setEvent(qName, wp);
} catch (Exception e) {
System.out.println(e);
}
System.out.println("super");
}
Is never entered/called. How can I modify the xhtml to get an ActionRequest.
regards
Witold
Neil Griffin, modifié il y a 11 années.
RE: IPC ActionRequest with h:selectOneRadio?
Liferay Legend Publications: 2655 Date d'inscription: 27/07/05 Publications récentes
Hi Witold,
The h:selectOneRadio standard component simply renders something like the following:
In order for the click to invoke an ActionRequest, you would need to disable Ajax and add an onclick event like the following that submits the form via JavaScript:
For more info, see the thread titled "Radio button submit" in the SpringSource forums.
Neil
The h:selectOneRadio standard component simply renders something like the following:
<input type="radio" name="A1234:myForm:foo" value="1">
In order for the click to invoke an ActionRequest, you would need to disable Ajax and add an onclick event like the following that submits the form via JavaScript:
onclick="this.form.submit()"
For more info, see the thread titled "Radio button submit" in the SpringSource forums.
Neil