jsf


p:commandButton doesn't call action


I have two dialogs, each of which has a button. If I place own form inside each dialog, then both buttons do not call their listener-methods, if I remove the forms inside the dialogs, only the button from the first dialog calls the listener-method.
<h:form id="mainForm">
<p:commandLink oncomplete="PF('editPersonalDataDialog').show()" title="Edit data" styleClass="fa fa-edit param-item"/>
<p:commandLink oncomplete="PF('editPasswordDialog').show()" title="Edit password" styleClass="fa fa-edit param-item"/>
</h:form>
<p:dialog header="Edit personal data" widgetVar="editPersonalDataDialog" resizable="false" position="center">
<h:form>
<p:commandButton id="saveData" value="Save" actionListener="#{profileBean.editPersonalData}" icon="fa fa-save" styleClass="btn"/>
</h:form>
</p:dialog>
<p:dialog header="Edit password" widgetVar="editPasswordDialog" resizable="false" position="center">
<h:form>
<p:commandButton id="savePassword" value="Save" actionListener="#{profileBean.changePassword}" icon="fa fa-save" styleClass="btn"/>
</h:form>
</p:dialog>
Try putting the dialog forms outside the dialog Like:
<h:form id="form1">
<p:dialog ...>
<h:outputPanel id="panel1">
.... your code...
</h:outputPanel>
</p:dialog>
</h:form>
then call it like this; use onclick and update in your commandLink...
<h:form id="mainForm">
<p:commandLink onclick="PF('editPersonalDataDialog').show()" title="Edit data" styleClass="fa fa-edit param-item" update="form1:panel1"/>
<p:commandLink onclick="PF('editPasswordDialog').show()" title="Edit password" styleClass="fa fa-edit param-item" update="form2:panel2"/>
</h:form>

Related Links

How do I force a Primefaces calendar to update after a change Ajax event validates the new value?
How to open multiple url/link in separate windows at once using JSF?
primefaces schedule repeat day with different values
<p:commandButton/> not doing anything [duplicate]
How i can save inputtext values of a List?
Check or uncheck selectBooleanCheckBox by checking another
Primefaces data exporter not working [duplicate]
JSF 1.2 table value as id for a4j command button
How to escape a String in EL inside a ternary operator? [duplicate]
Disabled Attribute is not rendered with empty EL-String
Mojarra 2.3.0-m06, #PersistenceContext field is null
jsf 2.2: manage creation of new pages at runtime [duplicate]
Primefaces blockUi trigger by boolean value
Why is EL processed in comments? [duplicate]
CheckboxMenu with a pair of selectItems instead one [duplicate]
Wildfly 8.2 JSF (Primefaces) JAAS security principal loading order

Categories

HOME
mql4
filterrific
wms
angular2-directives
concourse
zend-framework2
urlencode
desktop
height
criteria
flexbox
wicket
nixos
squarespace
aptana
ng-show
tree-traversal
primes
boolean-expression
apply
os161
remove-method
tflearn
scalajs-react
shopping-cart
data-cleansing
hanami
blackboard
vegan
lmdb
modelandview
npm-shrinkwrap
service-locator
jquery-multidatespicker
nashorn
pdftk
crop
encapsulation
context-free-language
aqgridview
walmart-electrode
ti-basic
pinvoke
tiddlywiki
slot
openh264
teiid
iostat
uistackview
activeweb
ruby-2.0
qregexp
multifile-uploader
amf
listadapter
shipitjs
nssplitview
kendo-combobox
dbscan
multilingual-app-toolkit
squirrel
asp.net-mvc-partialview
twgl.js
mfc-feature-pack
getrusage
eyeql
unity5.3
mysqldumpslow
kendo-menu
rad
retro-computing
magento-1.12
low-level
word-2013
ctrlp
scala-2.11
livechat
system.web
adaptive-compression
korma
bsod
jquery-tabs
driver-signing
sql-server-2012-web
nuspec
resgen
magickwand
fluidsynth
vt100
lync-server-2010
feof
icefaces-3
shim
law-of-demeter
emacs23
selectmanycheckbox
scraperwiki
gethashcode
carbide
task-management
jquery-ui-button
webrat
revision

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App