Pass a variable number into an Action method from an array of buttons

Hello,
I have created an array of buttons like so:
                   private javax.swing.JButton[] barray = new JButton[8];
javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(K8055_Card_Control.JavaElectrodeSwitches1App.class).getContext().getActionMap(JavaElectrodeSwitches1View.class, this);
             for (int i=0;i<8;i++)    // Create Output Check Boxes
          barray[i] = new JButton();
                        barray.setAction(actionMap.get("ButtonPressed"));
          barray[i].setName("Outbox"+ String.valueOf(i+1));
          barray[i].setText("Electrode " + String.valueOf(i+1));
BoxLayout layout = new BoxLayout(jPanel1,BoxLayout.PAGE_AXIS);
barray[i].setAlignmentX(JCheckBox.CENTER_ALIGNMENT) ;
jPanel1.setLayout(layout);
jPanel1.add(barray[i]);
When a button is pressed it calls the method ButtonPressed()@Action
public void ButtonPressed()
// button pressed code here
My problem is that once the button has been pressed I don't know how to find out which button called the method. Each button operates a different switch.
I tried testing barray.isSelected(); however the ButtonPressed() method is only called once the button has released and is no longer selected.
Any ideas?
Thanks,

Actually the answer to both of these questions is ActionEvent
do for instance:
JButton b = new JButton("test");
JButon b2 = new JButton("test2");
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
  Object src = ae.getSource();
  String cmd = ae.getActionCommand();
  if (src == b) { //won't work unless you make b final
  //or
  if ("test".equals(cmd)) {
b.addActionListener(al);
b2.addActionListener(al);

Similar Messages

  • How to pass a Variable value into an ODI Scenario from ODI Package

    I have created an Interface that uses the variable #ENTITY_ID for retrieving entity data from the DWH; now I have generated a Scenario from the interface and placed the Scenario in an ODI Package; am not sure how to pass the #ENTITY_ID variable to the ODI Scenario?
    Any help is greately appreciated.
    Best Regards
    Bee

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • How to  pass a variable value into a custom planning function via a web

    Can some one tell me
    How to  pass a variable value into a custom planning function via a web template?
    What are the different types of Planning function parameters available and what is the difference between them?
    Thanks
    babu

    Hi Sutrtha,
    Yeah I got the pop up asking to select the variables used, I have selected ENTITY_ID that was used by the interfaces, but on execution of the package the Scenario did not work as the passeed variable #ENTITY_ID is set to 0 instead of the value I am passing.
    Am I missing something?
    Regards
    B

  • Prevent action method from executing

    Hi,
    Is it possible to somehow jump over some action methods in the definition of a service? For instance, this is the definition of the COLLECTION_INFO service, with two extra additions (prepareCustomRedirect and dummyMethod). In prepareCustomRedirect method I would like to force the service to jump over the execution of the rest of the action methods and go directly to the last one, dummyMethod, which does nothing, hence the services completes its execution. After the execution of the service, a redirect is desired, which is set in prepareCustomRedirect.
    <tr>
         <td>COLLECTION_INFO</td>
         <td>DocService
              33
              COLLECTION_INFO
              null
              null<br>
              !csCollectionUnableToInfoCollection</td>
         <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
              3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
              3:canReadInCollection:::null
              3:loadUserConfig:::null
              3:loadCollectionPermissions:::null
              3:getCollectionMeta:::null
              3:loadSpecificCollectionMeta:::null
              3:loadPathForCollection:::null
    3:dummyMethod::0:null</td>
    </tr>
    Is this possible, either in this way or any other?
    Thanks,
    V

    You can do it like this:
    <tr>
    <td>COLLECTION_INFO</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:dummyMethod::0:null</td>
    </tr>
    <tr>
    <td>COLLECTION_INFO_ORIG</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
    3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
    3:canReadInCollection:::null
    3:loadUserConfig:::null
    3:loadCollectionPermissions:::null
    3:getCollectionMeta:::null
    3:loadSpecificCollectionMeta:::null
    3:loadPathForCollection:::null
    </td>
    </tr>
    Within your dummyMethod you can perform your test and either execute the other service, or your code.
    Alternatively, take a look at Java filter events. If you find one that suits, you may put your code into the filter, and stop executing the rest of the service, if necessary.

  • How to invoke action method from mail contained link

    Hello,
    my application needs to send mails to users that include links for the user to click on. Something like www.mysite.com/displayData.jsp&id=123. My question is now how I make JSF invoke the respective method in the backed bean to display the data with the id 123 when the user clicks on the link int the mail.
    I wonder whether there is some kind of "catch-all action" that checks whether the user is logged in and authorized whenever any JSP page is invoked. I'm a bit tired of first checking the authorization of some user before processing the remaining part od the backed bean's action method.
    Thanks for any hints,
    Oliver Plohmann

    my application needs to send mails to users that
    include links for the user to click on. Something
    like www.mysite.com/displayData.jsp&id=123. My
    question is now how I make JSF invoke the respective
    method in the backed bean to display the data with
    the id 123 when the user clicks on the link int the
    mail.I dont think there is a way to submit to an action on click of a link. Only possible solution is to invoke the method from the constructor of your Backing Bean and populate the bean fields displayed on your page.
    I wonder whether there is some kind of "catch-all
    action" that checks whether the user is logged in and
    authorized whenever any JSP page is invoked. I'm a
    bit tired of first checking the authorization of some
    user before processing the remaining part od the
    backed bean's action method. You can try out a Servlet filter for doing this.

  • How to pass variable value into module pool scren from a report program

    Hi,
    I have created a report program with selection screen parameters. when the inputs are filled and executed it generates the purchase evaluation sequence number. i have created a screen and passed that number to display on it with print option and back option buttons as required. but variable alone is not getting passed from the program to module pool screen. buttons are working fine. value alone is not coming. can anyone please help me.
    regards,
    sudha.

    Hi ,
    you need to declare that variable param at Global.
    sample code...
    report xyz....
    data: g_no type ekko-ebeln.
    start-of-selection...
    g_no = '12345'.
    call screen 0100.

  • Passing a variable value into a parameter

    Here's a general example (not all of the code):
    _global.xPosition = function(whichMc:MovieClip,
    xStart:Number, xEnd:Number):Void {
    new Tween (whichMc, "_x", Strong.easeOut, xStart, xEnd, 1,
    true);
    function loadFunction(success:Boolean):Void {
    if (success) {
    var image01ClosedPosition:Number =
    this.firstChild.childNodes[0].attributes.imageChangeX;
    hit01.onRollOver = function() {
    xPosition(img01,image01ClosedPosition,0);
    In the XML file, the value I'm pulling in is -29.
    If I do a trace of imag01ClosedPosition, I get the correct
    value of -29.
    If I change the call to the function to read
    xPosition(img01,-29,0); this also works
    I just cant seem to get it to work the way I have it above.
    (I know I left a lot out, but just wanted to give an idea of
    the part that's not working.)

    Thanks, kglad. I was wondering about that. I thought that
    putting a variable data type of :Number would have made it a
    number, but I never got an error in the debugger so I thought it
    was ok. I traced the data type and figured out it was actually a
    string and changed the line like follows which turned the string to
    an integer and made it work:
    var image01ClosedPosition:Number =
    parseInt(RootNode1.attributes.imageChangeX);

  • Rendered attribute of commandButton preventing action method from executing

    When I add a rendered tag to my commandButton it'll only execute the method intermittantly. After a lot of testing, I've narrowed down the problem so I now know when it does and does not work properly.
    If rendered="true" it always works fine
    If rendered="#{issue.update}" and isUpdate() is simply "return true;" it'll always work correctly
    If rendered="#{issue.update}" and isUpdate() is simply "return this.getId() != 0;" it will not execute the action specifiied, however the page does refresh.
    It's also interesting to note that on the rendered page, the button is always shown only when it should be. So when the action fails to execute, the button is shown on the screen.
    In the case that doesn't work, I debugged through and noticed that isUpdate() is called six times for a single page refresh. By printing a stacktrace for each call, I discovered that it's called once in the ApplyRequestValues stage of the lifecycle and the other five times are from RenderResponse (I have the stacktraces, let me know if they'd be worth posting). This method is only referenced once and only on the jsf page, never in the java code... but I'll go back and try to understand why it's calling it so many times later.
    The first time isUpdate() is called, it will retrun false because the value for id has not yet been assigned, which makes sense. This causes a "false" to be returned from isUpdate() and this is what is causing the action to not be executed. If I debug through and change the return value to be true here (only the first time) the action is updated. So my question is, what's going on here? I don't understand why is isUpdate() called so many times, why is it called so early in the lifecycle, and why the call in the apply request values stage determines whether or not it executes the action?
    Now, as a workaround, I put a binding on the id, and tried to use that value. That exposed another problem with my page which requires some explanation... Here are the relevent sections of the page and backing bean...
    issue.jsp
    <h:outputText value="#{issue.init}" />
    there's a datatable here which displays all issues and has a commandLink to edit the issues (immediate="true"). It posts back to this page and passes an ID on the URL.
    <h:inputHidden id="id" value="#{issue.id}" binding="#{issue.idBinding}" />
    <h:inputText id="name" value="#{issue.name}" required="true" />
    <h:commandButton id="updateIssue" value="Update" action="#{issue.updateIssue}" rendered="#{issue.update}" />
    Issue.java
    getInit() will get the id from the FacesContext (specifically, the URL) and load the data from the database.
    On the rendered page in my web browser:
    After clicking on an edit link, the page is loaded and the name is filled in, the update button is on the screen, and everything looks good.
    When I view source, I see that the hidden input for id is set to zero. I'm still trying to figure out why this is the case since all the other parameters are set properly. I stepped through getInit() and it is, indeed setting the id property properly.
    So when I added the binding to get the value from there instead of via the local values, I found that it always got zero (presumedly because that's what is rendered in the HTML code). This means that isUpdate() still returns false on the first call, and my attempt at a workaround fails! So, just as a test, I used some "javascript on the URL" trickory to set the id field to "10". That worked just fine. So the root of the problem is that issue.id is not loading. I put code in the getId() method to always look at the binding and then faces context and put the id into this.id if it found a non-null and non-zero value. It now returns the correct value all of the time but the HTML produced still says the value is zero.
    I've spent about 4 hours on this issue and I'm to the point where I need advice from someone who is more educated on how JSF works. I know the inputHidden get the vaule for the HTML tag it produces from getId() because when I hard code that to always return 10, it works. But when I leave it to return the proper value, the debug statements say it's returning the proper value, but the HTML always says it's zero. This isn't an acceptable solution anyway because I use getId() in the datatable to display the IDs of each of the issues; I just wanted to see if it'd work and it didn't.
    Here's my latest getInit() method (which returns the value from the URL when called from the datatable, but not when called from the inputHidden.
        public int getId() {
            if(getIdBinding() != null && !getIdBinding().isLocalValueSet()) {
                if(getIdBinding().getSubmittedValue() != null) {
                    int temp = Integer.parseInt((String)getIdBinding().getSubmittedValue());
                    if(temp != 0) {
                        this.id = temp;
                        log.info("Got binding value of "+this.id);
            FacesContext ctx = FacesContext.getCurrentInstance();
            if(ctx != null) {
                Map<String, String> map = ctx.getExternalContext().getRequestParameterMap();
                    if(map != null) {
                    String given_id = map.get("id");
                    if(given_id != null) {
                        // if given an ID and no action, we load the data
                        try {
                            log.info("Got value from FacesContext of "+given_id);
                            int temp = Integer.parseInt(given_id);
                            if(temp != 0)
                                this.id = temp;
                        } catch(NumberFormatException e) {
                            // if what's passed in isn't an integer, we leave everything at default values
            return this.id;
        }Thanks in advance,
    Adam

    I'm clicking a link which will load data into a form. In the form there is a field called "id" which has a value of something other than zero. I press the update button (which is only rendered when the id is non-zero), it submits the form. When the restore view happens, the id is the default value of 0 because it has not yet applied the values from the form to the backing bean. Therefore the rendered attribute of update button (isUpdate()) will return false, and the update() method does not get queued.
    When I switch my backing bean to session level, the restore view already has the id loaded, even before the values from the form are applied, so everything works as expected. The problem was that I needed to have the correct return values before any values have been loaded into the member variables.
    As a solution to this, I made some private boolean variables called isNew and isUpdate. Both of them are true by default. This makes sure that the isNew() and isUpdate() methods (attached to the render attribute of my command buttons) return true in the restore view phase. When I read in the id from the URL or hidden input, it'll update the boolean values accordingly, which makes sure the buttons are rendered properly. This allowed me to set the backing bean back to the request scope, which make me happy. <img class="emoticon" src="images/emoticons/grin.gif" border="0" alt="" />
    Thank you Mr. De Campo. You gave me exactly what I was looking for... a better understanding of how thigns work, and (indirectly) a clean solution to my problem.

  • Not able to call action method from the javascript

    I am using weblogic 10.3.2 portal.
    My requirement is to call a action in controller throuhg java script when user selects a different option in a dropdown.
    When try it we are not able to call it is returning null as a elementId. Below is the snippet of my code.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <netui:html generateIdScope="true">
    <head>
    <netui:base/>
    </head>
    <script language="JavaScript" type="text/JavaScript">
    function SelectBANSubmit(id)
         var scope = document.getElementById("scopeOneSpan");
         alert("value====arv" + scope);
         //var form = document.getElementById(lookupIdByTagId(form,scope));
         //alert("value====arv" + form);
         var knoVal = document.getElementById(lookupIdByTagId(id,scope));
    alert("in method" + knoVal);
         </script>
    <netui:body>
    <span id="scopeOneSpan">
         <netui:form action="getBillDetails" >
         <netui:select dataSource="actionForm.selection" tagId="arvind" optionsDataSource="${actionForm.resDTO.kno}" onChange="SelectBANSubmit('arvind')"/>
              </netui:form>
         </span>
         </netui:body>
    </netui:html>
    Any help would be appreciated.

    Below is my code
    JS Code
    function fundemo(id)
    alert("so currently we are in fundemo function ");
         var scope = document.getElementById("scopeOneSpan");
    alert(scope);
         var check = document.getElementById(lookupIdByTagId('textbox1',scope));
    alert("check id is " + check.id + " and its value is "+ check.value);
    JSP Code
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <netui:html generateIdScope="true">
    <head>
    <netui:base/>
    </head>
    <script type="text/JavaScript" src="D:/testWS/testWebProject/WebContent/WEB-INF/js/test.js"> </script>
    <script language="JavaScript" type="text/JavaScript">
    function SelectBANSubmit(id)
    alert("In JS Method of the JSP File ");
    fundemo(id);
    </script>
    <netui:body>
    <span id="scopeOneSpan">
    <netui:form action="getBillDetails">
    <td >
    <netui:textBox dataSource="actionForm.selection" tagId="textbox1" />
    </td>
    <td>
    <netui:button type="button" onClick="javascript:fundemo('textbox1')" value="Test click"/>
    </td>
    </netui:form>
    </span>
    </netui:body>
    </netui:html>

  • Passing Parameter/Variable into Dashboard URL

    Hi,
    Instead of having someone type in or search for a variable I was trying to determine a way to pass a variable directly into the URL
    I have tried:
    VARIABLE_SCREEN=X&BI_COMMAND_1-BI_COMMAND_TYPE=SET_VARIABLES_STATE&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE=VARIABLE_INPUT_STRING&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE_TYPE-VARIABLE_INPUT_STRING=XXXXXX&BI_COMMAND_1-VARIABLE_VALUES-VARIABLE_VALUE_1-VARIABLE=XXXXXXXXX
    added to the dashboard URL:
    pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=DASHBOARD
    But any time I try this method it just refreshes the variable screen...
    Am I missing something? Maybe I think its easier then it really is.
    Thanks,

    Mike,
    Variable_screen=x will always force the variable screen to display.
    Try just variable_Screen=&BI_command etc etc

  • Passing a variable from init to actionPerformed method

    hi everyone!
    i d like your help on how i can pass two variables (wager, bankBalance)
    to actionPerformed method. variable bankBalance is initialized out of init method(is it right?) and i prompt the user to set a wager in the method init.
    i want to pass these values in actionPerformed in order to do the calculation bankBalance+wager.
    public class Wager extends JApplet implements ActionListener {
         JLabel die1Label, die2Label, sumLabel, pointLabel;
         JTextField die1Field, die2Field, sumField, pointField;
         JButton rollButton;
         final int WON=0, LOST=1, CONTINUE=2;
         int bankBalance=1000;
         boolean firstRoll=true;
         int sumOfDice=0;
         int myPoint=0;
         int gameStatus=CONTINUE;
         // setup GUI components
         public void init()
         int i;      
         do {
      String k = JOptionPane.showInputDialog(null, "Enter a number less than 1000 but greater than 0");
       wager= Integer.parseInt(k);
    } while (wager > 1000 || iwager< 1);
    public void actionPerformed (ActionEvent actionEvent)
    {

    This was answered in the other thread that you double posted. What's the problem?
    You can't PASS those to ActionPerformed. Like I said before, you have to make them class variables:
    public class Wager implements ActionListener
        private int wager;
        public void actionPerformed(ActionEvent event)
            // Now you can work with wager here, because it's a class variable.
    }%

  • Variable number of arguments in procedure PL/SQL

    Hello everyone,
    I have a "simple" question : can a procedure PL/SQL take a variable number of arguments ?
    In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs...
    Thanks you !

    862447 wrote:
    I have a "simple" question : can a procedure PL/SQL take a variable number of arguments ?No. Not in the style of Pascal and C/C++. E.g. int printf( char * format, … ) in C using va_list.
    In my case, the procedure is called by the submit button of a form, and the form has variable number of inputs...There are a couple of merhods.
    Code a fixed number of parameters in the procedure signature. Assign defaults to these. The caller can now select which parameters from the fixed list to use and which not.
    Create a structure. For example, having a 100 parameters in a signature is something I will call plain stupidity. This creates usability issues, maintenance issues and even performance issues. And debugging will be a nightmare. So instead create a structure (aka record in the PL/SQL language or an object using the SQL language) - where this structure describes (in a structured and logical way) the list of parameters.
    Neither of these method however allows the caller to pass a variable number parameters - the parameter signature is fixed. It has a fixed number of defined parameters.
    So the only way to simulate a variable parameter signature is to use a collection. The collection itself is of course a single parameter passed. But it can have 0 elements. It can have a 1000 elements. And similar to a va_list in C/C++, the procedure can iterate through the data passed via the parameter by the caller.
    Simple example:
    //-- define the collection type, e.g. a collection of strings
    create or replace type TStrings is table of varchar2(4000);The procedure's signature:
    --// passing by referencing and not value should be considered
    create or replace procedure FooProc( param TStrings ) is ..And to call this procedure with variable parameters:
    --// calling it with 2 param value
    FooProc( TString('123','testing') );
    --// calling it with 5 param values
    FooProc( TString('p1','p2','p3','p4','p5') );

  • Passing a changing number of parameters?

    I need to pass floats to a method like this:
    float n;
    m.store(n);
    But the number of floats to be passed, changes. Sometimes i need to pass one float and sometimes I need to add three floats or whatever. I'm guessing I need to use something like float n[ ]? But how do I do this? I hope you understand what i mean :-)

    IMHO, do use float, ever!
    Under version 5.0 you can pass a variable number of arguments.
    e.g.
    public void store(double... values)
    m.store(1.0);
    m.store(1.0, 2.0);
    m.store(1.0, 2.0, 3.0);
    Under 1.4 and 5.0 you can pass an array
    public void store(double[] values)
    m.store(new double[] { 1.0 });
    m.store(new double[] { 1.0, 2.0 });
    m.store(new double[] { 1.0, 2.0, 3.0 });

  • Passing variable of size greater than 32767 from Pro*C to PL/SQL procedure

    Hi,
    I am trying to pass a variable os size greater than 32767 from Pro*C to an SQL procedure.I tried assigning the host variable directly to a CLOB in the SQL section but nothing happens.In the below code the size of l_var1 is 33000.PROC_DATA is a procedure that takes CLOB as input and gives the other three(Data,Err_Code,Err_Msg) as output.These variables are declared globally.
    Process_Data(char* l_var1)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    l_clob := :l_var1
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    I also tried using DBMS_LOB.This was the code that i used.
    Process_Data(char* l_var1)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    DBMS_LOB.CREATETEMPORARY(l_clob,TRUE);
    DBMS_LOB.OPEN(l_clob,dbms_lob.lob_readwrite);
    DBMS_LOB.WRITE (l_clob, LENGTH (:l_var1), 1,:l_var1);
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    Here since DBMS_LOB packages allow a maximum of 32767,the value of l_var1 is not being assigned to l_clob.
    I am able to do the above process provided i split l_var1 into two variables and then append to l_clob using WRITEAPPEND.i.e l_var1 is 32000 in length and l_var2 contains the rest.
    Process_Data(char* l_var1,char* l_var2)
    EXEC SQL EXECUTE
    DECLARE
    l_clob clob;
    BEGIN
    dbms_lob.createtemporary(l_clob,TRUE);
    dbms_lob.OPEN(l_clob,dbms_lob.lob_readwrite);
    DBMS_LOB.WRITE (l_clob, LENGTH (:l_var1), 1,:l_var1);
    DBMS_LOB.WRITEAPPEND (l_clob, LENGTH(:l_var2), :l_var2);
    PROC_DATA(l_clob,:Data,:Err_Code,:Err_Msg) ;
    COMMIT;
    END;
    END-EXEC;
    But the above code requires dynamic memory allocation in Pro*C which i would like to avoid.Could you let me know if there is any other way to perform the above?

    Hi,
    The Long Datatype has been deprecated use Clob or Blob. This will solve lot of problems inherent with the datatype.
    Regards,
    Ganesh R

  • Opening a new window calls action methods again.

    Hi all,
    I have a form that has a button to submit the information. For certain scenarios that submission can take over 30 seconds. So while that submission is taking place I hit <ctrl>-N on the browser to open a new window. This new window is calling the action methods associated with the submit button of the form.
    My guess is that this second window is sharing the session information of the other window and therefore is sending the request flow through the state of the other view.
    What can I do to handle this case?
    Thanks.
    Jason

    If you want to open a new window besides your original window, then you have to do it with javascript. Put a code similar like this in your onClik property of your hyperlink:
    window.open("faces/Page1.jsp", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;When you click the hyperlink, it will open a second window of Page1.jsp. You can use if-else construct in javascript to choose which page you want to show.
    If you want to pass a value to the second window, you can use query string like this:
    window.open("faces/Page1.jsp?par1=value1", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;Passing a field value in table component to second window:
    window.open("faces/Page1.jsp?par1=#{currentRow.value['FIELDNAME']}", "","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=450");
    return false;To retrieve the parameter in the second page (in this case Page1.jsp), put this in init():
    javax.servlet.http.HttpServletRequest req = (javax.servlet.http.HttpServletRequest) getExternalContext().getRequest();
            String par1 = req.getParameter("par1");After getting the parameter value, you can do the rest as your normal page, ie populating the page the way you like.
    AFAIK, the only way to open a new window is through javascript only. CMIIW.
    Hope that helps.

Maybe you are looking for

  • Classnotfound exception in Studio

    I have this entity bean that I have deployed in weblogic. I am now trying to use the studio to create a business operation from one of the Bean methods. When I click on Configuration->Business Operations, I get a Classnotfound exception for the beans

  • Excel opens when i command a .csv file to open with numbers. How can i get numbers to be my default application?

    I am sharing a Macbook Pro with my girlfriend. She runs Microsoft Office Excel for her work and I perfer Numbers in my work. Logged into my user account, I command an email attachment (.csv) to open with numbers. Excel launches every time. I can open

  • Can I use Oracle Clusterware 11 against 10.2.0.4 databases?

    Implementing a 2 node RAC system on Linux RHEL 5, with version 10.2.0.4 databases. I read a fleeting post mentioning that you can use Oracle Clusterware version 11 against a 10R2 databases - is that the case? I've searched but can find no additional

  • Using non blocking connect() call for SCTP sockets in Solaris10

    Hi, I have a problem with non blocking connect call on SCTP socket. I am using the sctp stack support in Solaris10. When the connect is successful, I can get the pollout event on the socket. But there is no event observed when the peer does not exist

  • Process chain-Further Update

    Process Chain    I need to modify the current process chain   Our current Data Flow    ODS ( Full)---> Cube ( Delta)   Our Current Process Chain Chain   Executing a Info Package (  Full load to ODS) and next process Activate ODS Data and the next pro