How can I set a VO Attribute value ?

Hi,
I'm relatively new to developing OA framework pages, so apologise in advance if my terminology is not quite right at the moment. But I have an experienced Oracle Forms developer so am getting to grips with new tools.
I've managed to develop a number of simple pages (query page and create single record page). I now want to develop a simple "master-detail" page. I've created a page that has two regions Header region and Lines region. Region styles are set to Header and AdvancedTable (child of Header region). I created some test data in TOAD and have written the code to query back the header and related lines. This works and the correct lines get displays when a new header record is displayed. I coded this in the initQuery methods. But now I'm stuck trying to create detail/line rows from the page.
I've added the "Add New Rows" to and want to populate the Lines row with the value of my parents primary key (eventually I'll make the child fkey column hidden). For the last few days, I've read lots of forum notes and the OA dev guide. At the moment, I've created a CO on my Lines region and this basically does the following in the processFormRequest :-
a) Traps the Add Rows Event
b) Fetches the current row for the parent and parent Id (primary key)
c) Fetches the current child row
d) Tries to update the child foreign key attribute using parent's primary key.
When I pressed the Add Rows button I was getting an error "Attribute set <attribute> failed for ...>.
I read various notes suggesting that I did not have my EO and VO properties set for the attribute I was updating. So I changed the EO and VO to allow the attribute to always be updateable. Now I don't get the error, but the column is not populated. An empty row appears. I used the messaging and am definately getting a value in the parentKey variable.
I know I'm in the Add Rows event because I manged to display some dummy messages.
Below is the code in my Lines CO processFormRequest :
OAAdvancedTableBean tableBean = (OAAdvancedTableBean) webBean.findChildRecursive("RoutesRN");
if (tableBean.getName().equals(pageContext.getParameter(SOURCE_PARAM))
&& ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM)))
OAViewObject parentVO = (OAViewObject)am.findViewObject("XXRPAirlineCreateVO1");
OARow parentRow = (OARow)parentVO.getCurrentRow();
String parentKey = (String)parentRow.getAttribute("CompCode");
OAViewObject childVO = (OAViewObject)am.findViewObject("XXRPRouteFullVO1");
OARow childRow = (OARow)childVO.getCurrentRow();
//String childFKey = (String)childRow.getAttribute("CompCode");
//childRow.setAttribute("CompCode",parentKey);
childRow.setAttribute("CompCode",parentKey);
///// String message = "Pressed Add Rows Button Parent = " + parentKey + " Child = " + childFKey;
/// // throw new OAException(message, OAException.INFORMATION);
I guess the above may not be the best way to the "copy" of a parent id into a child foreign key.
Any help would be really appreciated.
Thanks
Ramnik
The region style for the Header

Look in the dev guide, Tables --> Adding rows.
If you are handling the add row event, you need to set autoInsertion off. You need to create a row in the child VO and then set the desired attributes

