Getting values From Table in method execute??

Hi,
I'm using JDEV 10.1.2 and UIX, i have a table with a singleSelection component.
I'm trying to send the values of the selected row to an action, in the primaryClientAction property of the submitButton i'm adding an action parameter with the key value = CveConcept and the Value &{bindings.SrvCConceptosView1.CveConcepto}, in the execute method i'm getting the parameters using request.getParameter("CveConcepto"). The problem is that it seems that the value is saved in cache or something like that because when i select a diferent row, the value of the last row is sended, only by clicking two times the submitButton the correct selected parameter is sended.
Am i doing this the correct way?
Is there a different way to send table values to the execute method from a submitButton?
I hope some one can help.
Thank you.

Wouldn't a more direct approach like so help out ? :-
Once you have the table with the single selection component enabled. Within the execute method of your managed bean ( or any other method you refer to in the action tag ) , get hold of the view Object and simply doing a getCurrentRow , would get hold of the row with all the required attribute details.....
Or am i understanding your requirement differently ?
Cheers
K

Similar Messages

  • How to get value from Thread Run Method

    I want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that it seems that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    /* I should get Inside the run method::: But I get only Inside */
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";

    I think this is what you're looking for. I hold up main(), waiting for the results to be concatenated to the String.
    public class sampsynch
        class SampleThread extends Thread
         String x = "Inside";
         public void run() {
             x+="the run method";
             synchronized(this) {
              notify();
        public static void main(String[] args) throws InterruptedException {
         SampleThread t = new sampsynch().new SampleThread();
         t.start();
         synchronized(t) {
             t.wait();
         System.out.println(t.x);
    }

  • Get value from Table/Recordset Cell into a JSP variable

    Can anyone please help with this ?...
    I need to get a cell value from a selected row of a table into a variable to pass to a java bean.
    1 - The dynamic table is populated by a recordset named "rs" and has a submit button for each row .
    2 - The user clicks on the corresponding button to select the row.
    3 - The recordset retrieved the ID for that row in the query, but does not display it in the table.
    I have tried :
    <% String ID = rs.getString("bookid");%>
    <% Library.bookConfirm(ID);%>
    But this fails saying that it "cannot resolve variable rs..."
    Yet the recordset populates correctly and its name is "rs"
    Is there another way to do this perhaps ?... ie: put the id in a column of the table and get the cell value ?...
    What would be the syntax to get the ID cell value of that selected row on the button click ?...
    Your feed back would be greatly appreciated.
    Thank you.

    Create a new rs
    ResultSet rs1 = statement.executeQuery(query);
    and use getstring to access the individual cell.

  • Get value from table control

    Hi Guys,
    FYI, im having a table control with field Plant and Material. I have defaulted the <b>std search help</b> to field <u>Material</u> at the screen painter. Meaning system will call up the search help for Material once i press F4.
    Since the search help for field Material is a collective search help, and there is a <u>Plant</u> field available for Material filtering. Thus i may need to get the Plant's value from of same row of the  table control to Populate into the Material's search help.
    I have already tried to create a new module under the LOOP...ENDLOOP at PAI's flow logic. And try to use parameter id to set the value for plant, purpose is to populate it to Material's search help when i click F4 on material field. The problem is the new module that i coded under LOOP...ENDLOOP will never trigger when i click F4. Because there is NO event to trigger my module.
    Other than the above, i tried to code it under POV. But it doesn't work as well, because there is more than 1 record under table control and i can not determine the during runtime which row of F4 for material being click.
    Please comment on this above on how to solve the problem.
    Thanks in advance.

    Hi,
          You can call standard collective search help [say for Eg:<b>MAT1</b>] through Process on value-request event and set the paramenter id of Plant field before calling the funtion module <b>'HELP_START'</b>.Then we can get the materials specific to the PLANT in the corresponding row of the TABLE CONTROL.
    To get which row of the table control is clicked use <b>Get Cursor Line</b> Statement as i mentioned below.
    Flow logic:
    PROCESS ON VALUE-REQUEST.
    FIELD x_marc-matnr MODULE mat_shelp.
    Module definition:
    MODULE mat_shelp INPUT.
      DATA:v_help_info LIKE help_info,n TYPE i,
       it_dyselect LIKE TABLE OF dselc WITH HEADER LINE,
        it_dyvaltab LIKE TABLE OF dval WITH HEADER LINE.
      REFRESH it_dyselect.
      it_dyselect-fldname = 'MANDT'.
      it_dyselect-dyfldname = 'SY-MANDT'.
      APPEND it_dyselect.
      it_dyselect-fldname = 'MATNR'.
      it_dyselect-dyfldname = 'X_MARC-MATNR'.
      APPEND it_dyselect.
      v_help_info-call     =     'M'.
      v_help_info-object     =     'F'.
      v_help_info-program     =      sy-repid.    "'ZVIG_MOD_TABLE_CONTROL_1'.
      v_help_info-dynpro     =     sy-dynnr.    "'9001'.
    v_help_info-tabname     =      'MARC'.
      v_help_info-fieldname = 'MATNR'.
      v_help_info-fieldtype     =  'CHAR'.
      v_help_info-keyword   =   'MATNR'.
      v_help_info-fieldlng = 18.
      v_help_info-fldvalue = ''.
      v_help_info-mcobj = 'MAT1'.
      v_help_info-spras = 'E'.
      v_help_info-menufunct = 'HC'.
      v_help_info-title =     'SAP'.
      v_help_info-dynprofld = 'X_MARC-MATNR'.     <b>----
    > Give ur screen field name</b>
      v_help_info-tcode     =      sy-tcode.       "'ZTC1'.
      v_help_info-pfkey     =      'MEN'.
      v_help_info-docuid     =     'FE'.
      v_help_info-pov     =     'N'.
    v_help_info-curow     =   '2'.
    v_help_info-cucol     =  '1'.
      v_help_info-dynpprog = sy-repid.       " ZVIG_MOD_TABLE_CONTROL_1
      v_help_info-stepl     =   '1'.
      v_help_info-selectart = 'A'.
      GET CURSOR LINE n.
      READ TABLE it_marc INTO x_marc INDEX n.
      SET PARAMETER ID 'WRK' FIELD  X_MARC-WERKS .
      CALL FUNCTION 'HELP_START'
        EXPORTING
          help_infos         = v_help_info
        TABLES
          dynpselect         = it_dyselect
          dynpvaluetab       = it_dyvaltab           .
    ENDMODULE.                 " mat_shelp  INPUT

  • Get value from table column

    Hi,
    I am new to OAF, I am trying to get the value from the table in order to make validation. I have the following PG:
    SearchResultsTableRN
    itemRow
    DetailsCell
    DetailsTableLayout
    ShortDescRow
    ShortDescCell
    ShortDesc
    LongDescRow
    LongDescCell
    LongDesc
    AttributesRow
    AttributesCell
    AttributesTableLayout
    Attributes1Row
    Attribute11Cell
    ect...
    Can anyone help me please in how to go into the table --> row --> column to retrieve the value from a specific column?
    If their is a document or example that can help I will appreciate it. Since I tried searching in devguide and didn't find any results.
    Note: I am extending the controller and reached till the following code:
    public void processFormRequest(OAPageContext oapageContext, OAWebBean webBean){
    super.processFormRequest(oapageContext, webBean);
    String event = oapageContext.getParameter("ShortDescRow");
    OATableBean advtable = (OATableBean)webBean.findChildRecursive("SearchResultsTableRN");
    OARowBean rowtbl = (OARowBean)advtable.findChildRecursive("DetailsCell");
    String message = "test:"+event+"|"+advtable+"|"+"|"+"|"+"|";
    throw new OAException(message, OAException.INFORMATION);
    Thanks and Regards
    Patrick

    Patrick,
    My first advice would be go through OAF guide and do tutorial examples, for such basic details.
    If ur talking about tablelayout region
    u can use pageContext.getParameter(<Item id of UIX bean whose value u want>);
    If you are talking about table
    You can Iterate through the VO based on primary key ...on which the table is based, and retrive the corresponding Vo attribute value.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Get value from table attribute.

    Hello,
    I'm trying to get the value of an attribute from a table in my page. Shouldn't the expression be as such: "#{bindings.TestfilesView11.collectionModel.Filename.inputValue}"?
    This didn't work. I thought maybe it's because the row is selected, so the expression should point to that row. So i tried "rowIterator", "currentRow" instead, and still nothing worked.
    Thanks,
    Mohamed

    >
    Can i do this for the button while viewing a table and not a form?
    Without the use of a bean (with expression builder)...
    >
    Yes, you can do it,
    If the button is inside the table, you can use this EL
    #{row.bindings.AttributeName.inputValue eq null}If the button is outside the table, then go to the page definition, click the add binding and select attributeValues and then select the data source and the desired attribute. then you can use this attribute in EL like #{bindings.AttributeName.inputValue eq null}.

  • Get value from table record and set Disabled property...

    Hi! I have table in my JSPX page. I search for records and then press on one of the records with right click, see: http://my.jetscreenshot.com/2677/20120203-fas1-30kb
    I set disabled property like this of my commandMenuItem:
    #{row.GenResGrupa != 'true'}But as You can see from my picture above, the disabled property do not work. Where I am wrong with my code:
    <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.GenResGrupa != 'true'}"/> Please correct me! If You need some other information, please let me know.
    Best regards, Debuger!

    Dear fedor! Popup is in facet contextMenu. contentDelivery="lazyUncached" for my popup:
    <af:popup id="p1" contentDelivery="lazyUncached">
                            <af:menu text="menu 1" id="menu1">
                              <af:commandMenuItem text="#{sampleBundle.pases}"
                                                  id="commandMenuItem1"
                                                  action="adfMenu_pasesDati"
                                                  actionListener="#{bindings.setCurrentRowWithKeyValue.execute}"
                                                  disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"/>
                            </af:menu>
                          </af:popup>In my pageDef I have this code:
    <bindings>
        <tree IterBinding="LVAIMeklesanaIterator" id="LVAIMeklesana">
          <nodeDefinition DefName="kokaugi.model.view.LVAIMeklesana"
                          Name="LVAIMeklesana0">
            <AttrNames>
              <Item Value="Accename"/>
              <Item Value="LvaiKolekcijaPk"/>
              <Item Value="Accenumb"/>
              <Item Value="AvsGrupa"/>
              <Item Value="Cropname"/>
              <Item Value="EkspGrupa"/>
              <Item Value="GenResGrupa"/>
              <Item Value="Genus"/>
              <Item Value="Species"/>
              <Item Value="Sinonims"/>
            </AttrNames>
          </nodeDefinition>
        </tree>
        <action IterBinding="LVAIKolekcijaDatiIterator"
                id="setCurrentRowWithKeyValue"
                InstanceName="KokaugiModuleDataControl.LVAIKolekcijaDati"
                DataControl="KokaugiModuleDataControl" RequiresUpdateModel="false"
                Action="setCurrentRowWithKeyValue">
          <NamedData NDName="rowKey" NDValue="#{row.LvaiKolekcijaPk}"
                     NDType="java.lang.String"/>
        </action>
      </bindings>And disabled property is like this:
    disabled="#{row.bindings.GenResGrupa.inputValue != 'true'}"But it is still do not working. I am wrong somewhere? Maybe the only way to correct my problem is like Hohn said?
    Best regards, Debuger!

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • POPUP FM to get values from a table control?

    I know about the FM POPUP_GET_VALUES to get one or more values from a popup dialog box.  I would like to find a similar FM that allows getting values from a table control or something that allows entry of multiple lines of values.  Is there such a thing, or do I need to write my own?

    it depends on what values you want to enter, better write your own to have a control on the function.

  • How can I get the variable with the value from Thread Run method?

    We want to access a variable from the run method of a Thread externally in a class or in a method. Even though I make the variable as public /public static, I could get the value till the end of the run method only. After that scope of the variable gets lost resulting to null value in the called method/class..
    How can I get the variable with the value?
    This is sample code:
    public class SampleSynchronisation
         public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run method "+sathr.x);
    // I should get Inside the run method::: But I get only Inside
    class sampleThread extends Thread
         public String x="Inside";
         public void run()
              x+="the run method";
    NB: if i write the variable in to a file I am able to read it from external method. This I dont want to do

    We want to access a variable from the run method of a
    Thread externally in a class or in a method. I presume you mean a member variable of the thread class and not a local variable inside the run() method.
    Even
    though I make the variable as public /public static, I
    could get the value till the end of the run method
    only. After that scope of the variable gets lost
    resulting to null value in the called method/class..
    I find it easier to implement the Runnable interface rather than extending a thread. This allows your class to extend another class (ie if you extend thread you can't extend something else, but if you implement Runnable you have the ability to inherit from something). Here's how I would write it:
    public class SampleSynchronisation
      public static void main(String[] args)
        SampleSynchronisation app = new SampleSynchronisation();
      public SampleSynchronisation()
        MyRunnable runner = new MyRunnable();
        new Thread(runner).start();
        // yield this thread so other thread gets a chance to start
        Thread.yield();
        System.out.println("runner's X = " + runner.getX());
      class MyRunnable implements Runnable
        String X = null;
        // this method called from the controlling thread
        public synchronized String getX()
          return X;
        public void run()
          System.out.println("Inside MyRunnable");
          X = "MyRunnable's data";
      } // end class MyRunnable
    } // end class SampleSynchronisation>
    public class SampleSynchronisation
    public static void main(String df[])
    sampleThread sathr= new sampleThread();
    sathr.start();
    System.out.println("This is the value from the run
    method "+sathr.x);
    // I should get Inside the run method::: But I get
    only Inside
    class sampleThread extends Thread
    public String x="Inside";
    public void run()
    x+="the run method";
    NB: if i write the variable in to a file I am able to
    read it from external method. This I dont want to do

  • How to get values from a stored package variable of type record ?

    Sir,
    In my JClient form, I need to get values from a database stored package variable of type record. And the values are retained in the JClient form for the whole session. The values are copied only once when the form is started.
    What is the best way to do that ?
    Thanks
    Stephen

    Stephen,
    not sure what your model is, but if it is Business Components, I think I would expose the properties as a client method on the application module. This way all JClient panels and frames will have access to it. You could use a HashMap to store the data in teh app module.
    If JDBC supports the record type, then you should be able to call it via a prepared SQL statement. If not, you may consider writing a PLSQL accessor to your stored procedure that returns something that can be handled.
    Steve Muench provides the following examples on his blog page
    http://otn.oracle.com/products/jdev/tips/muench/stprocnondbblock/PassUserEnteredValuesToStoredProc.zip
    http://otn.oracle.com/products/jdev/tips/muench/multilevelstproc/MultilevelStoredProcExample.zip
    Frank

  • Deleting the values from table control

    HI,
    I need to remove the selected line from the Table control on my screen.
    The point is that the Internal table does not have any records,.
    for example in the Customer Create screen,
    while entering the bank details we will enter it in a tbale contraol.
    but the records doesnt exist in the database. but the record gets deleted from the table control only if we press delete button.
    please guide me.
    please note : I want to delete the record from Table Control on the screen and I dont have any corresponding database records..
    regards

    Hi..
    The solution to your problem - deleting values from table control.
    Here: it_wizard is the internal table which is holding the value of table control.
             wa_wizard is the work are of the internal table it_wizard.
             it_delete is the internal table which holds the deleted record of table control.
             wa_delete is the work area of the internal table it_delete
    Also here the field ZSEL is the character field which is used to select the entire record in the table control.
    LOOP AT it_wizard into wa_wizard WHERE zsel = 'X'.
           MOVE-CORRESPONDING wa_wizard TO wa_delete.
           APPEND wa_delete TO it_delete.
           delete table it_wizard from wa_wizard.
    DELETE  FROM zfin_goods WHERE ZFG = WA_delete-ZFG.
    ENDLOOP
    if sy-subrc eq 0.
    Message 'Delete Successful' type 'S'.
    endif.
    The above code will delete the record from both the table control.internal table and the database table.
    I think this will help you to great extent.
    Ward regards,
    Bhuvaneswari
    Edited by: BHUVANESWARI THIRUNAVUKKARASU on Jan 7, 2009 10:39 AM

  • JSF:how to get value from dinamically generated HtmlInputText components�H�H

    <h:panelGroup binding="#{dynamicInputGroupBean.group}"/>
    public HtmlPanelGroup getGroup() {
              if (this.getSelectedComp() == null) {
                   return this.group;
              FacesContext facesContext = FacesContext.getCurrentInstance();
              Application application = facesContext.getApplication();
              this.group = new HtmlPanelGroup();
              Set pSet = this.getSelectedComp().getParameterses();
              int size = pSet.size();
              this.instanceValue = new String[size];
              int i = 0;
              for (Iterator it = pSet.iterator(); it.hasNext();) {
                   Parameters tempP = (Parameters) it.next();
                   HtmlOutputLabel outputLable = new HtmlOutputLabel();
                   HtmlInputText inputText = new HtmlInputText();
                   inputText.setId("p" + i);
                   String valueBindingExpression = "#{dynamicInputGroupBean.instanceValue["+i+ "]}";
                   System.out.println(valueBindingExpression);
                   ValueBinding valueBinding = application
                             .createValueBinding(valueBindingExpression);
                   inputText.setValueBinding("value", valueBinding);
                   outputLable.setFor(inputText.getId());
                   outputLable.setValue(tempP.getParaname() + ": ");
                   group.getChildren().add(outputLable);
                   group.getChildren().add(inputText);
                   i++;
              // group.getChildren().add(new HtmlInputText());
              return group;
         }as codes show above, i successfully genera HtmlInputText dinamicaly�C
    but i got problems while i try to print those values...
    after the the jsp page presents in my browser,
    i input some words in the input components,
    and then click a commandButton hold an action to print their value
    action code :
    String[] tempArray = this.getInstanceValue();
    for (int i = 0; i < tempArray.length; i++) {
    System.out.println(tempArray);
    only NULL has been printed in the consol ....not the word i inputed!!!
    so my question is how can i get values from those
    dinamically generated HtmlInputText ????

    This approach is odd. What's the functional requirement after all? You normally attach the inputtext value to a backing bean property and do the desired command button action which is attached to a backing bean action method. In this method you then use the value for the query.

  • How to get values from an IFrame...

    Hi everyone. I have come to a complete stop i my project and need to ask the following: How do i get the values from an IFrame.
    Situation: I have a main.jsp page that contains an IFrame(data.jsp). Data.jsp is basically made up of a bunch of checkboxes. The state of these boxes(checked or unchecked) is determined and set by a JAVA program and the results are then stored in a StringBuffer. Contents of Stringbuffer could look something like this: <tr><input type='checkbox' name='box0' CHECKED></tr>.
    The StringBuffer in then presented in the IFrame(data.jsp) like so: <%=res.getInfo()%>
    The user should be able to check or uncheck the boxes from the main.jsp page then when pressing a submit button the changes should be stored in a DBase.
    After the submit button have been pressed i go into my Servlet's doPost() method for some basic processing. This is were the problem starts. I usally use HttpServletRequest.getParameter(String param) to get values from the main.jsp page. But these checkboxes are stored in the IFrame, so how do i go about to retrieve the values from data.jsp from the doPost() method or in some other way maybe. This is quite urgent and i hope that i have explained the scenario in enough detail.
    Any help would be greatlly apritiated.
    Best regards
    Peter

    Hello
    Just try this link
    http://www.faqts.com/knowledge_base/view.phtml/aid/13758/fid/53
    HTH

Maybe you are looking for

  • Importing jpeg's to Microsoft word

    I am looking to import some jpeg's to word using activex, but i am having trouble doing that. need help on how to import a jpeg to labview.I do not have the office toolkit. thanks anand

  • SWF Loader - not loading from variables

    <mx:SWFLoader  id="imgComp" width="250" height="150" source="C:/projects/Flexprj/file1swf" autoLoad="true" complete="fnTest()"/> The above code is working find and it is loading the swf fine The problem comes when I read a list of files and load it..

  • Scroll bar of Detail table disappears after clicking on other Detail table.

    I am using JDeveloper 11.1.1.0.2 and JHeadstart 11g TP1. I have 1 master table with 3 detail tables. Master table: Layout style = Table-form --> inline, Stack Groups on same page = Detail Groups Only (Tabbed) Detail tables: Layout style = Table-form

  • Samsung 51 inch

    I need your opinion could this all be a defect I only have had this tv for about two months and I have comcast cable the type where you can have a guide and see the listings of channels well, I notice the other day when I was watching tv and their wo

  • Best strategy to retrieve large amount of data with EJB ?

    Hi all I have an EJB 3 which is fronted by a Web Service. The EJB retrieves a large amount of objects (TaskList) and returns it to the client. @Stateless public List <TaskList> findByRole(String role){ List <TaskList> tasklist = em.createNamedQuery("