2 buttons with 2 different results

I have a page that is going to ask a user to answer 'Yes" or 'No' to a question. If they click the 'Yes' button, they will go to a verification page. If they click the 'No' button, I want to display the same page, but with different text and a 'Try Again' button. how can I get these 2 buttons to work in jsf? Code examples would be very much appreciated.
Thanks

Here is my button code on my page:
<hx:commandExButton type="submit" value="Yes" styleClass="button" id="btnYes" action="#{Prescription_check.submit}" ></hx:commandExButton>
<hx:commandExButton type="submit" value="No" styleClass="button" id="btnNo" action="#{Prescription_check.submit}"></hx:commandExButton>
<hx:commandExButton type="submit" value="Try Again" styleClass="button" id="btnTryAgain" action="#{Prescription_check.submit}"></hx:commandExButton>When I click any of these buttons, I get a null pointer exception???? Here is the submit method in my backing bean:
public String submit() {
          FacesContext facescontext = FacesContext.getCurrentInstance();
          String returnValue = null;
          if (btnComponent.getId() == "btnYes") {
               ApplicationParameter.getLogger().debug("Yes button clicked");
               returnValue = ApplicationParameter.NAVIGATION_PRESCRIPTION_CHECK_YES;
               btnComponent.setRendered(false);
          if (btnComponent.getId() == "btnNo") {
               ApplicationParameter.getLogger().debug("No button clicked");
               returnValue = ApplicationParameter.NAVIGATION_PRESCRIPTION_CHECK_NO;
               btnComponent.setRendered(false);
          if (btnComponent.getId() == "btnTryAgain") {
               ApplicationParameter.getLogger().debug("Try Again button clicked");
               returnValue = ApplicationParameter.NAVIGATION_PRESCRIPTION_CHECK_NO;
               btnComponent.setRendered(false);
          return returnValue;
     }

Similar Messages

  • Siri comes up with different results than google maps

    I was doing a search for Food Lion through Siri but she wasn't finding the one right around the corner from my house. I went into maps and it found it no problem. Why do they come up with different results? I thought Siri searched google maps.

    Because Apple maps is NOT google maps.

  • I just installed Lightroom 5. It will not open. I have clicked on the desktop icon as well as the start menu button with no results. What am I missing?

    I just installed Lightroom 5. It will not open. I have clicked on the desktop icon as well as the start menu button with no results. What am I missing?

    I had the same problem, and I believe it is caused by having the Creative Cloud application doing the updating of LR.  I "fixed" the problem by:
    1. Uninstall Lightroom
    2. Download the stand-alone LR 5.6 installer from Product updates
    3. Install LR 5.6 using the stand-alone installer, instead of using the Creative Cloud application.

  • Help!! Buttons with different actions on IPAD

    Why is in Ipad a button with different actions does not respond to these actions at the same time, but one at a time? In Android works fine!!
    What is happening is that in ipad I have to touch more than once on the button to go to the different actions that this button has!
    Help...

    Hi Tomas
    thanks for the quick response.  I think mine Adobe Content Viewer is the last update, from February 21, so the problem is not due to this.
    II'll explain the situation better, i have several identical situations. For example, I have a square that hides an image and I want that when you tap this square this image appears behind him, then i did the following: I selected at first the square and the image and transformed a multi- State Object, in which the first state is the box (State1) and the second is the image (state 2) then made a transparent button on top of this square and it gave the following actions - on release go to state 2 (image) here everything goes well, the problem is that as I have more buttons / squares that do the same and show different images, that when I turned the other one the next hide her image. So all the buttons in addition to the state that shows the picture / object matching (state 2) - i have also- go to state (name of the object: state 1) causes other squares hide their files, as they get the state 1. Here lies the problem, in ipad these actions do not react automatically but in different touches, it seems that it reads a touch for action and not all at once.
    I apologize for my English but I'm Portuguese, I hope you can understand everything explained.
    Marta

  • Rollover buttons with unexpected results

    Hello Folks,
    I'm hoping someone can point me in the right direction with a
    problem I'm having with rollover buttons.
    I've used Fireworks to create five rollover buttons with
    round corners onto a single transparent canvas. I've exported the
    images as gif and then pasted the relevant code into Dreamweaver.
    I'm getting two results that are puzzling me.
    1. The images are not being displayed with transparent
    backgrounds, as you can see at this url:
    http://www.magicalwonders.com/rollover/index2.html
    The corners are showing which is not what I want. I notice that
    there are four types of gif than can be exported when making
    rollovers. So far, I've tried using Gif adaptive 256 and Gif
    Websnap 256 with no success.
    2. The second puzzle is that including the javascript code
    seems to have increased the top margin for the background of the
    page. If you compare the page before any code is added, you can see
    the difference:
    http://www.magicalwonders.com/rollover/index.html
    Hope someone can advise
    Many thanks,
    Myles

    Myles,
    Try exporting your menu images as png 8 files with index
    transparency.
    alex
    Magicalwonders wrote:
    > Just a quick update. I've corrected all the errors in
    the code and that has
    > fixed the margin problem.
    >
    http://www.magicalwonders.com/rollover/index3.html
    >
    > So now I just have the issue of rollover buttons with
    round corners. Not sure
    > what I'm doing wrong?
    >
    > Hope someone can help.
    >
    > Myles
    >

  • Array of buttons with different boolean text ?

    I'm looking for a method of displaying a 2D button matrix with
    different boolean text on each button. It seems an array of booleans
    must all have the same text. Perhaps a cluster could be used, but the
    array makes button alignment easy and easy to determine which had been
    pressed (radiobutton style with only one button true at a time).
    Steve

    On 6 Dec 2002 05:31:21 -0800, [email protected] (humenik) wrote:
    >[email protected] (Steve Parus) wrote in message news:<[email protected]>...
    >> I'm looking for a method of displaying a 2D button matrix with
    >> different boolean text on each button. It seems an array of booleans
    >> must all have the same text. Perhaps a cluster could be used, but the
    >> array makes button alignment easy and easy to determine which had been
    >> pressed (radiobutton style with only one button true at a time).
    >It's easy to make them individuals in a cluster, and on the block
    >diagram use Cluster To Array to get it into array form for
    >manipulation. This can be superior to an array of buttons, not merely
    >because the buttons can thereby have differing colors and text. An
    >array of buttons cannot have the buttons Latched When Pressed; when in
    >a cluster, however, the latching action is available.
    When might that Latched When Pressed behavior be useful ? Using a 2D
    array of buttons (not cluster), in LV 6.1, a Value Changed event for
    the array can be used as you mention below to XOR the event's OldValue
    and NewValue and wire that to a local variable copy of the array.
    This easily gives a radio button effect for the entire 2D button
    matrix. The array control automatcially arranges the visual
    alignment of the buttons.
    For the cluster method, I'd like to programmatically change which
    button is true. All the approaches I come up with end up using
    Array-to-Cluster which then requires the cluster size to be specified.
    I may end up wanting to programmatically vary the number of buttons in
    both dimensions and hence the cluster size. LV's Align Objects and
    Distribue Objects ends up making the button visual alignment not
    difficult (for a 12 x 8 matrix).
    >Try this: take a cluster of four PB's (latched when pressed) put
    >inside a while loop. Initialize a boolean array of 4 to FALSE outside
    >the while loop, and attach it to a shift register input on the left
    >side of loop. Inside the loop, convert your cluster to an array. XOR
    >the shift register with this array from the buttons, and wire this to
    >the output shift register and to an indicator array. Set the boolean
    >to the loop so it will run free and start it up; on the control panel,
    >click on the PB's and you will see the outputs toggle.
    >
    >Greg

  • Issues with iCloud synchronisation and contacts over two or more devices.  iTouch and iPad2 sync with different results from iMac.  Thoughts?

    Has any one experienced issues with iCloud synchronisation and contacts over two or more devices? The primary machine is an iMac running Lion. Address Book was created from vcf file (backup of address book prior to moving to iCloud). iTouch replicates Contacts just fine and matches the Address Book on the iMac. The iPad 2 does not showing only 123 contacts where there should be 200. I have turned off iCloud on both devices thus erasing the iCloud content of both devices and staring from scratch with both devices with identical results. Even turned off iCloud on the iMac and erased the Address Book and rebuilt with the same results. Anyone have any ideas or suggestions? I am going nuts.....

    To follow-up with this issue:
    I ended up performing a security wipe on my device. The security wipe finished, and I was about to reconnect with Exchange when I decided to visit our host's web site to see if they had any articles covering the issues I was experiencing. While they didn't have anything specific, I did find a step-by-step guide to connecting a BB10 device to Exchange... and right there at the end, it said "Do NOT enable memo sync."
    I contacted support, and the rep told me that OS 10 has an issue with memo sync and it can cause all sorts of unpredictable behavior. Now, whether or not this is accurate I can say this: So far, the device is not disconnecting and reconnecting like it was before. Problem is, is this a result of not enabling memo sync, or is this a result of the security wipe?
    I may have overlooked it, but I don't recall reading anything about that anywhere else. I'm tempted to try re-enabling the memo sync to see if everything blows up again. At least that way I can see for myself if the memo sync is a real issue. Of course, perhaps it's an issue with SherWeb (our host) specifically. Hm...
    Anyway, for those that were interested, and for those that may come along in the future with a similar situation, the strange behavior that I first reported is no longer happening. I just don't know if it was a result of a security wipe or a result of not enabling memo sync with Exchange.
    Ian

  • Same circuit twice with different results

    I've been having some trouble having Multisim match a circuit I have modeled in MATLAB. During the troubleshooting process I put voltage probes on each wire used. The circuit portion in question involves an AC Voltage source connected to a resistor which is then connected to an inductor. I made a copy of the circuit and started from scratch. One of the circuits gives a voltage drop across the resistor, while the other one doesn't drop any voltage at all. I've checked all of the connections and they are all good. The only difference I can see is that one has the pins labeled 1 - 2 while the other is 2 - 1. Does anyone know what the problem is here? I shouldn't not be getting two different results for the same circuit.

    Hi Jmerc,
    Maybe you can post the circuits so that we can compare.
    Tien P.
    National Instruments

  • In vs. Exists with  different results

    Hi all
    I have a general question
    Are there any cases where using the exists operator can produce different results/amount of results
    Vs. using the IN operator ?
    If yes please post an Example
    the reason that i'm asking this it's because the exists returns true if the subquery returns at least one row and
    it doesn't continue to check , but IN check all the values ,
    this is critical for me to know , if i need to returns the amount of rows etc.
    Thanks In advanced
    Naama
    Edited by: naama on Jun 21, 2011 11:52 PM

    Hi,
    naama wrote:
    Hi all
    I have a general question
    Are there any cases where using the exists operator can produce different results/amount of results
    Vs. using the IN operator ?
    If yes please post an Example I don't believe that's really your question.
    The answer to the question above is: Yes, of course. Most of the time, EXISTS and IN will produce different results. For example, this query returns 3 rows:
    SELECT     dname
    FROM     scott.dept     
    WHERE     deptno   IN (
                   SELECT  deptno
                   FROM     scott.emp
    ;but this query produces 0 rows:
    SELECT     dname
    FROM     scott.dept     d
    WHERE     EXISTS      (
                   SELECT  NULL
                   FROM     scott.emp
                   WHERE     sal     = d.deptno
    ;Try again; what really is your question?
    An important difference between EXISTS and IN is that EXISTS always returns TRUE or FALSE, but IN can return any of the 3 logical values: TRUE, FALSE or UNKNOWN. When you say "WHERE condition_1" in a query, the row is included if condition_1 is TRUE, and the row is not included if condition is either FALSE or UNKNOWN. That means you can have situations where these two conditions:
    WHERE  deptno IN (subquery_a)always produces the exact same results as
    WHERE  EXISTS (subquery_b)but
    WHERE  deptno NOT IN (subquery_a)always produces the exact same results as
    WHERE  NOT EXISTS (subquery_b)for the exact same subqueries. That's because it's possible for neither
    "IN (subquery_a)" or
    "NOT IN (subquery_a)" to be TRUE, but either
    "EXISTS (subquery_b)" or
    "NOT EXISTS (subquery_b)" will always be TRUE.
    Review SQL's 3-valued logic. NOT UNKNOWN is the same as UNKNOWN.

  • Two buttons with different ids keep overwriting eachothers onclick

    My flex app has 2 different states ('Employee Results' and 'Place Results') all based on one original base state (so three total)
    I have a search button called searchbtn on one view state.
    I have a search button called searchbtn2 on another view state.
    They both are in their own unduplicated control bars, meaning I didn't copy and paste from one screen to the other.
    I have assigned an onclick event of currentState='Employee Results' to the searchBtn.
    I have assigned an onclick event of currentState='Place Results' to  the searchBtn2.
    The problem is this.
    When I assign the event to the searchBtn it works.
    When I go to the next view state and assign the event to searchBtn2, the searchBtn is overwritten with the same onclick that is in searchBtn2.
    Why is this happening and how do I get around it?

    Sorry.  It was the way I was nesting things.  I had forgotten some closing
    tags.
    Thank you!
    The soul of a journey is liberty, perfect liberty, to think, feel, do just
    as one pleases.
    William Hazlitt, "On Going a Journey," 1822

  • Webutil_File_Transfer.DB_To_Client with different result

    hi
    Forms 10.1.2.3
    i use in Forms this function to Downlaod BLOBs
    Webutil_File_Transfer.DB_To_Client
         ('H:\l.xml',
         'T_DEV_ARCHIV',
         'dar_xml_blob',
         'dar_id=110874')
    In the BLOB are German letters inside ü, ä, ö ..
    Result on two Clients:
    at the first client the result looks good
    On the other Client I’m missing the German letters.
    Why the transfer is different? What has to do with the client?
    BLOB's are binary files !!!
    I just despair.
    Edited by: alinzenb on 04.03.2013 13:16

    Yes, but did you add a characterset definition to your XML file, and does the data stored in the XML match this characterset?
    If you have e.g.
    <?xml version="1.0" encoding="windows-1252" ?>But the data in the blob is actually UTF-8 encoded you have a Characterset-Problem, as the XML parser will treat your (UTF-8 data) as windows-1252 data...
    cheers

  • Two queries against aud$ with different results

    hi guys
    I'm not so good with queries and that is the reason for my question:
    We have audit activated and we want to get the following information (monthly):
    - how many times the user logon to database.
    - every logon of each user in a month.
    For the first (1) requirement we have the following query:
    select USERID "Cuenta", USERHOST, TERMINAL, nombres||' '||PRIMER_APELLIDO||' '||SEGUNDO_APELLIDO "WhiteList"
    , count(*) "TOTAL"
    from aud$, ab.usuarios
    where (ACTION# = 100) and
    (NTIMESTAMP# between (to_date(to_char('01092013 00:00:00'),'ddmmyyyy HH24:MI:SS'))
        and (to_date(to_char('30092013 23:59:00'),'ddmmyyyy HH24:MI:SS'))) and
    USERID = CODIGO_USUARIO(+) and
    USERID not in ('DBSNMP','SYSMAN')
    group by USERID, USERHOST, TERMINAL,  nombres||' '||PRIMER_APELLIDO||' '||SEGUNDO_APELLIDO
    order by USERID, USERHOST, TERMINAL;
    the result of this query shows like this:
    Header 1
    Cuenta               USERHOST                  TERMINAL        WhiteList                                     TOTAL                                                                                     
    ASEGUR               MAQUINADIAB\SSSSS        IUOOO          PEPITO GARCIA Y GARCIA SOCIED                    10                                                                                     
    ASEGUR               POSADASDE\MNNN4550094  MNNN4550094    PEPITO GARCIA Y GARCIA SOCIED                     1                                                                                     
    ASEGUR               POSADASDE\YUMI          YUMI            PEPITO GARCIA Y GARCIA SOCIED                    10                                                                                     
    ASEGUR               YUH                                       PEPITO GARCIA Y GARCIA SOCIED                    20                                                                                     
    ASEGUR               SDFRG                                    PEPITO GARCIA Y GARCIA SOCIED                    13                                                                                     
    ASEGUR               signy                                     PEPITO GARCIA Y GARCIA SOCIED                    29                                                                                     
    ASEGUR               sigurd                                    PEPITO GARCIA Y GARCIA SOCIED                    32                                                                                     
    ASEGUR               valhalla-Legacy                           PEPITO GARCIA Y GARCIA SOCIED                    12                                                                                     
    ADMIN                MAQUINADIAB\SSSSS        IUOOO          USUARIO ADMINISTRADOR NETWORKING                3                                                                                     
    SPRINGUSR            bragi                                                                                      98                                                                                     
    SPRINGUSR            hermod                                                                                     59                                                                                     
    SPRINGUSR            YUH                                                                                        49
    So, is the total logons in a month by user.
    for the second requirement we are using the follow query:
    select USERID "Cuenta", USERHOST, TERMINAL, to_char(NTIMESTAMP#,'YYYYMMDD HH24:MI:SS') "Fec Ing", nombres||' '||PRIMER_APELLIDO||' '||SEGUNDO_APELLIDO "WhiteList"
    --, count(*) "TOTAL"
    from aud$, ab.usuarios
    where (ACTION# = 100) and
    --to_char(NTIMESTAMP#,'dd-mm-yy')=to_char(sysdate-50,'dd-mm-yy') and
    (NTIMESTAMP# between (to_date(to_char('01062013 18:00:00'),'ddmmyyyy HH24:MI:SS'))
        and (to_date(to_char('30062013 23:59:00'),'ddmmyyyy HH24:MI:SS'))) and
    USERID = CODIGO_USUARIO(+) and
    USERID not in ('DBSNMP','SYSMAN')
    group by USERID, USERHOST, TERMINAL,to_char(NTIMESTAMP#,'YYYYMMDD HH24:MI:SS'), nombres||' '||PRIMER_APELLIDO||' '||SEGUNDO_APELLIDO
    order by USERID, USERHOST, TERMINAL;
    Header 1
    Cuenta               USERHOST                  TERMINAL        Fec Ing              WhiteList                                                                                                                                                            
    USER12               DOMINIODDD\IOIPOP        IOIPOP          20130930 12:08:33    ANGEL ROBERTO GARCIA Y GARCIA S                                                                                                                                        
    USER12               DOMINIODDD\IOIPOP        IOIPOP          20130930 14:28:47    ANGEL ROBERTO GARCIA Y GARCIA S                                                                                                                                        
    USER12               DOMINIODDD\IOIPOP        IOIPOP          20130930 16:24:43    ANGEL ROBERTO GARCIA Y GARCIA S 
    so, shows each logon done by user in a month.
    But in the both queries, the results are different. It is not suppose that they have to be the same number of logons?
    I mean, If I sum the numbers in TOTAL column I have less that I get in the second query. Always !!!
    could you help us?
    thank you

    Your timeframes are different:
    (NTIMESTAMP# between (to_date(to_char('01092013 00:00:00'),'ddmmyyyy HH24:MI:SS')) 
    and (to_date(to_char('30092013 23:59:00'),'ddmmyyyy HH24:MI:SS'))) and 
    versus
    (NTIMESTAMP# between (to_date(to_char('01062013 18:00:00'),'ddmmyyyy HH24:MI:SS')) 
        and (to_date(to_char('30062013 23:59:00'),'ddmmyyyy HH24:MI:SS'))) and 

  • Linking 2 text boxes with different results

    Hello
    I am trying to Link a drop down box with names, to a text field containing the relative identification of that person,
    Here is what I am trying to do.
    The drop down would have              and the result in the linked text box
    Richard                                                       123456
    Steve                                                            654321
    Jerry                                                                125874
    Fred                                                                  987542
    I have attached a screen shot with some graphics
    How can I do this please?
    Thanks in advance

    Thank you so very much I will give it a go I am totally new to theis program.
    Sorry for asking more but.
    If the Dropdown has the names and once they have selected the name using the dropdown, I would like the texbox called "Certificatenumber" to associate the name with the correct number, how do I link the boxes.
    Any chance of a couple of screen shots.
    Sorry I am so bad on this I just started with forms like the other day.
    Thank you for your time everyone.
    (Thank you MarkWalsh)

  • Two buttons with different colors

    Hi,
      I am very new to the Web Dynpro. I have placed two buttons in my web dynpro application. What to want to change the first button color to RED and Seond button color to GREEN. How to do this?

    Hi Praveen,
    We have very limited options while changing the colors of the UIElements in WebDynpro.
    There is no direct way to change the color.
    For the Button UIElement we have a property called Design.
    You can set the property value to "emphasized" or "standard" to get different look & feel.
    Or Check the following article by Bharathwaj
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/colourful webdynpro applications.pdf
    Regards, Anilkumar
    Message was edited by: Anilkumar Vippagunta

  • Project 7 - Pop menu magic 2 - 1 template with different results

    I just noticed something strange on my website.
    I only use 1 template which should normally give the same result on all pages.
    However on 4 pages the menu bar is split into 2 row.  All other pages are correct as per template.
    Here is the link for the correct page : http://www.lotolux.com/media.html
    And here are the links of the 4 pages with the error.
    http://www.lotolux.com/biography.html
    http://www.lotolux.com/actingcareer.html
    http://www.lotolux.com/burbank08concert.html
    http://www.lotolux.com/london08concert.html
    Can somebody help me solving this?
    Many thanks
    Martine

    And it becomes more stranger.
    I recreated those 4 pages using the template.  I copied and pasted all info from the old pages onto the new ones.
    The new pages have the same name - I only added 2 at the end.
    http://www.lotolux.com/biography2.html
    http://www.lotolux.com/actingcareer2.html
    http://www.lotolux.com/burbank08concert2.html
    http://www.lotolux.com/london08concert2.html
    They are uploaded and the error is gone. BUT BUT BUT BUT BUT ....................if I update the P7 -PMM2 menu bar ......the error is back there.
    It is a mystery to me and get frustrated from it.   Uploaded without linked in the menu bar = all ok, but if the link is made = back to zero.

  • Sandpit and Dev give Address search with different results using Web UI

    Using the Sandpit system I can perform a BP search on Street and enter the post code, but it still finds the right address. However, in our development sytsem it does not. The FM which performs the search is identical so I assume this would be down to some kind of address related config?. Can anyone enlighten me further as what could possible cause this?.
    Jason
    [RESOLVED]
    Edited by: Jason Stratham on Sep 8, 2009 11:35 AM

    Okay. So, I asked the admin to create a scope for the list, which they did following the steps outlined in Ben Tedders article, and then I followed the steps in the rest of the article setting up the web parts. When I ran a search, it returned the no results
    page. Not sure why, but I removed the scope from the Search Core Results web part, and the search returned usable data from the list.
    Here's my part ii question - - how do I customize the Search Core Results web part to display the data from the search in manner that makes more sense than from a list of nondescript layout of,
    Search Result
         Search Term ... dataField01 ... dataField02 ... dataField03 ... dataField04 ...
         author info
    url info
    to something a tad more informative, such as,
    You search for Search Term, with the following results:
         Search Result
              dataField01 label ... dataField01
              dataField02 label ... dataField02
              dataField03 label ... dataField03
              dataField04 label ... dataField04
    because nobody's really going to care who uploaded the list or want to link to the data pulled from the list in one of those columnar results tables.

Maybe you are looking for