Using value selected in selectOneChoice as variable for execute method

I have already created data controls for the session bean method so I can drag and drop on to the jsp. This works fine when entering the data into the input text fields but I really need the first value to come from an initial page and the second value to come from the dropdown. I just don't know how to get the value or how to connect it to the button for execution.
The method takes two values
value 1, org is passed in (how do I pass from another page? I will actually have the render for this input field set to false so it does not display)
value 2, typeId from a selectonechoice drop-down list (how do I manipulate the soc to pass the information? Currently it looks as if it is just passing the elementAt number, I need get the actual value for the item selected. Where can I retrieve it?)
I have a button ready to execute the method on the session bean which should take these values. (of course the inputvalue for the soc was not typeId but I changed it. The values for the soc are actually coming from another method performed earlier.)
This is what I have so far:
I have my input text field waiting on info to be populated from the previous page (currently I manually entered it)
I have my selectonechoice populated
A button with the execute method already set (b/c I initially used the drag-drop functionality to test my method)
Forgive me for repeating myself so much.
Thanks!

Passing a value between pages:
http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#BABIHDAA
Getting a value from a list item:
http://www.oracle.com/technology/products/jdev/tips/mills/listvalue/listbindingvalue.html
http://blogs.oracle.com/shay/2009/11/getting_the_value_from_a_selec.html

