|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
AjaxCommandButtonHi,
is it possible to invoke AjaxCommandButton as a UIComponent from java code. I am constructing my JSF GUI components in Java as opposed to jsp due to some GUI complexity. I tried to invoke the code below (using both AjaxCommandButtonTag and AjaxCommandButton) and the exception was thrown at runtime saying that the child wasn't an instance of UIComponent. I was thinking that there must be a way to do it from java. Please share your thought on this issue. HtmlPanelGrid panelGrid = new HtmlPanelGrid(); AjaxCommandButtonTag btn2 = new AjaxCommandButtonTag(); btn2.setTitle("testing"); panelGrid.getChildren().add(btn2); Thanks! __________________________________________________ |
|||||||||||
|
|
Re: AjaxCommandButtonAny of Ajax4jsf tag can be invoked from java code.
For a4j:commandButton, the right class is:
org.ajax4jsf.ajax.html.HtmlAjaxCommandButton
The corresponding class for each of the ajax4jsf
component will be mentioned in the final version of the
documentation.
For now, there is a simple tip:
ajax4jsf.jar has two key files in the META-INF/
folder: a4j.taglib.xml and faces-config.xml
In the a4j.taglib.xml you can find a
component-type. Then, in the faces-config.xml the implementation class by this
type.
|
|||||||||||
|
|
Re: AjaxCommandButtonHi, I have similar question too. I am using jsf popup to display some messages. Now I want to invoke this popup when some exception or error occurs in backend(controllers) & pass the user's action(yes/no/cancel) back to backend. User may click some link which might take long time & may fail too, in this case error msg should be popped up. Depending on user's action(yes/no), it should allow preceding operations. How should I accomplish this? One way I think is, by inserting hidden variable & javascripts template in component renderer & rename elements on the fly & store user response in that hidden field. I think there should be some standard approach too. Regards
Any of Ajax4jsf tag can be invoked from java code. For a4j:commandButton, the right class is: org.ajax4jsf.ajax.html.HtmlAjaxCommandButton The corresponding class for each of the ajax4jsf component will be mentioned in the final version of the documentation. For now, there is a simple tip: ajax4jsf.jar has two key files in the META-INF/ folder: a4j.taglib.xml and faces-config.xml In the a4j.taglib.xml you can find a component-type. Then, in the faces-config.xml the implementation class by this type. ----- Original Message ----- From: Polina Keselman To: dev@... Sent: Friday, December 29, 2006 7:10 AM Subject: AjaxCommandButton Hi, is it possible to invoke AjaxCommandButton as a UIComponent from java code. I am constructing my JSF GUI components in Java as opposed to jsp due to some GUI complexity. I tried to invoke the code below (using both AjaxCommandButtonTag and AjaxCommandButton) and the exception was thrown at runtime saying that the child wasn't an instance of UIComponent. I was thinking that there must be a way to do it from java. Please share your thought on this issue. HtmlPanelGrid panelGrid = new HtmlPanelGrid(); AjaxCommandButtonTag btn2 = new AjaxCommandButtonTag(); btn2.setTitle("testing"); panelGrid.getChildren().add(btn2); Thanks! __________________________________________________
Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you. |
| Free Forum Powered by Nabble | Forum Help |