Setting tableView selection

I have a htmlb:tableView with selection.
I now implemented a "Move-Up" button, by which you can move the selected line one line up. This works fine.
If you select line 5, it will be moved to line 4.
However, the tableview selection stays at line 5 after the move. I can I move it to line 4. In other words, how do I set the tableView selection via coding?

Hi Daniel,
there are 2 ways dependent on how your table is defined.
If you are using Index you need to set one of the attributes selectedRowIndexTable or selectedRowIndex (dependent on whether you use single or multi-select). Be aware if you delete the selection you need to set this value to an invalid Index as otherwise the tableview reads it from the request.
If you have defined a key column you basically do the same but use the attributes selectedRowKeyTable or selectedRowKey. Here the same applies if you want to delete(unselect) the entry.
Best Regards
Michael

Similar Messages

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • How do I find and/or change the pre-set voltage selection switch in an HP TouchSmart IQ500 series

    how do I find and/or change the pre-set voltage selection switch in an HP TouchSmart IQ500 series (specifically an IQ524)
    This question was solved.
    View Solution.

    Doesn't it use an external AC Adapter? If so, all you should need to use in another country is an adpater plug to match the wall socket.
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • "Missing parameter values." Error when setting record selection formula

    Setup - VS 2008, CR 2008 (v12.0), Win XP & C#.Net
    I have a form which loops through all parameters (non-linked to sub reports, so only off the main report) and allows users to enter the values for each parameter. When hitting the preview button, I loop through all of the saved values, set the parameter field values and then add any additional filters into the recordselection formula as below. The problem i'm having is that the ReportDocument.HasRecords returns true if the ReportDocument.RecordSelectionFormula doesn't filter out every result.
    For example, I have a list of customers and if I set the selection formula to filter out a specific customer, ReportDocument.HasRecors returns true, if I set the selection formula to filter something that doesn't exist i.e. customer "xk39df", the moment this line of code runs "ReportDocument.RecordSelectionFormula = rsFormula;" - ReportDocument.HasRecors returns the following exception as opposed to "False".
    Message: Missing parameter values.
    Source: CrystalDecisions.ReportAppServer.DataSetConversion
    StackTrace:    at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.hasRecords()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_HasRecords()
    ErrorID: MissingParameterFieldCurrentValue
    The strange thing is, it works fine if the recordselectionformula selects a record which exists in the results - all parameters have a current value except for the linked parameters.
    This one has got me stumped!
    foreach (ParameterFieldDefinition parameterField in ReportDocument.DataDefinition.ParameterFields)
                    var query = ReportObjects.Values.Cast<Filters>().Where(objects => objects.ParameterName == parameterField.Name.ToUpper().Trim());
                    foreach (var item in query)
                        parameterField.CurrentValues.Clear();
                        parameterField.CurrentValues.Add(item.ParameterValue);
                        parameterField.ApplyMinMaxValues(item.MinLength, item.MaxLengh);
                        parameterField.ApplyCurrentValues(parameterField.CurrentValues);
                var records = ReportObjects.Values.Cast<Filters>().Where(recordSelection => recordSelection.RecordSelectionFormula.Trim().Length != 0);
                foreach (var item in records)
                    rsFormula += item.RecordSelectionFormula;
                if (rsFormula.EndsWith(" AND "))
                    rsFormula = rsFormula.RTrim(5);
                ReportDocument.RecordSelectionFormula = rsFormula;

    Hi,
    The report has it's own ADO Datasource set in crystal reports, so I just pass the log on information to the report object before doing anything else.
    this.DataSourceConnections[0].SetConnection("ServerName", "Database", "sa", "Password");
    I then do a refresh before applying the parameter values (I do this because the user can preview the report more than one time by using a preview button on the parameter form without re-loading the report object)
    this.Refresh();
    Then I set all parameter values followed by setting the recordselection formula.

  • How to set the Selected row and Column in JTable

    Hi,
    i have a problem like the JTable having one Method getSelectedRow() and getSelectedColumn to know the Selected row and Column but if i want to explicitly set the Selected Row and Column,then there is no such type of Methods.If anybody has any solution then i will be thankful to him/her.
    Praveen K Saxena

    Is that what you're looking for? :myTable.getSelectionModel().setSelectionInterval(row, row);
    myTable.getColumnModel().getSelectionModel().setSelectionInterval(column, column);

  • How to set default selection in html:radio

    hai
    how to set default selection in <html:radio>.

    No it won't help.
    You can't set a value into an <input type="file"> control at all. The user has to put values in themselves.
    The reason behind this is security. If the programmer could put any value they liked in there, you could upload any file at all from a users computer without their intervention. eg C:\windows\system32\passwords.txt
    Bottom line: you can't put a default value into the input type="file" control.
    And a good thing too ;-)

  • How do you set the selected item of a combobox?

    I looked around and didn't find an intrinsic method or
    function to set the selected index of a combobox. I wrote a
    function, but I thought I would see what the "best" way of doing it
    is?
    The function I wrote is;
    private function
    setComboSelectedItem(cmbBoxIn:ComboBox,strFindItem:String):void
    for (var i:int=0;i<cmbBoxIn.dataProvider.length;i++)
    if (cmbBoxIn.dataProvider(I) == strFindItem)
    cmbBoxIn.selectedIndex = i;
    break;
    The parentheses surrounding "i" above should be square
    brackets, but they do not display.
    Paul

    doing a calllater will solve this problem if your changing
    dataprovider and trying to set the selected index on an editable
    combox

  • Accessing WS data set during selection screen processing in BG processing

    Hello ABAPers,
    I am attempting to access a working storage table variable that is set during selection screen processing after the user submits the program to background processing (using F9).
    I have tried using export to memory id in the at selection screen section and then import from memory id in the start-of-selection section, but it does not seem to work all of the time.  Is there a better way of doing this?
    Thanks

    bump

  • Trying to print a jpeg (not a photograph).  No matter what setting i select, it prints in landscape.  How do I get portrait printing?

    Trying to print a jpeg (not a photograph) in Elements 12. No matter what setting i select, it prints in landscape. How do I get it to print in portrait?
    Second question.  What is the fastest way to change the number setting (0 to 12) for an existing photo so that the file size is smaller?

    kkbadobe wrote:
    Trying to print a jpeg (not a photograph) in Elements 12. No matter what setting i select, it prints in landscape. How do I get it to print in portrait?
    Second question.  What is the fastest way to change the number setting (0 to 12) for an existing photo so that the file size is smaller?
    Go to File>print in Editor. In the dialog that comes up, you should see "Page Setup". Select "Portrait".
    This assumes that the file is in portrait orientation as well, before sending it to the printer.
    As for question #2, I am unaware of a numeric sequence such as you would like in this program. You can alter file size via File>save for web, however.

  • Set row select

    Hello.
    How I can set row select from PLSQL process handler after commit.In more detail  I have some set of field in my filter. I need to select all report rows which match this filter.
    Thanks in advance Andrii.

    Hi Andrii,
    I'm not sure if I understand you correct, but if your report has checkboxes, which you want to set checked when they match your filter, you could try the following:
    In your report query, where you define your apex_item.checkbox add a case stement.
    SELECT case when <your_filter_condition> then APEX_ITEM.CHECKBOX(1,<your_column>,'CHECKED')
                          else   APEX_ITEM.CHECKBOX(1,<your_column>)
                  end case as " "
    , <other_columns>
    FROM <your_table>
    regards,
    Vincent Deelene

  • To change Default Setting of Selection Screen while Filtering on infoobject

    Dear Guru's,
    I just want to know where can I change the Deafult Setting from 100 to 500 which we get in the Selection Screen when we want to Filter on Info-Object level in the Workbook.
    Hope this will clear the question , incase any further information required please let me know.
    Many thanks.

    Hi Kasi,
    Please do not post the same question twice. You can see my reply at:
    Re: To change Default Setting of Selection Screen while Filtering on infoobject

  • How to set multi select by script to a list box.

    Hi All,
    I have a list box with multiple select on the form with list (Say A,B,C,D,E,F,G ..)
    When I select A,C,E ans say this.RawValue I get A,C,E separated by carrage returns.
    When i submit the form in my Fm I get A#C#E its all fine.
    Now when the form is openend for the 2nd time to update values I get the value as A,C,E separated by carrage return thats fine too.
    Now i need to set these 3 values as selected by default so i had some java script in form ready.
    Where i iterate tru these list match the entries in the dropdown its fine untill here.
    this.setItemState(index,true)
    is the code to set them as selected but when i do only the 1st found is set to selected not the remaining ones.
    Am i doing something wrong here, please let me know with your suggestions.
    below is my script.
    var ddValue =  this.rawValue;
    ddValue = ddValue.replace("#","\n");
    var ddArray = ddValue.split("\n");
    var ddLen = ddArray.length;
    var textValue = "";
    GM_INTAKE_STRUCTURE.sf80.sfItemBuilder.sfHeaderConditions.dlExpenseType.clearItems;
    GM_INTAKE_STRUCTURE.sf80.sfRequestSummary.dlItem.clearItems;
    for(var i = 0;i<ddLen;i++){
         for(var j = 0;j<this.length;j++){
              if(this.getSaveItem(j) == ddArray<i>){
                   this.setItemState(j,true);                
                   GM_INTAKE_STRUCTURE.sf80.sfItemBuilder.sfHeaderConditions.dlExpenseType.addItem(this.items.nodes.item(j).value,this.getSaveItem(j));
    Thanks & Regards,
    Sai

    Hi Sai,
         The replace function is only replacing the first occur of #, not all of them. But you don't even need to replace the # before you do the split, just change your first lines to split directly with the # character. Your code should look as follow:
    var ddValue =  this.rawValue;
    var ddArray = ddValue.split("#");
    var ddLen = ddArray.length;
    var textValue = "";
    GM_INTAKE_STRUCTURE.sf80.sfItemBuilder.sfHeaderConditions.dlExpenseType.clearItems;
    GM_INTAKE_STRUCTURE.sf80.sfRequestSummary.dlItem.clearItems;
    for(var i = 0;i<ddLen;i++){
         for(var j = 0;j<this.length;j++){
              if(this.getSaveItem(j) == ddArray<i>){
                   this.setItemState(j,true);                
    GM_INTAKE_STRUCTURE.sf80.sfItemBuilder.sfHeaderConditions.dlExpenseType.addItem(this.items.nodes.item(j).value,this.getSaveItem(j));
    Best regards, Aldo.
    Any comments and feedback are welcome.

  • How to set default selected checkbox in af:tableSelectMany /

    Hi,
    I am new to ADF technology, I am using JDev 10..3g.
    I want to set the checkbox as default selected for particular rows.
    but I don't know how to set default selected checkbox in <af:tableSelectMany />
    Is there any way to do this using ADF<af:tableSelectMany />
    Thanks,
    Mohammed

    Hi Jeroen,
    Thanks for reply. but the problem is that I am getting data from database and based on some flag I need to select checkbox while page is loading first time.
    at that time the table is null as till now it not rendered. and when its rendered it means page is displayed now.
    just before display I need to set checkbox as selected.
    I don't want to do like this (when user is pressing any command button then only is should update checkbox selection).
    Thanks,
    Mohammed.

  • Hey guys, I'm having trouble matching the colour of the image back ground (white) with the pre-set colour selection. is there a tool that can help me? thanks

    hey guys, I'm having trouble matching the colour of the image back ground (white) with the pre-set colour selection. is there a tool that can help me? thanks

    Your description of the problem is not quite clear so I made certain assumptions. I hope I am rigtht. I believe you have a color patch such as this:
    that you would like to place in an image area that has modeling in its white background. You do not want to lay in a flat color but rather to add a color and not lose the modeling or other background tone. The problem is, after making the selection, if you use Edit > Fill and set the Blending mode to Color, the white background remains white. The only colored background area may be an object's shadow or some similar area that is not pure white. (Image 2) It is an unsatisfactory result.
    If that is an accurate description of the problem, consider this:
    Image 1: The original image
    Image 2: Edit > Fill with the Blending mode set to Color. White remains white
    Image 3: Mode changed to Lab Color. Edit > Fill with the Blending Mode set to Color. Then return to RGB.
    (I would not normally use this green as a replacement color but since it is a Tiffany clock, I chose a light version of Tiffany's trademark color.)

Maybe you are looking for

  • Month Day Year format

    When entering dates with just numbers like 050508. Is there a way to have it show up as 05/05/08 or even 5/5/08? Acrobat 9 Standard

  • Screen Saver - photos no longer available for screen saver

    I had screen saver set up to display my photos. I can't remember if the photo's were pulled from Aperture or from MobileMe. Now I get a message that there are no photos in the folder or no pictures associated with the subscription (MobileMe). This se

  • How can I view on external NTSC monitor in PRCS6?

    NOTE: I've aksed this quesion before on this forum and followed the kind suggestions given, however, I have not yet been successful. Note that I can view my timeline on my external broadcast monitor just fine in FCP .. anyone??

  • Alert for Marketing Attributes

    Hi I am sorry but I donu2019t understand the solution presents in the last questions on this issue. I am using CRM 2007 and I have marketing attributes maintained on the Sold-to party business partner. I want this marketing attribute to be displayed

  • Content Presenter error in Spaces

    Hi all From Spaces, when I select the button "Create Web Content" for a single content item through the Content Presenter Configuration wizard I receive an error message "This placeholder is restricted, but no region definitions have been specified."