Table row colour loading problem

Hi,
Thanks for your time.
I want to display table row colour dynamically based on table data.
Am able to achieve it partially as below,when I scroll the table the loaded colour dissappears.
I use the below code:-
template: new sap.ui.commons.TextView().bindProperty("text","objectivecategory",function(category){
  if(category=="Operational"){
  backgroundColor='#fff2cb';
  backgroundColorClass ="operationColor"
  else if(category=="Strategic"){
  backgroundColor='#e8f5fe';
  }else{
  backgroundColor='#ecf6c1';
           cellId = this.getId(); 
           //alert("cellId"+cellId);
           $("#"+cellId).parent().parent().parent().css("background-color",backgroundColor);

Hi Velu
Here is an example
Hope this answer your question.
-D

Similar Messages

  • How to delete the source table rows once loaded in Destination Table in SSIS?

    Data Base=kssdata
    Tables= Userdetails having 1000 rows
    Using SSIS: 
    Taking A  
    OLE DB Source----------------->OLE DB Destination
    Am Taking 200 rows in Source table and loaded into Destination table once
    Constraint: here once 200 rows are exported in destination table , that 200 rows are deleted in source table
    repeat the task as source table all the records are loaded into Destination table 
    After that am taking another 200 rows in source table and loaded into Destination table

    Provided you've a sequential primary key  or audit timestamp (datetime/date) column in the table you can do an approach like this
    1. Add a execute sql task connectng to source db with below statement
    SELECT COUNT(*) FROM table
    Store the result in a variable
    2. Have another variable and set it to below expression
    (@[User::CountVariable]/200) + (@[User::CountVariable]%200 >0? 1:0)
    by setting EvaluatesExpression as true. Here CountVariable is variable created in previous step
    3. Have a for loop container with below settings
    InitExpression
    @NewVariable = @CounterVariable
    EvalExpression
    @NewVariable > 0
    AssignExpression
    @NewVariable = @NewVariable - 1
    3. Add a data flow task with OLEDB source and OLEDB Destination
    4. Use source query as
    SELECT TOP 200 columns...
    FROM Table
    ORDER BY [PK | AuditColumn]
    Use PK or audit column depending which one is sequential
    5. After data flow task have a execute sql task with statement as below
    DELETE t
    FROM (SELECT ROW_NUMBER() OVER (ORDER BY PK) AS Rn
    FROM Table)t
    WHERE Rn <= 200
    This will make sure the 200 records gets deleted each time
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Highlight table rows on load

    Hi,
    I am using JSF dataTable and need to highlite some of the rows on page load. The order of the rows which is to be marked with different bgcolor is not fixed. Is there any way to do this? I am breaking my head for a day now without any success. Please help me out.
    Thanks in advance.

    If the dataTable is bound to a list of custom objects and you know which row needs to be highlighted on the server side, can't you have a property in the custom object for the css classname and set the value? This property can be bound to the className attribute of the row????? I am not very sure.
    Or do it onload of the page using javascript. You can set a comma separated list of rowId's say in a hidden field, and onload, the script code can read the field and get the Row with the ID and change the css class.

  • Ajx problem with jsp .not able to show  ajax response data in table rows

    hi evryone
    i m new to ajax .i m not able solve this problem .pls help if anyone understood my problem
    probelm scenario is like this:
    take a example of shopping page where a field amount changes every time (time interval) ,the amount data is coming from database .ok...
    this i m trying to do with ajax and want to display the value in table rows one by one ..but response whihc i m getting is different .....same value is diaplying in evry rows .which i dont want
    the output it coming now is:like this
    item amount
    item 1 20
    item2 20
    item 3 20
    i want like thi s
    item amount
    item 1 20
    item2 30
    item 3 40
    even in database the value is 20,30,40
    here is the code of two jsp page
    one is ajaxitem_amount.jsp
    <%
    try
    stmt3 = con.createStatement();
    String itemQ="select item_ref_id,quantity from item_master where shop_ref_id="+shopid+" and (status is null or status<>'w') order by item_ref_id";
    //out.println(railQ);
    rs_details=stmt3.executeQuery(itemQ);
    while(rs_details.next())
    item2 = rs_details.getInt("ITEM_REF_ID");
    v.add(new Integer(item2));
    String aString = Integer.toString(item2);
    itemids.add(aString);
    Enumeration enum = v.elements();
    for (j=0; j<v.size(); j++)
    //out.println("v[" + j + "] = " + v.elementAt(j));
    sql3="select max(shop_amount) from shop_floor_temp where item_ref_id="+v.elementAt(j);
    rs_bid=stmt3.executeQuery(sql3);
    if(rs_price.next())
    last_price=rs_price.getDouble(1);
    if(last_price != 0)
    lprice= last_price;
    else
    lprice=1;
    out.print("<response>");
    out.print(lprice+"|");
    out.print("</response>");
    out.print("\n");
    catch(Exception ex)
    out.print("ERROR"+ex);
    // out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    _another is main shopping
    <td bgcolor="#C5B9AB" width="10%" align="center">
    <strong><font face="Verdana" size="2">Last price</font></strong>
    int tabrowcounter=0;
    while(rs_details.next())//some query
    tabrowcounter++;
    //*some more data is displayed here one by one all are working instead of this which i am calling from another page ajaxitem_amount.jsp page*
    <td bgcolor='<%=colorjava%>' width="50%" align="center">
    <div id="responseimage<%=tabrowcounter%>"></div>
    <div id="responseOutput<%=tabrowcounter%>"></div>
    <SCRIPT LANGUAGE="JavaScript">
    function createXHR<%=tabrowcounter%>()
    try { return new XMLHttpRequest(); } catch(e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
    alert("XMLHttpRequest not supported");
    return null;
    function sendRequest<%=tabrowcounter%>()
    document.getElementById('responseimage<%=tabrowcounter%>').innerHTML ="<IMG SRC='load.gif'> ";
    document.getElementById('responseimage<%=tabrowcounter%>').style.display = 'block';
    document.getElementById('responseOutput<%=tabrowcounter%>').style.display = 'none'
    var url="ajaxauct_floor.jsp";
    var xhr = createXHR<%=tabrowcounter%>();
    if (xhr)
    xhr.open("get",url,true);
    xhr.onreadystatechange = function()
    handleResponse<%=tabrowcounter%>(xhr);
    xhr.send(null);
    function handleResponse<%=tabrowcounter%>(xhr)
    if (xhr.readyState == 4 && xhr.status == 200)
    try
    var data = xhr.responseText.split("|");
    //document.write(data);
    //updatePage<%=tabrowcounter%>(xhr.responseText);
    //document.write(xhr.responseText);
    setTimeout('sendRequest<%=tabrowcounter%>()',10000);
    for(var x=0;x<data.length-1;x++)
    //alert(data);
    document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[x];
    document.getElementById('responseimage<%=tabrowcounter%>').style.display = 'none'; // HIDE
    document.getElementById('responseOutput<%=tabrowcounter%>').style.display = 'block'
    //document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[0];
    //document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[0];
    catch(e)
    alert('1 '+e)
    sendRequest<%=tabrowcounter%>();
    </SCRIPT>
    </td>
    </tr></table>
    if anyone have understood my problem pls help me .i have tried lot but not working .anyone genius here ?thnak you

    thanks baluc
    thanks for correcting me and giving me a good advice .anyway i m trying make you understand once again ...
    if you have understood this time please do reply .else i m sorry for placing wrong question ....
    hi everyone
    I m new to Ajax .I m not able solve this problem .pals help if anyone understood my problem
    problem scenario is like this:
    take a example of shopping page where a field amount changes every time (time interval) ,the amount field* (this data is coming from database )
    this I m trying to do with Ajax and want to display the value in table rows one by one ..But response which I m getting is different.....same value is displaying in every rows .which I don't want
    The output it coming now is: like this
    item amount
    item 1 20
    item2 20
    item 3 20
    I want like this s
    item amount
    item 1 20
    item2 30
    item 3 40
    even in database the value is 20,30,40
    here is the code of jsp page
    one page is ajaxitemamount.jsp_*
    <%
    try
    stmt3 = con.createStatement();
    String itemQ="select item_ref_id,quantity from item_master where shop_ref_id="+shopid+" and (status is null or status<>'w') order by item_ref_id";
    //out.println(railQ);
    rs_details=stmt3.executeQuery(itemQ);
    while(rs_details.next())
    item2 = rs_details.getInt("ITEM_REF_ID");
    v.add(new Integer(item2));
    String aString = Integer.toString(item2);
    itemids.add(aString);
    Enumeration enum = v.elements();
    for (j=0; j<v.size(); j++)
    //out.println("v[" + j + "] = " + v.elementAt(j));
    sql3="select max(shop_amount) from shop_floor_temp where item_ref_id="+v.elementAt(j);
    rs_bid=stmt3.executeQuery(sql3);
    if(rs_price.next())
    last_price=rs_price.getDouble(1);
    if(last_price != 0)
    lprice= last_price;
    else
    lprice=1;
    out.print("<response>");
    out.print(lprice+"|");
    out.print("</response>");
    out.print("\n");
    catch(Exception ex)
    out.print("ERROR"+ex);
    // out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    another is main shopping page page 2*
    <td bgcolor="#C5B9AB" width="10%" align="center">
    <strong><font face="Verdana" size="2">Last price</font></strong>
    int tabrowcounter=0;
    while(rs_details.next())//some query
    tabrowcounter++;
    <td bgcolor='<%=colorjava%>' width="50%" align="center">
    <div id="responseimage<%=tabrowcounter%>"></div>
    <div id="responseOutput<%=tabrowcounter%>"></div>
    <SCRIPT LANGUAGE="JavaScript">
    function createXHR<%=tabrowcounter%>()
    try { return new XMLHttpRequest(); } catch(e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (e) {}
    try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
    alert("XMLHttpRequest not supported");
    return null;
    function sendRequest<%=tabrowcounter%>()
    document.getElementById('responseimage<%=tabrowcounter%>').innerHTML ="<IMG SRC='load.gif'> ";
    document.getElementById('responseimage<%=tabrowcounter%>').style.display = 'block';
    document.getElementById('responseOutput<%=tabrowcounter%>').style.display = 'none'
    var url="ajaxauct_floor.jsp";
    var xhr = createXHR<%=tabrowcounter%>();
    if (xhr)
    xhr.open("get",url,true);
    xhr.onreadystatechange = function()
    handleResponse<%=tabrowcounter%>(xhr);
    xhr.send(null);
    function handleResponse<%=tabrowcounter%>(xhr)
    if (xhr.readyState == 4 && xhr.status == 200)
    try
    var data = xhr.responseText.split("|");
    //document.write(data);
    //updatePage<%=tabrowcounter%>(xhr.responseText);
    //document.write(xhr.responseText);
    setTimeout('sendRequest<%=tabrowcounter%>()',10000);
    for(var x=0;x<data.length-1;x++)
    //alert(data);
    document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[x];
    document.getElementById('responseimage<%=tabrowcounter%>').style.display = 'none'; // HIDE
    document.getElementById('responseOutput<%=tabrowcounter%>').style.display = 'block'
    //document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[0];
    //document.getElementById('responseOutput<%=tabrowcounter%>').innerHTML = data[0];
    catch(e)
    alert('1 '+e)
    sendRequest<%=tabrowcounter%>();
    </SCRIPT>
    </td>
    </tr></table>
    if anyone have understood my problem please help me .i have tried lot but not working .anyone genius here ?thank you

  • Bizarre Problem for table row deletion.please help

    Folks
    I am facing a most BIZARRE PROBLEM!!!
    I have a table with a deleteButton by the side.
    The table has 3 rows
    ABC-----DELETE
    BCD-----DELETE
    VDG-----DELETE
    I click on the delete Button of the first row,the record gets deleted from the table,
    Now there are 2 records..
    BCD-----DELETE
    VDG--- -DELETE
    I click on the delete Button of the first row,and I get the error
    java.lang.ArrayIndexOutOfBoundsException: Array index out of range: -1
    The table.getSelectedRow() becomes -1 automatically...
    Now if I comment out the Table deletion statements, and I click on any delete Button
    i get the correct messages
    You clicked row : 1
    you clicked row : 2
    After deletion of the first record,i am unable to delete the 2nd record,i get the
    error above.
    any suggestions
    ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("Table Row clicked is : " + table.getSelectedRow());
    // Delete row from window.
    ((DefaultTableModel)table.getModel()).removeRow(table.getSelectedRow());
    table.revalidate();
    };

    after deleting the row call this method
    fireTableRowsDeleted()
    -Ashish

  • Alternate row colours in dynamic tables?

    Hi all,
    I know that alternate row colors are easily accomplished on static tables using class styles. Does any one know if this can be implemented on pages that dynamically display multiple records?

    Yes, it's very easy to do. The actual coding depends on your server-side language. The basic principle is to use the modulo operator (%) with a counter that's incremented with each iteration of the loop.
    Modulo division produces the remainder of a division sum. So, if you use modulo division on the counter, and divide the counter by 2, the result will alternate between 1 and 0, which can be used to determine which class to apply to the current row.
    In PHP:
    <?php $i = 0;
    <?php do {
    <tr <?php if($i++ % 2) {echo 'class="hilite"';} ?>>
    <!-- rest of code -->
    </tr>
    <?php } while ($row_recordsetName = mysql_fetch_array($recordsetName)); ?>
    Create a style rule for all table rows, and a different one for the hilite class. Stripes.

  • How to make a whole table row be read at once?

    Hi,
    I want to make a whole table row be read at once by screenreaders if the table is not editable?
    I tried to use "getAccessibleSelection" and return a own implementation which returns the number of columns at "getAccessibleSelectionCount".
    But if "getAccessibleSelectionCount" return anything else than 1, the method "getAccessibleSelection" is never called.
    Does anybody have a idea or a suggestion to solve this problem?
    Thanks in advance

    Hi AJL,
    If you mean a table of data values in the Data Portal, i.e. a list of channels, then yes you can do it. In that case you should just register load the channels you want to be read-only. You can do this interactively by right-clicking on the data file in question and select "Register data". You can also double-click on the file to select individual channels to load or register. Programmatically, this looks like
    Call DataFileLoad(DataFilename, DataPluginName, ImportAction)
    Setting ImportAction = "Register" will register load the channels. If dragging and dropping the data file loads it correctly, then you can set DataPluginName = "". Otherwise, you can specify there which DataPlugin to use for the import process.
    You can also programmatically selectively load some of the channels from the data source:
    Call DataFileLoadSel(DataFilename, FileImportFilter, ImportSelection, ImportAction)
    The "ImportSelection" parameter works just like the CNo() function in DIAdem:
    "GroupName/ChannelName"
    "GroupName/[ChannelIndex]"
    "[GroupIndex]/ChannelName"
    "[GroupIndex]/[ChannelIndex]"
    If, on the other hand, you mean a read-only table in the REPORT panel, your options are limited, though you can do that with a SUDialog.
    Regards,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Coloring table row using css in pfr

    Hi all,
    I am using classic table region for loading the records.After loading in PFR using table multiselection selecting one or more than one row then coloring should happen for those selected rows.
    In pfr we cann't change bean properties.
    Give ur idea.
    Thanks,

    Hi,
    Go through these threads...
    Can we colour the rows in the column of a table
    Changing Color of a value in a column
    Thanks,
    Gaurav

  • Webi Alternate Row Colour

    Hi experts,
    I have a webi report which colour lines must have alternate colours. I customized that on the table proporties, in webi, but it's not working... is there some kind of trick to activate alternate row colours?
    Thanks you.
    Cheers!
    Inê

    If you change "Alternate Row/Column colors"property of block then it should applied for that particular block only.
    If you want other colors for other blocks then do the same steps.
    Frequency is by default 2. Which tells us the applied color should show alternatively, and 3,4, etc..., follows like that.
    FYI if you change property of a block and insert new objects then you can't see colors again for the same block.
    Manually you need to do it again to appear.
    Eg:
    if i individually insert say 5 rows to block and drag unique report variables to each row, the alternative colours are not coming up.
    How to acieve this?
    This is the problem, the alternate row fucntion works for a row which have more than one value. In your case you have different variables for each row then you have to do it manually. Remember that if you have more than one value for any variable the second row of that variable will be 255,255,255. By default first row gets the alternate color. You get the same alternate color for all 5 rows because it's first row of all the 5 variables.
    One trick is give alternate color as 239,239,239 for first row and 255,255,255 for second and so on.
    Hope you got me.
    Gracias...!!

  • Table Row Frequent Lock

    Dear All,
    Recently we had changed our remote connection from 128KB Leased Line to high speed IP VPN (1MB) MPLS based lines. After that onwards Oracle table rows are getting locked frequently. We are using Windows 2003 Server Std with 9i 2.0.7 database loaded. Server Total Memory is 4GB with 3.2 MHz dual processor.
    When we increase the sga_max_size (1400MB or above), ORA-12500:TNS:Listener failed...... error appears and users can't connect to our database server.
    Memory Configuration is:-
    Shared Pool - 352MB
    Buffer Cache - 584MB
    Large Pool - 128MB
    Java Pool - 16MB
    SGA Max Size - 1281.573 MB
    Aggregate PGA Target - 259MB
    Please help to correctly calculate the Memory configuration if its wrong. Or is there any other solution to sort out the table row locking problem.
    Thanking you all in advance,
    Manesh

    On initial guess, it sounds like you are chasing the wrong aspect of the problem.
    You do not describe what the application is doing, but logically it appears that you are getting more transactions happening because of the higher access speed. In other words, the client is no longer being throttled back.
    You also do not decribe the actual kind of lock. It intrigues me that specific rows would need to be locked - that implies that the application is attempting to capture the rows ahead of time. This sort-of feels like the application may have been ported from another system, or designed based on a totally different locking machanism that what Oracle usess, forcing Oracle to try to work in a way it is not supposed to work.
    Simply throwing more resources at the problem will [probably] not solve the problem - it may alleviate it for a while. Better would be to understand what is actually happening and correct the root cause.
    I encourage you to read Tom Kyte's "Expert Oracle Database Architecture: 9i and 10g Programming Techniques and Solutions" to get some tools to help undertsnad and isolate the actual problem. (http://apress.com/book/bookDisplay.html?bID=10008)
    As for the ORA-12500, I believe Metalink has a few notes about that.

  • Setting the color (or other properties) of a single table row

    Say I have a data model backing a table view, with a field like e.g. "isDisabled". And for every item where this field is true, I want to set the text color of the table row where the item is displayed to grey, or something otherwise suitable.
    It doens't seem that it is possible to use the row factory for this. Do I have to set a cell factory for each cell and set the text color of the cell individually?

    I spent a few minutes today extending DataFX (http://www.javafxdata.org) to support styling entire TableView rows via CSS. It's now going to take me considerably longer to describe the API I just provided in DataFX :-)
    So, to start with, this is just a proof of concept. I look forward to you using it and giving me feedback. What you are going to need to do is create a custom TableView row factory, like so:
    tableView.setRowFactory(new Callback<TableView<Person>, TableRow<Person>>() {
        @Override public TableRow<Person> call(TableView<Person> p) {
            final CSSTableRow rowCell = new CSSTableRow() {
                @Override public void getCssState(List s) {
                    super.getCssState(s);
                    s.add(getIndex() % 2 == 0 ? "even" : "odd");
            rowCell.getStyleClass().add("alternate-style-test");
            return rowCell;
    });Basically what I'm doing here is creating a new TableRow on-demand, of type CSSTableRow, which is a class provided in DataFX. I override the getCssState method and add strings to the list that represent the state of that row. In this example, I'm basically using the index value of the row to alternate between "even" and "odd" states. In your case, you'll probably do something like
    tableView.setRowFactory(new Callback<TableView<Person>, TableRow<Person>>() {
        @Override public TableRow<Person> call(TableView<Person> p) {
            final CSSTableRow rowCell = new CSSTableRow() {
                @Override public void getCssState(List s) {
                    super.getCssState(s);
                    if (getItem() != null && getItem().isActive()) s.add("active");
            rowCell.getStyleClass().add("active-table-row");
            return rowCell;
    });The other thing to note is that every row is given a style class. This is how you target them from CSS. So, moving on to CSS, here is the test CSS I wrote for my alternating row colour test:
    .alternate-style-test:even {
        -fx-text-fill: green;
    .alternate-style-test:odd {
        -fx-text-fill: red;
    }Without doubt you can quite easily connect the dots (and easily appreciate that I am not a designer) :-) All you need to do now is bring in your custom CSS, and hopefully you should get the result you expect.
    If you have any problems, my contact details are on the DataFX website here: http://www.javafxdata.org
    I'll be uploading this new API shortly, in what will be version 0.0.4.
    -- Jonathan

  • No rows are loaded after the execution

    Which product and version are you using?
    ans client 9.2.0.2.8 and db 9.2.0.4
    - On which platform and version is it installed?
    windows 2000
    - Is this part of Oracle Applications (i.e. Financials, Inventory, etc.)?
    its part of 9ids. I installed data warehouse in saperate home
    - Has this ever worked correctly? If yes, what has changed?
    No. This is my first project and we are evaluating oracle over other warehouse
    product.
    All is working except the rows are not loaded. Mapping is validated correctly. Deployed successfully, executed successfully from the deployment manager but 0
    rows are loaded. You get a small pop up window after execute of a mapping. Log message
    at the end of the execute shows insert 0, update 0, delete 0 and merged 0.
    The mapping consists of two table operators. One from source table from differenct schema and one for target. There is nothing so complicated here. All I want is
    to copy the data from source to target table through warehouse. My question really what do I need to insert the record? Once the mapping is defined, deployed and executed should not the rows be loaded?
    Everything else is working. Like creation of target tables and so on.
    The source operator properties are bound_name-eqpthist_qtr, primary source-no loading type-Insert.
    The target has bouondname-test, primary source-no, loading type delete/insert.

    after the execution there errors whatsoever. It executes with out any error.
    Its working when I replace the source table with one from the target schema itself. I mean a copied table to target using slqplus. I uses any tables under its schema itself then all the rows are inserted. Its not working when copying/referencing from another source schema. THe target user is given select any table, all object privileges of the source table, even dba role. Still no rows are loaded.
    the target has DBA,CONNECT,RESOURCE,AQ_USER_ROLE, WB_A_VLSIOWRUN, WB_D_VLSIOWRUN, WB_R_VLSIOWRUN, WB_U_VLSIOWRUN, SELECT_CATALOG_ROLE.
    The target has system privs as
    CREATE VIEW
    CREATE TABLE
    ALTER SESSION
    CREATE SESSION
    CREATE SYNONYM
    CREATE TRIGGER
    CREATE ANY TYPE
    CREATE SEQUENCE
    CREATE SNAPSHOT
    CREATE DIMENSION
    CREATE INDEXTYPE
    CREATE PROCEDURE
    SELECT ANY TABLE
    DROP ANY DIRECTORY
    DROP PUBLIC SYNONYM
    CREATE ANY DIRECTORY
    CREATE DATABASE LINK
    GLOBAL QUERY REWRITE
    UNLIMITED TABLESPACE
    CREATE PUBLIC SYNONYM
    SELECT ANY DICTIONARY
    CREATE PUBLIC DATABASE LINK
    and the following privs on the source table as well
    SELECT
    ALTER
    DELETE
    INDEX
    INSERT
    UPDATE
    REFERENCES
    ON COMMIT REFRESH
    QUERY REWRITE
    DEBUG
    FLASHBACK

  • How to pass hidden field values on a click of a table row

    hi all,
    href = "bookAndNonBook.do"
    I am very new to struts. I have created a table using displaytable tag which displays results in a tabular format. In addtion, i have a hidden field (prodType), the table rows are getting highlighted when i get my mouse on a particular row.
    Following is the code from the results.jsp file
    <body
    onload="addRowHandlers('row', 'rowMouseOver')"
    bgcolor="#FFFFFF" text="#000000" leftmargin="100" topmargin="50"
    marginwidth="" marginheight="" rightmargin="30">
    <html:form action="/bookAndNonBook" method="post">
    <display:table name="sessionScope.productSearchList" id="row"
    sort="list" export="true" defaultsort="1" defaultorder="ascending"
    pagesize="15" decorator="org.displaytag.decorator.TotalTableDecorator"
    class="dataTable">
    <display:column property="prodType" title="ProdType" class="prodType"
    headerClass="prodType" media="html" />
    <display:column title="Title" property="titleName" sortable="true"
    class="title" headerClass="title" />
    </display:table>
    </html:form>
    </BODY>
    I am calling a funtion addRowHandlers which passes the table id (which is row) and the rowMouseover for highlighting the rows on mouse over.
    the code for function addRowHandlers is
    function addRowHandlers(tableId, rowClassName) {
    var previousClass = null;
    var table = document.getElementById(tableId);
    var rows = table.getElementsByTagName("tr");
    for (i = 1; i < rows.length; i++) {
    rows.onmouseover = function () {
    previousClass = this.className;
    this.className = this.className + " " + rowClassName ;
    this.style.cursor="hand";
    rows.onmouseout = function () {
    this.className = previousClass;
    this.style.cursor='';
    rows.onclick = function (){
    var cell = this.getElementsByTagName("td")[0];
    var ProdType = cell.innerHTML;
    alert("value of prodType = " + ProdType);
    when i run the above code and click on a particular row it returns me the value in the hidden field i.e. prodType for that particular row
    Now where i am having problem is i want that on the basis of prodType my jsp file should call different actions for different prodType as returned....somwhat a function like this
    function submitProduct(prodType) {
    if(prodType == "BK")
    resultsForm.action = "/bookProduct.do";
    else if(prodType == "NB")
    resultsForm.action = "/nonbookProduct.do";
    but i am unable to figure out that how do i this..
    Any help will be really appreciated
    Thanks
    Sam

    can you please suggest some good struts forums where i can post my question
    thanks in advance
    Sam

  • Table.rows.find() returns null in a table where the row exists.

    Hi...
    I am working in a Project in Visual Studio 2013 where I have to read an Excel report related with a list of business opportunities. Some of the Fields that are involved in it are:  Opportunity ID, BU, Account, close date, Account Manager,
    Total Value and so on. As soon as I get the conection with the Excel Report, I fill a DataTable and declare the columns [Opportunity ID] and [BU] as my Primary Keys.  In that way, an Opportunity value may have one o more rows
    with different BU code each of them.  In consequence, you can define one row in the table if you specify the [Opportunity ID] and the [BU] values.
    My problem starts when I try to get information of those rows that have an specific value of [Opportunity ID]. For that situation I make a "foreach" structure where I check the BU codes that are involved with that Opportunity. So
    I use the Find() Method to get the information of the row specified by the Opportunity ID and BU.  The first time it goes to find the information it gets the results successfully but in the next cycle changing just the [BU] using the same [Opportunity
    ID] value, the find() method returns a "null" and I do not know why because I am sure that the row exists in the table.  I have verified the "Unique" property for the  [Opportunity ID] and [BU] columns (which are
    my primary keys)  and they are in false which is OK.
    I share the code that I am using...
    Hope someone can help.
    Thanks.
    Alfmar.
    void ObtenTotalesxBUs(string Opportunity, string[] BUs, Object[] TotalBUs, Object[] ExpTotalBUs)
    ArrayList TotalesBUs = new ArrayList(); //Required information from the row.
    ArrayList ExpTotalesBUs = new ArrayList(); //Required information from the row.
    foreach(string businessUnit in BUs)
    Object[] LlaveBusqueda = { Opportunity, businessUnit }; //Provide values to the Primary Keys.
    DataRow RenglonInfo = null;
    RenglonInfo = TablaFunnel.Tabla.Rows.Find(LlaveBusqueda); //Find method receives the Primary Keys values. Here is where I have a "null" in return the second time changing just the [BU] field.
    TotalesBUs.Add(RenglonInfo["Total"]); //Get the required information from the row.
    ExpTotalesBUs.Add(RenglonInfo["Expected Total Value"]); //Get the required information from the row.
    TotalBUs = TotalesBUs.ToArray();
    ExpTotalBUs = ExpTotalesBUs.ToArray();}

    Hi Viorel..
    Thanks a lot for you help.
    I am absolutely sure that the second ítem of BU is valid and exist in the table because I tried to make a "Select" statement in the table providing the values of [Opportunity ID] and [BU] and I get the expected record. So, why is not
    working using Find() with the defined Primary Keys??? 
    I tried this in order to test that the record exists...
    if(RenglonInfo == null)
    string strSelect = "[Opportunity ID] = '0000218256' AND [BU] = 'SFW'";
    RenglonInfo2 = TablaFunnel.Tabla.Select(strSelect);

  • Check for empty table row before adding date

    On the form below, when I click the green + button (far right), a new table row is created with today's date. the user can then enter more text to the right of the date. Problem is when the form is saved and reopened, the text the user enters is deleted and new today's date added because it is in the intialize event. How do I script to check and make sure each dated row is empty before adding today's date?
    https://acrobat.com/#d=qTINfyoXA-U6cDxOGgcSEw
    Thanks,
    ~Don

    Hi Don,
    One option would be to use the caption area of the textfield for the date and leave the value portion free for the user to input their data:
    if (xfa.resolveNode("this.caption.value.#text").value === "") {
              this.caption.value.text = util.printd("[mm/dd/yy] ", new Date() );
    See here: https://acrobat.com/#d=VjJ-YsXLKmV6QU84JrAAIw.
    Hope that helps,
    Niall

Maybe you are looking for

  • The method add() in java.awt.Container made me in confuse

    Here is my two java code file: //MyContainer.java package sam.gui; import java.awt.Dimension; import java.awt.Graphics; import javax.swing.JApplet; import javax.swing.JFrame; public class MyContainer extends JApplet {      private MyButton[] myButton

  • Automatic replication of Configuration from R/3 (ECC) to CRM 2007

    Hi all, We would like to set up an automatic replication of configuration maintained in R/3, e.g. Customer group 1, Payment terms, Incoterms, etc.. in order to secure consistency between R/3 and CRM as well as reduce work load. As I understand, Custo

  • Sales office and sales group

    Hi Experts, I have a question here. When ever we try to edit the business partner data in Customer/Prospect role in CRM. We are getting error message " please fill the sales office and sales group data in sales area xxx. We  go to corresponding sales

  • How do I find how much money I have left on my iPad

    How do I find out how much money I have left on my iPad

  • What is the Hard Reset Buttons Combo for Macbook pro

    I have done it before but have forgotten.  I think it is Shift+option+commaand and hold down the power button for 5 seconds, all while the computer is off and plugged in, but I can't remember. Any help is much appreciated