Similar Messages

  • How to use a collection type of bind variable for execute dynamic statement

    Hi,
    We have a case where we copy selective data from Schema A To Schema B in one oracle database. The copy is achieved by using
    execute immediate 'insert into '||target_schema||'.tablea select * from '||from_schema||'.table a where a.id in (select test_id from '||from_schema||'.table c);';
    This works fine it takes an average of 10 seconds to copy around 14 tables. We have a requirement to bring this time to 2 seconds. One observation has been the clause
    "select test_id from '||from_schema||'.table c" in the above sql statement repeats for many inserts . Thus we were thinking to bulk fetch this set of tests ids and use a bind vatiable of collection type for the execute immediate clause. Any suggestions on how to achieve it?
    Thanks,
    Chandana

    >
    One observation has been the clause
    "select test_id from '||from_schema||'.table c" in the above sql statement repeats for many inserts
    >
    So what? Constructing a string for a table level insert and parsing it can't possibly be a performance problem. If you were creating a string in a loop to insert rows into a table by getting the data FROM a collection - that's a problem that keeps showing up in the forums.
    I'm with bravid and Nikolay on this one. First find out which side, select/insert, the problem is on.
    As they said you need to provide more information about the process.
    And using collections for your use case is definitely not the thing to do.
    1. How many rows are we talking about?
    2. Are the rows being inserted into an empty table?
    3. Are you running these queries during peak production hours or in a batch windows?
    Tune the SELECT if the problem is on that side.
    Post an execution plan for the SELECT part of a query you think should run faster.
    SET SERVEROUTPUT ON
    SET AUTOTRACE TRACEONLY
    SQL> select * from emp;
    Execution Plan
    Plan hash value: 3956160932
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |    14 |   546 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| EMP  |    14 |   546 |     3   (0)| 00:00:01 |
    SQL>On the INSERT side you might be able to use bulk inserts
    ALTER TABLE myTable NOLOGGING;
    INSERT /*+ append */ INTO myTable . . .
    ALTER TABLE myTable LOGGINGIf the insert tables are always reused you could just leave them as NOLOGGING. Since you can't recover bulk data you need to make sure to get a good backup after the loads if you need to recover the data from the logs rather than just reload it yourself.

  • How to use the selection profile and status profile for production order?

    Hi expert,
       I want to know how to use the selection profile and status profile for production order. what's the usage for these two selection profile and status profile ?
      Please help me.
      thanks in advance.
      george.shi

    Hi George,
    There are are two types of statuses.One is system status and second one is user status.These statuses will tell us current situation of an order.
    We can't change system statuses.But we can create our own statuses through status profile.With this profile we can control user statuses.
    In this status profile,
    1.We define the sequence in which user statuses can be activated,
    2.We define initial statuses
    3. Allow or prohibit certain business transactions.
    Selection profiles are used to select the objects (say production orders) with different status combinations.We assign status profiles to selection profiles in BS42 T-Code.
    Regards,
    Raja.
    Edited by: Rajarao on Oct 30, 2008 6:21 AM
    Edited by: Rajarao on Oct 30, 2008 6:22 AM

  • Need a Syatem variable for Executing the report by RFC.

    Hi Experts,
    Need a Syatem variable for Executing the report by RFC.
    what i mean to say is,i can execure the report directly ...then no issues.
    But if i execute the Report by RFC ,then i should put a condition with system variable...
    Please suggest me ,how can put a condition when i am executing the report through RFC.
    Thanks
    Babu

    Hello Friend,
    what I understood that you want to put some extra condition if that report is getting called from RFC...
    you can use the system variable SY-CPROG....it will hold the value of the report when it is geeting executing directly...
    but when it is getting executed therough RFC...it will hold that RFC name...
    Thanks
    Krish

  • Using Value in a Text Entry Box for Calculation in a Variable

    I have a project where I ask the user to fill in their name in one entry box and their two-digit age in another text entry box.  Later in the project, I want to ask them to think back to when they were 6 years old and how they would describe themselves at that time.  (the project is on self-awareness).  To make this as personable as possible, I thought it would be neat to say. "(Name Variable), think back to about (Years Since 6)years ago, when you were just about 6 years old".  I am having trouble getting the "Years Since 6" variable to work, and would like to know if it is possible.
    I have set up the text entry box variable as "v_age"
    I have set up a variable as "v_age6" with a value of "6"
    I have set up the result variable as "v_result_age6"
    I have set up a standard action with a mathematical expression that reads "v_result_age6 = v_age - v_age6"
    The variable output does not show on the stage in project preview mode, and I think it's because there is only one variable with an assigned value in the equation.  The "v_age" variable does not have an assigned value because that is a text entry box.
    Is it possible to use a value typed in from a user as a variable to do math with?
    Thanks.

    Welcome to the forum,
    Each TEB has an associated variable, its generic name is the same as the TEB. But you'd better link your variable with the more significant name to the TEB. Have a look at this real old blog post, still valid (although maybe the screenshots are bit out of date):
    http://blog.lilybiri.com/timesaving-tip-create-associated-variable-for
    BTW: you didn't need to create an extra variable for the number 6. This action would have done as well:
        Expression  v_resultage6 = v_age - 6
    How do you trigger the action, by which event?
    http://blog.lilybiri.com/events-and-advanced-actions
    Lilybiri

  • ADO Database Connection: Need help with correct syntax for 'Execute' Method

    My server Windows 2008R2 taking more than 30 hours to complete backup
    so next backup getting fail
    is there any option to set start backup after 24 hours if previous backup complete

    I have a script that I am trying to cobble together, but I am stuck at attempting to execute an SQL query against and ADO connection. My code is as follows:Powershell $FQDNUpper = $Computer.ToUpper() + ".domain.dn1.dn2" $FQDNLower = $Computer.ToLower() + ".domain.dn1.dn2" $shell = New-Object -ComObject "Wscript.Shell" # for use later in script $cnn = New-Object -ComObject "ADODB.Connection" $cnn.ConnectionString = "Connection_String" $cnn.Open() $query = "SELECT CAST(ID AS nvarchar(50)) ID FROM Machine WHERE Name=$FQDNUpper AND Role = 0" $rs = $cnn.Execute($query,' ',1) #If statement that will qualify if $FQDNUpper returned anything else try $FQDNLowerWhen executing the code I receive an error:
    PowershellArgument: '2' should be a System.Management.Automation.PSReference. Use [ref].At line:9 char:5+ $rs = $cnn.Execute($query,' ',1)+ ...

  • How to use the dynamical or static variable for ESSBASE cube name?

    Hi Experts,
    When I import ESSBASE Cube into physical layer, the cube name from ESSBASE is created automatically, such as H_Sales.
    I want to use the the static or dynamical variable for replacing the external name. So I try to create the static variable in RPD,such as cubeName, and use the following code
    'VALUEOF(cubeName)' into the textbox of external name.
    However, when I view the report in answer, it will generate the error message: Database VALUEOF(cubeName) does not exist.
    Is it possible to implement this functionality?
    Thanks..

    Hi,
    use <%=odiRef.getSchemaName("D")%>
    D as parameter if it is the Data Schema or W if you need the schema from Work Schema
    Your command will be like:
    select <%=odiRef.getSchemaName("D")%>.GER_LOT_EXEC_ODI('Fluxo', 1, 'C') FROM DUAL
    Works?
    Cezar Santos
    http://odiexperts.com

  • Generate dynamic DataTable for Values selected from SelectManyListBox

    I want to generate a datatable for values selected in a selectManyListBox,
    DataTable will have three columns
    1serial number
    2.values selected from listbox
    3.inputText for entering some data
    Plz guide me how can i do this...
    Thanx in advance!

    Check http://balusc.xs4all.nl/srv/dev-jep-dat.html how to use datatables.

  • BW Query variable default value put in Crystal report variable question

    Why BW Query variable default value put in Crystal report variable for BO InfoView to open crystal report.
    I using Analyzer to open bw query,variables had default value ,but crystal report can't had variable default value ,and can't search variable  value.
    pho:
    [http://file.itpub.net/f/e38876ad4f6efb7e73980488e7d71f8d/4ae940e9/day_091029/20091029_2b04da1232144feba180OrB23SNvXtoT.gif/p/1.gif]
    [http://file.itpub.net/f/d93ddfe61e0eaf80429726c61f1a02ff/4ae940e9/day_091029/20091029_3211ffe04bf0302fbab5FRKnbwmH80p7.gif/p/BW_QUERY_Crystal.gif]
    Edited by: flying on Oct 29, 2009 8:20 AM

    I Know what to do .
    but Crystal report date variable value are Garbage characters "###".
    PHO:
    [http://file.itpub.net/f/39a8510104476707ae21c945db93ecba/4ae97949/day_091029/20091029_32dcbb7e7d99141483aesJ9KBJHXN0Kj.gif/p/2.gif]

  • Using multiple select lists in ADF

    Hi,
    I am trying to use a multiple select list in my JSP page, and have a method in the ApplicationModule be called when the Struts action is called. I am following the example ADF tutorials, where the method is added to the ApplicationModule class, then dragged onto the Stuts Flow diagram (to associate it with an action).
    I am able to create a dyna form bean for the page that contains the multi select as a type "java.lang.String[]" (string array). I am able get that values that were selected in a normal action's "execute" method. For example:
    msf = (DynaActionForm) form;
    String[] statusSelection = (String[]) msf.get("multSelectList");
    However, I cannot seem to get the "multSelectList" values into a method in my Application Module class. The "multSelectList" is defined in my dynaFormBean as a String[] type. I am passing it in as an argument like the following....
    public void setParams(String multSelectList[]) {
    This results in the method not being called at all. I am not sure why. Does this have something to do with a String[] not being serializable??
    However, if I just attempt to pass other types form items to the method, it works. For example:
    public void setParams(String simpleCheckbox) {
    Does anyone know how to use multiple select lists in conjunction with ADF?
    P.S.
    my multSelectList looks something like this:
    <select name="multSelectList" multiple size="5">
    <option value="ALL">Select All</option>
    <option value="preferred">Preferred</option>
    <option value="standard">Standard</option>
    <option value="approved">Approved</option>
    <option value="interim">Interim</option>
    </select>

    I got this working by changing the signature of the Application Module method to use ArrayList rather than String[], then you can marshal the Struts FormBean contents into an ArrayList to pass up.
    To do this, subclass the DataAction by using "Go To Code" off of the context menu and then override the initializeMethodParameters() method:
      protected void initializeMethodParameters(DataActionContext actionContext, JUCtrlActionBinding actionBinding)
        //Get the String Array from the Form Bean
        String[] selection = (String[])((DynaActionForm)actionContext.getActionForm()).get("multiSelect");
        //convert that to an ArrayList
        ArrayList selectionArr = new ArrayList( Arrays.asList(selection));
        //Add that object to the Arg List for the AM method
        ArrayList params = new ArrayList();
        params.add(selectionArr);
        actionBinding.setParams(params);
      }

  • Using a selection option Var on a restricted list of values for  a char

    hi all,
    i am trying to use a selection option variable in a restricted list of values in a characteristic. for example. company code has the following values:
    1) GB01
    2) GB02
    3) GB03
    4) MY01
    5) SG01
    and so on.....
    Now, i would like to restrict the list of values into GB01, GB02 and MY01.
    and based on this restricted list, i will again need a variable to do a selection option in the report.
    Do you think this is possible? what will be the solution to this?
    i have tried to restricted it with 2 variables but it doesnt allow that.
    cheers,
    willie

    ADF Faces has a very small learning curve, at least
    on top of learning JSF itself, - it's a JSF component
    library with some extra JSF framework features, but
    you can use only the bits you want. It is
    proprietary to the extent that you're using some code
    that isn't a standard, but we run right on top of the
    JSF standard (and you can use either MyFaces or the
    Sun RI), so there's not a whole lot of lock-in.Ok sounds good and I am aware of a lot of the work that Oracle has been doing. I would like though ask you some additional questions.
    Could you contact me at [email protected] if it is not too much trouble.
    Thanks much.

  • 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

  • How to select several values from a user exit variable in a planning folder

    Hello,
    I have created a user exit variable for limiting the values only to which the user need to access.
    For a simulation part, it is then necessary for him to select several values from these values (not only one, and not all)
    But It seems in this case the user has only two possibilities :
    - keep all the values without any restriction
    - restrain the selection to only one value.
    It seems possible for the user to access to a multiple choice window, but this possibility doesn't seems to work : in all tests we did, only the first value was taken into account by BPS.
    If this method is not good do you know an other manner to permit the user to choice several values amongst a set of pre-selected  (because the original set is too important) values ?
    Thanks for your help.

    Hi Mayank,
    Thanks for your response, but I don't think it corresponds to my problem.
    I my case, I use a user exit variable to filter some data. It seems BPS offers the possibility to the user to select several values amongts the pre-selected values presented by the user exit variable, but it doesn't work. We can use a popup in which we enters the required values, but in final, only the first value is taken into account.
    I don't know if it is due to a BPS bug or if it is not a good solution in regard to BPS philosophy. In this case, the concerned caracteristic isn't in the header but in lead columns.
    I must present a solution to my client next monday, so I have not enough time to open an OSS message.
    An alternate solution should be interesting too.
    My need is to present to a user a selection of values amongst all values from an infoobject (the user exit variable seemed to be a good solution) and the user must have the possibility to select some values amongst these as filter.
    Regards

  • USING MULTIPLE SELECT VARIABLE IN A SQL STATEMENT

    In HTMLDB, the value of the parameter of a multiple select box is colon delimited(ie P6_Name = Smith:Jones:Burke). Is there an easy way to use this parameter in a SQL statement?
    Example
    Select *
    from names
    where
    Name=P6_Name
    Select *
    from names
    where
    Name IN ('Smith','Jones','Burke')
    Thank you

    Thank you for your response! I'm an idiot. It didn't make sense to me because your talking about a <i>multi-select</i> variable and I was thinking about a <i>select-list</i> variable. My problem is that I need to assign a list of values to one select list item.
    <br>
    For example:
    <br>
    SELECT * FROM EMPLOYEE
    WHERE EMPLOYEE_TYPE IN ( :SELECT_LIST_RETURN_VALUE );
    <br><br>
    With the select list as
    <br><br>
    Display value = All Types, Some Types, One Specific Type<br>
    Return Value = (Type1, type2, type3), (type1, type2), (type3)
    <br><br>
    I've just started in all of this so I'd imagine that I'm probably going about it wrong.

  • Using a variable for two different characteristic

    Hello
    I've to following situation:
    1) While execuring a query in BEx Analyzer, the user should manually enter a specific key date KEY_DATE
    2) Then, two InfoObjects should be restricted by using that KEY_DATE as follows
         a) InfoObject BEG_DATE <= KEY_DATE
         b) InfoObject END_DATE > KEY_DATE
    So, in Query Designer I've created a variable KEY_DATE and added it to each of the above InfoObjects. Now, while executing the query I get an error: "Variable KEY_DATE is used for two different characteristics".
    Is there another possibility to realize my requirements?

    Hi Dear,
             create variable for that date and restrict the char. info object by that date.
    -->create a variable of date char.
    -->in General tab, select processing by Replacement path
    -->in replacement path , offset 0 and lenght 0
    -->ok
    when u restrict, select value ranges and select greater than for one and less than equal for another
    try and let me know if any probm...
    Regards
    Obaid

Maybe you are looking for