How to use EVS with different data in each row, in a Java Web Dynpro table?

Hi all,
I am using EVS in a column of java web dynpro table.
Let's say the name, and context attribute, of this column is column1.
It's filled dynamically using an RFC, that uses as input parameter the value of another column, and related context attribute, from the same table (Let's call it column2).  Obviously, from the same row. So, in other words: the values of the EVS in column1 of row1, are dependent of the value of column2 of row1. And the values of the EVS in column1 of row2, are dependent of the value of column2 of row2. And so on... Hope i could explain myself ok.
The code I'm using works great for filling the EVS dynamically:
IWDAttributeInfo attrInfo = wdContext.nodeDetail().getNodeInfo().getAttribute(nodeElement.COLUMN1);
ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
value.clear();
if(this.initRFC_Input(nodeElement.getColumn2())){
     for (int i = 0; i < wdContext.nodeRFCresult().size(); i++){
          value.put(wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgort()
             , wdContext.nodeRFCresult().getRFCresultElementAt(i).getLgobe());
In this code, nodeElement is the context row of the table that is passed dynamically to the method when the value of colum2 is changed.
HOWEVER, the problem I'm having is that after executing this code, EACH NEW ROW that is added to the table has by default the same values as the first row, in the column1 EVS. And, for example, if I refresh the values of the column1 EVS in row 2, all EVS values in the other rows are also refreshed with the same values as the ones of EVS in row 2.
How can I make sure each row EVS has its own set of independent values, so they don't mess with each other?
Hope you guys can help me. And please, let me know if I didn't explain myself correctly!
Thanks!

I just did as you said (I think), but it's still having the same behaviour as before (same data for all EVS in the table).
Here´s what I did:
I
In node "Detail" (cardinality 0...n, singleton set to true), which is binded to the table, I created a child node named "Column1Values" wth cardinality 1...1 and singleton set to false.
"Column1Values" node has an attribute called "column1", of type String.
I did the binding between attribute "column1" and the column1 inputfield celleditor in the table.
I created an event called Column2Changed and binded it to the column2 celleditor of the table. I added a parameter called nodeElement of type IPrivateCompView.IDetailElement to this event, and mapped it to the column2 editor in the table so that I can dynamically get the nodeElement that is being affected.
I added the following code to the onActionColumn2Changed(wdEvent, nodeElement) method that gets created in the view:
IWDAttributeInfo attrInfo = nodeElement.nodeColumn1Values().getNodeInfo().getAttribute("column1");
ISimpleTypeModifiable siType = attrInfo.getModifiableSimpleType();
IModifiableSimpleValueSet<String> value = siType.getSVServices().getModifiableSimpleValueSet();
if(this.initRFC_Input(nodeElement.getColumn2())){
     for(int i =0; i < wdContext.nodeRFCresults().size(); i++){
          value.put(wdContext.nodeRFCresults().getRFCresultsElementAt(i).getId(),
                              wdContext.nodeRFCresults().getRFCresultsElementAt(i).getDesc());
And with this, I still get the original problem... When the EVS of one row is updated, ALL other EVS of the table get also updated with the same values.
What am I missing? Sorry Govardan, I bet I'm not seeing something really obvious... hopefully you can point me in the right direction.
Thanks!

Similar Messages

  • How to use CASE with UPDATE?

    Hi all. I'm trying to update multiple rows in a MS-Access
    database using a single query, with different values for each row.
    Here's a simplified example of the code:
    <cfquery name="JustInCase" datasource="variables.DB">
    Update Users
    SET First_Name =
    CASE WHEN ID = 1 THEN 'Nini' END,
    SET Last_Name
    CASE WHEN ID = 32 THEN 'Yumpi' END
    </cfquery>
    Trying to run something like this produces the following
    error message:
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression 'CASE WHEN ID = 1 THEN
    'Nini' END'.
    I realize this can easily be done using multiple queries, but
    the actual code will contain many updates, and I would like to at
    least test the possibility of improving performance using a single
    query instead of multiple queries. I would greatly appreciate any
    help with this - I've been trying all kinds of variations, and
    nothing seems to satisfy emperor ColdFusion. Any ideas?

    Case might be a verity tag but it is also a valid sql keyword
    in many dbs. I use it in select clauses frequently and have seen it
    used in where clauses.
    The problem with the original query is that, it the value of
    id is not 1, this part
    SET First_Name =
    CASE WHEN ID = 1 THEN 'Nini' END,
    will cause a syntax error. For those values of 1 and 32, this
    syntax will run, but will update every row in the table which might
    not be the plan.
    update users
    set
    case when id = 1 then first_name = 'Nini'
    when id = 32 then last_name = 'Yumpi'
    else first_name = first_name
    end
    ranger, your code will also fail if the value is neither 1
    nor 32. You need a default case.

  • Drop Down List in a table - different options for each row

    How can i have a drop down list in a table with different options for each row?
    My requirement is this.. I want to display, say employee dtails in a table, and one column is employee hobbies, whcih can have multiple values and each employee may have a different list of hobbies. So how can we populate the drop down for each row, with different options?

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Display data in Web DynPro table from database via EJB

    I have a JavaBeans model which has a method populateDataToTable()to retrieve data from database via Session bean (calling entity bean, returning ArrayList of data) and the data needed to be display in the Web DynPro table.
    User Interface (Web DynPro) <-> JavaBeans Model <-> Busineess Logic (session bean) <-> Persistence (Entity Bean)<-> DB table.
    The context bindiing and table part is ok. How do i load the data to the table ? what the coding to put in wdDoInit() ?
    Any help would be appreciated.

    in wdinit(),
    Collection col = new ArrayList();
    try{                    
      MyCommandBean bean = new MyCommandBean();
      col = bean.getDataFromDbViaEJB();
      wdContext.nodeMyCommandBean().bind(col);
    } catch (Exception ex) {
       ex.printStackTrace(ex); 
    in your JavaBean model class, MyCommandBean getDatafromDbViaEJB() method:
    Collection col = new ArrayList();
    Collection newcol = new ArrayList();
    //include your own context initialization etc...
    col = local.getDataViaSessionBean(param);
    // if your returned result also a bean class, reassigned it to current MyCommandBean
    for (Iterator iterator = col.iterator(); iterator.hasNext();) {
        MyOtherBean otherBean=(MyOtherBean)iterator.next();
        MyCommmandBean bean = new MyCommandBean();
        bean.attribute1 = outBean.getAttirbute1();
        // get other attibutes
        newcol.add(bean);
    return newcol;

  • Using portal theme in web dynpro tables

    We are currently running EP6 (NW04).  Is there a way to make our java web dynpro table ui elements use the portal theme?  All tables appear blue unless they are checked as readonly in which case they are white. 
    I see there is a TableCellDesign ui element, but that is not available until NW04s and we are not there yet.
    Please assist. (and thank you!)
    Jeff Karls

    hi
    You are right about NW04s portal theme editor and we are able to change colour
    the tablecelleditor ui. But as far as i remember i was able to change properties like selected cell colour, non selected cell colour and mulitselected cell colour.
    However if you are not able to change it in EP 6.0 (NW04) then use the webdynpro themes. I suppose you will be able to do everything there.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d2b1d790-0201-0010-25b7-d1fb059a8ad9">How to edit webdynpro themes</a>
    <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/1e/535d420447e054e10000000a155106/frameset.htm">Setting the theme in Visual admin</a>
    Hope it helps.
    regards
    LNV

  • I have two users with different music on each itunes and i can only use one library, how do i use both for one iTouch?

    i have two users with different music on each itunes and i can only use one library, how do i use both for one iTouch?

    Chris, I believe this link may have the information you're looking for. Welcome to discussions!
    http://docs.info.apple.com/article.html?artnum=300432

  • I have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device?

    i have multiple devices backed up to the same computer each with different data. how do i keep them from syncing all data when i back up or transfer stuff from the computer to a device? one is an iphone 6 and the others are ipad mini first gens, each ipad has 64gb and the iphone has 128, need to keep the data seperate as they are not all mine

    Itunes content and pics are NOT part of the backup that itunes performs.
    Backing up, updating, and restoring iPad, iPod touch, and iPhone software
    You should transfer any purchases from iphone regularly:  File>Transfer Purchases  , if they fail to be transferred when you sync.
    You buy one and only one download.  It is your responsibility to move/copy/backup your purchases.
    You can try contacting itunes support and asking for an exception, but they are under no obligation to allow.
    http://www.apple.com/support/itunes

  • How to use Count with Date Parameters

    Hello,
    I am having issues using the Count() function in conjunction with date parameters.
    This is a Siebel report and in my report I have 2 date parameters(From Date, To Date). In a nutshell I am basically trying to count Opportunities that has a start date within the given date period. However I don't see a reasonable way to put my date parameters within the Count() function. The reason being is that I need to have a huge chunk of code to convert the dates into a common format that can be compared, and it won't even fit within the code block in my rtf template. I am not even sure how to put multiple conditional statements inside a Count() function since all the examples I have seen are very simple.
    Anyone have a suggestion on how to use Count() with date parameters?
    Thanks.

    Any chance you can get the date formats in the correct format from siebel?
    I don't know Siebel - so I can't help you with that. If you get the correct format it is just
    <?count(row[(FromDate>=date) and  (date<=ToDate))?>
    Otherwise the approach would probably need to use string function to get year/monthd/day from the date
    and store it into a varialbe and compare later the same way
    <?variable@incontext:from; ....?>
    <?variable@incontext:to; ...?>
    <?count(row[($from>=date) and  (date<=$to))?>
    Potentially you can use the date functions such as xdofx:to_date to do the conversion
    [http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T481158.htm]
    But I am not sure if they are available in your siebel implementation.
    Hope that helps

  • I have multiple itunes libraries in my itunes folder with different dates. how did this happen?

    im trying to figure out why songs randomly disappear from my actual itunes. when i check the itunes folder on the drive, there are several versions with different dates. I didnt intentionally create these multiple libraries and i dont know how to open them to look for missing music

    Settings/Store worked...thanks Lawrence

  • How to go about multiple inclination with different data selection in Delta

    We have to copy large amount of data ( more than 42lak of recodes) selectivly from on ODS to other ODS. in delata load ( BW 3.5 enverioment)
    I thought of loading data in slices through delta loading with selection condition.
    step 1> Do The initialization with selection condition as for calyear =2001 ( Init without data transfer )
    step 2> Take the delta load .. it will take all delta record with same selection
    step 3> Now I want to do Initialization with selection condition as for calyear =2002
    step 4> take the delta now it will take delta for year 2001 and 2002 both Right ?
    Here what problem I am facing.. while doing 2nd time initialization it prompt me to delete the last  initialization request form scheduler menu.
    if i delete the last request .. will it take the delta  for previous initialization selection  and new initialization selection. ?
    Please advice how to go about multiple inclination with different data selection in delta loading.
    Looking forward your reply.

    Hi,
    step 1> Do The initialization with selection condition as for calyear =2001 ( Init without data transfer )
    step 2> Take the delta load .. it will take all delta record with same selection
    step 3> Now I want to do Initialization with selection condition as for calyear =2002
    step 4> take the delta now it will take delta for year 2001 and 2002 both Right ?
    You are correct with this scenario normally. The message you mentioned normally comes up when you open a infopackage and don't change the selection first or in case you have overlapping selections with an already done init.
    regards
    Siggi

  • How to compare two rows from two table with different data

    how to compare two rows from two table with different data
    e.g.
    Table 1
    ID   DESC
    1     aaa
    2     bbb
    3     ccc
    Table 2
    ID   DESC
    1     aaa
    2     xxx
    3     ccc
    Result
    2

    Create
    table tab1(ID
    int ,DE char(10))
    Create
    table tab2(ID
    int ,DE char(10))
    Insert
    into tab1 Values
    (1,'aaa')
    Insert
    into tab1  Values
    (2,'bbb')
    Insert
    into tab1 Values(3,'ccc')
    Insert
    into tab1 Values(4,'dfe')
    Insert
    into tab2 Values
    (1,'aaa')
    Insert
    into tab2  Values
    (2,'xx')
    Insert
    into tab2 Values(3,'ccc')
    Insert
    into tab2 Values(6,'wdr')
    SELECT 
    tab1.ID,tab2.ID
    As T2 from tab1
    FULL
    join tab2 on tab1.ID
    = tab2.ID  
    WHERE
    BINARY_CHECKSUM(tab1.ID,tab1.DE)
    <> BINARY_CHECKSUM(tab2.ID,tab2.DE)
    OR tab1.ID
    IS NULL
    OR 
    tab2.ID IS
    NULL
    ID column considered as a primary Key
    Apart from different record,Above query populate missing record in both tables.
    Result Set
    ID ID 
    2  2
    4 NULL
    NULL 6
    ganeshk

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    Hi,
    REPORT ZPRUEBA782 .
    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    start-of-selection.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    enddo.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    enddo.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    end-of-selection.
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    endloop.
    endform.
    You can try it if you don't find a better solution.
    Cheers,
    Chaitanya.

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use setSoTimeOut() with socket ??

    HI All!
    I eagerly need to know how to use setSoTimeOut() with socket (on server side).
    Actually the scenario is that My Server accepts connection and waits for connected client to send data to it. I WANT TO KEEP, IF CLIENT DOENS'T SENDS ANY DATA TO SERVER WITHIN 5 min. THEN SERVER MUST CLOSE THE CONNECTION, BUT IF SERVER RECEIVES STILL A BYTE FROM THE CLIENT WITHIN 5 mins., THE SERVER MUST RESET CHECKING TIME OUT FOR NEXT 5 MINUTES.
    How can i do that??
    Any help with example will be appreciated!!
    Thanx in advance

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    while(running)
    try
    String readIn = in.readLine();
    // do whatever you want with the data read
    catch(SocketTimeoutException)
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,
    Radish21

  • Need an example how to use SCAN_Start with a callback function

    I would appreciate if someone helps me with a working example of how to use SCAN_Start with a callback function. I need just a basic functionality: to specify a channel list (with gains probably), to start a data acquisition task and to receive data buffers utilizing a callback function. t this time whatever I was trying to do caused computer hangups, though it is supposed to be one of the most regular tasks to perform.
    Thank you in advance,
    Mike

    Hello Mike,
    Thank you for contacting National Instruments.
    Attached is an example project which uses a callback function to begin analog acquisition (AI) by calling SCAN_Start. This project acquires from the first 2 channels on your DAQ device. Make sure to modify the device number in the code to match the number of your card.
    Let me know if you have any further questions...
    Sincerely,
    Sean C.
    Applcications Engineer
    National Instruments
    Attachments:
    Acquire_multichannel_61xx.zip ‏11 KB

Maybe you are looking for