Highlighting currently selected row in a Report-Form page

Hi,
I have a page with Report - Form layout. On the top of the page there is a classical report (not IR). When the user click a row then I display a detail form below it. It would be nice if I could highlight the row the user clicked last time, to indicate to which row the detail data below the report belongs to. Did any body do something similar?
Regards, Tamas

It's relatively simple to achieve this—without JavaScript—using a named column report template and CSS:
http://apex.oracle.com/pls/apex/f?p=34839:27:0
We'll assume a page item (or items) already exists for receiving the master row primary key value(s). In the example this is P27_DEPTNO. Give the master report region a static ID for use in CSS selectors. Here this is department.
If the master primary key value(s) are used as links in the report, then [column link] columns need to be created to replace them in the report attributes.
Create a named column report template as required by your report query, including an HTML ID attribute for the report row element that contains column references to the primary key value(s). Replace column references in the row template for any primary key link columns with the [column link]s created previously. In the example, [column link] (ref #4#) replaces DEPTNO (ref #1#) as we need to reference the original DEPTNO value in the row ID:
Row Template
<tr id="dept-#1#">
  <td class="t17data">#4#</td>
  <td class="t17data">#2#</td>
  <td class="t17data">#3#</td>
</tr>We then just need to use the selected P27_DEPTNO value via substitution in a page HTML Header to create a descendant selector that will apply a highlight to the cells in the currently selected row (along with some others to make it easier to select the row):
CSS
<style type="text/css">
/* Make the whole table cell a link target */
#department td {
  padding: 0;
#department td a:link {
  display: block;
  padding: 2px 8px;
/* Universal Selector sucks */
  font-size: 9pt;
/* Highlight the selected row */
#department tr#dept-&P27_DEPTNO. td {
  background-color: #eee;
</style>

Similar Messages

  • Need help on how to specify the current select row in a View Object

    Hi,
    I have a ADF table on my page, when I was selecting the rows in this table, I want the set and get methods in the ViewRowImpl class to do some customized actions. I found out that each time regardless the row I select in the table, the viewrowimpl class will always return the data in the first row, I tried to use getCurrentRow in VO row impl. but still, gets the first row.
    Does anyone know how to get the selected row value in the View Object, or View Row Impl rather???
    Thanks!

    Hi,
    you can call a method exposed by the AM and pass teh rowKey of the selected row as an argument. When you configure the exposed AM method in the pageDef (creating a method binding) the argument is shown in a dialog from where you can use EL like #{bindings.iteratorName.currentRow.rowKey} to access the current selected row.
    Frank

  • Af:table: copy values of currently selected row to other attribute bindings

    Hello,
    I'm using JDev 11g.
    Copying a value from one attribute value binding to another one is easy when you are clicking a button, with a setActionListener:
    <af:setActionListener from="#{bindings.SourceField.inputValue}" to="#{bindings.DestinationField.inputValue}"/>What I want to do is the same behaviour, but instead of clicking a button, the triggering event should be the selection of a row on an af:table. The source field is a column of the currently selected row. The destination is another attribute value binding outside of the table.
    Jspx:
    <af:table value="#{bindings.EmployeesView1.collectionModel}" var="row">
      <af:column ... >
        <af:inputText value="#{row.bindings.SourceField.inputValue}" ... />
      </af:column>
    </af:table>
    <af:inputText ... value="#{bindings.DestinationField.inputValue}" />
    ...Page Def:
    <bindings>
      <tree IterBinding="EmployeesView1Iterator" id="EmployeesView1">
        <nodeDefinition ... >
          <AttrNames>
            <Item Value="SourceField"/>
          </AttrNames>
        </nodeDefinition>
      </tree>
      <attributeValues IterBinding="EmployeesView1Iterator" id="SourceField">
        <AttrNames>
          <Item Value="SourceField"/>
        </AttrNames>
      </attributeValues>
      <attributeValues IterBinding="SomeOtherIterator" id="DestinationField">
        <AttrNames>
          <Item Value="DestinationField"/>
        </AttrNames>
      </attributeValues>
    </bindings>What needs to happen in this simplified case is everytime a row is selected in the table, the value of the SourceField column (that also has an attribute value binding) should be copied to the DestinationField of some other iterator. Analogous to the setActionListener, but without a button. And in the real case, there are more columns of the selected row that need to be copied to more fields.
    How can this be done? I already created a custom selectionListener for the table in a backing bean. In this selectionListener, the first thing I do is call the default "#{bindings.EmployeesView1.collectionModel.makeCurrent}". Then I fetch the current row, which is also no problem. So I now have access to the value of SourceField in my selectionListener in the backing bean. The only thing that is left now is copying this value to the "#{bindings.DestinationField.inputValue}" in Java, and that's where I'm stuck. :-)
    Or even better ofcourse, is there a declarative way to do this without Java code?
    Help would be greatly appreciated!
    Chris

    Hi Chris,
    You should be able to use this utility method from JSFUtils class (part of FOD)
        public static void setExpressionValue(String expression, Object newValue) {
            FacesContext facesContext = getFacesContext();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, expression,
                                                Object.class);
            //Check that the input newValue can be cast to the property type
            //expected by the managed bean.
            //If the managed Bean expects a primitive we rely on Auto-Unboxing
            Class bindClass = valueExp.getType(elContext);
            if (bindClass.isPrimitive() || bindClass.isInstance(newValue)) {
                valueExp.setValue(elContext, newValue);
        }edit... just realized you need this too
        public static FacesContext getFacesContext() {
            return FacesContext.getCurrentInstance();
        }John

  • Highlight Current/selected cell in Calender

    Hi,
    How can I highlight current / Selected Cell in Calender ?
    Im using calender with link as like in Denes application: http://htmldb.oracle.com/pls/otn/f?p=31517:40
    But I cannot highlight the clicked/selected cell.
    Regards,
    Benz

    Any clue ? ..

  • Display and edit currently selected row of ADF Table in ADF Form

    I have an ADF Read-only Table and ADF Form, which were created from the same Data Control.
    I need to be able to edit the selected row of the table in the form (just like in "Binding Data Controls to your JSF page" part of "Developing RIA Web Applications with Oracle ADF" Tutorial). However, I can't figure out how to do this :(
    I found the following solution on the Web: #{bindings.DeptView1.currentRow.dataProvider.dname} - but it doesn't work, since "the class oracle.jbo.server.ViewRowImpl does not have the property dataProvider".
    Sorry for the newbie question.
    Thanks in advance for any help!

    Hi,
    AFAIK, dataProvider is not supported on ADF BC, hence the error.
    If you have created ADF Read only table and form from the same data control you just need to refresh the form based on table selection to show up the selected record, to do which you just need to add partialTriggers property to the panelFormLayout and set its value to the id of table
    Sireesha

  • How to reference the selected row on a report by click a radiobox

    I created a report with a column displayed as a radiobox.The report source is like "select htmldb_item.radiogroup(1,.....),rec_id,....from .... where ....",after click one radiobox,i want to get other column's value in the selected row in the after submit process ,can anyone help me?????? how to reference "rec_id" of the selected row?

    Hello,
    First, please tell us your first name, and update your forum handle. It’s make it easier to track your threads, and help you.
    >> apex_application.g_f01(1)" only return the first record's rec_id,if i click radiobox in other rows,it returns the same result as click radiobox in the first row?
    The ‘G_F01’ is an array of values, so apex_application.g_f01(1) will always bring you the first element of this array. If you want to retrieve other values from this array, which will include the values of the radiogroup value of the other lines, you need to use a loop. Something like that should work:
    for i in 1.. apex_application.g_f01.count loop
    … apex_application.g_f01(i) …
    end loop;
    >> after click one radiobox,i want to get other column's value in the selected row in the after submit process
    That means that the value of your radiogroup item should include some indication to the line you are on. If, like in Andy’s example, you can retrieve your record from a table, based on a PK, your radiogroup can return this kind of information. However, if the data on the other columns of the select raw, were just entered/updated by the user (like in a tabular form), the radiogroup item should include information about the row you are in, in order for you to be able to access the corresponding array elements – other G-Fxx arrays – of the other columns in the row. In this case, I believe using checkboxes is preferable.
    Regards,
    Arie.

  • How to Highlight the selected row of table

    Hi All,
    I have a result table. I want the selected row to be highlighted in orange color.
    The properties of the table are as follows :
    rowSelectable : true
    selectionChangeBehaviour : auto
    selectionMode : auto
    Please let me know what am I missing.
    Nikhil

    Hi Nikhil,
                 We too encountered this problem in EP 6.0. The code is correct. Actually
    int index=wdContext.nodeSales_Orders1().getLeadSelection();
    is enough.
    But this is not the problem. It is the problem with  either browser or Portal Runtime.
    Is your version EP 6.0? Is this a problem for all tables or only this table? Check with other browsers like Mozilla..(or different IE versions).
    regards,
    Siva

  • Spry Menu Bar Show Highlighting currently selected

    Is there a way to get a vertical Spry menu to leave the
    lights on while we're on a given page? I'd like to affect the menu
    behavior to cue it to leave the highlighting turned on for the
    currently selected page. I'm hoping there's a short script I could
    add to individual pages to tell the menu where we are. If my menu
    has 6 vertical list items, and the page I an displaying was loaded
    by clicking on the third item in the list, then I'd like item three
    in the menu to remail highlighted. This would cue the user to know
    where they are in the menu for any given page. Looking at the
    script near "show menu highlighting and MenuBarItemHover"

    hey,
    i think the reason the spry menu isn't working is because it
    needs to expand past the frame, which isn't possible. if you want
    you can use
    this
    it's compact and it doesn't need to exapand past the frame.
    hope this helped

  • How to highlight a perticular row of a tabular form

    Hi everybuddy,
    I want to ask you 2 question.
    1> How can i highlight a perticular row of a form.The requirement is that when you click any row of a form it will be highlighted by yellow color or the background color will be green.
    2> I have a tabular form with five rows but when ever i want to add one button
    five consiqutive buttons are add automatically.They are in a stack manner.
    Can any body will please tell me how can i resolve two issues.

    don't duplicate:
    how to highlight a perticular row of a tabular form

  • Adding new row to the reports list page

    How can I add a new report row in the reports list of the reports tab.
    Ex: a new row to the report "users by Date of Join report" is to be added
    How can we add Please help me out in this

    I am facing the same problem!
    camickr wrote:
    Try adding an empty row containing a null value for the String instead of the empty String.camickr, it will not help, the DefaultRowSorter in the "*+compare(int model1, int model2)+*" method return -1 if the first value is null and 1 if the sacond value is null. and incase of DESCENDING it mult by -1.
                    // Treat nulls as < then non-null
                    if (v1 == null) {
                        if (v2 == null) {
                            result = 0;
                        } else {
                            result = -1;
                    } else if (v2 == null) {
                        result = 1;
                    } else {
                        result = sortComparators[counter].compare(v1, v2);
                    if (sortOrder == SortOrder.DESCENDING) {
                        result *= -1;
                    }And this is the real problem!
    The empty line is sorted as the smallest value and incase of DESCENDING it will be the first line (because of the mult by -1).
    We could have overide it and incase of the empty row(usualy the last row) do not mult by -1 in DESCENDING mode.
    But the problem is that the "+*compare*+" method and it's caller "*+Row+*" inner class are private :-(
    It is not wise to do it but we can do like kmp83 wrote:
    kmp83  wrote:
    copy/duplicate "private" code from DefaultRowSorter into my extended class.Anyone have another suggestion?

  • Creation of Report+Form pages

    HI all,
    In [Building an application using APEX OBE|http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/devdays2012/apexp1_lab/apexp1_lab.html] when create the app, creates pages too, and one of them (well, 2) is a Report+Form.
    I tried to search this in my actual application created. But I only found, Form, and Report, but not both.
    There are some way to automatize the creation of this 2 pages, like Application Wizard does?
    Regards.

    GiuseppeL wrote:
    There are some way to automatize the creation of this 2 pages, like Application Wizard does?Yes. From the application home page click Create Page > Form > Form on a Table with Report, then follow the wizard.

  • Problems looping selected rows in a report

    Hi,
    I have a report on my form, of type SQL Query (updateable report), that I populate using the following SQL:
    SELECT APEX_ITEM.CHECKBOX(1,prvidd,'CHECKED') " ", prvidd, prvnme, prvlev
    FROM vu_roleprivs
    WHERE rolidd = :P32_ROLIDD
    The first two columns are hidden, so that when it comes to inserting/updating then all rows will be processed (this is a requirement).
    I use the following process to loop through the report rows...
    DECLARE
    vROW VARCHAR2(4000);
    prvIDD NUMBER;
    prvLEV VARCHAR2(3);
    BEGIN
    FOR i IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    vROW := APEX_APPLICATION.G_F01(i);
    prvIDD := APEX_APPLICATION.G_F02(vROW);
    prvLEV := APEX_APPLICATION.G_F04(vROW);
    -- Delete the current row from PDROLPRV
    DELETE FROM pdrrolprv WHERE rolidd1 = :P32_ROLIDD and prvidd1 = prvIDD;
    -- Now insert the record from the table row
    INSERT INTO pdrrolprv VALUES(:P32_ROLIDD, prvIDD, prvLEV);
    END LOOP;
    END;
    ... but when the process runs I get the following error:
    ORA-06502: PL/SQL: numeric or value error: character to number conversion error
    I can't see where I am going wrong - can anyone help, would be much appreciated.
    Best regards
    Simon

    Hi Simon,
    This might be stating the obvious, but first up I would determine exactly where the code is failing by putting dummy values instead of variables into the following statements: -
    DELETE FROM pdrrolprv WHERE rolidd1 = :P32_ROLIDD and prvidd1 = prvIDD;
    INSERT INTO pdrrolprv VALUES(:P32_ROLIDD, prvIDD, prvLEV);
    Assuming the code then runs correctly, start putting your variables back 1 by 1 until you find the failure. You might also want to dump out your variable values: -
    vROW := APEX_APPLICATION.G_F01(i);
    prvIDD := APEX_APPLICATION.G_F02(vROW);
    prvLEV := APEX_APPLICATION.G_F04(vROW);
    to a test table.
    Hope that helps. Give me a shout if you're still having trouble.
    Mike

  • I need some syntax help with reading some values from a selected row in an Access form.

    My goal:  to extract the data from 4 fields in a datasheet row and place them in another form.
    My problem:  I can only get the field values from the first row of the datasheet.
    I have tried using the Form_Click event as the location for the code I've tried.  This seems to be the right place, but apparently referring to the desired fields by their names with Me. in front just references the first record in the datasheet, not
    the one I've selected.
    Should I just read the source form's recordset using the Currentrecord value somehow?  I could use some direction on that.
    Thank you.
    Marj Weir

    It's generally considered good forum etiquette to post back a description of the solution which you've reached.
    The normal control for a multi-valued field is a combo box rather than a text box, but unless it is necessary for you to use a  multi-valued field, i.e. your database is interfacing with SharePoint in the very limited context in which this feature is necessary,
    I'd advise that you model the many-to-many relationship type in the time-honoured way by means of a table which resolves the relationship type into two one-to-many relationship types, and use a subform to show the data.  You can alternatively use a multi-select
    list box or a text box which shows a value list.  You'll find examples of all three methods in StudentCourses.zip in my public databases folder at:
    https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
    If you have difficulty opening the link copy its text (NB, not the link location) and paste it into your browser's address bar.
    Ken Sheridan, Stafford, England

  • How can I get the values of the selected row in the report?

    Hi All:
    I have a dynamic query(lexical parameters)that columns are selected at the run time. And depend on the values, I'd like to do another query just for certain row. For example, when I double click on the fifth column of the fifth row. I'd like to collect all the column values of this fifth row. I think It likes drill-down report, but I don't need a detail report. I just want a string of the combination column's values. Would you please help?
    Thanks, in advances, for your help.
    TD

    Hi:
    I got it.
    Thx,
    TD

  • Re: Getting the current selected Row & column in adf table

    Hi,
    Our requirement is we have to retrieve both the current row and column in adf table.
    We can retrieve the current row in the backing bean like
    ViewObject view = getViewObject();
    view.getCurrentRow();
    Is it possible to retrieve selected column id or column header text as we are getting for row?
    please give some sample.
    Thanks,
    Vijay.
    Edited by: Vijayakumar Palanisamy on Jun 23, 2011 2:23 AM

    Hi John
    My exact requirement,
    1.     We have collection of records in adf table
    2.     Each cell in the row has commandImageLink (Like adding approver, edit approver, delete etc)
    Currently it’s working fine for me in the commandImageLink listener, but the problem is table is refreshed 2 time,
    while selecting a record and commandImageLink is clicked, I have to avoid 2 times refreshing,
    If it’s possible to identify a particular cell in the row selection, I can avoid the image link listener.
    we are using Jdeveloper11.1.1.4.0
    Please suggest.
    Thanks,
    Vijay

Maybe you are looking for

  • Windows 8.1 (64-bit) Keeps Crashing

    Hey, first time post. About a month ago I built my first computer and for the most parts it works. There has been instances however where my computer crashes with the blue screen of death. I have checked the forums for similar problems, and even trie

  • Help needed in swing

    HI friends, I have a GUI with 4 paem nels .On one panel ..i have a menu item called "Create" when i click it an oval will be drawn on a canvas. And i have the Buttons on the other panel . I need to drag these buttons and drop them into the ovals. Can

  • Too much "stuff" to install Leopard

    I've backup my iPhoto Library & iTunes library to external HD. Now I delete both from my HD? Then after Leopard is installed, I drag both of them from the external HD to MacBook Pro HD? Just being extra cautious!

  • Replace Sybase callback functions with OCI

    Has anybody replaced the Sybase error and message callback functions with the OCI callback capability? If so, I would be interested in discussing any lessons learned that you might have.

  • Tab widget inside another tab widget

    Hi, Is it possible to do the following? I want to create a vertical tab widget (no prob). But on each of the tab 'pages' I want to add a horizontal tab widget. Thanks, Donal