Setting field value from antother field

I am having problems setting the value of a field depending on the entry of a previous drop down field.
I am creating some wizard pages. On one page i wish a drop down list to populate another field. The drop downlist is unbound. (I have tried doing this with bound field aswell). To do this I have the Depends on Item of the target field to depend on the dropdown list field, so that the appropriate values are updated. (i have tried with the target field being bound and unbound aswell not that it should matter).
I have then updated the VO (view object) adding transient fields when the fields are unbound. Then i updated the view row class. The setter of the drop down field was used to set the value of the target field. (Using the setter of target field). I added system.out.println and the fields are called and set accordingly. ie getters and setters are correct.
However when i run the screens the target field value is not set with the value within the getter of target field.
Could you advice if this is a bug or whether i should be coding this in a different manner. (if it is a bug and you tell me when it is likely to be fixed and any alternative work arounds).
Cheers
Alan

Alan,
Not really a bug, but "missing functionality". The problem is that ADF Faces will only refresh a UI Component value from the underlying model binding value when you submit the request with immediate="false", OR when you explicitly call resetValue() on the component.
We have added a new boolean item-level property "Clear/Refresh Item When Depends-On-Item Changes" in the latest build.That property will do the trick for you: it will clear the value and call resetValue on the UI Components of the dependent items, BEFORE the depends-on-item model value is updated. So, in your case, the setter method of your depends-on-item attribute will update your dependent item after JHS cleared the item, and you will see the new value right away because UIComponent.resetValue() was called as well.
Steven Davelaar,
JHeadstart Team.

Similar Messages

  • ComboBox - Setting Selected Values from data

    I am running into a problem in Flex 3 that seems to be
    different from Flex 2. Maybe someone can help.
    I have a function for setting a combobox selected item for a
    location for a value when the titlewindow completes loading. The
    value is a prior value from a prior save. In other words to set the
    combobox a value from a prior session.
    The locations xml file is loaded from a remote object
    oncreationcomplete of the titlewindow. The setselectedvalue
    function worked perfectly in Flex 2 but now only works in Flex 2
    after the titlewindow is loaded. We tested this by running the
    setselectedvalue function from a button click after loading.
    The dataprovider length is showing 0 in our debugging. After
    titlewindow up on screen the length is showing correct ( 35 ) - in
    this case. Our viewxmlobject function is showing no xml. Shows xml
    correctly after up on screen.
    I have set the creationpolicy to "all". That did not help
    either.
    Any suggestions? Anyone. This is killing me. Spent two days
    now trying to get back to working state.
    private function SetSelectedValue_cbLocation(): void {
    var xLocID:String = eLocationID.text;
    //viewXmlObject( cbLocation.dataProvider )
    for (var i : int = 0; i < cbLocation.dataProvider.length
    ; i++) {
    //Alert.show( cbLocation.dataProvider
    .locid, 'Location DataProvider', Alert.OK);
    if ( xLocID == cbLocation.dataProvider.locid ){
    cbLocation.selectedIndex = i;
    break;
    The combobox has the dataprovider set at design time.
    <components:is2ComboBox id="cbLocation" x="585" y="4"
    width="196" dataProvider="{xmlLocations.Record}"
    labelField="locname" dataField="locid"
    change="changeLocation(event)" disabledColor="#004080" prompt="1.
    Please select location"></components:is2ComboBox>

    Hard to say without seeing the code. Is the application
    opening a pop-up window (the title window)? If so, where is the
    combo box located? In the main app or the titleWindow? What calls
    the SetSelectedValue_cbLocation() function?

  • Can af:selectOneRadio initial selection be set to values from view object?

    Using JDeveloper 11.1.1.4
    Hi all. I have a selectOneRadio on a data entry page which works well. Now I want to (if possible) use the selectOneRadio on an edit page--setting the choice initially to the values that were stored in a database table's record (from the data entry page). I am able to retrieve the data selected in the data entry page, but I can't find anything referencing what I want to do on the edit page. Note that my selectOneRadio objects are actually on jsff's in a region on a page. I've supplied how I designed selectOneRadio on the data entry page in hopes that someone can gleen from it and tell me how to set one up on the edit page and set its initial value to the value combination stored.
    There are two columns in the data displayed (example):
    Short Format / Text
    Short Format / Comma Delimited
    Long Format / Text
            <af:selectOneRadio value="#{bindings.Pay_File_Data_FmtVO1.inputValue}"
                               shortDesc="#{bindings.Pay_File_Data_FmtVO1.hints.tooltip}" id="sor1"
                               inlineStyle="text-align:left; font-size:2.0em;"
                               autoSubmit="true" showRequired="false" label="File Format">
              <f:selectItems value="#{bindings.Pay_File_Data_FmtVO1.items}" id="si111"/>
            </af:selectOneRadio>
    public class FileTypesBean {
        String fileFormat = null;
        String dataFormat = null;
        public BindingContainer getBindings() {
            return BindingContext.getCurrent().getCurrentBindingsEntry();
        public void getFileTypesSelection(ActionEvent actionEvent) {
            fileFormat =
                    (String)resolveExpression("#{bindings.Pay_File_Data_FmtVO1.attributeValue}");
            dataFormat =
                    (String)resolveExpression("#{bindings.Pay_File_Data_FmtVO1.attributeValues[1]}");
            //System.out.println("dataFormat = " + dataFormat);
            // now put in ParamsBean for use
            AdfFacesContext afci = AdfFacesContext.getCurrentInstance();
            ParamsBean params =(ParamsBean)afci.getPageFlowScope().get("paramsBean") ;
            params.setFileTypeParam(fileFormat);
            params.setFileDataTypeParam(dataFormat);
        public Object resolveExpression(String el) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory =
                facesContext.getApplication().getExpressionFactory();
            ValueExpression valueExp =
                expressionFactory.createValueExpression(elContext, el,
                                                        Object.class);
            return valueExp.getValue(elContext);
    }Thanks in advance,
    Troy
    Edited by: Hoopestr on Apr 18, 2012 10:54 AM

    in the amimpl have an edit method, get the value you want to set and set that value for your af:selectOneRadio, row.setAttribute(PayFileDataFmtVO1, value);

  • Set PDO value from Backbean

    hi there,
    JDeveloper Studio 11.1.1.5.0.
    i have a business object that has 3 element :
    id from type int,
    name from type string,
    family from type string
    and also i have a process data object of this business object(PDO)
    how can i set values to this process data object from backbean by java code?
    Thanks for any help

    I am assuming that you have the bindings of the PDO in your padeDefinition file which is for a page referring to this BackingBean.
    then you can use code like
    ADFUtils.setEL("#{bindings.requestType.inputValue}",<value>);
    where setEL is from reusable static class ADFUtils as below
         * Sets a value into an EL object. Provides similar functionality to
         * the <af:setActionListener> tag, except the from is
         * not an EL. You can get similar behavior by using the following...
         * setEL(to, evaluateEL(from))
         * @param el EL object to assign a value
         * @param val Value to assign
        public static void setEL(String el, Object val) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            ELContext elContext = facesContext.getELContext();
            ExpressionFactory expressionFactory =
                facesContext.getApplication().getExpressionFactory();
            ValueExpression exp =
                expressionFactory.createValueExpression(elContext, el,
                                                        Object.class);
            exp.setValue(elContext, val);
        }

  • Set atribute value from session bea while creating new record using ADF BC

    hi,
    i want to set the value of new record attribute from session bean while
    using ADF BC using creation form. how can i set the value of a perticular arribute of a record to the value stored in session bean.

    Chapter 9 in the ADF Developer's Guide for Forms/4GL Developers (available on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html ) describes how to accomplish this along with other typical kinds of programmatic business logic.

  • Set item value from application level item

    Hello,
    I'm using Apex 2.2.1.00.04. I've modified the Page "No Tabs" template so that I can have my own Form (which is submitted to an outside website). On this form, I create some hidden items:
    <form name="frmEPay" method="POST" action="some_website">
    <input type="hidden" id="i1" name="userId" value=&G_ID. />
    <input type="hidden" id="i11" name="timestamp" value="" />
    <input type="hidden" id="i12" name="hash" value="" />
    On this apex page, I have a javascript function which is called in the onload (basically, the ApEx webpage displays and then is redirected). Here's a snippet of that function:
    var appProc = new htmldb_Get(null, html_GetElement('pFlowId').value,'APPLICATION_PROCESS=PrepEPay',0);
    appProc.get();
    appProc = null;
    document.getElementById('i11').value = "&G_ECOM_TIMESTAMP.";
    document.getElementById('i12').value = "&G_HASH.";
    document.frm_infiNET.submit();
    As you can see, the function calls an application level On Demand process (PrepEPay). That process sets the values of the application level items G_ECOM_TIMESTAMP and G_HASH. After those App level items have their values, I want to take those values and apply them to the hidden items on my custom form. Unfortunately, it doesn't work how I have things currently. I've verified that the On Demand process is running(by viewing the Session report on the page). So my problem seems to be this: 1. Retrieving the values from the Apex application level items
    2. Setting those values to the values of my hidden items (on my custom form)
    I think the biggest reason why I'm having difficulties is because I have to do a lot of this in the template, since that is the only way to have a separate Form. Maybe my problem is that I don't understand how to reference the Apex application level item value from a different form?
    Thanks,
    Marty

    Marty,
    You are describing this as if you expect the substitution within "&G_ECOM_TIMESTAMP." and the other one to take place in some kind of lexical order, e.g., from the top to the bottom of the HTML. The replacements happen in the engine, before anything is sent to the page. Then the browser interprets language constructs such as javascript calls which in your case includes an ajax invocation of a server-side application process.
    You need to re-think the machinery here.
    Scott

  • Looping and setting cfset values (from a query)

    Stuck on how to get this to work.
    How would I go about looping and setting these values instead
    of doing them individually?
    The query this <cfset> references works fine and will
    work but repeats...
    <cfset ans1 = (qryGetPcts1.q1Ct / qryGetCounts.qID2) *
    100>
    <cfset ans2 = (qryGetPcts2.q2Ct / qryGetCounts.qID2) *
    100>
    <cfset ans3 = (qryGetPcts3.q3Ct / qryGetCounts.qID2) *
    100>
    <cfset ans4 = (qryGetPcts4.q4Ct / qryGetCounts.qID2) *
    100>
    <cfset ans5 = (qryGetPcts5.q5Ct / qryGetCounts.qID2) *
    100>
    So I'd like to loop and set them all instead...
    <cfloop index="i" from="1" to="27">
    <cfset ans#i# = (qryGetPcts#i#.q#i#Ct /
    qryGetCounts.qID2) * 100>
    </cfloop>
    But it's responding with this...
    Invalid CFML construct found on line 196 at column 19.
    ColdFusion was looking at the following text:
    I'm sure I'm missing something simple b/c this must be
    possible? Can I use a cfset in a loop?
    Help is appreciated

    In the main everything is in CF is in a struct. Armed with
    this information you use array notation to help you.
    <cfloop index="iCount" from="1" to="27">
    <cfset variables["ans" & iCount] =
    (variables["qryGetPcts" & iCount]["q" & iCount & "Ct"]
    / qryGetCounts.qID2) * 100>
    </cfloop>

  • Setting default values from a configuration file...how_to

    Hi,
    When we place controls in the front panel VI, there are default values
    that we can set during design time. Is it possible to load up a VI and
    read those default values from a file? I guess the point is that I want
    to be able to store different control settings for different users with
    one VI. Maybe possibly use the File I/O VI's to load up default control
    values that way. Is it possible?
    Thanks,
    Steven

    _Steven Chang wrote:
    >Hi,>>When we place controls in the front panel VI, there are default values>that
    we can set during design time. Is it possible to load up a VI and>read those
    default values from a file? I guess the point is that I want>to be able
    to store different control settings for different users with>one VI. Maybe
    possibly use the File I/O VI's to load up default control>values that way.
    Is it possible?>>Thanks,>Steven>
    After trying many various ways of storing configuration data, the way I use
    the most is to set up a "configuration global", a global that consists of
    basically a single cluster into which I place anything about the application
    that I want to configure and store. I usually include the application's path,
    DASQ settings, a
    nd user preferences. You can then read/write this cluster
    anytime during your test session. You can provide user access to specific
    portions of the global through a tabbed dialog box and allow multiple records
    in your config file which can be accessed at any time.

  • Set lookup value from another item

    Hi!
    I add to my list in SP 2013 new column like type Lookup field and select item from another document library
    and display field select "Title". How i can set this filed value for new item from document library item?

    Hi AllXander,
    From your description, my understanding is that you want to set lookup field value with C# CSOM.
    You could use method "FieldLookupValue()". Please refer to this code below to set lookup field value when add an new item to a list:
    // replace your site URL
    using (ClientContext context = new ClientContext("http://sp/sites/sp2013"))
    // replace your user, password and domain
    context.Credentials = new NetworkCredential("Administrator", "Access1", "contoso");
    // the library that you get value for the lookup field
    List list = context.Web.Lists.GetByTitle("Department");
    context.Load(list);
    context.ExecuteQuery();
    CamlQuery query = new CamlQuery();
    query.ViewXml = "<View/>";
    ListItemCollection allContacts = list.GetItems(query);
    context.Load(allContacts);
    context.ExecuteQuery();
    foreach (ListItem item in allContacts)
    // replace the id that you want to set value to the lookup filed
    if (item.Id == 1)
    // replace the list title with your list that you want to add the item
    List oList = context.Web.Lists.GetByTitle("Employee");
    ListItemCreationInformation itemCreateInfo = new ListItemCreationInformation();
    ListItem oListItem = oList.AddItem(itemCreateInfo);
    oListItem["Title"] = "My New Item!";
    // set the lookup field value
    FieldLookupValue lookup = new FieldLookupValue();
    lookup.LookupId = item.Id;
    oListItem["Department"] = lookup;
    oListItem.Update();
    context.ExecuteQuery();
    You could refer to this article about creating/updating/deleting a new item with C# CSOM:
    http://www.c-sharpcorner.com/UploadFile/sagarp/create-update-delete-a-list-using-client-object-model-cso/
    You could refer to this article about updating multi-value lookup column:
    https://sunbin0704.wordpress.com/2013/10/11/update-multi-value-lookup-column-values-in-sharepoint-2010-using-managed-csom/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Want to set messageStyledText value from LOV (In a table)

    Hi,
    I want to set values in non editable fields. These values are being stored in database table (DML operations can be performed on the table).
    The values for these fields is coming from a LOV and setting properly in the fields.
    But on next click(i.e. by clicking any LOV or any button on the page) the values are disappearing from the page. Instead of using non editable fields, if editable fields are used (messageTextInput) then the values is staying on next click.
    I have tried with messageStyledText, messageTextInput by making the fields readonly & disabled but in all the cases the result is same.
    Thanks,
    Arindam.

    Hi Bhowmick,
    I had a similar problem, solve it with the following workaround:
    - set the field read only property to true.
    - add a controller to region page that contains the field and modify processFormRequest as follows:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    String itemValue= pageContext.getParameter("itemID");
    if(itemValue!= null && !itemValue.equals(""))
    pageContext.putTransactionTransientValue("dummyParameter", itemValue);
    OAMessageTextInputBean mti = (OAMessageTextInputBean)webBean.findChildRecursive("itemID");
    mti.setValue(pageContext,pageContext.getTransactionTransientValue("dummyParameter"));
    Regards,
    Carlos C.

  • Set Form Values From Interactive Report Row

    Using Apex 4.2.
    I have two tables: T1 and T2
    Table T1 contains five columns: CT11, CT12, CT13, CT14, CT15
    Table T2 contains 4 columns: CT21, CT22, CT23, CT24
    I have a page with two regions. Region 1 is a Form on a Table using table T1. Region 2 is an Interactive Report ( IR ) on table T2.
    The SQL for region 2 is:   select apex_item.RADIOGROUP(p_idx => 1, p_value => CT21) "Choose", CT22, CT23, CT24 from T2;
    When the user clicks a radio button for a row in the Interactive Report, I would like the values in the IR cells CT22, CT23, CT24 to populate the CT13, CT14, CT15 fields in the table form in region 1. If a user clicks another row radio button, the values should update.
    Any help is greatly appreciated.  Thanks!

    Hi,
    As per my understanding ur requirement is as below.
    When the user clicks the 'Link Column' it should redirect to another page with the value of id, Day, Start Time, and End Time.
    Hope all the cloumns are from the same table.
    As Denes said, it is enought to pass the ID value to the link column as of below.
    ie., u can modify ur query as of below.
    SELECT Last Name,First Name,Day,Start Time,End Time, ID as "Link Column"
    FROM t.
    Now u can pass the value  as #Link Column# which will pass the ID value to the next page.
    Hope my understanding is correct.

  • Set form value from MyQuery

    <cfif structKeyExists(MyQuery, "MyID")>
    <CFSET form.MyID= MyQuery.MyID>
    </cfif>
    <cfif structKeyExists(url, "MyID")>
    <CFSET form.MyID= url.MyID>
    </cfif>
    I use above code to check if query ID exists then assign value to my form variable.
    It seems that it does not work, but it works for url.
    Can you please help and advise are there any way to check value in query and assign to the form if it is defined?
    Your help and information is great appreciated,
    Regards,
    Iccsi,

    For assigning the value to form field you can directly use value="#MyQuery.MyID#"
    For eg:<cfform><cfif structKeyExists(MyQuery, "MyID")> <cfinput type="text" Name="MyID" value="#MyQuery.MyID#"></cfif></cfform>
    So the input text will be visible if value in query is defined else the correct data will be populated to form field MyID

  • Set variable value from a query - is it possible?

    Hi all,
    I need to use a 'precalculated' value in my report measures' calculations.
    Is it possible to set a variable value as a result of a query?
    Thanks in advance,
    Alex

    Hi,
    In my report, I need to calculate one of the columns as a [certain measure] / [result of another query]
    I didn't succeed to include the [result of another query] as a column in my report's request, but it would be very easy to calculate this [result of another query] separately.
    The [result of another query] value is same for all the rows of my report.
    What I'm trying to do is to run a query before my report (e.q. in the Prefix section), set a variable = [result of another query] and then use this variable in the column calculation of the report.
    Is this possible?
    Thanks,
    Alex

  • Display pattern for DateTimeField ignored when setting value from script

    Hello,
    I have a DateTimeField with Data pattern date{DD.MM.YYYY} and Display pattern date{MMMM}, so it displays its default value "21.05.2011" as "May". Now I'm setting its value from the other field's initialize event:
    if (this.rawValue) {
        data.Subform_Footer2.DateTimeField1.rawValue = this.rawValue.match(/\d+\.\d+\.\d+/)[0];
    Assuming this.rawValue contains text "21.04.2011", the DateTimeField displays "21.04.2011" in preview instead of "April" as specified in Display pattern.

    Hi,
    To me it looks like you are passing a string to the date field, rather than a date.
    Instead of trying to abstract the month manually in the script, why not pass the whole date through "21.04.2011" and leave the display pattern display the month.
    Niall

  • How to set the Value in Dropdownbyindex

    Hi Experts,
    I am New to Webdynpro-ABAP.
    I have one Dropdownbyindex field. I need to set the value from BAPI. how to set that values in Dropdown..
             I need Basic step-by-step procedure.
    Regards,
    P.Manivannan

    Hi,
    1. First import the BAPI in to WD component using create->service call.
    2.The BAPI import, export and Table parameters will be set in to the Component Controller context.Then drag this BAPI node to your view.
    3.In the 'texts' property of DDbyindex bind the BAPI output node which will be the Table parameter of the BAPI.It could be under CHANGING node.
    4.In WDDOINIT method just click the code wizard and enter the method name which you will give when importing the BAPI.Automatically the values from the BAPI will be loaded into your Dropdown when you run the application.
    Regards,
    Dinesh

Maybe you are looking for

  • Select query in method    endmethod

    Hi all,       I am writing code in a method which is not accepting into table in select query, How to pass data into internal table using select query in method. As per my knowlegde we have to write code using field-symbols. can anybody please help m

  • Need to know more about timezone

    Hi All, I would like to know more about timezone usage/advantage. can u just send me some sample scripts/doc. how/where to use. Expecting your help

  • Cs5.5 Design Premium installation

    I'm trying to install the c5.5 Design Premium but I'm getting "image not recognized" anyone know how I can get this fixed? and install

  • Getting Confused in merge repository process

    Hi All, i have a repository in PROD and there we added some users to that repository then we have another repository currently in DEV where we have the new Development. what i want to do is i want to merge both repositories that they will have the sa

  • BRIDGE TAP MISSING, SHORT BATTERY

    Hi,  I got my playbook last week and I am never able to bridge my playbook with my 9700, apparently these 2 devices are not able to find each other. the more annoying part is, the bridge tap was there on the desktop, but it went missing after I had t