Similar Messages

  • In OBIEE 11g, how can you set a presentation variable value from javascript ?

    I want to set up presentation variable from a javascript variable. Does anyone knows the workaround for this ?

    SriniVEERAVALLI,
    Thanks for your suggestions. I want to make a custom prompt that is only my requirement. From JS I have made a custom slider prompt now I want to use this slider prompt to pass selected value in presentation variable. Since, we have slider prompt only for numbers, I have to use it for other values.
    I just want to make my post looks simple and focus on the specific problem.
    Anyways, thanks a lot for taking time to reply. Appreciate your help.

  • How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi
    Can anyone tell me.
    How Can I Set a Javascript Value into an Attribute of BSP PAGE

    Hi Mithlesh,
    javascript runs on client side and you cannot assign the value to a Page attribute directly.
    As a workaround,you can use an Inputfield,hidden if required,and set the value using javascript.Then the form will have to be submit to be able to read the value in onInputProcessing and then can be assigned to any variable.
    In Layout
    <head>
    <script language="javascript">
    function pass()
       txt1 = document.getElementById("ip_mrf");
       txt.value = "hello" ;
    </script>
    </head>
    <htmlb:inputField  id="ip_mrf"
                               value="<%=mrf_number%>"
                               visible="FALSE"/>
    in onInputProcessing
    cha1 = request->get_form_field( 'ip_mrf' ).
    where cha1 is the page attribute
    hope this helps,
    Regards,
    Siddhartha
    Message was edited by: Siddhartha Jain

  • How can I set a value in a field before create when a New button is clicked

    Hi,
    I am using
    JDeveloper 10.1.3.1.0.3984 and
    JHeadstart 10.1.3.1 release 10.1.3.1.26
    I have one group and there is a detail group under that group.
    From main group to detail group there are 3 field relating those groups.
    field1
    field2
    fieldSEQ (auto-generated by database trigger)
    These 3 fields are PK.
    In the detail group, there is a New button. So, when the New button is clicked, it tries to create the record with those 3 fields value as those are coming from main group. As a result it's giving the duplicate error as that record already exists in the table.
    But I don't want to create the record with that SEQ as that will be created in the trigger.
    How can I set the SEQ temporarily any no. (-1) before create when the New button is clicked?
    Can anybody help?
    Thanks
    Syed Jabbar
    University of Windsor
    Windsor, ON, Canada

    Hello Syad,
    What I would suggest is setting the sequence number at the creation of the entity object (so in the create() method) by using the database sequence. This way it will always be unique.
    So something like:
    protected void create(AttributeList AttributeList) {
    super.create(AttributeList);
    SequenceImpl sequence =
    new SequenceImpl("KCP_SEQ", getDBTransaction());
    setFieldSeq( sequence.getSequenceNumber());
    If this still does not solve it: please go to the ADF Forum since this problem is an ADF problem, not a JHeadstart problem.
    Regards,
    Evert-Jan de Bruin
    JHeadstart Team.

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • How can I set a value of column in SSIS by using Replace

    How can I set a value of a column in SSIS using a Replace in Derive columns. I have here NameCode and I need to Set = 1 Where NameCode like LIKE '____99____'
    eg. 1006993010... if 5th and 6th characters are 99
    Else 0
    Hope to hear from someone soon and I appreciate great help here.

    If NameCode column is integer then you have to cast it correctly to String.
    I am adding that to the expression provided by Rajen.
    SUBSTRING((DT_WSTR,20)ProductCode,5,2) == "99" ? 1 : 0
    -Vaibhav Chaudhari

  • How can i set  "Createdby" attribute  When using Custom JheadStart Security

    Hello
    We do not use JASS for Authentication , please help us how can i set createtby attributes with jhs.username in application for any entity object?
    thanks

    See a similar question at History Attributes when using Custom Authentication Type

  • How can I set the value to a session bean from backing bean

    Hi Experts,
    How can I set the value to a session bean from backing bean where I have created getter and setter
    methods for that variable.
    Basically I am using ADFUtils class where I am able to get the value from session bean
    using following expression
    String claimType =
    (String)ADFUtil.invokeEL("#{ClaimValueObj.getClaimType}");
    Thanks
    Gayaz

    Gayaz,
    Wrong Post !!
    Post in JDeveloper and ADF
    Thanks
    --Anil                                                                                                                                                                                                                               

  • How can I set default values for Allocate Mode in AO config?

    Hi, How can I set default values for allocate mode in AO config. To be specific, in the attached vi, I need to set the Allocate Mode in AO Config to 'Use FIFO Memory (6)' if the value inside my case structure is false and to 'no change (0)' if the value inside the case strusture is true.
    Solved!
    Go to Solution.
    Attachments:
    generateWaveformFIFO.vi ‏15 KB

    Create two constants for the Allocate Mode input (right click > create > constant). Place one in the true case of the case structure, and place the other one in the false case. Wire them to the same tunnel (border of the case structure), then wire the tunnel to the Allocate Mode terminal of the AO Config. I don't have Traditional DAQ installed, but that should do it.
    Misha

  • How can i Set ArrayList values to selectOneListbox

    Please Let me know How can i Set ArrayList values to selectOneListbox dynamically from the managed bean

    Note: beanList is a list of selectItems
    ArrayList<SelectItem> beanList;

  • How can I set a Session bean timeout

    Hello !
    How can I set a Session bean to time out eg. 48 hours ?
    Thanks
    Uiloq Slettemark

    For stateful session beans you can use the timeout attribute in the orion-ejb-jar e.g.
    <session-deployment timeout=1800 ..>
    this is specified in seconds and Default Value: 30 (minutes)
    regards
    Debu

  • Setting QueryDescriptor's attribute values programmatically

    Hi all,
    How can I set the attribute value(s) in a query descriptor programmatically? From the query descriptor you can get a handle on a particular attribute criterion which has a getValues() but no setValues(). Can this be done?
    Also, is it possible to programmatically switch a query panel from basic mode to advanced mode and vice versa?
    I am using JDeveloper 11.1.1.7
    Thanks,
    Bill

    Hi Timo,
    Your suggestion worked after a little bit of tinkering around. I assumed that AttributeCriterion makes a defensive copy of the list before returning it, however this isn't the case. In fact. it returns a list of type FaceCtrlSearchingBinding$AdfCriterionValues which does not behave as expected.
    The following prints null:
    List values = attributeCriteria.getValues();
    values.clear();
    values.add("1100254");
    System.out.println(values.get(0));
    While doing it this way prints the expected value "1100254":
    List values = attributeCriteria.getValues();
    values.clear();
    values.set(0, "1100254");
    System.out.println(values.get(0));
    Thanks,
    Bill

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • How can i restrict the Expenditure Type values at a specific OU ?

    Dear Guys,
    I would like to ask about the Expenditure Types,
    I have implemented two projects for different Operating Units ,
    when navigating to any Projects responsibilty,and navigating the Expenditure Type field
    the values exist are all the values implemented across the OU not the values entered at this OU
    How can i restrict the Expenditure Type values at a specific OU
    Regards
    Amr Hussien

    Hello
    When you set up a project there is an option called Transaction Control.
    This option allow you to list the allowed or restricted elements of costs for the project.
    You may enter the transaction control on a project template and that will be copied to any new project.
    The cost elements may be expenditure types, expenditures categories, suppliers, employees, etc.
    In your case, I suggest to set up specific project templates for each operating units. On each template enter the list of allowed expenditures types for that OU.
    Doing so, the system restricts users from entering any expenditure item, supplier invoice, purchase cost etc, against an expenditure type, which is not allowed.
    Dina

  • How can i set a long String to a xmltype field in oracle9i use PHP?

    i can set xml String to xmltype field with:
    $sql_insert_sql = "insert into g_province (p_id,p_regionid,p_provincenameobj,solt)
    values (g_province_q.nextval,'".$_GET['region_id']."',sys.XMLTYPE.createXML('".$xml_con."'),0)";
    but if $xml_con too long,i can not set this content into xmltype fields.
    then , i use :
    <?
    //(tabel_name:articles)DDL; //just for test;
    //create table articles (id number(11),content sys.xmltype);
    //----------This is insert test----------------------------------
    $conn = @OCILogon("in_user","user_in","bigfish");
    $stmt = @OCIParse($conn,"insert into articles (id,content) values(1,xmltype(EMPTY_CLOB())) RETURNING content INTO:CONTENT");
    $clob = @OCINewDescriptor($conn,OCI_D_LOB);
    OCIBindByName($stmt,':CONTENT',&$clob,"1",OCI_B_CLOB);
    OCIExecute($stmt,OCI_DEFAULT);
    if ($clob->save("<root><a>JUST TEST</a></root>")){
    OCICommit($conn);
    echo "Insert succes!";
    else{
    echo "Insert default!";
    //---------------Insert end-----------------------------------------
    //---------------Select start---------------------------------------
    $sql = "select content from articles order by id desc";
    $stmt = @OCIParse($conn,$sql);
    @OCIExecute($stmt,OCI_DEFAULT);
    @OCIFetchInto($stmt,&$rows,OCI_RETURN_LOBS);
    echo "<br>Content is:\"".$rows[0]."\"";
    //---------------Select end-----------------------------------------
    ?>
    run it ,display these errors:
    Warning: ociexecute(): OCIStmtExecute: ORA-22816: unsupported feature with RETURNING clause in /home/www/bigfish/sgtest/testclob.php on line 12
    Warning: save(): OCILobWrite: OCI_INVALID_HANDLE in /home/www/bigfish/sgtest/testclob.php on line 13
    Insert default!
    Content is:""
    Warning: Unknown(): ociclose_session: OCISessionEnd: ORA-00600: internal error code, arguments: [729], [28], [space leak], [], [], [], [], [] in Unknown on line 0
    how can i set long content to xmltype fields??

    geng sun,
    Ora-00600 is an internal Oracle error. You will need to open a tar with Oracle.

Maybe you are looking for

  • Downloading songs from iPhone 4 to second PC

    So a virus killed my computer and everything's gone. Only some of it was backed up - my huge bad. I've downloaded a number of songs from iTunes directly to my iPhone 4 and then downloaded those songs onto the computer that is now dead. My iTunes was

  • Robohelp 11 - Image Problems

    Hello, I recently installed the 11 Robohelp, and updated projects he had done in Robohelp x5. Previously I could use images captured by capturing images of Windows because now every time I try to use these images or any other image editor, to put it

  • How to retrive data from oracle dtaabase to JSP

    HI Please help me in the fallowing issue, I am writing 2 JSps with tomcat 5.5 while I am retiving data from database ,, I am unable to retive it. can any one help what is the best solution, Thanks IN Advance,, here is my code.. <%@ page language="Jav

  • DATA UPLOADING IN SAP SYSTEM

    What is the meaning of data uploading in SAP system?Which TCode is used and how it is done?

  • TS3694 i have an error 3014 on my iphone how do i fix this error

    i have an error 3014 on my i phone 4s, how do i fix this?