Two tables on the same page. Is it possible?

Hi all,
I followed the multi-slect sample in Winston's blog and everything is working. However, when I tried to put two tables on the same page, the selections are all messed up. When I looked at the code again I realized the line
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
in the setSelected(Object object) method.
In the case that there are more than one tables on one page, how does the code which table it is refering to? Or how the code should be different so we can have multi tables with selectable rows on the same page? Thnx.

Thanks. But how do you tie the TableSelectPhaseListeners to their respected tables.
This is Winston's code for row select (1 table)
private TableSelectPhaseListener tablePhaseListener = new TableSelectPhaseListener();
public void setSelected(Object object) {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
if (rowKey != null) {
tablePhaseListener.setSelected(rowKey, object);
public Object getSelected(){
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener.getSelected(rowKey);
public Object getSelectedValue() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return (rowKey != null) ? rowKey.getRowId() : null;
public boolean getSelectedState() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener.isSelected(rowKey);
For two tables. Do I just repeat the code like this?
private TableSelectPhaseListener tablePhaseListener1 = new TableSelectPhaseListener();
public void setSelected1(Object object) {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
if (rowKey != null) {
tablePhaseListener1.setSelected(rowKey, object);
public Object getSelected1(){
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener1.getSelected(rowKey);
public Object getSelectedValue1() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return (rowKey != null) ? rowKey.getRowId() : null;
public boolean getSelectedState1() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener1.isSelected(rowKey);
private TableSelectPhaseListener tablePhaseListener2 = new TableSelectPhaseListener();
public void setSelected2(Object object) {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
if (rowKey != null) {
tablePhaseListener2.setSelected(rowKey, object);
public Object getSelected()2{
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener2.getSelected(rowKey);
public Object getSelectedValue2() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return (rowKey != null) ? rowKey.getRowId() : null;
public boolean getSelectedState2() {
RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
return tablePhaseListener2.isSelected(rowKey);
Edited by: Thomas5 on Jan 18, 2008 5:28 AM

Similar Messages

  • Two tables in the same uix page

    Hi! I work with Jdeveloper and UIX with the framework Jheadstart. I need to save data of two tables at same time; i mean , two tables in the same page which save with the same submitbutton. i have made some tries editing the service file, some templates and of course the page, but sometimes it works and sometimes not, i dont know what's happening and i really need to resolve this problem urgently. i hope someone can help me and i'd thank you a lot.
    Thanks for your atention.

    I'm sorry, but I'm going to need more details before I can help. If you can provide stripped down versions of your UIX page and Java code, perhaps I can be of service. Also, I would like to know which JDeveloper and UIX versions you are using.
    Ryan Pollock
    UIX Team

  • How to use the TableSorter for two tables at the same view?

    Hello,
    I am using the TableSorter object in order to sort Dynpro tables.
    Suppose I have two tables at the same view, is it possible to use it seperatly for both of them?
    I assume that at the wdModifyView method I will need to catch the table that the user clicked on, yet I don't have an idea of how to do it...

    Hi Roy,
    Constructor of TableSorter
    public TableSorter(IWDTable table, IWDAction sortAction, Comparator[] comparators)
    So, you have to create instance of TableSorter class for each table on the view.
    best regards, Maksim Rashchynski.

  • Two forms that update differrent tables on the same page?

    I tried to add two forms that update different tables on to one page.
    Problem is when I do that the forms gives me an error saying the field does not exist. It's like it is trying to update one table with the other tables fields.
    As an example Say I have one forms that is for people table and another one that is the Jobs table.
    When I go to update the people table, it sends the data for the jobs fields too I get an error like the field job description does not exist.
    I have two different forms for these and everything.
    I would hope it is possible to have two forms that update different tables on the same page.

    I was trying the exact same thing, but i managed to work round it by setting the steps to hide one region, so the user would enter the form see one region submit the region then direct back to the same page with the different region visible and the original hidden.
    I don't know if this would be acceptable for you...

  • 2 single selection tables on the same page

    I used the following great article:
    http://blogs.sun.com/roller/page/winston?entry=single_selectable_row_table_component
    to create a singlerow select table. But I want 2 of these tables on the same page of my tabset component.
    On my page i have:
    private TableSelectPhaseListener tablePhaseListener = new TableSelectPhaseListener();
    public void setSelected(Object object) {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    if (rowKey != null) {
    tablePhaseListener.setSelected(rowKey, object);
    public Object getSelected(){
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.getSelected(rowKey);
    public Object getSelectedValue() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return (rowKey != null) ? rowKey.getRowId() : null;
    public boolean getSelectedState() {
    RowKey rowKey = (RowKey)getValue("#{currentRow.tableRow}");
    return tablePhaseListener.isSelected(rowKey);
    but when I added the second table, I had to add the duplicate the above 4 methods, changing currentRow to currentRow2 and tablePhaseListener to tablePhaseListener2, and changing the method names. I also had to make these updates in 2 other places---on the JSP code, as well as in the JavaScript!! For just 2 tables this isn't too bad, but with more tables having to synchronize everything could get real ugly real fast. Am I doing something wrong?
    Also,
    It seems to work, however my IE browser is still reporting some minor Javascript errors that I don't get when I had only 1 single-row select table
    Thanks,
    -DM

    I also went the route of duplicating all methods for the single-selectable row in a table.
    I have at most on my pages two tables with selectable rows and I have not run into any javascript issues.
    I have had a problem when I rename my tables from "table1" etc. The row selection does not work as well when I give my table objects meaningful names. I have not had the time to dig in and discover why.

  • Updating two tables at the same time

    Please,
    Does someone have an idea on how to update two tables at the same times?
    Thanks a lot in advance

    I was thinking about a single session and single update command.
    That's why I thougth someone else could have a clue.
    Thank you

  • HOW TO PUT TWO PANNEL IN THE SAME PAGE

    HI ALL
    I NEED TO KNOW HOW TO PUT TWO PANNEL IN THE SAME PAGE TO FULLY UTILIZE FULL PAGE AREA BECAUSE THE PANNEL WIDTH IS TOO SMALL , SO I WANT TO MAKE THE PAPER CONTAIN TO PANNELS VERTICALLY.
    THANK YOU

    So Barb,
    I like to use multiple desktops and move back and forth between then using gestures. At the moment I have 5 open: Chrome, Firefox, Safari, Photoshop CS 6 and a desktop. I use "gestures" to navigate between them:
    Mac Basics: Multi-Touch gestures - Apple Support
    and I use Mission Control (F3) to move the various desktops around in the order I want them.
    Mac Basics: Mission Control - Apple Support
    So say I'm searching for a photo to open in CS 6, I find it on the open desktop then hit select "open" in CS 6 and go to that folder in the select pane.
    Even right now I'm typing this in Safari and "gesturing" back to Chrome where I did the search about multi touch and mission control. I drag copy the URL there  and gestured back here to paste the URL into this text.
    If you did a lot of photo searches, I set professional clients of mine in Chicago up with dual monitors (In this case you'd have an external monitor on extended desktop.). So all you need to do is just glance over at the second monitor slide your cursor over there open stuff up find your photo and go back to Photoshop and open it up.
    Hope this helps.

  • How do I join two tables in the same database and load the result into a destination table in a SSIS package

    Hi,
    I have a query that joins two tables in the same database, the result needs to be loaded in a destination DB table.  How do I do this in SSIS package?
    thank you !
    Thank You Warmest Fanny Pied

    Please take a look at these links related to your query.
    http://stackoverflow.com/questions/5145637/querying-data-by-joining-two-tables-in-two-database-on-different-servers
    http://stackoverflow.com/questions/7037228/joining-two-tables-together-in-one-database

  • How do I put two galleries on the same page?

    What's the "trick" to putting two galleries on the same page?
    I've been experimenting, but it's not working out well. I have one working, but when I put the seond one on, all sorts of unexpected things happen. The first gallery goes up "over" the banner (it covers it??) and even though the sizes are spec'd the same, the second one shows up a lot larger as well.
    It's very weird.
    Any insight would be appreciated!
    Thanks!
    Michelle

    Juan,
    When Application Express finds a validation error, the page rendering step is executed again in the same database process used for the validations. So the procedure wwv_flow.accept, which is doing your validations, calls wwv_flow.show (a PL/SQL call) and passes information about the validation errors to the show procedure so that error text can be merged into the page rendering process.
    If you want to simulate this you might need to save validation info in collections and build the "show" part of the page so that it knows how to run in "validation-display" mode, i.e., to be able to use the collections.
    Scott

  • Two iviews in the same page

    hi
    i have created two iviews in the same page based on the two jspdynpage components.
    i am displaying a tableview on the ist view..on on cell click i hav to pass an the value in the cell(of ist view) to the second view...
    how do i call the second view with passing this argument...
    please tell the code to proceed .
    looking forward for ur response.
    thanks
    bidyut dutta

    Try this code and let me know the results.
    EPCF1.java(producer of event)
    ===============================
    package com.epcf;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent ;
    public class EPCF1 extends PageProcessorComponent {
    public DynPage getPage(){
    return new EPCF1DynPage();
    public static class EPCF1DynPage extends JSPDynPage{
    public void doInitialization(){
    public void doProcessAfterInput() throws PageException {
    public void doProcessBeforeOutput() throws PageException {
    this.setJspName("EPCFProducer.jsp");
    EPCF2.java(consumer of the event)
    ===================================
    package com.epcf;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent ;
    public class EPCF2 extends PageProcessorComponent {
    public DynPage getPage(){
    return new EPCF2DynPage();
    public static class EPCF2DynPage extends JSPDynPage{
    public void doInitialization(){
    public void doProcessAfterInput() throws PageException {
    public void doProcessBeforeOutput() throws PageException {
    this.setJspName("EPCFConsumer.jsp");
    EPCFProducer.jsp
    ================
    <%@ taglib uri = "tagLib" prefix = "hbj" %>
    <hbj:content id="myContext" >
    <hbj:page title="PageTitle">
    <script>
    function buttonClick()
    var name = 'hi';
    alert('hi');
    EPCM.raiseEvent("urn:com.epcf.EPCFProducer", "clickEvent", name);
    alert('hi');
    </script>
    <hbj:form id="myFormId" >
    <hbj:button
    id="myButton"
    text="click"
    width="125px"
    tooltip="click here"
    onClientClick="JavaScript:buttonClick();"
    />
    </hbj:form>
    </hbj:page>
    </hbj:content>
    EPCFConsumer.jsp
    =================
    <%@ taglib uri = "tagLib" prefix = "hbj" %>
    <hbj:content id="myContext" >
    <hbj:page title="PageTitle">
    <script>
    function eventHandler(event)
    myFormId.data.value=event.dataObject;
    EPCM.subscribeEvent("urn:com.epcf.EPCFProducer", "clickEvent", eventHandler);
    </script>
    <form id="myFormId" >
    The string passed is:
    <input type="text" value="" name="data"/>
    </form>
    </hbj:page>
    </hbj:content>
    portalapp.xml
    ================
    <?xml version="1.0" encoding="utf-8"?>
    <application>
    <application-config>
    <property name="SharingReference" value="com.sap.portal.htmlb"/>
    </application-config>
    <components>
    <component name="EPCF1">
    <component-config>
    <property name="ClassName" value="com.epcf.EPCF1"/>
    </component-config>
    <component-profile>
    <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
    </component-profile>
    </component>
    <component name="EPCF2">
    <component-config>
    <property name="ClassName" value="com.epcf.EPCF2"/>
    </component-config>
    <component-profile>
    <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
    </component-profile>
    </component>
    </components>
    <services/>
    </application>

  • How do I duplicate or copy a table onto the same page?

    In Pages, how do I duplicate or copy a table onto the same page?

    option drag duplicates anything or copy and paste
    Peter

  • Can you give me a paper or document related to this phone was changed since it was broken down? I need IMEI numbers of two Iphones on the same page. Because I don't wanna save this Iphone again in my country. I paid one time for my old Iphone.

    My Iphone was changed because of broken down thanks to its warranty. I am from Turkey and I paid one time for my old Iphone to save. Can you give me a paper or document related to this phone was changed since it was broken down? I need IMEI numbers of two Iphones on the same page. Because I don't wanna save this Iphone again in my country. I paid one time for my old Iphone. If you give me a document, I don't need to save my Iphone5 and also I don't need to pay again to save in my country.

    this forum is made up of users like you, not apple employees.  We can not help you with that kind of request.

  • To create an application with a master and two details in the same page

    How I make to create an application contend a form master with two forms details in the same page?
    Tomaz
    Message was edited by:
    user517841

    Hi,
    You do not need to mount a screen. Just add a new region with several text fields inside. You should fetch a row by a process and populate the set when you load the page or click on a button. Insert, update, and delete should be done by processes. You have to have Next and Previous buttons to brows trough all rows of the detail table.
    The most important thing here is what the connections between tables in your database are.
    If they are the "One to many, One to one" you can use the approach described above.
    If they are "One to many, One to many" will be better to use buttons or links to lunch details' tables in separate forms.
    If the second and third tables are connected only to the master table you can use two buttons at the right of every master row. Clicking on the buttons will bring separate form for each detail table.
    If the third table is just a luckup table to the second one you can use "Select List" field into tabular form of the second table in one Master-Detail form.
    Konstantin
    [email protected]

  • Make two tables in the same space of template

    Hi,
    i made a pivot table with a dataset, i need add a new column or another table beside that pivot table, but doesn't work or generate a error.
    how can i make two tables of diferente dataset in the same rows in a template?
    thanks a lot
    Edited by: user3504622 on 06-jul-2012 8:35

    You could create two separate pivot tables and then enclose them in a borderless single row outer table. You need to ensure that the tables display correctly on the same page.
    Thanks,
    Bipuser

  • Data from two tables in the same row in XML transformation

    Hi,
        I am using XML transformation for generating excel file which is to besent as email attachment.
        Here  I want to display the data from two internal tables in the same row in the excel. .I am using   <tt:loop ref=".<table name>"> ...  </tt:loop> for looping through the table. Can I loop two table simultaneously ? In that case how will I specify the fields in each table . Some of the fields in two tables are of same name and type.
    Please help...
    Thanks,
    Jissa

    Hello Brian,
    Thank you for your answer. It is approach I will use, I think. However let me ask: Would it be possible to have a Version in this layout, too? I mean to see, which value comes from Version A and which comes from Version B? Something like this:
    Calendar Month Version Sales Amount
    2011.01  B  200
    2011.02  B  300
    2011.03  A  260
    2011.04  A  230
    2011.05  A  200
    A

Maybe you are looking for

  • Message Mapping Error in Text File to XML file Scenario

    Hi Gurus, This is Sudheer...I am New to SAP-PI...... Below link is File to File Scenario(Text File to XML File)... https://www.sdn.sap.com/irj/scn/wiki?path=/display/xi/basicFileAdapterContentConversion I am facing Message Mapping Error....I am not a

  • Error at new statement on extended program check need help

    Hi all ,                    This is the code : LOOP AT i_stocks INTO wa_stocks WHERE NOT pulkt IS INITIAL AND                          NOT bstkt IS INITIAL AND                          NOT fprctr IS INITIAL AND                          ( write_off_fi

  • DISSATISFIED

    I must confess, I am highly dissatisfied with the whole hyped bb10. To start with, it is not user friendly. So much stress for a mobile and supposed to be "handy" device. It's a non utility phone. Not a phone when you need accuracy with speed or shou

  • The method 'rollback' cant be called when a global transaction is active

    I receive the following error stack while dequeuing a message (aq adapter outbound) and forward the message to a database (database adapter inbound) within Oracle ESB 10.1.3.4. The database connection is dynamic using additional variables in the xlst

  • Define date of count in CC WM

    Hello, We have defeined the categories as A - 4 times/year, B - 3 times/year, C - 3 times/ year and assigned to Material Master in MM, and we pass in WM for this same stock.We want to conserve the actual CC inventory procedure. We would like to conse