Af:commandMenuItem action only works first time

I am using the af:panelPage, and have added a menu1 facet that contains an af:menuTabs component with 3 af:commandMenuItems. I'd like the selection of each tab to invoke a bean 'action', where I'll set some flags that control the rendering of different subviews.
I really like JDeveloper and ADF Faces... but I must be misunderstanding something basic. It all seems easy, and when I run and select one of the tabs, the correct 'action' is called and all works great. But when I then select a different tab, the 'action' is not called. Nothing happens after this.
I'm still learning both web-aps and JSF stuff, so hopefully I'm just doing something dumb.
The .jspx stuff looks like:
<?xml version='1.0' encoding='windows-1252'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:c="http://java.sun.com/jsp/jstl/core"
 xmlns:af="http://xmlns.oracle.com/adf/faces/EA16"
 xmlns:afh="http://xmlns.oracle.com/adf/faces/EA16/html">
<jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
 doctype-system="http://www.w3.org/TR/html4/loose.dtd"
 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
<jsp:directive.page contentType="text/html;charset=windows-1252"/>
<f:view>
<afh:html>
<afh:head title="try1">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252"/>
</afh:head>
<afh:body>
<af:form>
  <af:panelPage binding="#{backing_rmMain.panelPage1}">
    <f:facet name="menu1">
      <af:menuTabs binding="#{backing_rmMain.mainTabsBar}">
        <af:commandMenuItem text="Overview"
          binding="#{backing_rmMain.overviewTab}"
          action="#{backing_rmMain.overviewTabAction}"/>
        <af:commandMenuItem text="Configuration Setup"
          binding="#{backing_rmMain.configTab}"
          action="#{backing_rmMain.configTabAction}"/>
        <af:commandMenuItem text="Results View"
          binding="#{backing_rmMain.resultsTab}"
          action="#{backing_rmMain.resultsTabAction}"/>
      </af:menuTabs>
    </f:facet>
    <f:subview id="overviewPage" rendered="#{backing_rmMain.showOverview}">
      <jsp:include page="/WEB-INF/pages/Overview.jspx"/>
    </f:subview>
    <f:subview id="configPage" rendered="#{backing_rmMain.showConfig}">
      <jsp:include page="/WEB-INF/pages/Config.jspx"/>
    </f:subview>
    etc...
  </af:panelPage>
</af:form>
</afh:body>
</afh:html>
</f:view>
</jsp:root>
The backing bean action handlers simply set some booleans and return (I've tried returning both null and a simple string value... I'm not using navigation rules for this). If I set breakpoints, the action handlers get called, but only for the first selection.
Thanks for any suggestions or help.
Don

