How to set setRowKey value when table is populated dynamically

Hi All
I have created a view object using only select statement and displaying all the records in it in the table at page load. Table is SelectMany. Now after selecting some records I press submit button. At the backend logic is executed which prints how many rows selected and the values of the selected rows. Everything works fine till here.
Now when the view object is modified by putting where clause. And the parameter to this where clause is coming from url. When the page is loaded table displays only records based on filter criteria. But the problem begins when I press the submit button. It shows the error: row is null for rowKey:oracle.jbo.Key[AAAQkHAAJAAAACkAAA ]
I have done some research and found that row key is not set for the displayed records. because at the backend when I am printing the values of keys in selectionState.KeySet it prints only null.
This thing happens only when table is populated dynamically through url value.
Can anyone help me how to get the selectionState.Keyset values when table is populated dynamically?

SOLVED:
Actually there is no problem with the rowKeys as I mentioned in the post. What happened was that I was executing the query everytime on page load. Second time when the page is loaded the param value was set to null. So row becomes null but on the other hand I am referring the rows by some selected row keys. so the error that row is null for key...
So now i am storing the param value in managed bean and then referring it in the code.

Similar Messages

  • How to set a value when right click on af:commandlink ?

    Hi All,
    JDev Ver : 11.1.1.4.0
    How to set a value to property listener on right click of a commandLink ?
    I am having values that are hyper linked using af:commandlink, when i right click on hyperlink, that value i need to get in the managed bean ?
    (While right click i am populating on menu item)
    how to get the value ?
    Give some solutions ?
    thanks
    Gopinath

    Hi,
    Try this code:
    <af:clientListener method="rightClick"
    type="contextMenu"/>
    <af:serverListener type="setValue"
    method="#{beanName.setValueMethodName}"/>
    <trh:script xmlns:trh="http://myfaces.apache.org/trinidad/html"
    id="s13">rightClick = function(event) {
    var source = event.getSource();
    AdfCustomEvent.queue( source, "setValue"
    , {}, false); }
    </trh:script>

  • How to set item values when redirecting to the same page.

    I just created a redirect button that I want to redirect to the same page and set the 2 page items on the page to the same value they had before the redirect.
    But I can't write:
    Set These Items: P1_Permit_Number,P1_Fishing_Year
    With These Values: &P1_Permit_Number.,&P1_Fishing_Year.
    Because there are no values in the session state, since a submit has not been done.
    So how do I do this?
    I know how to get the values stored in the items, e.g., $v('P1_PERMIT_NUMBER')
    but where do I place that command? It's not allowed under "With These Values"
    And I don't really want to make this a submit button and create a process that says:
    P1_PERMIT_NUMBER := $v('P1_PERMIT_NUMBER') because that would complicate the page too much -- I already have other processes and branches on the pages whose conditions would have to be modified so that they don't run during this scenario.
    Thanks.

    Thanks Gary and Andy. I rewrote the function according to above instructions:
    function redirectToURL()
    var permitNumber = document.getElementById('P1_Permit_Number');
    var fishingYear = document.getElementById('P1_Fishing_Year');
    var url = 'f?p=&APP_ID.:1:&APP_SESSION.::::P1_Permit_Number,P1_Fishing_Year:' + permitNumber +',' + fishingYear;
    window.location.href = url;
    But when I entered a value for permit number and fishing year and redirected, the word "null" appeared in the Permit page item, instead of the permit number that I had entered.
    Remember that I am not submitting here. So if the syntax you showed me, i.e. getElementById('P1_Permit_Number'), searches for the item's session state, then it will be wrong, since there is no session state value for the items at this point. Perhaps that is the reason I got the null?
    If so, what can I do?

  • Xml: how to get node value when pasing node name as a parameter

    Hi,
    I've got some xml:
    var xmlData:XML =
    <1stNode>
        <buttonID>first child node value</buttonID>
        <imageID>second child node value</imageID>
        <labelID>third child node value</labelID>
    </1stNode>
    Then I want to read specific node value based on a value passed to a function. .
    var buttonID = new Button;
    var imageID = new Image;
    var labelID = new Label;
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData.nodeName)                      //doesn't work
    var str:String = "xmlData." + nodeName;
    var xml:XMLList = str as XMLList             //doesn't work
    I'm don't know how to get the value when node name is dynamically changed.

    use:
    getNodeValue(buttonID); //the value here is set dynamically
    private function getNodeValue (nodeName:String):void {
    trace (xmlData[nodeName])                    

  • How to get the values from table region and how to set

    Hi,
    I have a requirement as Seeded Page Having One Table Region having around 8 columns, In That Item Description field is there. My Requirement is I need add one more field for that Region and assign the value depending Item Description.
    I will create one new Item in that region and will give name as Item, But how to set the values to Item Depending on Item Description.
    Is it possible to through CO Extension, If yes..Pls help how to get it.
    Thanks in Advance,
    Hanimi

    Hi Hanimi,
    1. You need to extend the VO, add a new Attribute.
    2. In VORowImpl of the extended VO, you can find the getter for your new attribute (example getItem())
    3. In this getter method you can write some code like:
    if("ABC".equals(getItemDescription())
    return "XYZ" ;
    -Prince
    http://princekapoor82.blogspot.com

  • How to set default value of a table using sequence number

    Dear all,
    Does any body know that how to set default value of a table
    using sequence number.
    But I don't want to use trigger to do that.
    Please help!!!!
    Eldon

    Andrew is essentially correct. You can get around the trigger,
    but not the sequence, if (and this may be a very big if) you can
    guarantee that every time an insert is done into the table, from
    whatever source, the statement looks something like
    INSERT INTO tbl VALUES (sequence.nextval,other_columns_values)

  • 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

  • In advancedSearch , how to set retainAM=Y when click 'Go' button

    Hi,
    I created advancedSearch in page, when I click on go button, I will get the result in advancedTable ,
    in the page Address, it will be appended '....&retainAM=N&addBreadCrumb=N&oapc=3',
    Now my question is how to set 'retainAM=Y' when I click on 'Go' button

    Hi Gyan,
    In advanched search, click go button, then I will get the result in the advanchedTable,
    and the address of this page will be added the statement '...retainAM=N..'
    Then, for example, click 'about this page', it will go to 'About Page'. click 'Return to Page: ', it will go to the previous page and the address of the page
    still be '..retainAM=N..', but now the result table is blank.
    I want to retain the result we have searched when return to the previous search page.
    I think if we can change the retainAM's value to 'Y' after clicking on 'Go' button, then when we return to this page, retainAM will still be 'Y' so that the
    result will be retained .
    And I found one thing so strange, in advancedSearch criteria, there are four criteria displaying in search region by default, but when I add one new criteria, even I don't erter any value to this new crireria, and then go button, in address of this page, it will be '..retainAM=Y', then when we return this page , it will retain the result

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • In flex, How to set a value to one parameter, the parameter defined in a cffunction in a cfc file

    In flex, How to set a value to one parameter, the parameter
    defined in a cffunction in a cfc file, In the cffunction there are
    much cfargument, I want set a value to one of them, such as the
    cfc:
    <cffunction access="remote" name="myShow" output="false"
    returntype="struct">
    <cfargument name="ID" type="numeric" default=0>
    <cfargument name="GoodsID" type="string" default="">
    <cfargument name="DestTime" type="string" default="">
    <cfargument name="DestCount" type="numeric" default=1>
    How I set a value to only parameter one of them , such as set
    GoodsID when use mx:remoteObject.
    Thanks for your help

    Got maybe a solution for you, I have just tested it.
    So, the idea is to use intermediate variables. Imagine Var1 and Var2 variables that you refresh with your more or less complicated queries. Then what you can do is to refresh your final variable Var3 with a query using your intermediate variables. Here is an example for Oracle:
    select #Var1+#Var2 from dual
    This way you can make a chain of dependent variables: Var3 is using Var2 and Var2 is using Var1.
    Hope it helps.
    Shamil

  • How to set default values in initialization event for select option

    Abapers,
    I have 3 GL account like 0024831231,0024831238,0024831245.
    Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
    Thanks

    Select option is table <Structure> with fields, low, high, sign & option
    you need to append the value into the select option, with appropriate value in low or
    example:
    S_HKONT-low  = <value>
    S_HKONT-SIGN = 'I'
    S_hkont-OPTION = 'EQ'
    append s_hkont.
    Default value for select-option also can be added directly in select-option statement.
    Regards,
    Mahesh

  • How to set fixed value in doDML

    Hi,
    My application is ADFBC.
    i am getting fixed value in backing_bean.this value is not coming form VO.how to set this value in doDML.because i want to save this fixed value(this value changing in backing_bean from UIpage) into database.
    actually i am using fixed list box values(these are not from VO) in UIPage and after submitting i am getting this vaue in backing_bean and some updatable table is displaying in UIpage.after filling some values in the updatable table and i am pressing commit button then i have to set this value into one table in databse.
    all updated values are saving because i am using ADF table.now i have to save this list value also in one of the column in this table.
    How to set this value into doDML?
    please help me.
    Thanks,

    Have you thought of creating a "transient" attribute in your EO or VO, that stores the fixed list box value? Then in the doDML method you could grab this attribute's value and update the other EO attribute you're interested in.
    Alternatively in the transient attributes setter in the EO, you could write the code to update the other EO attribute.
    Hope this helps.
    Regards,
    CM.

  • How to set the selectedIndex when dataProvider is an XML object in DropDownList?

    dataProvider was an XML object
    How to set the selectedIndex when dataProvider is an XML object in DropDownList?
    I do this:
    <s:DropDownList id="dropDownList" requireSelection="true" selectedIndex="2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    But always the first item is selected whatever the value of selectedIndex equals to.

    if i understand correctly, you want the selectedindex to be 2 when the DropDownList  displays.
    It might be the case that the dataprovider is being sought after it's already selected its index (as the dataprovider isn't already determined to begin with), so currently it's
         - setting the selected index to default
         - setting the selected index to 2 (your command)
         - getting the dataprovider
         - setting the selected index to default
    try writing a function to set the DropDownList's selected index after it's received the information, or even just attach it to the employeeService result handler.
    for quick testing sake you could just add
    <s:DropDownList id="dropDownList" requireSelection="true" updateComplete="dropDownList.selectedIndex = 2"
                    labelField="lastName" dataProvider="{employeeService.lastResult.employees.employee}"/>
    to see if my theory is correct.

  • Need to set default value in table EABL.

    Hi Experts,
    How to set default value of field ATIM form 00:00 to 23:59 ion field selection screen for table EABL in transaction SE16?

    hi jazz try this way.
    forget about every thing and come from beginning.
    by now i think your are familiar with shd0.
    firstly create a variant using shd0 for your table eabl with default value and save it and activate it.
    next check whether it is working or not by opening se11 or 14 and enter table name and click display, the you can you see your default vale in your required field.
    after it is done the come to second part i.e your se16.
    now create another variant for this and save it and activate it.
    (by this i mean to say you are creating two variants )
    hope this will solve your problem.
    if your purpose is not solved yet then please write to my mbox.
    regards,
    kool.

Maybe you are looking for

  • Mail showing blank screen after iOS 8.2 upgrade

    after upgading to iOS 8.2 today, my mail is showing what seems to be a blank gmail screen, then goes dark, then transparent. Not able to get any email.  Tried deleting gmail account,  still getting same screen.

  • Hardware/Software needed for WebForms?

    My company is planning on migrating a Forms 3.0 application to WebForms (we need to support both Win95/98 PCs and Macintoshes). I understand the basic 3-tier structure (i.e. database server, application server and browser based client), but I'm still

  • 3d rotate tool perspective errors?

    Hello! I was trying to understand 3d tool, so I have drawn a square and then make a symbol, and select rotate 3d tool...but something unexpected happens: if I rotate along x axis the square is not simmetric along y axis. Try to explain better: this i

  • Extract image from DVD, add different sound and burn new DVD?

    I am a composer for film and TV. My clients send me DVDs that have inferior sound. I would like to extract the image from the DVD, add a better sound file (48k16bit) and drop this in iDVD to create a final DVD. How do I do this?

  • Don't Want Mail App as a Default app

    If I am answering an email on yahoo or hotmail or gmail and I click a "mailto" link, Mail pops up as the default app as opposed to me being able to respond inside whatever I am presently using. How do I keep this from happenning? Thanks for the help