Proper way to use multiple pop-up dialogs

I've got an application that uses a series of pop-ups to process user information.
A general flow of information is
User clicks a button
->dialog launches asking for confirmation to start process
Dialog returns and system processes request (in a returnListener)
->System launches new dialog, using AdfFacesContext.launchDialog, asking user to confirm changes to be made
Dialog returns and systems processes changes.
What I've noticed is that if I interact with the components in the second dialog 'too much' then the second return listener is not being called.
So, my question is, am I using dialogs properly? Should I try to use actions and navigation links instead of opening and closing dialogs?

Sounds reasonable.
In that vein, is there a way to create 're-usable' dialogs? Ideally I don't want to have to write tons of little dialog that do nothing more interesting than asking "Are you sure?" with the actions set differently.
At first glance, I'm almost tempted to pack a method binding into the process scope and have the dialog check if it exists, and if it does, execute that. But that seems somewhat, inelegant.
Any thoughts?

Similar Messages

  • Need to update list page using a pop up dialog page (Please its URGENT)

    Hi,
    I have master page with list of employees. Using a pop up dialog I'am trying to insert a new record but the record is not appearing in the list.
    Possible solutions tried but no hope:
    1. Using managed bean I tried with refreshing (re-execute) the iterator and binding container of employee list page.
    2. Used a navigation from popup dialog to list page along with returnActionListener associated on button.
    Thanks in advance,
    Syed Fazal

    Hi Syed,
    you may try in your return event
    FacesContext context = FacesContext.getCurrentInstance();
    NavigationHandler nh = context.getApplication().getNavigationHandler();
    nh.handleNavigation(context, null, "whateveryournavigationruleis");

  • What is the proper way to use Siri dictation with punctuation, on iPad with Retina Display?

    What is the proper way to use Siri dictation with punctuation, on iPad with Retina Display?
    Thank you!

    From the iPad User Manual:
    Also:
    no space on ... no space off—to run a series of words together
    smiley—to insert :-)
    frowny—to insert :-(
    winky—to insert ;-)

  • What is the proper way to use the write method?

    What is the proper way to use the OutputStreams write method? I know the flush() method is automatically called after the write but i cant seem to get any output
    to a file. The char array contains characters and upon completion of the for loop the contents of the array is printed out, so there is actually data in the array. But write dosnt seem to do squat no matter what i seem to do. Any suggestions?
    import java.io.*;
    public class X{
    public static void main(String[] args){
    try{      
    FileReader fis = new FileReader("C:\\Java\\Test.txt"); //read chars
    FileWriter fw = new FileWriter("C:\\Java\\Test1.txt"); //read chars
    File f = new File("C:\\Java\\Test.txt");
    char[] charsRead = new char[(int)f.length()];
    while(true){
    int i = fis.read(charsRead);
    if(i == -1) break;
    // fw.write(charsRead); this wont work
    // but there is infact chars in the char Array?
    for(int i = 0; i < charsRead.length -1 ; ++i){
    System.out.print(charRead);
    }catch(Exception e){System.err.println(e);}

    Sorry to have to tell you this guys but all of the above are broken.
    First of all... you should all take a good look at what the read() method actually does.
    http://java.sun.com/j2se/1.3/docs/api/java/io/InputStream.html#read(byte[], int, int)
    Pay special attension to this paragraph:
    Reads up to len[i] bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len[i] bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.
    In other words... when you use read() and you request say 1024 bytes, you are not guaranteed to get that many bytes. You may get less. You may even get none at all.
    Supposing you want to read length bytes from a stream into a byte array, here is how you do it.int bytesRead = 0;
    int readLast = 0;
    byte[] array = new byte[length];
    while(readLast != -1 && bytesRead < length){
      readLast = inputStream.read(array, bytesRead, length - bytesRead);
      if(readLast != -1){
        bytesRead += readLast;
    }And then the matter of write()...
    http://java.sun.com/j2se/1.3/docs/api/java/io/OutputStream.html#write(byte[])
    write(byte[] b) will always attempt to write b.length bytes, no matter how many bytes you actually filled it with. All you C/C++ converts... forget all about null terminated arrays. That doesn't exist here. Even if you only read 2 bytes into a 1024 byte array, write() will output 1024 bytes if you pass that array to it.
    You need to keep track of how many bytes you actually filled the array with and if that number is less than the size of the array you'll need pass this as an argument.
    I'll make another post about this... once and for all.
    /Michael

  • Is it a proper way to use queue for consumer/producer model?

    Hi all,
      I am following the example of consumer/producer model to use the queue to synchronize the following process: The producer is a loop to produce N numbers, I will put every generated number into an array and after every 5 numbers generated, I put the array into the queue and pass it to the consumer. I have to wait the consumer use up the data and it will then remove the element from queue so the producer will get a chance to produce another 5 numbers. Since I set the maximum size of the queue to be ONE, I expect the producer and consumer take turns to produce / consume all five numbers and pass the chance to the other. Here is my code
    when the case box is false, the code will be
    For the first 5 numbers, the produce will generate every thing right and put that into the array, and it will pass the array to the quere so the consumer will get a chance to loop over the array. I except the procude's loop will continue only when the queue is available (i.e. all elements are removed), but it seems that once the consumer start the loop the produce 's loop will continue (so the indicator x+1 and x+2 will show numbers changed). But it is not what I want, I know there must be something wrong but I can't tell what is it.
    Solved!
    Go to Solution.

    dragondriver wrote:
    As you said in 1, the sequency structure enforcing the execution order, that's why I put it there, in this example, to put the issue simple, I replace the complete code with number increase, in the real case, the first +1 and +2 must be executed in that order.
    Mikeporter mentioned:
    1. Get rid of all the sequence structures. None of them are doing anything but enforcing an execution order that would be the same without them.
    So even if you remove the sequence structure, there will be a fixed & defined execution order and that is because LabVIEW follows DATA FLOW MODEL.
    Data Flow Model (specifically in context of LabVIEW): A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram (Click here for reference).
    Now in your code, just removing the sequence structure will not make sure that the execution order will gonna remain same but you need to do few very small modifications (like pass the error wire through For loop, before it goes to 'Dequeue Element' node).
    Coming to the main topic: is it a proper way to use queue for consumer/producer model?
    The model you're using (and calling it as consumer/producer model) is way too deviated from the original consumer/producer model model.
    dragondriver wrote:
    For the second one, yes, it is my fault to remove that while. I actually start from the example of Producer/Consumer design pattern template, but I didn't pay attention to the while loop in the consumer part.
    While loops (both Producer & Consumer) are the essential part of this architecture and can't be removed. You may want to start your code again using standard template.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • What's the proper way to use reusingView in a custom UIPickerView

    Does anyone have an example of the proper way to use the resuingView parameter when implementing pickerView:viewForRow:forComponent:reusingView: in a UIPickerViewDelegate?
    The documentation states that reusingView is "A view object that was previously used for this row, but is now hidden and cached by the picker view."
    and: "If the previously used view (the view parameter) is adequate, return that. If you return a different view, the previously used view is released. The picker view centers the returned view in the rectangle for row."
    I need to create UILabel views so I can right justify things, and I have that working by always returning my copy of the view, but it seems like things could be made more efficient by returning the view passed to me if it's "adequate". So, how do I tell if the view is adequate?
    I've tried something like this:
    // check to see if the view we're given is a UILabel and return that view
    if ([view isMemberOfClass:[UILabel class]])
    v = (UILabel *)view;
    return v;
    else
    ... return a UILabel instance for this row ...
    But the view I'm being passed is never a UILabel instance. That or I'm not using isMemberOfClass correctly.
    Thoughts anyone?

    - (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view {
    iPregnancyAppDelegate *iPregAppDelegate = [[UIApplication sharedApplication] delegate];
    UILabel *pickerLabel = (UILabel *)view;
    // Reuse the label if possible, otherwise create and configure a new one
    if ((pickerLabel == nil) || ([pickerLabel class] != [UILabel class])) { //newlabel
    CGRect frame = CGRectMake(0.0, 0.0, 270, 32.0);
    pickerLabel = [[[UILabel alloc] initWithFrame:frame] autorelease];
    pickerLabel.textAlignment = UITextAlignmentLeft;
    pickerLabel.backgroundColor = [UIColor clearColor];
    pickerLabel.text = @"Put YOUR text here!";
    return pickerLabel;
    Message was edited by: gpmoore

  • Proper way to use data throughout a class?

    I know global variables aren't a thing in c#, as that goes against the rules.
    So I have a couple of functions and subroutines (pardon my vocabulary if it isn't canon). I use a simple array to transfer data back and forth. Is this the proper way to do this? As in most efficient, readable, and expandable?
    class Program
    static void Main()
    bool[] MotorPosition = new bool[4];
    MotorPosition[0] = true;
    MotorPosition[1] = false;
    MotorPosition[2] = true;
    MotorPosition[3] = false;
    while (true)
    MotorPosition = UpdateMotorPosition(MotorPosition);
    DisplayMotorPosition(MotorPosition);
    System.Threading.Thread.Sleep(64);
    static bool[] UpdateMotorPosition(bool[] MotorPosition)
    bool[] NewMotorPosition = new bool[4];
    for (int x = 0; x < 4; x = x + 1)
    NewMotorPosition[x] = !MotorPosition[x];
    return NewMotorPosition;
    static void DisplayMotorPosition(bool[] MotorPosition)
    string CombinedDisplay = null;
    for (int x = 0; x < 4; x = x + 1)
    CombinedDisplay = CombinedDisplay + MotorPosition[x].ToString();
    Console.WriteLine(CombinedDisplay);
    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

    Absolutely amazing! I learn something new every day. I wonder when programming will cease to amaze me.
    using your example jdweng, I was able to add a counter to your code and move the motor position to the test class; as well as add another motor by instancing the class again!
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    namespace ConsoleApplication1
    class Program
    static int Main(string[] args)
    Test test = new Test();
    test.Initialize(); //Assigns initial value to MotorPosition
    Test test2 = new Test();
    test2.Initialize(); //Assigns initial value to MotorPosition
    while (true)
    if (test.MotorUpdateCount == 40) Console.ReadLine(); //pauses at 40 to make it easy to see output upto that point
    if (test.MotorUpdateCount > 1000) return -1; //ends program
    test.MotorPosition = test.UpdateMotorPosition(test.MotorPosition); //updates motor 1 position
    test.DisplayMotorPosition(test.MotorPosition); //displays motor 1 position
    if (test.MotorUpdateCount > 20) //at count 20, engages motor 2
    test2.MotorPosition = test2.UpdateMotorPosition(test2.MotorPosition); //updates motor 2 position
    test2.DisplayMotorPosition(test2.MotorPosition); //displays motor 2 position
    System.Threading.Thread.Sleep(128); //slows the loop down to reasonable speed
    public class Test
    public int MotorUpdateCount = 0;
    public bool[] MotorPosition = new bool[4];
    public void Initialize()
    MotorPosition[0] = true;
    MotorPosition[1] = false;
    MotorPosition[2] = true;
    MotorPosition[3] = false;
    public bool[] UpdateMotorPosition(bool[] MotorPosition)
    bool[] NewMotorPosition = new bool[4];
    for (int x = 0; x < 4; x = x + 1)
    NewMotorPosition[x] = !MotorPosition[x];
    MotorUpdateCount = MotorUpdateCount + 1;
    return NewMotorPosition;
    public void DisplayMotorPosition(bool[] MotorPosition)
    string CombinedDisplay = null;
    for (int x = 0; x < 4; x = x + 1)
    CombinedDisplay = CombinedDisplay + MotorPosition[x].ToString();
    Console.WriteLine(CombinedDisplay);
    Console.WriteLine(MotorUpdateCount.ToString());
    Mediocre Access 2010 | (Baby) Beginner C Sharp | OK at Active Directory (2012) | Fragmented understanding of DNS/DHCP | Laughable experience with Group Policy | Expert question asker on MSDN Forums

  • Best or proper way to Use a Mophie Helium with iPhone 5s

    What would be the recommended way to use a Mophie Helium with a iPhone 5s?  Use the phone battery as primary and recharge from the Mophie as needed or use the Mophie battery first and then the iPhone? The later is what Mophie shows in their ops manual but I would like to hear Apples opinion on the issue.

    Based on this http://www.mophie.com/shop/iphone-5/juice-pack-helium-iphone-5, it would not appear that using the Morphie first is what is recomended. since it is essentailly a charging mechaism, frankly, that wouldn't make any sense.
    BTW: this is a user-to-user forum, so Apple will not offer an opinion here.

  • Is there a way to use multiple ipods on one computer without them overwriting each other?

    i have in total 3 ipods.
    One is an the square ipod. (the one with the moving screen on the right)
    the second is an ipod shuffle (the touch screen one)
    and i just got an ipod touch. (the colorful one)
    i still use all my ipods but on my first two i use the same itunes for it. so for example, i use one ipod to download all of my music library.
    then i connect my second ipod only to download selected songs.
    but now that i have an ipod touch, one of the ipods is going to be overwritten.
    So is there a way for that not to happen?
    having a flash drive for a seperate itunes for one ipod is to much of a hassle.
    but if anyone has the answers, i would greatly appriaciate it.
    thanks! : D

    Why do you think that one will be over written?
    You can sync as many ipods/iphones/ipads as you like to one computer.  Each is different and will only sync what you select.

  • Is there a way to use multiple canvas tags with the ToolKit for CreateJS for Flash in one HTML5 doc?

    Hey everyone, I was wondering if someone could help point me in the right direction for solving this. I have created 5 short animations using Flash and when I published each ".fla " (with Toolkit for CreateJS extension) I get 5 different html5 files with their own respective javascripts. Is there a way to get all those canvas tags in one html5 file and still have it work. I'd love a hint on where to begin so I can begin researching the solution.
    Thanks!
    -DJ

    Why do you think that one will be over written?
    You can sync as many ipods/iphones/ipads as you like to one computer.  Each is different and will only sync what you select.

  • Best way to use multiple external harddrives?

    Hey everyone
    I want to ideally have a setup where I have 3-4 Harddrives attached to my macbook (1 firewire powered, the rest independently powered), but am nervous about power distribution and data transfer rates. Is there any sort of hub or external box that can help manage these drives better? I've heard that daisy chaining multiple drives is not a good idea.
    Thanks

    Well daisy chain firewire device is a lot more easier than back in the day you have to configure terminator and tiny jumper set up on each HD for specific SCSI ID.
    So far I have daisy chained 3 device using fire wire :
    macbook - external Lacie HD - external lightscribe DL dvd burner - Sony TRV camcorder, and no problem until now.
    You can give firewire Hub a shot, but make sure it has its own power adapter for the power provided from macbook firewire port might not enough for fire that hub up.
    Here is one of the unique hub that I wish to have if it comes in black like my macbook.:
    http://www.lacie.com/products/product.htm?pid=10854
    Good Luck.

  • Proper way to use JMenuBar?

    I want to use a JMenuBar to produce some "redundant" functionality into my program. Say, for instance, the user wants to print something. I can have a print button on screen an a print option in the file menu. I can have both objects call a static printRecords() menu in one of my other classes. This part isn't a problem.
    The problem I think I'm going to run into is JMenu items that try to reproduce the functionality of actions in classes that it doesn't have access to. Say, for instance, I have a JPanel full of JTextFields and it also has a button that says "Clear Fields." Currently, my design has the implementation for the button in the JPanel class. This works except that the JMenu does not have access to this method.
    What's the best approach to reducing the amount of code that I have to reuse without passing information all over the place?

    Assuming you still care about this issue (or that others do), I know I'm coming back long time after...
    The only class that I extend is the JPanel class because it makes it easier
    to create and manage the complex layout that I need.
    Are you suggesting there is a better way (...) without extending JPanel?Yes.
    Write business logic in non-graphic classes, write interaction logic into dedicated classes (depending on swing API but not extending any JComponent), and write the building and wiring of graphical components to the intercation classes in a dedicated composer class (you're right I made up this term, I don't know if a generally accepted one exists).
    I looked up the term "composer class" but couldn't find anything.
    Can you go into more detail about this term?Something along the line of:// Simple class, one text field, one clear button
    public class MyGUIComposer
      public void JFrame composeScreen()
      JFrame theFrame = new JFrame();
      JPanel mainPanel = new JPanel();
      mainPanel.setLayout(...)
      JPanel subPanel1 = new JPanel();
      final JTestField myTextField = new JTextField(...);
      Action buttonLogic = new ClearAction(myTextField);
      JButton clearButton = new JButton(buttonLogic);
    }With ClearAction.actionperformed() methods being as simple as the TextField.cleartext();
    If the configuration of the screen is more complex (e.g. lots of text fields, other widgets,...), you can use a Mediator class (this one is a known and documented design pattern). See below.
    Also, I figured I could use the same Action for the different components
    but (...)
    how would a "Clear" Action have a handle to the fields it needs to clear?It should have a handle to a Mediator object: this latter has already references to all widgets. And the clear action does not even bother clearing all buttons but just ask the Mediator to do so.
    The Mediator can itself be the composer, in this case the creation of the action becomes:
           Action buttonLogic = new ClearAction(this); // this being the mediator instanceand ClearAction.actionPerformed() becomes as simple as
    public void actionPerformed() { theMediator.clearAllFields();}And of course you write the mediator class with the method clearAllFields() which iterates through all relevant fields and clears them.
    At first it looks much more convoluted, but the Mediator really comes handy when you add features to your UI : more widgets, more interactions, more conditions (e.g. clear button clears all fields and adds a message in the status bar, and greys out the submit button only if the "Enable empty names" option is false.
    I find it better than having a JPanel subclass having to pass around the value of all options.

  • Proper way to use a compressor

    I have a bass line that is sitting well in the mix when I put the channel fader to -12 db.
    But there are ocassional peaks that take the signal into Red.
    So before I apply compression to this track should I first put the channel fader down until the signal stops going in the red? Or do I leave the channel fader as it is and then go ahead and mess with the compressor?

    In this case, the answer is clear. Adjust your levels first.
    If you try to fix this using only compression, it will totally flatten anything above the threshold point. That will cause a substantial loss of dynamic range. Far better to maintain that dynamic range since that will make the line more vibrant and musical.
    So, take the level down a touch and apply a compressor. Keep listening and adjusting. By the way, you might like to try using Channel EQ in the path before a compressor. That way, you can take the level down of certain frequencies and still keep the ones that you need in your mix.
    Just to be quite clear, though, the fader operates after all the inserts have done their stuff. When you move the fader down, you're not taking down the signal and then applying compression. What you're doing is taking the hot spots out of the signal with the compressor and then using the fader to mix the treated signal.
    If you really want to take the signal down before applying compressor, use channel EQ (which will, of course change the flavour of your sound) or use the Gain insert (found under Insert > Utility) before the Compressor insert.
    Pete

  • Is there a way to use multiple query is Oracle apps or XMPL Desktop?

    I know that you can use the concatenate sql data source option in the Enterprise. But what about the Oracle apps or the XMLP Desktop?

    You can use Data Templates. Please check UserGuide for detais.

  • Easiest way to use multiple computers for render/export?

    So, for tools like Vegas, Premiere etc you can have a render far, that would help you render/export clips potentially cutting down render time from 40+ hours to mere hour or two.
    I have a couple of macs available on the network that i would like to try do the same with, at least cut it down in half or 1/3 of what it is taking now.
    What is the best/easiest way to go about doing this?
    Thanks

    Hi(Bonjour)!
    You can do that with Final Cut Studio with Compressor and by build a quick clusters render farm. Ask on Compressor forum.
    Michel Boissonneault

Maybe you are looking for

  • Unsolicited ad inserted behind main browser window (pop-under)

    Unsolicited ad inserted behind main browser window (pop-under) every time TheBlaze.com is visited. ENVIRONMENT Win7 SP1 Firefox 34.0 (Pop-up windows are blocked) DESCRIPTION OF PROBLEM Once the requested home page, from theBlaze.com server, is receiv

  • Hi guys urgent

    Hi, I am using SO_NEW_DOCUMENT_SEND_API1 for sending mail notifications    l_wa_recieve-receiver = '[email protected]'.    l_wa_recieve-rec_type = 'U'.    l_wa_recieve-com_type  = 'SOTR'.    APPEND l_wa_recieve TO l_it_recieve.    clear l_wa_recieve.

  • When I download a pdf file to iBooks on my iPad should it also show up on my iPhone?

    My PDF in files  iBooks are not syncing between my iPad and iPhone.  Should they be?  If it is possible, how can I make mine sync.

  • SharePoint 2010 - Document Management and Security Setup Recommendations

    Greetings All! I have a requirement where the business would like to manage various files.  The setup looks like this: User1 ----------->User2 ----------->User3 -------------------->User4 -------------------->User5 Where User1 has permission to see e

  • Problem with java.tuil.Date.

    Hi all I am in strange problem. I want to convert java.util.Date object to this format : MM/dd/yyyy but the condition is i should not convert it to String type or any other type. My method should return Date object. Any body has any idea. Thanx in ad