After a couple of days of "try this, try that" I've concluded that the problem was caused by the <jsp:include>. As I'm learning, one must be careful when mixing JSF and ADF components, as well as how components are nested within containers.
I was hoping there would be a way to visually develop a page fragment in one file, and then include it in another file. But I could not find a way to do this.
What I'm doing for now is:
1. Create a jspx file for my sub-page (so I can develop it graphically).
2. Create a jspf fragement file, and include that in my main page using <jsp.directive.include>.
3. copy/paste from the jspx file to the jspf file to test (but only copy the portion between the <af:form> block.
Seems to work. I'm open to better suggestions.
Don

Similar Messages

  • UploadedFile & https Only work first time upload ????

    I am using 10.1.3.4 Jdev. I use UploadedFile interface to upload files from local PC and ftp files to unix server. My "upload" web page works between my local PC and Unix server, but it only works first time upload file and ftp between
    https server (application server--weblogic 10.0) and Unix server. If I just use http without SSL and my codes work fine you can upload file as many times you want and ftp them to Unix server. I used FTP not sftp to transfer files from application server to unix server. Can anyone shed some lights on my head ???? Thx.

    Yes. I changed my code to SFT from ftp. it works. Thx. This URL for sftp: http://www.jcraft.com/jsch/ and is very good .
    Edited by: albertpi on Feb 11, 2010 8:05 AM
    Edited by: albertpi on Feb 11, 2010 8:05 AM

  • Taking action only the first time an event executes

    I want a certain action to occur only the first time an event handler for a button is called. Is there a simple way to do this?
    Bill F

    There are two pretty easy ways to do this.
    If you want to continue to trap other events (other event cases in your event structure), use a shift register:
    1. Add a shift register to the loop containing your event structure. (right-click on the left-hand border of your loop and select Add Shift Register).
    2. Wire a numeric constant = 0 from outside the loop to the input (left-hand) terminal of your shift register.
    3. Inside your event structure, in the event case you want to handle only once, put a case structure around the code you want to execute only once. That code should be within the True case.
    4. Add an Equal To 0? function (from the comparison palette) to the loop. Wire the input shift register to the input of Equal To 0?. Wire the output of Equal To 0? t
    o the selctor for your new case.
    5. Within the True case of your new case structure, add a numeric constant = 1. Wire that constant out to the output (right-hand) side of your shift register.
    6. Within the False case of your new case structure, wire the input side of your shift register to the output tunnel created by the wiring in step 5.
    This way the event structure will keep running and handling other events, but the case you just modified will only run the first time: the first time you get the event, the shift register will = 0 so you'll execute the True case of your new case structure. Within that case, you set the shift register to 1. The next time you get that event, the shift register = 1, not 0, so you'll execute the False case and not the code in your True case.
    If you want to stop all event handling after the first event and your event handler is the only thing with its loop, from the event case (for the event you want to stop on), wire a True boolean constant out to
    the Stop terminal of the loop containing your event structure.

  • Simulating animation by iterating - JLabel icon. ONLY  Working first time!

    I am "simualting" animation by changing the icon attribute of a JLabel. If I call the method from main, this works. It also seems to work (ie. the JLabel image changes on the screen as the icon attribute is changed in the program.) if I call it first from another or its own class one time, but not after that. What happens on subsequent calls is: The thread.sleep() is working (time passes), and the icon attribute of the JLabel is chaging (lblCaveActive.getIcon() for the JLabel returns the correct changed *.gif, but the images do not show up on the screen, until the last image, whatever I set it to be. I am pulling my air out over this little problem, which is the last lingering problem I am having with this project....I was wondering if you have seen this or have any ideas? I have tried lots of different things, including repainting and such. If you have a clue concerning this, please please please advise, o wise one.
    * simulates animation: ex. Wumpus approaching to eat the
    * player, bat appraoching to transport player
    * @param: int numPics - number of pictures to loop through
    * @param: String picNamePreface - filenames must be "*0.gif" through
    * picNamePreface + numPics + ".gif".
    * Send the "*" portion into this arg
    * @param: int milliSecSleep - seconds for the thread to sleep between
    * pictures
    private void animateMeetHazard(int numPics, String picNamePreface,
    int milliSecSleep)
    try
    for (int i = 0; i <= numPics; i++)
    caveCurrentIcon = new ImageIcon(picNamePreface + i + ".gif");
    lblCaveActive.setIcon(caveCurrentIcon);
    Thread.sleep(milliSecSleep);
    catch (InterruptedException e){}
    --A very tired girl.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Something like
    private void animateMeetHazard(int numPics, String picNamePreface,
    int milliSecSleep)
    try
    SwingWorker workHard = new SwingWorker()
    public Object construct()
    for (int i = 0; i <= numPics; i++)
    caveCurrentIcon = new ImageIcon(picNamePreface + i + ".gif");
    lblCaveActive.setIcon(caveCurrentIcon);
    Thread.sleep(milliSecSleep);
    return null;
    public void finished()
    workHard.start();
    catch (InterruptedException e){}
    Not really sure if the Thread.sleep() will throw you out and give you the same problems .. but it mightn't ;)

  • Copy workflow issue - Only works first time

    Hello
    I created a simple "copy" workflow with SPD:  it should automatically copy to another library any new files that match a condition , as they are uploaded.  
    If Current Item:Doc Type equals JobReport
     Copy item in Current Item to Job Reports
     Stop the workflow and log File copied
    It works with the first file, then it quit working, even if disaply "Completed" in the workflow outcome field.
    Source Library is DocSet enabled, while destination library is not.
    Any idea? Thnks
    Lucio 

    After a couple of days of "try this, try that" I've concluded that the problem was caused by the <jsp:include>. As I'm learning, one must be careful when mixing JSF and ADF components, as well as how components are nested within containers.
    I was hoping there would be a way to visually develop a page fragment in one file, and then include it in another file. But I could not find a way to do this.
    What I'm doing for now is:
    1. Create a jspx file for my sub-page (so I can develop it graphically).
    2. Create a jspf fragement file, and include that in my main page using <jsp.directive.include>.
    3. copy/paste from the jspx file to the jspf file to test (but only copy the portion between the <af:form> block.
    Seems to work. I'm open to better suggestions.
    Don

  • Home wifi connection only worked first time?

    Hello.
    Second day with my new 3GS and it says 'unable to join the network BP'. When I first switched it on last night it found the network, I entered the password and it was connected. Even made a phone call via Skpye - very cool! Love this phone, hoping a simple glitch to fix this problem? Reading old posts I have tried restoring network settings, turning off, reentering WPA and SSID. Have checked Apple support page. Not sure about router settings - should I be calling Bigpond?
    Thanks.

    You should not have enter the SSID unless your router withholds it to hide your network. I would try re-starting the router and the network should appear in the Wi-Fi network list and your iPhone should join your network automatically without re-entering the password and assuming it is in range of the router.

  • Need to restrict triggering of workflow only once(first time).

    Hi guys,
    I hv a requirement to trigger the workflow only once(first time).
    whatever is the the condition/changes in document, it should not trigger for second time.
    do we hv any options available for this........
    thanks in advance...
    santosh.

    Hi susan,
    Below is the requested information,
    Release : ECC 6.0
    we are working on custom WF for ECO creation(CC01).
    Description,
    ECO is created in SAP by legacy system, thru bapi CCAP_ECN_CREATE, the WF will take the editing of the material in that ECO to different departments like MRP, accounting, sales,quality etc.... & respectively creates the views.
    we cannot use CREATE event, bcos first the ECN(CC01) is created by bapi & further bapi creates the material & inserts it into ECN again, which is CHANGING the document. once this is done, our WF should trigger.
    As we dont have CHANGE event in ECM BO, i am using CREATE event & settting it for ON CHANGE in SWEC t-code.
    Bottomline is , it is triggering as soon as any changes happens.
    But, we want it to restrict for one time triggering.
    Regards.
    santosh.

  • App file sharing: files are displayed only the first time...

    clicking somewhere else and then back to the application that you want to share files are not there any more.
    I've to close and re-open the itunes in order to see them again.
    itunes is running on windows 7 64bit.
    is this a bug ?
    thank you.

    Hi! I have the same, exact problem. The files are displayed only the first time I look at the apps listed under File Sharing. If I look at another app on the list, the files on the one I previously checked are gone when I look at it again. Is there any way to fix this? I have a Lenovo X61s on Windows XP Professional 32 bit.

  • QuickTime launches slow but only the first time

    QuickTime is slow in Mac OS 10.7, that's been widely discussed.
    In my case, QuickTime is slow to open up a video file (MP4, AVI, WMV, etc,), but only the first time.  After I've successfully opened up the one video file, all subsequent video files open up quickly, even after quitting QuickTime.
    However, after a restart it's the same old situation again.
    Is QuickTime installing something, then removing it when the computer shuts down?

    QuickTime is slow in Mac OS 10.7, that's been widely discussed.
    In my case, QuickTime is slow to open up a video file (MP4, AVI, WMV, etc,), but only the first time.  After I've successfully opened up the one video file, all subsequent video files open up quickly, even after quitting QuickTime.
    However, after a restart it's the same old situation again.
    Is QuickTime installing something, then removing it when the computer shuts down?

  • Button actions only work the first time used then nothing?

    This is what I have...
    I Have 2 buttons in MC named mcMovieTrans the AS for these buttons are in the MC's timeline, the code is:
    stop();
    function playLifeboy(event:MouseEvent):void
    gotoAndStop(3);
    function playKrave(event:MouseEvent):void
    gotoAndStop(2);
    lifeboy_btn.addEventListener(MouseEvent.CLICK, playLifeboy);
    krave_btn.addEventListener(MouseEvent.CLICK, playKrave);
    when the buttons are activated they go to there corresponding frames and Stop. As an example of what happens next I'll show you frame 3 which plays MC mcKraveMovie:
    Frame 45 has a flv. movie on it that plays at this frame. The AS for this timeline on Frame 45 is:
    stop();
    function playReturn(event:MouseEvent):void
    gotoAndPlay(46);
    return_btn.addEventListener(MouseEvent.CLICK, playReturn);
    The AS for the timeline on Frame 90 is:
    MovieClip(parent).gotoAndStop(1);
    This is where the problem occurs because when this action takes place and it returns to the parent MC (mcMovieTrans) The buttons actions dont work anymore.
    And I get this error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at capQinc_fla::mcMovieTrans_89/frame1()[capQinc_fla.mcMovieTrans_89::frame1:15]
    at flash.display::MovieClip/gotoAndStop()
    at capQinc_fla::mcKraveMovie_97/frame90()[capQinc_fla.mcKraveMovie_97::frame90:1]
    Thanks

    Thanks,
    I replaced all the button symbols that where in tweens on the MC mcKraveMovie with static art. But I still Get this error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at capQinc_fla::mcMovieTrans_89/frame1()[capQinc_fla.mcMovieTrans_89::frame1:15]
    at flash.display::MovieClip/gotoAndStop()
    at capQinc_fla::mcKraveMovie_97/frame90()[capQinc_fla.mcKraveMovie_97::frame90:1]
    This is the timeline for the (Parent) MC mcMovieTrans:
    If that helps at all, the only place where the buttons are (and there actions) are in Frame 1 of this Timeline
    Thanks

  • Hyperlinks work only the first time clicked when published

    I am using hyperlinked text captions for slide navigation within a course.  I have placed the text hyperlinks on the master slides so they appear throughout.  The hyperlinks either link to an external pdf (job aid) or to another slide within the course. 
    When I publish the course, the hyperlinks only work the first time they are clicked.  All other times, I get the hand cursor when I roll over them, but nothing happens when I click.  Is there a setting somewhere to allow for infinite clicks on they hyperlinks?

    Hi there
    Odd that this would happen. There is no setting I'm aware of that determines the number times a link may be clicked.
    My guess is that something else is going on. Normally, the slide is paused when the link is clicked. Is this the case for you? One thought is that by clicking the link, the pause is released and perhaps the link is then no longer active because the playhead reached a different spot?
    Cheers... Rick

  • Hand off works only the first time

    iphone 6
    macbook air 2012
    hand off always works on the phone...i can see what is on the mac...
    but on the mac i cannot see what is on the phone
    log out iCloud on all my devices...log back in...
    it works on the mac...i see the iPhone app icon on the mac dock left most position....
    i click it...the iPhone app opens on the mac...great!!!
    but when i close the app on the Mac hand off is gone...
    e.g. it works the first time...
    (p.s. phone calls can be made from the mac, message is all synched...that part works...)

    fixed it...
    my behavior was very similar...it rarely intermittently worked...i somehow stumbled on the fact that it was a bluetooth issue...then i finally fixed it...now it works like a charm...here is a post i made after i fixed it...turns out it has to do with allowing "bluetooth and internet connection sharing..."  here is a post a made with my solution...hope it works for you...
    Had a similar problem...
    open an app on mac...can see it on phone...
    open an app on phone...cannot see it on mac...or see it once then its gone...
    my problem (not sure if it is yours)...
    Mac-->System Preference: Sharing
    1. Turn on Bluetooth sharing; 2. Turn on Internet sharing bluetooth PAN...
    worked for me...
    (have not seen anyone or apple post this...they should)

  • Customized effects only work when time-based?

    Hello,
    Effects (Captivate 5) can be triggered time-based, triggered by a click box/button or by an advanced actions.
    I created some customized effects, sequence of different default effects with setting of timing and parameters. Applying those effects in the first way (timing effect) works fine. But when triggered by a button/click box or by an advanced action only some effects will appear: none of the movement effects, zooming effects or tint changing will be visible. Did anyone else try this out? If this is a known limitation of those triggered effects, please would it be possible to have a list of effects that could be included in a customized effect that has to be triggered?
    Lilybiri

    I am using 6.1. I ended up just making multiple versions of the object in question in different colors then show/hiding them with conditional actions. Not as elegant but it works reliably. Seems silly to have the option to set color effects with advanced actions when they don't work properly. Having the ability to set the duration would be a nice fix.
    Thanks,
    Ryan

  • Wait cursor appears only the first time... unless I don't move the mouse!

    Ah yes, another cursor problem:
    I am setting a wait cursor in my main JFrame when a key-release or a menu item click is detected (the time-consuming action is then triggered in a child JInternalFrame), and so far, it's been working great.
    Then I noticed that the wait cursor only appears the first time the time-consuming action is called (or more precisely, if I never move the mouse, it happens every time as it should, but if I move the mouse, it only happens the first time! Ah, and I noticed I CAN move the mouse but ONLY when it is in the form of the wait cursor!).
    Strangely, I can see the cursor blink briefly when the action is done, precisely when it should be changing back to the default cursor... what gives? If I close the child internal frame and re-open it, I can get the wait cursor again the first time only (again, unless I keep the mouse still, in which case it works great - argh).
    Any ideas would be deeply appreciated!
    Cheers!
    PS - Here's a snippet of how we set the cursor, this is code in our main JFrame, called via either a keypress event or clicking on a menu item - mostly it's stuff that is unrelated, and we simply set the wait cursor as the very first line, so why in the world would it skip that line???? (the rest of the lines do in fact get executed):
    private void refreshMenuItemActionPerformed(java.awt.event.ActionEvent evt) {     doRefreshMenuItemAction(); }
    private void doRefreshMenuItemAction() {
    this.setCursor(new Cursor(Cursor.WAIT_CURSOR));
    JDesktopPane desktop = (JDesktopPane)this.getContentPane().getComponent(0);
    JInternalFrame activeFrame = desktop.getSelectedFrame();
    try {
    if ( activeFrame instanceof IDataDrivenForm ) {
    ((IDataDrivenForm)activeFrame).refresh();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));

    almost...
    I now see that glasspanes are an answer to that question. I got it to work (almost) using a glasspane (see code snippet below). But what I can't quite grasp now is why this code does not work when I call it from a child (contained) dialog (and possibly internal frames as well)??? When I do so, the dialog freezes (the button I pressed doesn't even release) and the cursor does not change to waiting. This time I'm really not sure where to go next....
    I appreciate anyone who has read this far, and would really be indebted to you for some good advice!
    PS - Here's the nifty code, placed in my main JFrame class. I just substituted "this.setBusy(true);" for every place I was manually setting the WAIT_CURSOR in the past (and of course with matching setBusy(false)):
    public final void setBusy(boolean isBusy)
    Component glassPane = this.getGlassPane();
    Cursor theCursor = isBusy ? Cursor.getPredefinedCursor( Cursor.WAIT_CURSOR ) : Cursor.getPredefinedCursor( Cursor.DEFAULT_CURSOR );
    this.setCursor( theCursor );
    glassPane.setCursor( theCursor );
    glassPane.setVisible( isBusy );

  • Time machine would back up only the first time after I shut off my imac and started it up again.  Then it would fail or claim it could not locate my external Hard Drive even though it's icon was showing in the time machine dialog window.

    Time machine only ever backed up the first time it runs immediately after I start up my computer after it has been shut off.  All other back up attemps fail.  Recently it stopped recognizing the icon for my external hard drive in the time machine dialog window where you select the hard drive to back up to, and turn on and off the time machine function.  Now the external HD icon only shows up on the desk top but no longer in the dialog box. I just tried shutting the computer off and turning it on again and now the light is on, on the external hard drive but the icon does not even appear on the desk top.
    The external hard drive is a 1TB Seagate. The drive still has plenty of unused capacity.  I ran a diagnostic test on it. It said the disk needed repair but the repair function would not work. The message stated that it could not be unmounted and repair is not available because the disk can't be written to. The Mac OX utility said the disk can still be opened but can't be changed nor repaired.  The external HD is not S.M.A.R.T. supported.
    I haven't tried replacing the cable yet. Is that the next thing I should try?

    What Mac OSX version are your running ("iOS" as shown in your profile cannot run on a Mac computer)?

Maybe you are looking for