• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Problem inside a richModalPanel

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, i have this modal panel which is dislayed to confirm the save or the delete action:

<rich:modalPanel id="confirmPopup" width="350" height="100"
<div class="actionButtons">
<a4j:commandButton event="onclick" action="#{accountManager.save}" oncomplete="#{rich:component('confirmPopup')}.hide()" value="#{messages['fr.aptus.siaptus.user.save']}" />
<h:commandButton value="annuler" id="fermer" onclick="#{rich:component('confirmPopup')}.hide();return false;"></h:commandButton></div></center> </rich:modalPanel>

My first problem is that the action will not be triggered if i replace <a4j:commandButton by h:commandbutton, why?
I do not need an ajax action because i want to refresh the page so my source code is not logic.

The second problem is that i want to pass a parameter to the rich:modalPanel, I want this component rendered if a paramater is well passed to the rich:modalPanel.
<a4j:commandButton event="onclick" action="#{accountManager.save}" oncomplete="#{rich:component('confirmPopup')}.hide()" value="#{messages['fr.aptus.siaptus.user.save']}" />
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you put your commandButton within a h:form?
 
Jaaouane Aymen
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, this is my source code

<rich:modalPanel id="confirmPopup" width="350" height="100">
<f:facet name="header">
<h:panelGroup>
<h: outputText value="Modal Panel">< /h:outputText>
</h:panelGroup>
</f:facet>
<f:facet name="controls">
< h:panelGroup>
< h:graphicImage value="/img/false.png" styleClass="hidelink"
id="hidelink" />
<rich:componentControl for="confirmPopup" attachTo="hidelink"
operation="hide" event="onclick" />
</h:panelGroup>
</f:facet>
<center><h:form>
<div class="actionButtons"><h:commandButton event="onclick"
action="#{accountManager.delete}"
rendered="#{event.parameters.action=='delete'}"
oncomplete="#{rich:component('confirmPopup')}.hide()"
value="#{messages['fr.aptus.siaptus.user.delete']}" /> <h:commandButton
value="#{messages['fr.aptus.siaptus.user.cancel']}"
onclick="#{rich:component('confirmPopup')}.hide();return false;">
</h:commandButton></div>
</h:form></center>
</rich:modalPanel>

I resolved the problem of submit but i don't for the problem of parameter, rendered="#{event.parameters.action=='delete'}" does not work
otherwise when i debugged the code by onshow="alert(event.parameters.action)" in the rich:modalpanel, the String delete is well dispalyed
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic