Primefaces switches between multiple dialogs -


I am using Prime 4.0 I have three communication components (Dialogue 1, Dialogue 2, Dialogue 3) and three The button is a page with components (button 1, button2, button3), click on dialog 1 will be shown from button 1, dialog 2 will be shown by click button 2, and dialog 3 will be shown with click button 3. User can be the same In time, these three dialogs can open, this means that user users will be able to access these three conversations. Can do some work with all the show, like:

Enter the image details here

When the user does some work in a dialog, then I need to change Bean to change some values ​​and update some components for the first time, and when the user has a button Clicking displays a dialog, then there is no problem and when the user clicks on the button , But when the user changes the active dialogue from dialogs and click dialogs shown to three:

How can I change active dialogue dialog to 'Dialog 2' from e-dialog?

Here is my XML code:

  & lt; P: Command links onclic = "Dialog 1" Show () "update =" outputText "actionListener =" # {testBean.changeActiveDialog ('dialog1')} "& gt; Button 1  















Show () "Update =" Output Text "Action Listener =" # {testBean.changeActiveDialog ('Dialog2')} & gt; Button 2 & lt; / p: CommandLinks> & lt; br / & gt; Lt; p: commandLink onclick = "dialog3.show ()" update = "outputText" exemplifier = "# {testBean.changeActiveDialog ('dialog3')}" button3
/>
gt; Dialog1 & lt; / p: dialog & gt; ; & Lt; p: dialog id = "dialog2" header = "dialog 2" resizable = "true" dynamic = "wrong" modal = "false" draggable = "true" widgetVar = "dialog2" minimizable = "true" maximizable = "True"> gt; Dialog2 & lt; / p: dialog & gt; & lt; p: dialog id = "dialog3" header = "dialog 3" resizable = "true" dynamic = "wrong" modal = "false" draggable = "True" widgetVar = "dialog3" minimizable = "true" maximizable = "true" & gt; Dialog3 & lt; / P: Dialog & gt;

and my thoughts beam:

  extends the public square Testbenbabybine {Private string active dialogue; Public Zero Change Active Dialog (String Dialog) {activeDialog = dialog; } Public string getActiveDialog () {activeDialog return; } Public Zero Set Active Dialog (string ActiveDialog) {this.activeDialog = activeDialog; }}  

I googled it but I did not find a solution to my problem. Any suggestions would be appreciated, thanks in advance.

While opening several dialogs at the same time is a good idea, but you get what you want To do this you can always use javascript.

When the dialog is clicked or pulled, the Zee-index will change, making it above "active" / other elements. You can set up two main events to hear the case. : click and dragstop then send a dialog code to the bean managed by remoteCommand , here's an example:

Javascript

  $ ('.ui-dialog)') .on ('clickstop Click 'function' (active) Ialog ([{name: 'activeDialog', Value: $ (this) .attr ('id')}]); // remotecommand;);  

XHTML

A small example, and a work example for example.

Note: You must first open the dialog for the caretaker.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -