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);

Similar Messages

  • How I can stop the combo box with list of values from fireing validations

    Hi I'm using Jdeveloper 11.1.2.3.0
    Using Hr Schema employees table
    I Display employees data in af:table
    and I make List Of values on Department_id filed to easy change the employee department
    and another one on Job_id filed
    and Imake them UI Hints as ( combo box with list of values ) in the employeesVO
    the problem is when I Select a value from department or jobs ( combo box with list of values )
    fires the entire filed validations for mandatory atributes
    Note : the af:table Property ( contedelivery) is set to (immediate )
    How I can stop the combo box with list of values from fireing validations

    check it out.,
    http://andrejusb.blogspot.in/2012/09/what-to-do-when-adf-editable-table.html

  • Attribute set for Choice in view object xxPickSlipYesNoVO1 failed

    Hi all,
    I have a problem that i find pretty weird.
    The context is: I created a custom page that contains a table populated with some printer names. And the other field it contains is a messageChoice item. Both of these items are populated using custom VO that i also created and included in a custom AM. The VO that contains the printer names is used in a Query region with a table and it works perfectly. But the messageChoice is feeded by a VO that contains the following query :
    select 'No' choice from dual
    union
    select 'Yes' choice from dual
    I know this is very simple but i did not find any other way to populate the messageChoice than by using a view object. Where the problem comes is in the runtime behavior. When the custom page loads, "Yes" is automatically loaded in the dropdown. Then when i click the submit button it works perfectly but if i choose "No" i get the following message:
    Error
    Last Request Only - Attribute set for Choice in view object xxPickSlipYesNoVO1 failed
    Note: "Last Request Only" is the prompt of the messageChoice.
    And when this error is displayed the submit button does not want to work ....
    I dont know how to solve this i did some research but i did not find anyone with a similar issue!! yet! So i turned to you expertise to help me in solving this problem.
    Best Regards,
    Carl

    Carl,
    as u said u have removed the attribute sets created previously,. I would advice to delete myclassses folder , recompile and run. Also follow Sumit's suggetion for creating lookup, as that is the standard way of doing.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Error: Attribute set for field_name in view object VO_instance failed

    While I try to add a new row in a table using a VO created on two EOs, it comes back with error message 'Attribute set for <field_name> in view object <VO_instance> failed' for each field I enter the data. Please suggest me if I am missing something while doing it.

    Are you sure you are specifying a value for the attribute of the VO and the value of correct data type.
    Also, please make sure that you have one row coming from each EO , so that the VO has one row, and a outer join is not happening.
    Thanks
    Tapash

  • Error:Attribute set for DetailHideShow in view object SalaryDetailsVO faild

    Hi
    We need to add one column in the self service Manager > My Employee Information > Salary history table
    - This column does not exist in the standard view Object
    oracle.apps.per.selfservice.mgrviews.server.SalaryDetailsVO
    - With Jdeveloper we have created a new view that extend the standard view :
    cggv.oracle.apps.per.selfservice.mgrviews.server.CGGVSalaryDetailsVO
    - We used the substitution tools to substitute the standard view by the new one
    with the following column :
    java oracle.jrad.tools.xml.importer.JPXImporter $CGG_MDS_TOP/cggv/per/12.0.0/java/ParodiExtendPJ.jpx -username apps -password
    apps -dbconnection "(description = (address_list = (address = (community =
    tcp.world)(proto = tcp)(host = doradb)(port =
    1581)))(connect_data = (sid=LDEV )))"
    - the new view contain exactly the same attribute than the standard one, we just add one new attribute at the end
    - We used Self-service perzonalisation functionality to add the new column in the table region.
    When we click on the Show buton the this error message appears :
    Error : Attribute set for DetailHideShow in view object SalaryDetailsVO failed
    It seems there is a probleme when extending ViewObject and adding column to table that contains a Show/Hide Detail column.
    Do we need extend also the controler ?
    Thank a lot for your help
    Julien Robinet

    Is the new column you have added part of the show/hide detail? If not, is the correct getting displayed?
    Is show/hide also handled through the attribute of substituted VO?
    --Shiv                                                                                                                                                                                                                                                                                                                                                                               

  • How can I reduce the selection for the characteristics value in a BW query

    Good morning,
    I need to find out how I can reduce the selection for the characteristics values in a BW query.
    In a BW query I have a characteristic "Due month".
    The characteristic values shown in the query are from 01.2001->03.2007. I would like to reduce it to the last 2 years,in the query view,  without deleting the data for the other years in the cube.
    Do you know how this can be done?
    Thank you in advance for your feedback.
    Kind regards,
    Linda Verding
    Staff Consultant - CSC

    hi,
    First thing you have to do is check the report how the data is being restricted only to those months.
    1) one it can be variable in which the code is written for that to populate for last few years.
    or else it must have been hardcoded for these months.
    Go into your report and underneath the characteristicsCALMONTH there must be an variable or hardcoding.
    You need to change this here in the report.
    You dont have to delete anything there.
    Regards, Siva

  • Select a set of integer from another set

    I have a set of integers from 1 to 7.
    I want to select the integers which not exist in this set.
    For example: the set contains (1,3,6,7)
    The result should be (2.5)
    how to do it in SQL

    Hi,
    First, construct a Counter Table with 7 rows, containing the values 1, 2, 3, ..., 7. (Don't be thrown off by the term "table"; it's usually not a real table, but rather a result set that acts like a table.)
    See thie following thread for ways of creating a Counter Table:
    Counter Table
    Use the NOT IN operator to get all the rows from that counter table except the rows numbered 1, 3, 6 or 7.
    If you get stuck, post your best attempt, as Alex suggested.

  • How can I set a value to an Object Array

    I am declaring an object variable like this:
    final Object[][] data = {
    {"Mary", new Integer(5)},
    {"Alison", new Integer(3)},
    {"Kathy", new Integer(2)},
    {"Sharon", new Integer(20)},
    {"Angela", new Integer(4)}
    And I would like to declare it like this:
    final Object[][] data = new Object [6][3];
    But the matter is that when I try to set a value like this:
              data[0][0] = "Hola";
    I got the next Errors.
    TableEditDemo.java:95: ']' expected
              data[r][c] = "Hola";
    ^
    TableEditDemo.java:95: <identifier> expected
              data[r][c] = "Hola";
    ^
    TableEditDemo.java:95: cannot resolve symbol
    symbol : class data
    location: class TableEditDemo.MyTableModel
              data[r][c] = "Hola";
    ^
    3 errors
    Could Somebody Help me please???? Thank you very much.

    I don't see problem for your declaration. Is it possible you forgot to cast data back to whatever class?
    PC

  • How to set updatable property of view object on runtime

    Hello Gurus,
    I am new in adf and using jdev 11.1.2.3.
    I have two view object which has view link and they are based on entity object. In master view i have a column with the name of status. The target is if the value of status is 'active' then i want to allow add rows in detail view and if it is inactive then wants to disable adding or editing in the detail view.
    I don't know how to do this. I don't know how to get the other view object and how to set update able property and where to write code in entity object class or view object class.
    Any advice................
    Thanks in Advance

    There are multiple possible ways to archive this. As the VOs are in a master-detail relationship, you can opt to add a navigation method to the child back to the parent. This method can be accessed via java or groovy to allow the child access to the master row. Once the child has access you can use this to ask the master for it's status and if it's not active disable the edit and update buttons.
    If both master and detail are on the same page in the ui, there is an easier way. Drag the status attribute from the master table onto the page as e.g. inputText. This will create a binding for the attribute which changes if you select a row in the master table. As you don't need to inputtext, switch to the source mode of the page and delete it. This will remove the inputtext put keep the binding. Now you can use hte binding in an EL to set the disable property of other components to true like
    <af:commandButton text="commandButton 1" id="cb1" disabled="#{bindings.masterstatus.inputValue ne 'active'}"/>
    The button will only be active it the binding for masterstatus is active.
    Timo

  • How can I insert values from table object into a regular table

    I have a table named "ITEM", an object "T_ITEM_OBJ", a table object "ITEM_TBL" and a stored procedure as below.
    CREATE TABLE ITEM
    ITEMID VARCHAR2(10) NOT NULL,
    PRODUCTID VARCHAR2(10) NOT NULL,
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE T_ITEM_OBJ AS OBJECT
    ITEMID VARCHAR2(10),
    PRODUCTID VARCHAR2(10),
    LISTPRICE NUMBER(10,2),
    UNITCOST NUMBER(10,2),
    SUPPLIER INTEGER,
    STATUS VARCHAR2(2),
    ATTR1 VARCHAR2(80),
    ATTR2 VARCHAR2(80),
    ATTR3 VARCHAR2(80),
    ATTR4 VARCHAR2(80),
    ATTR5 VARCHAR2(80)
    TYPE ITEM_TBL AS TABLE OF T_ITEM_OBJ;
    PROCEDURE InsertItemByObj(p_item_tbl IN ITEM_TBL, p_Count OUT PLS_INTEGER);
    When I pass values from my java code through JDBC to this store procedure, how can I insert values from the "p_item_tbl" table object into ITEM table?
    In the stored procedure, I wrote the code as below but it doesn't work at all even I can see values if I use something like p_item_tbl(1).itemid. How can I fix the problem?
    INSERT INTO ITEM
    ITEMID,
    PRODUCTID,
    LISTPRICE,
    UNITCOST,
    STATUS,
    SUPPLIER,
    ATTR1
    ) SELECT ITEMID, PRODUCTID, LISTPRICE,
    UNITCOST, STATUS, SUPPLIER, ATTR1
    FROM TABLE( CAST(p_item_tbl AS ITEM_TBL) ) it
    WHERE it.ITEMID != NULL;
    COMMIT;
    Also, how can I count the number of objects in the table object p_item_tbl? and how can I use whole-loop or for-loop to retrieve values from the table object?
    Thanks.

    Sigh. I answered this in your other How can I convert table object into table record format?.
    Please do not open multiple threads. It just confuses people and makes the trreads hard to follow. Also, please remember we are not Oracle employees, we are all volunteers here. We answer questions if we can, when we can. There is no SLA so please be patient.
    Thank you for your future co-operation.
    Cheers, APC

  • Can i copy values from one object to another ?

    One more help..
    How do i compare the input values with the ones in an object of another class ?
    Can i copy values of one object of a class to different object of another class ?
    Thanks,
    Sanlearns

    How do i compare the input values with the ones in an
    object of another class ?By getting and comparing them?
    Can i copy values of one object of a class to
    different object of another class ?Yes, you can. But you shouldn't, as you're breaking encapsulation all over the place. You could use setter methods (if available) to set the values.

  • Setting dynamic values to entity object

    Is there any way to set bean values (dynamic values) to Entity Object while commit the record, and how can i set these values using Groovy language
    Thanks in advance

    You need to give more information about the version of Jdev you use and your use case. read more -
    https://forums.oracle.com/forums/ann.jspa?annID=56

  • Setting parameter in Detail View Object

    I want to setting parameter in detail view.I have two table.One is master another is detail.I use parameter in master table so I put my page parameter form and I execute it.It work fine.I want to use parameter in detail table.In detail table if I dont use parameter master is execute it automaticly and it shows the result but when I put the parameter in detail it isn't show any result it say no rows return.Please help about to use detail views parameters(bind variables)

    Hmmm, sorry, not sure.
    Can I suggest you change your code to the following:
    RowSetIterator[] iter= getMasterRowSetIterators();
    if (iter != null && iter[0].first() != null) {
      Row row = rsi[0].getCurrentRow();
      .....(etc)....And run it in the debugger. See if it actually gets to the Row line. If not getMasterRowSetIterators() isn't returning any iterators and you should check how you've exposed your VOs in your AM - specifically looking to see if your detail VO is actually a detail VO to a parent VO.
    Also I'm not sure overriding executeQuery() is the best place to be doing this as the doco says it is not always called. The doco seems to indicate executeQueryForCollection() is the preferred method. However in my testing it appears you can't set the query parameters in this method.
    Sorry I couldn't be more helpful.
    CM.

  • 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 the value of a object in request scope

    I have the object in my req scope. I need to set value to one of the object attributes if that attribute is blank. How can I set its value.
    <c:set var="benefitVO" value="${requestScope.BenefitVO}" />I need to set the following Object attribute value, if it is blank.
    something like --- > benefitVO.setBnftCd("asdf");
    How can I set it using JSTL tags?
    any ideas
    Thanks

    I need to set value to one of the object attributes if that attribute is blank.This is some kind of a default value that you want, then? If so then just take care of that when you output it. Use <c:if>, and if the attribute is blank then output the default value, otherwise output the attribute.
    Or have the servlet that created that request attribute take care of that requirement.

Maybe you are looking for

  • ? play multiple videos simultanously with a single control bar ?

    I have 4 live f4vs that I'm using with interactive server 3.5.  Thus they are running in dvr.  I'm trying to find a way to control all 4 videos so that when you go back on one video all 4 videos go back to the same time.  This is very important with

  • What is causing my macbook pro to hard freeze?

    My 2011 15" MacBook Pro started hard freezing recently a couple months ago. The screen goes black and the computer seems to be stuck on a loop. If music is playing, it will repeat the same second of music over and over until I hold the power button.

  • Oracle RAC Course Institues in India (Mumbai)

    Hi I am interested in doing the Oracle RAC course , can someone suggest me any good institutes in India that are offering the course specially in Mumbai. Regards

  • "Failed to connect backend system.Check your system definition and user pri

    Hi Experts, I am a BW Consultant working on Portal & Visual Composer (7.0) As a Developer i got SAP_ALL & SAP_J2EE_ADMIN roles in BW and System Admin and VC role in Portal. In Portal Created/Published iviews for BW Queries (Transaction) and Published

  • Trying to cancel skype

    I've been trying to cancel my Skype now for a few days. I've tried every avenue and nothing!!! Why is it so hard to cancel? If you know how please email me at [Mod edit: Please do not include personal/private information when making a public post. Th