Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 57 characters in body; deleted 89 characters in body
Source Link
Bozho
  • 599k
  • 147
  • 1.1k
  • 1.2k

No, there isn't a smarter way in the common case. This is the way to do it. Perhaps you wouldYou will have to set type="button" ondo the button.following

  • set type="button" on the button.
  • set the action on the <a4j:support> rather than on the button istself.

In this particular case (a button) a shortcut will be:

<a4j:commandButton value="Submit" action="#{actions.submitToDB}" reRender="Button0" /> 

If using JSF 2.0, you can do it with <f:ajax event="onclick" render="Button0" />, which has exactly the same semantics.

No, there isn't a smarter way in the common case. This is the way to do it. Perhaps you would have to set type="button" on the button. In this particular case (a button) a shortcut will be:

<a4j:commandButton value="Submit" action="#{actions.submitToDB}" reRender="Button0" /> 

If using JSF 2.0, you can do it with <f:ajax event="onclick" render="Button0" />, which has exactly the same semantics.

No, there isn't a smarter way in the common case. This is the way to do it. You will have to do the following

  • set type="button" on the button.
  • set the action on the <a4j:support> rather than on the button istself.

In this particular case (a button) a shortcut will be:

<a4j:commandButton value="Submit" action="#{actions.submitToDB}" reRender="Button0" /> 
Source Link
Bozho
  • 599k
  • 147
  • 1.1k
  • 1.2k

No, there isn't a smarter way in the common case. This is the way to do it. Perhaps you would have to set type="button" on the button. In this particular case (a button) a shortcut will be:

<a4j:commandButton value="Submit" action="#{actions.submitToDB}" reRender="Button0" /> 

If using JSF 2.0, you can do it with <f:ajax event="onclick" render="Button0" />, which has exactly the same semantics.