Dynamic table generation in webdynpro java

Hello All,
  could you please  tell  me, how can i create Dynamic table in Webdynpro java.
     can some one help me out on this?
Thanks
Venkat.

Hi,
Please check this [link|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/74cda090-0201-0010-6b91-f85b2489f765?quicklink=index&overridelayout=true].
Also search SDN for this query. You can get lot of help from the search.
Regards,
Manoj

Similar Messages

  • How  to  copy  the  table1selected  records into table 2 in webdynpro java.

    Hi 
           how  to  copy  the  table1selected  records into table 2 in webdynpro java.
    venkat
    Edited by: venkatpvr on Sep 23, 2011 11:53 AM

    Hi Venkat,
    You have 2 Value Nodes one for Table1 and second for Table2.
    Table1 node having one more Value Attribute i.e check Box data type is Boolean. Now you are requirement are select records from Table1 Node and click on One Method that records will moves to Second Table2 Node.
    Create One Method for getting the Records from 1-Table to 2-Table
    CopytoTable2 ()
    In this method you have to write code like this
    If (wdContext.nodeTable1.Checkbox(true))
    If(1. Check the Table1 Value Node Size()>0)
    Get the Table1 records and set to table2 Value node.
    Else
    Please select check box// Error message
    Hope this helps!!
    Regards
    Vijay K

  • Pass a table from my webdynpro JAVA application to an RFC in R/3

    Hi All,
    I need to Pass a table from my webdynpro JAVA application to an RFC in R/3. How can I do that?
    Regards
    Sarath

    Hi,
    Please have a look at this thread,
    Pass Table as Input to Adaptive RFC
    Regards,
    Saravanan K

  • Dynamic table generation for Employee Schedule Project

    Hi,
    I am new to Jave programming and attempting to teach myself Java using the Sun tutorials & these forums. As a first step of learning, I want to do a Automated Employee Schedule Project in Java. (JSP)
    There are two main parts of the project. The first part will be a table with the employees listed down the left, the days of the week across the top, and with each cell being that employee's shift for the day. There are four different types of shift in a day ( M- Morning, R- Regular, A- Afternoon and N- Night).
    The second part will allows the user to enter in a new employee or display/edit an existing employee's information, including a list of scheduling constraints, like can?t work in Morning shift / Night shift. Apart from that number of employee in a shift may vary based on situation.
    Could you please help me to understand the flow for creating this Automated Employee Schedule project?
    Thanks in advance.
    Amitava

    I need the logic as to how to generate the shift plan. Could you tell me how to get about creating this dynamic table and any idea what i should take as baseline? I was thinking to read the employees from the database and take them as input for the first column. and the number of days as the column list. Can you tell me if this is the correct approach?

  • Table Filters using webdynpro Java

    Hi Experts,
    I am trying to implement Table Filter i did every thing mentioned in this
    Generic Web Dynpro Java Table Filter still am not getting the filter values
    all the table columns remains same it is not doing any filtering , please help me in solving this logical issue
    Thanks a lot in advance.
    Regards,
    Ken.

    Hi Ken,
    I believe you might came across these blogs as well: if not pls go through the below blogs:
    How to get ready-made filter for your Web Dynpro Table with minimal coding ?
    Filtering Table Values using WebDynpro
    Hope this helps.
    Cheers-
    Pramod

  • Dynamic table generation, an OOP question, and .

    I am attempting to teach myself Java using the Sun tutorials (mostly DiveLog) and these forums. So far, things are going well.
    My application is a scheduling program for my current boss. I work in retail, and the app would (ideally) faciliate creating the weekly schedules. I am using Swing to generate the windows and such.
    There are two main parts to the app, each corresponding to a tabbed pane. The first part will be a table with the employees listed down the left, the days of the week across the top, and with each cell being that employee's shift for the day. Totals for hours worked that week will be the farmost right column and totals for hours of coverage that day will be the bottom row. The second part of the app allows the user to enter in a new employee or display/edit an existing employee's information, including a list of scheduling constraints (e.g., can't work mornings Tu/Th because of class).
    My intuition is that the schedule table and the list of scheduling constraints should be dynamically generated and displayed depending on the number of employees and the number of constraints. It would also seem that both parts of the application need access to the current set of data encompassing all employees and their information. As I am just starting, the work I have done so far has been in the employee info section where I am in the process of implementing an MVC architecture with the model as a sort of employee datagram.
    The questions....
    1. How do I draw tables with a dynamic number of rows? I want the scheduler table to have a row for each employee and have the number of employees not hardcoded in. With the list of scheduling constraints, could I just have Swing draw each new row from a loop that counts down the number of constraints?
    2. What is the smart move regarding having multiple parts of the app/GUI access employee data? Would I just load the data into an object when the app starts and have the two parts access the info via 'get' functions? (And subsequently have the second part of the app be able to edit the data via 'set' functions and then tell the first part of the app update itself?)
    3. Is it appropriate to use reading and writing to and from a file for this sort of activity? (As opposed to a database of some sort.) The DiveLog app uses object serialization, and I'm feeling sketchy in this area, particularly with accessing specific pieces of data from whatever gets read from a file. If the user selects an employee from a JComboBox, how do I take that selection and grab the right object from the stuff that's been read back from a file? Similarly with the scheduling table.

    Hi,
    I am new to Jave programming. As a first step of learning, I want to do a Automated Employee Schedule Project in Java. (JSP)
    Could you please help me to understand the flow for creating Automated Employee Schedule project?
    Thanks in advance.
    Amitava

  • ADF Dynamic Table Generation

    Hi, I'm trying to generate dynimic tables from my backing bean and i can't get it work, i've looking on the web and many forums, and this is the only example i've found :
    public void setDataTable(UIXTable param) {
    this.dataTable = param;
    if(!columnsBound) {
    // Bind to the table
    List<SearchResultsColumn> cs = this.getColumns();
    for(int c = 0; c < cs.size(); c++) {
    CoreColumn col = new CoreColumn();
    SearchResultsColumn colDef = cs.get(c);
    col.setHeaderText(colDef.getName());
    CoreOutputText coldata = new CoreOutputText();
    FacesContext.getCurrentInstance().getApplication();
    coldata.setValueBinding("value", FacesContext.getCurrentInstance().getApplication().createValueBinding("#{row.cellArray.value}"));
    col.getChildren().add(coldata);
    col.setHeaderText(colDef.getCaption());
    this.dataTable.getChildren().add(col);
    This code is useless for me, because i'm using a version of JDeveloper and ADF that has deprecated methods like createValueBinding(xx) (JDeveloper 11g). I'll be gratefull for any help with this problem.
    Thanks!
    Giorgio

    Some blogs:
    http://jdeveloperandadf.blogspot.com/2011/01/adf-faces-dynamic-tags-for-form-that.html
    and http://blogs.oracle.com/shay/2010/10/adf_faces_dynamic_tags_-fora.html
    Timo

  • Dynamic table generation

    Hi everybody !
    I'm using Adobe LiveCycle Designer ES free trial.
    I have a set of data and two pdf. The first is a pdf i got on the web, which was created with Adobe LiveCycle Designer ES full version.
    The second is the one i created with the trial version.
    I'm trying to display several data like this:
        <history>
            <date>08/05/2009</date>
            <doc>doc</doc>
            <desc>desc</desc>
        </history>
        <history>
             <date>09/05/2009</date>
             <doc>doc</doc>
             <desc>desc</desc>
         </history>
    With the first pdf it works fine. All the data are displayed.
    But only one data is displayed with mine.
    I checked all the options (like binding) and there are all the same on the two pdf.
    So is there a limitation on the trial version with repeating data ??
    Thanks

    No there are no limitations in the trial version, but the one you got from the web is probably saved as a dynamic PDF and yours is probably not saved that way.
    Paul

  • Dynamic Table in PDF - only first row passed to the WD Java

    Hi Experts,
    I'm working with Web Dynpro for Java on WAS 2004s SP13, ADS for SP13 and LiveCycle Designer 7.1
    I am facing a problem related to PDF-dynamic table generation.
    I am creating the PDF form with a dynamic table, an empty row will be added, when ADD button is clicked, the row will be deleted when DELETE button is clicked. After form submit, only first row of the table is passed to the Web Dynpro. I'v tried to use different dataSource Context node structure without results. The structure diescribed in the thread [Dynamic Table -  same data repeating in all rows;  doesnt works for me. The same happend if i try to folow the advise from Wiki https://wiki.sdn.sap.com/wiki/display/WDJava/Creating%20Table%20in%20Interacting%20form%20using%20Web%20Dynpro.
    Beside this,  my DropDown list in the table column is not populated. I know how to populate the DropDown list outside of table. That's working fine. But the DropDown in the table just not respond on the click (is not going open). I'm pretty sure that this is a result of a Context node structure/binding issue. 
    Please suggest me how can i implement dynamic table and populate the data in table dropdown column.
    Edited by: A. Mustacevic on Sep 7, 2009 12:18 AM

    Hi Prabhakar,
    You describe exactly my situation. The node which is bound to the table row has cardinality 1..n. Exactly Context structure is:
    node dataSource (cardinality 1..1/ Singleton true) ======> dataSource of the Interactive Form
    subnode TableList (cardinality 1..1/ Singleton true) ======> bound to the table in the Interactive Form
    subnode TableWrapper (cardinality 1..n/ Singleton true) ======> bound to the table row in the Interactive Form
    subnode TableData (cardinality 0..1/ Singleton false) ======> table data
    attribute 1  ====>     Context nodeattribute bound to the table row field   
    attribute 2
    This structure is recommanded in the post that I found on the Forum (see the firs hyperlink in my firs post).
    Is this structure correct? Why is not working?
    Your link is not working. Can you post the correct one.
    Thanks in advance.
    Regards
    Adnan
    Edited by: A. Mustacevic on Sep 8, 2009 1:56 PM
    Edited by: A. Mustacevic on Sep 8, 2009 1:57 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:00 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:01 PM
    Edited by: A. Mustacevic on Sep 8, 2009 2:02 PM

  • Copy and Paste functionality required in Webdynpro Java

    Hi All !!
    I want to create a functionality in which i can copy the contents from table (Created in Webdynpro Java) and paste them below in same table.
    Scenario:
    I've a table UI (Created in Webdynpro Java) in my screen. Table UI is displaying data from database.
    Modifications, Insertion and deletion of data are allowed in the table control which will in turn reflect to Database.
    Now i want users to copy and paste the rows in the Table UI and past it in same table 
    Is it possible or not ?
    Can any one help me in this regard?
    Regards,
    Abhijeet

    Hi Abhijeet,
    try this.
    Assuming Value node Customer with attribute cname, cno and sal is bound to the table.
    //creating Dynamic node inside wdDoInit method for copy the table row details.
    IWDNodeInfo nodeInfo = wdContext.getNodeInfo().addChild("DynamicCustNode", null,true, false, false, false, false,
         true, null, null, null);
    nodeInfo.addAttribute("custName", "com.sap.dictionary.string");
    nodeInfo.addAttribute("custNo", "com.sap.dictionary.string");
    nodeInfo.addAttribute("custSal", "com.sap.dictionary.double");
    IWDNode node = wdContext.wdGetAPI().getRootNode().getChildNode("DynamicCustNode", IWDNode.LEAD_SELECTION);
    node.addElement(node.createElement());
    Inside View take a Button Say Copy,inside the action of the button store the selected table row data in the created dynamic node and copy
    the dynamic node details in to your Value node that is bound to the table.
    int leadSelected = wdContext.nodeCustomer().getLeadSelection();
    int n = wdContext.nodeCustomer().size();
    IWDNode node = wdContext.wdGetAPI().getRootNode().getChildNode("DynamicCustNode", IWDNode.LEAD_SELECTION);
    node.getCurrentElement().setAttributeValue("custName", wdContext.nodeCustomer().getCustomerElementAt(leadSelected).getCname());
    node.getCurrentElement().setAttributeValue("custNo", wdContext.nodeCustomer().getCustomerElementAt(leadSelected).getCno());
    node.getCurrentElement().setAttributeValue("custSal",new Double(wdContext.nodeCustomer().getCustomerElementAt(leadSelected).getCsal()));
      int  j = node.getCurrentElement().index();
      IPublicCustomerComp.ICustomerElement custElm = wdContext.createCustomerElement();
      custElm.setCname(node.getElementAt(j).getAttributeValue("custName").toString());
      custElm.setCno(node.getElementAt(j).getAttributeValue("custNo").toString());
      custElm.setCsal(Double.parseDouble(node.getElementAt(j).getAttributeValue("custSal").toString()));
      wdContext.nodeCustomer().addElement(custElm);
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6fdae690-0201-0010-a580-d104b459cb44
    Regards,
    Mithu

  • Dynamic Tables: TableCellEditor depending on Context node value

    Dear community,
    I'm creating a dynamic table containing all the neccessary fields to display my context node in Java code but I have one requirement that I can not resolve by myself:
    Depending on the value of a cell the TableCellEditor should be of type IWDTextView or LinkToURL. So if the context node value is e.g. the String "abc" I want to display a LinkToUrl containing a Target - such as http://www.abc.com - depending on the value, if the context node value is "def" I want to do nothing but display the value in a TextView.
    As I am creating the dynamic table in advance and binding my Context node to it later, I don't know how to change the TableCellEditor at that point of time.
    Right now I have the choice to either display all cells of the column as LinkToUrl TableCellEditor or display all cells as TextView - the dynamic table generation itself is no problem for me.
    Does anyone have an idea on how to do that? Maybe it is not possible in WDJ right now?
    regards,
    Christian

    Hi Christian
    Try this:
    IWDTable theTable=(IWDTable)view.createElement(IWDTable.class,"table");
    IWD TableColumn aColumn=(IWDTableColumn)view.createElement(IWDTableColumn.class,"col");
    if(str.equal("abc"))
    IWDTextView aField=(IWDTextView)view.createElement(IWDTextView.class,"TextView");
    aField.bindText(str);
    aColumn.setTableCellEditor(aField);
    else if(str.equal("def"))
    IWDLinkToURL aField=(IWDLinkToURL)view.createElement(IWDLinkToURL.class,"LinkToURL");
    aField.bindtarget("http://www."str".com");
    aColumn.setTableCellEditor(aField);
    theTable.addColumn(aColumn);
    Best regards,
    Sangeeta

  • Image not displaying on a dynamic Table !

    Dear Friends,
    In my assignment, I would like to display the Status column of a table with different image as per the data received from backend system.
    Infact it is a dynamic table generation.  The code snippet is as below:
    IWDNodeInfo tabNode=wdContext.getNodeInfo().getChild("Reports_TAB");
    String colName="Status";
    String imagePath=tabNode.getAttribute(colName).toString();
    IWDImage colImage=(IWDImage)view.createElement(IWDImage.class, colName+"Image");
    colImage.setSource(imagePath);
    But problem, is imagePath is hold the value as DataAttributeInfo(DashBoardView.It_FinalTAB.Status), instead of actual image name.
    (Ya, Image is stored in src/mimes/Components/<component>/ folder, which is working absolutely fine with test example.)
    Because of this, image is not displaying on the table elements.
    Can anybody help me, how can retrive exact image name from the tabNode?
    Thanks in advance,
    Lakshmikantha

    Hi Lakshmikantha,
         Instead of Doing colImage.setSource() you have to do collmage.bindSource()
    IWDNodeInfo tabNode=wdContext.getNodeInfo().getChild("Reports_TAB");
    String colName="Status";
    IWDAttributeInfo imagePath=tabNode.getAttribute(colName);
    IWDImage colImage=(IWDImage)view.createElement(IWDImage.class, colName+"Image");
    colImage.bindSource(imagePath);
    What we have done here is when the table column is created we are mentioning that at runtime for each record the image source has to be taken from the attribute value of "Status". This will only work if at runtime the value coming in the Attribute Status has the image path (relative path).
    If for instance you dont have the image path coming from the backend but only the status code and you have to decide which image to show at runtime. This is mostly the case. Then under the node "Reports_TAB" you will have to create a calculated attribute of type String. The calculated attribute will generate a getter method which will accept the current record and return the string. You will have to write code to extract status from the current record and return the appropriate path.
    The binding of the Image table column should now point to the newly created calcuated field instead of the field Status.
    Hope this helps.
    Regards,
    Sanyev

  • PDF - Dynamic Table

    Hi,
    I am facing one problem related to PDF-dynamic table generation. Suppose I have designed the master page and i have the company logo as header in all the pages and my body page has one table designed. I have choosen Flow Layout for the table but when the tables has many rows, it is extending to the next page but problem is that these rows are overlapping with the header of the next page(Company Logo). Is there any way we can keep the Master page header fix and the extra table rows from the first table will be displayed that only.
    Your sugestion is highly welcome.
    Regards
    Satya

    Hello,
    You can create multiple master pages with different layouts for 1st and following pages.
    Regards,
    Francois

  • Dynamic table in Webdynpro Java

    Hi Colleagues,
    I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table
    could anyone please help me here?
    Thanks & Regards
    Swetha

    Hi Armin,
    In a window i have to develop a part of window which looks like this
    Image             URL                      Description
    Image             URL                      Description
    Image             URL                      Description
    Image             URL                      Description
    I have tried doing this using Flow layout for each line
    But when i follwed that the last column "description" is not alligned in a straight line(for all rows)
    structure is not even as shown above
    (varying depending upon the length of the URL)
    Here i have attached the piece of code i  used
    IWDTransparentContainer MainContainer1 = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
           IWDFlowLayout flowlayout1 =  (IWDFlowLayout)MainContainer1.createLayout(IWDFlowLayout.class);
    ////For adding Image 
           IWDImage image = (IWDImage)view.createElement(IWDImage.class);
           image.createLayoutData(IWDFlowData.class);      
           image.setSource("~sapicons/s_b_alet.gif");
    /////for Adding URL
           IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);     
           IWDTextAccessor link1text = wdComponentAPI.getTextAccessor();
           link1.setText("Collaboration Window");
           IWDAction Action1  = (IWDAction)view.getAction("Openlink");
           link1.setOnAction(Action1);
           IWDFlowData linkdata1 = link1.createLayoutData(IWDFlowData.class);
           WDLayoutCellDesign rightpad = WDLayoutCellDesign.R_PAD;
           WDLayoutCellSeparator seperator = WDLayoutCellSeparator.LARGE;
           linkdata1.setCellDesign(rightpad);
           linkdata1.setVGutter(seperator);
    ///for adding description      
           IWDTextView text1 = (IWDTextView)view.createElement(IWDTextView.class);
           text1.setText("Testing");
           IWDFlowData textdata1 = text1.createLayoutData(IWDFlowData.class);
           textdata1.setCellDesign(rightpad);
           textdata1.setVGutter(seperator);
           MainContainer1.addChild(image);
           MainContainer1.addChild(link1);
           MainContainer1.addChild(text1);
           IWDGridData maincont1 = MainContainer1.createLayoutData(IWDGridData.class);
           maincont1.setPaddingLeft("10px");
           maincont1.setPaddingTop("20px");
    I found that this static way of adding rows is not the right way( Keeping in mind the future enhancements)
    So thought of trying it through table
    i have used IWDtable ...but the look does'nt meets the requirement at all(it has header....border..scrollbar..rows and colums are seperated by lines---> which are not needed)
    Could you please let me know is there a approach to do this?
    Thanks & Regards
    Swetha
    Edited by: Swetha Nellore on Feb 18, 2009 12:32 PM
    Edited by: Swetha Nellore on Feb 18, 2009 12:33 PM
    Edited by: Swetha Nellore on Feb 18, 2009 12:34 PM

  • Could anyone provide sample of WebDynpro Java TableFilter for Dynamic Table

    Hi
    I have a dynamic table I have given a context node as a data source and it executes a Web Service and populates itself based on the resultset of query this node contains no of columns and rows
    The table changes dynamically everytime the user selects different table type
    When I created a TableFilter I used IWDTableColumn from the current view and looped though the context elements and binded the values of attributes of each context element to this column inside a loop. TableSort works, But I  am not able to get the Filter working for the Dynamic Table , when I click on Filter Button the Filter does not filterand  just sorts.
    Not sure what is wrong but if someone can give some inputs,leads I will highly appreciate if some one has  a  sample of WebDynpro Java TableFilter for Dynamic Table
    Thanks in advance,
    Ragu.

    Hi Ragu,
    Please check the link for table filtering.
    http://wiki.sdn.sap.com/wiki/display/WDJava/GenericTableFilter+Code
    since your dynamic table uses webservice I assume it has fixed context attributes, just put the filter into wdDoModify method everytime you execute/trigger the webservice.
    Regards,

Maybe you are looking for