How to switch to another page when clicking a button

I have a main frame consits of many button.What I need to do when click
a button,it switch to another page?
Thanx....

Try this, it should work.
// not tested
JButton linkButton = new JButton("<html><a href=\"http://forum.java.sun.com\">link to<br>forum</a></html>");

Similar Messages

  • Redirect to another page by clicking on button

    Hi All,
    I want open another page by clicking button i am trying below code it's not getting another page in oaf (10.1.3).
           pageContext.forwardImmediately("OA.jsp?page=/eamxx/oracle/apps/eam/oagroup/webui/NavigatePG"
                      ,null
                      ,OAWebBeanConstants.KEEP_MENU_CONTEXT
                      ,null
                      ,null
                      ,false
                      ,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
    Please give any solution.
    Regards,
    Mohan Reddy

    I got solution by using below code open another page in co class  process form request need to write below code.
    if(pageContext.getParameter("Next")!= null){         
                  am.getTransaction().commit();
                   pageContext.setForwardURL(
                   "OA.jsp?page=/eamxx/oracle/apps/eam/oagroup/webui/NavigatedtPG&formval=val",
                     null,        
                     OAWebBeanConstants.KEEP_MENU_CONTEXT,        
                     null,        
                     null,        
                     true,        
                     OAWebBeanConstants.ADD_BREAD_CRUMB_NO,        
                     OAWebBeanConstants.IGNORE_MESSAGES);  
    Regards,
    Mohan Reddy

  • How to switch from different views when a common button is clicked on using View states concept

    Hi
    i have  made a single form for both Login Screen and Registration screen with two states :
    1. BaseState which is the curret state of  state of My application
    2.registrationstate 
    I have a common button for changing from one view to another view .(Not related to any of the state)
    At first the Login screen is loaded , and when the common  button is clicked , i want to switch to Registration Screen .
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
        <![CDATA[
    // Logic for common button needed .
        public function handleMe(event:MouseEvent):void
        ]]>
    </mx:Script>
        <mx:states>
            <mx:State name="registrationstate">
                <mx:SetProperty target="{formitem1}" name="label" value="Email"/>
                <mx:SetProperty target="{button1}" name="label" value="Change state to Login"/>
            </mx:State>
        </mx:states>
        <mx:Form x="248" y="158">
            <mx:FormItem label="User Name" fontWeight="bold" id="formitem1">
                <mx:TextInput/>
            </mx:FormItem>
        </mx:Form>
    <!-- This is my coomon button-->
        <mx:Button
            click="handleMe(event)"  
            x="297" y="261" label="Change state to Registration" id="button1"/>
    </mx:Application>

    Originally I could not get that to work, but now I have it working:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
      <mx:Script>
        <![CDATA[
          import mx.controls.Alert;
          public function handleMe(event:MouseEvent):void{  
            trace(this.currentState); 
            if(currentState=="" || currentState == null){
              mx.controls.Alert.show("base state");
              currentState = "registrationstate"; 
            }else if(currentState=="registrationstate"){
              mx.controls.Alert.show("registrationstate");
              currentState = ""; 
        ]]>
      </mx:Script>
      <mx:states>
        <mx:State name="registrationstate">
          <mx:SetProperty target="{formitem1}" name="label" value="Email"/>
          <mx:SetProperty target="{button1}" name="label" value="Change state to Login"/>
        </mx:State>
      </mx:states>
      <mx:Form x="248" y="158">
        <mx:FormItem label="User Name" fontWeight="bold" id="formitem1">
          <mx:TextInput/>
        </mx:FormItem>
      </mx:Form>
      <mx:Button click="handleMe(event)" x="297" y="261"
        label="Change state to Registration" id="button1"/>
    </mx:Application>
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex / AIR Development, Training, and Support Services

  • How can i reset another page when call it from a page

    I use JDeveloper 10.3 to develop my application. And I want to reset value of UI component (inputtex, selectInputDate . . .) of a page when i call it from another page.
    Thanks!

    You can execute a method in "backing bean/Application module" on page load which can set the value of the UI components. Following link can help you to
    [http://kohlivikram.blogspot.com/2008/10/call-method-on-page-load-in-adf.html|http://kohlivikram.blogspot.com/2008/10/call-method-on-page-load-in-adf.html] .
    ~Vikram

  • How to forward to another page when checking session managed bean in jsf 2

    When I do it in jsp page I write:
    <c:if test="${sessionScope.role != 'user'}">
        <jsp:forward page="login.jsp" />
    </c:if>And in jsf 2.0 I use ManagedBean as session and I want to check session in per page. But I cannot do it in jsf 2.0 (.xhtml). Please help me. Thanks
    Edited by: tuanbs on May 12, 2010 1:19 AM

    I included this code in the PartnerManagementBean.java:
         public class PartnerManagementBean {
         protected List<SelectItem> partners;
    //other properties....
    public String addPartner() {
    // code to insert new partner into db
    // Add the newly added partner to the partner list
              addToPartnerList(partnerBO);
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove("PartnerManagementBean");
              FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("PartnerManagementBean");
    Still, the new partner added is not reflecting in the session variable and hence it is not reflecting when I look for the new partner in "Modify Partner" page.
    What could be the solution ?

  • How to call a popup window when click save button

    Hi, expert
    the scenario is :
    we we create a order , we click the 'save' button,
    then there will show a popup window,
    in the window, there are buttons like 'confirm' , 'cancel' and also show some info about the order.
    how can i do that.
    Thanks
    Oliver.

    Hi ,
    Try to redefine the method and use the IV_TEXT parameter in the CREATE_POPUP_2_CONFIRM method (usaully comes from the Component Controller ).
    Regards
    Vikranth

  • How do I stop extra instances of Firefox program being opened by another page when it loads?

    How do I stop extra instances of Firefox program being opened by another page when it loads?
    When I log on to a favorite site it loads OK. The site has a number of pages. When I move to the second or third page, a second instance of Firefox automatically starts and loads an advertisement. I can block the site that tries to load the page, but I cannot stop the second instance of Firefox from loading up. So in the end I might have three or four instances of Firefox all going at once.
    Any help would be greatly appreciated.

    Do a malware check with a few malware scan programs.<br />
    You need to use all programs because each detects different malware.<br />
    Make sure that you update each program to get the latest version of the database.
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    See also "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked and [[Searches are redirected to another site]]

  • Jump to another page by clicking on the inputtext

    i want tojump to another page by clicking on the inputtext.bu because i've made the tree's edit mode to "clicktoedit".
    so, i mean when i single click on the inputtext to jump,and double click on it to edit its value.
    here is the tree:
    <af:tree value="#{favoriteTreeMB.treeModel}" var="node"
    rowSelection="single" id="pt_t1" contextMenuSelect="true"
    editingMode="clickToEdit"
    binding="#{favoriteTreeMB.favoriteTree}"
    partialTriggers="deleteContextMenu">
    <f:facet name="nodeStamp">
    <af:group>
    <af:inputText value="#{node.attributes['name']}" autoSubmit="true"
    valueChangeListener="#{favoriteTreeMB.renameTreeNode}">
    <af:showPopupBehavior popupId="popupMenu"
    triggerType="contextMenu"/>
    </af:inputText>
    </af:group>
    </f:facet>
    </af:tree>

    the question is :
    how to implement when i single click on the inputtext to jump another page? the var node has a attribute :link.this is the attribute i will use to jump
    Edited by: Danny Zhou on 2009-12-9 上午12:25

  • How to Redirect to another page Using JavaScript in ADF Faces?

    Hi Guys,
    I have a UI user case that has a af:menu which contains mutiple af:goMenuItem. When user click on the menu, the menu slides down and shows up the af:goMenuItem. As we know, you could define the page destinations in af:goMenuItem to go to another page when user clicked, but af:menu itself cannot be redirected to another page. Well, the user case wants the menu itself could be redirected if user click on it.
    So I am thinking using JavaScript to do this: when the af:menu gets clicked, redirect to another page. BUT, I looked over the ADF Faces Javascript API and was not able to find that piece of code to do this. Any help???
    Another work around for the user case scenario is to use HTML marks + CSS/JavaScript instead of af:menu and af:goMenuItem but this changes the scope of technology although it's not hard to do
    Any other idea to accomplish the user case other than what I could think of ?
    Thanks Guys!
    Jay

    Hi,
    1 - you can have a hidden command item to do the navigation based on a control flow case. In this case, you access the command component from JavaScript create a new ActionEvent and queue it
    2 - JavaScript can use an af:serverListener to call into a server side managed bean method to perform the navigation
    there is no JavaScript API for navigation in ADF Faces because navigation in JavaServer Faces is an event driven framework and we don't support developers fighting the framework.
    Frank

  • ADF how to display a processing page when executing large queries

    ADF how to display a processing page when executing large queries
    The ADF application that I have written currently has the following structure:
    DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
    I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
    The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
    I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
    Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
    I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

    Hi Steve,
    After a few attempts - yes I have a hit a few snags.
    I'll send you a copy of the example application that I am working on but this is what I have done so far.
    I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
    DataPage --> DataAction (refresh Collection) -->DataPage
    I have then added this code to the (refreshCollectionAction) DataAction
    protected void invokeCustomMethod(DataActionContext ctx)
    super.invokeCustomMethod(ctx);
    HttpSession session = ctx.getHttpServletRequest().getSession();
    Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
    if (nominalSearch == null)
    synchronized(this)
    //create new instance of the thread
    nominalSearch = new ns(ctx);
    } //end of sychronized wrapper
    session.setAttribute("nominalSearch", nominalSearch);
    session.setAttribute("action", "nominalSearch");
    nominalSearch.start();
    System.err.println("started thread calling loading page");
    ctx.setActionForward("loading.jsp");
    else
    if (nominalSearch.isAlive())
    System.err.println("trying to call loading page");
    ctx.setActionForward("loading.jsp");
    else
    System.err.println("trying to call results page");
    ctx.setActionForward("success");
    Created another class called ns.java:
    package view;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.generic.DCRowSetIteratorImpl;
    public class ns extends Thread
    private DataActionContext ctx;
    public ns(DataActionContext ctx)
    this.ctx = ctx;
    public void run()
    System.err.println("START");
    DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
    ((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
    //b.executeQuery();
    System.err.println("END");
    and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
    package view;
    import javax.servlet.http.HttpSession;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class ProcessingAction extends DataForwardAction
    protected void invokeCustomMethod(DataActionContext actionContext)
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.invokeCustomMethod(actionContext);
    HttpSession session = actionContext.getHttpServletRequest().getSession();
    String action = (String)session.getAttribute("action");
    if (action.equalsIgnoreCase("nominalSearch"))
    actionContext.setActionForward("refreshCollection.do");
    I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
    Thanks in advance for your help
    David.

  • How to avoid submitting a page when tabular form rows are empty

    Hi,
    I have a master detail form in my application. There are 2 tables that are used Table A and Table B. Table A contains Ticket number and Table B refers to Table A through a foriegn key and Table B have columns like Date,Name, Age, ticket_id (that refers to the ticket_number of the Table A).
    This is how the application works:
    In a page there is a field for Ticket Number, once the user enters the Ticket Number and click Add Details, a tabular Form with 5 empty field appears... (Done through Page Process->Data Manipilation->Add Rows)
    This form contains fields Date, Name and Age. Once the user fills in all the details and click Submit button, the page is submitted. Whatever values that was entered is saved in Table B. Page Sucess message appears. This works fine.
    But once the Ticket Number is entered and Add Details is clicked, and without entering the values in the Tabular Form, if Submit button is clicked, there is no error showing up neither I see Page success message. But this should not be allowed. There should be some error showing up...
    Tabular Form Validations works only when user enters some values in the Tabular Form and click Submit. For the above scenario, where the form is untouched the validation doesnt work.
    How can I get this done? Any ideas?

    Hello Suzi,
    >> if (document.wwv_flow==null)
    The document.wwv_flow is an object representing the current form that was just rendered on your screen. As such, it can never be null.
    >> How to avoid submitting a page when tabular form rows are empty
    The correct way, especially for versions prior to APEX 4.0 is to use JavaScript, but for that, you need to know and understand how APEX generates your tabular form, HTML wise.
    To be very brief, APEX attached a unique ID to every updatable cell in the tabular form, using a certain pattern – each updatable column is getting a unique name (e.g. ‘f01’,’f02’ etc.) and the ID of a cell is a combination of this name with the serial row number the cell is on. For example, a cell on the third row in an updatable column called ‘f04’ will be given an ID of f04_0003. (More detailed explanation, with an example, can be found in my book).
    What you should do is to check these cells according to your validation policy (e.g. is all five row must be filled, is all the columns in a specific row must be filled, etc.).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • To Dispaly stale data page when browser back button is clicked.

    Hi All,
    How can we display Stale Data Page when the browsers back button is clicked.
    thanks

    You have already raised a thread for this..
    To display Stale Data Page when browsers back button clicked.
    - Senthil

  • HT201401 i have a birthday showing in my calendar listed as an all day event and it is incorrect how can I delete it. When clicked on does not bring up the edit feature. The vodaphone shop thinks it has synced with my facebook app.

    i have a birthday showing in my calendar listed as an all day event and it is incorrect how can I delete it. When clicked on does not bring up the edit feature. The vodaphone shop thinks it has synced with my facebook app.

    hello, the addons manager is exactly the right place to look for it. please try disabling the addons that are listed there one-by-one (a restart of the browser might be necessary after each step). maybe one of them is bundling this kind of adware.
    [[Disable or remove Add-ons]]

  • How to display the details of particular order when click on button in sapui5

    Hi Experts,
        How to display the details of particular order when click on button in sapui5?
    I Have a requirement that is i want display all the list of orders coming from backend as shown in image below
    then in that i have a button when i press the button  it need to display the details of particular order as shown in image below
    Please help me .
    Thanks & Regards
    chitti

    Does anyone know how to display the index of current desktop?
    Brute force - - I have written the number of the Desktop directly onto the wallpaper picture I am using for each Desktop  (easy to do with Preview).
    All Desktops are using different wallpaper photos, so they are easily recognized by the color scheme, and in the upper left corner is the number.
    Regards
    Léonie

  • How to generate a html page when a button is pressed

    hi
    i have to generate a html page when a help button is pressed
    so please help me
    thanks
    shiva

    "touch index.html"
    Might not be what you're looking for but creates an html page.

Maybe you are looking for

  • How to handle Canceled documents

    Hi All, Need your suggestions. How can i handle the canceled documents.If document is created today and is loaded into BW system. After few days if user cancels the document , then what happens to the document which is already there in the BW system.

  • How to make links in the OA Worklist portlet open in a new separate window?

    We are in the process of certifying Portal 10.1.4 with Oracle Apps. I've been able to create an Oracle Applications Framework Provider and successfully add the Worklist portlet to a portal template. The idea is to have a user see their Worklist notif

  • Adobe Flash IDE: Migration/Compatibility issues between Adobe Flash Professional CS3 and CS5

    Hi, Adobe Flash IDE: Adobe Flash CS3 Professional and Adobe Flash Professional CS5 I am facing some  migration/compatibility issues between Adobe Flash CS3 Professional and Adobe  Flash Professional CS5: I am working on a project that has  been compl

  • LCD screen, eyestrain problems?

    I've been considering getting an iPad 2 or a Kindle DX to have my college textbooks on and to use an ereader. It would be nice to have the extra features of the iPad and it would be easier to take to class than my laptop, however, I was wondering abo

  • Publish Photo refuses to work

    Hi all, I've done a bit of troubleshooting and still cannot resolve this issue. I was trying to load an iphone photo to my mobileme gallery today and it would not work, would not connect. It would give me the following message: "Check your MobileMe n