Tables in Webdynpro for java

hi All,
Im trying to impletemet the form which contains the table to enter the value.
I have creatd the context and have created the table out of it as well.
But i can enter the data in the first row and the remaining rows are in not editable mode.
What property shud i change to make all the feilds in editable mode and i need to have one button(add row) to add more rows as well.
Any one pls help me on this.
Thank you
Regards
Nithya

Releases >= 7.1 EhP1 have a new API IWDTableRowCreator to make this more convenient:
http://help.sap.com/javadocs/nwce/ce711sp03/wdr/com.sap.wdr/com/sap/tc/webdynpro/clientserver/uielib/standard/api/IWDTableRowCreator.html
Armin

Similar Messages

  • Basic TableUI element to Retrieve Data from DB in WEbDynPro For Java

    Hi Experts,
    I am new to WebDynPro for java.Can any body please help me out from this issue.
    I am trying to display records from DataBase by Using Table UI element.
    DBTable Contains 10 rows.
    I have created a Node and Attributes(for every column) .
    I am using JDBC code to retrieve data from database and assigning to Attributes.
    But in Table UIElement its displaying only last record from database as first row in UIElement.
    Its over writing previous rows.
    Can any body please help me the correct procedure to retrieve data from DataBase.
    Thanks and Regards,
    Shashikiran.B

    Hi,
    Iterate through the result set object
    populate the context node
    Ex:Replace the context nodeName with that of yours.
    ResultSet resultSet = stmt.getResultSet();
           //Iterate through the resultset
           while(resultSet.next())
                //Create element of the context node
               IWDNodeElement nodeElement = wdContext.nodeOrders().createElement();
               //assign value from the database to the context attribute
               //Replace attributeName with your attribute name
               //Replace value with resultSet.getShort("<ColumnName>")
               nodeElement.setAttributeValue(attributeName, value);
               //Add the element to your node
               wdContext.nodeOrders().addElement(nodeElement);
    Regards
    Ayyapparaj

  • Basic TableUI element to Reset Data in WEbDynPro For Java

    Hi Experts,
    I am new to webdynPro for java . Can anybody plz help me out.
    i wrote the following code to retrieve data from DB. which is working very much fine.
    public void
    onActionGetRecords(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    while(rs.next()){
    tabstrip.comp.wdp.IPrivateSearchEmployee.IEmpDetailsElement elt= wdContext.nodeEmpDetails().createEmpDetailsElement();
                          elt.setSNo(rs.getString(1));
                          elt.setName(rs.getString(2));
                          elt.setPlatform(rs.getString(3));
                          elt.setPhNo(rs.getString(4));
                          elt.setCity(rs.getString(5));
                          wdContext.nodeEmpDetails().addElement(elt);
    Now my problem is when i call this action its adding the rows to Table UI elements.
    Can anybody please help
    how to reset values in TableUI element when i click on reset button OR when i call onActionGetRecords(-----) methods,
    Please help me .....
    thanks and Regards,
    Shashikiran

    hi,
    if you want the data to be erased(reset)
    in your code
    tabstrip.comp.wdp.IPrivateSearchEmployee.IEmpDetailsElement elt= wdContext.nodeEmpDetails().createEmpDetailsElement();
    elt.setName("");
    elt.setPlatform("");
    elt.setCity("");
    wdContext.nodeEmpDetails().addElement(elt);
    by this way you can reset all the values present in the table
    and can you make it more clear for on action getrecords
    or  you acn use the remove method to remove the table element
    wdContext.nodeXXX().removeElement();
    thanks and regards
    fazal
    Edited by: fazal ahamed on Apr 2, 2008 4:10 PM

  • Webdynpro for Java Edit and Save.

    Dear all,
    ter cal
    iam working on webdynpro for java i want simple code for EDIT and SAVE  after calling a rfc in for using NWDS webdynpro for java.
    1)HOW TO SAVE AND EDIT THE FRONT WEBDYNPRO FOR JAVA APPLICATION
    2)AFTER SAVING AND THE DATA THAT SHOULD BE SAVED IN PA30 ARE PA20 AND IN PARTICULAR TABLE ALSO.
    PLEASE GIVE ME GOOD TIPS.

    Hi Kishore,
    Creating/Updating entries in tables through Bapis (RFC calls) work in the same way as it is done for other Bapis like those for returning values or even structures. All you have to do is
    1. Import the model, create a model node in your context and bind it to the Input structure of the model under used models.
    2.Create an istance of the Model input structure, like
         Z_Test1_Input input = new Z_Test1_Input();
    3. Set attibutes directly under the input structure
         input.setAttr1("XYZ");
    4. Set attributes under any other structure under Input Structure by first creating the instance of the sub-structure
        Z_SubStruct1 subStrc1 = new Z_SubStruct1();
        subStrc1.setSubAttr1("ABC");
    5. Add all available instances of sub-structures to the instance of input structure
        input.set<SubStruct1>(suStrc1);
    6. Add all available instances of tables under Input Structure after setting attributes within using
    for (int iCount = 0; iCount < wdContext.nodeVn_ContactInfo().size(); iCount++) {
          Z_Table1 zTable1 = new Z_Table1();
          IPublic<YourComponent>.IVn_Table1Element tab1Ele = wdContext.nodeVn_Table1().getVn_Table1ElementAt(iCount);
          zTable1.set<TableAttr>(tab1Ele .getVa_Attr1());
          input.add<Table1>(zTable1);
    7. Bind the instance of input structure to the model node.
       wdContext.nodeMn_TestModel().bind(input);
    8. Execute the model object and then invalidate the output structure under model node (Put this code in try catch block)
       wdContext.currentMn_TestModelElement().modelObject().execute();
       wdContext.nodeMn_TestModel().nodeOutput().invalidate();
    9. Retrieve values from the attributes, tables and structures under the Output Node of the Model Node (Mn_TestModel) as usual
    and store wherever in context as required. In case of output tables, you need to use FOR loop to iterate through the tables and access elements within using index (using wdContext.node<YourRequiredNode>().get<YourRequiredNode>ElementAt(int index)).
    Hope it is helpful.

  • Suggestion for a good book for webdynpro for java

    Hi, I am new to this technology,and i know a little bit basics,but i want to learn in depth regarding Webdynpro For Java and my backend is SAP R/3
             can anyone suggest me  a good book for webdynpro for java

    Hi padma,
    Check this link.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#9">Web Dynpro Sample Applications and Tutorials</a>
    Re: Guides for new entrant to Webdynpro
    Regards,
    Mithu

  • Charts creation with Webdynpro for Java

    Hello everyone,
    I am really new to SAP technologies and I have to create charts showing statistics for an application based on CE 7.1 and Webdynpro for Java.
    I would like to have some inputs about the best way to achieve this, I saw it exists a business graphics UI and flash islands to use flex with webdynpro.
    Thank you for your opinions
    Regards,
    Joh

    Hi Johann,
    Please refer to this link might help for your requirement:
    [Click Here|http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproforJavaDemo+Kit]
    Hope it helps
    Regards
    Arun

  • Flex with webdynpro for java using Flex Island

    Hi Friends,
    I am on Netweaver/SAP Enterprise Portal 7.0 SPstack12, I am developing UI for BI reports using VC, I am interested in developing UI using flex and want to integrate those apps with EP, I came to know flux Island supports flux with webdynpro java,  basically I am a webdynpro for java developer, I want to develop flux applications with webdynpro for java in NWDS. And i want to know how to use Flex Island with webdynpro for java. So could u please post some useful links.
    Thank in advance
    Regards
    samba

    Hi
    If you want to try out using ADOBE Flash Islands with WDJ, you would need to download SAP CE 7.1 EhP1 trial version, if not done so already.
    The following link may help you in building the WDJ component with Flash Islands..
    The specified item was not found.
    If you donot want to develop the Flex project you can download the .swf file provided by the SAP mentors:
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10989ef6-968c-2b10-50a9-eb34a5267163
    Thanks.
    Chitrali

  • How to access(connect) BI Data in webdynpro for java applications

    Hi ,
    is there any way to access and display the BI data in portal using webdynpro for java applications like we did in Visual composer.
    if not how to integrate the BI data in webdynpro applications ?
    Regards,
    Govindu

    Hi,
    Yes there are ways to do it. But may your scenario and the scenario for which I have done may differ.
    You can use openhub to get the data in a flat file and then read it into weddynpro through a java service OR
    You can use DBlink(which i have done).
    Please refer the link below:
    [Link|Data from BW to Oracle.;
    This I have done in NW04s. Not sure whether a better solution is available in the newer release.
    Hope it helps.
    Regards,
    Manoj

  • Adobe Interactive forms & WebDynpro for java problem with IE7 and IE8

    I have Interactive form ui-element in WebDynpro for java (ver. 7 SP 10) application. It works fine with IE6, but in IE7 (or IE8) it doesn't show that ui-element at all. We have tried to change IE7 security & advanced settings, but we have not made any progress. We have also tried to install/uninstall different Adobe reader versions etc.

    I know a little more about the problem now. After viewing the XML source I change the property of the inputfield.
    It was like this:
                <field name="verdipers_felt" y="130.7001mm" x="180.1801mm" w="101.6004mm" h="44.4501mm" locale="no_NO" access="ReadOnly">
    but i changed the access to be nonInteractive
                <field name="verdipers_felt" y="130.7001mm" x="180.1801mm" w="101.6004mm" h="44.4501mm" locale="no_NO" access="nonInteractive">
    now view2 shows the linebreak as in view1... Buut! when im going back to view1 from view2, the linebreaks gets converted into spaces
    thats pretty wierd, aint it?

  • Any difference between webdynpro for java and webdynpro for abap ?

    Hi all:
       I would like to build one small system in EP.
       I can choose to use webdynpro for java and webdynpro for abap.
       I would like to ask any major difference between webdynpro for abap and webdynpro for java ?
       Is fpm supported in webdynpro for abap ?

    Hi,
    see this thread,
    ABAP Vs JAVA WebDynpro
    Regads,
    J.Joe

  • Problem in connecting to database from webdynpro for java

    Hi
    I have a problem in connecting to database from webdynpro application
    I am using oracle 10 express edition as database and was able to connect to database from a java application.But  was unable to connect from a webdynpro for java.
    <b>I guess webdynpro for java uses open sql instead of vendor sql(I looked in the visual admin ,DB is using open sql) so unable to connect to database.Am i right.?</b>
    Do i need to make any settings in the visual admin to make it work?
    How to solve this problem.Please give me pointers
    Thanks
    Bala

    Hi,
    For connecting to Oracle, either you can use the normal JDBC connectivty code directly which is given below :
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    In case you want to fetch data through ejbs, these are the steps to be followed :
    1) Open the J2EE perspective
    2) Create an EJB Module project
    3) Right click on ejbModule, create a new EJB (select your EJB type)
    4) While creating the ejb itself, you can add business methods by clicking ‘Next’ in the UI. Another option is after creating the ejb, write the method in the bean, then select the method from ejb-jar.xml -> <bean name> ->method. Right click and select ‘propogate to local & remote’.
    5) Double click on ejb-j2ee-engine.xml. select your bean and specify a Jndi name for eg: “MyJndi”.
    6) Right click on the EJB project and add ‘classes12.zip’ file (provided by Oracle) to it’s build path. (under libraries tab). Also check the same file under ‘Order & Export’.
    7) Create an Enterprise Application project.
    8) Right click on the EJB module project and select add to EAR project, then select the created EAR project.
    9) Right click on the EJB project, select ‘Build EJB Archive’
    10) Right click on the EAR project, select ‘Build Application Archive’
    11) Open the WebDynpro perspective, open a new project, right click on the project ->properties. Do the following configurations :-
    • Java Build path - select the EJB project from ‘projects’ , check the selected project under ‘Order & Export’
    • Project references – select the EAR project
    • WebDynpro references – select ‘sharing references’ tab, click add & make an entry as : <vendor>/<EAR project name without .ear extension>
    You can find the vendor name under ‘application-j2ee-engine.xml’ file of the EAR project. By default it is ‘sap.com’. So if my EAR project’s name is ABC, my entry would look like ‘sap.com/ABC’
    12) Now the configurations are over and the EJB can be invoked by writing the client code inside the webdynpro component. Like:
    InitialContext context = new InitialContext();
    Object obj = context.lookup("MyJndi");
    MyEJBHome home = MyEJBHome)PortableRemoteObject.narrow(obj,MyEJBHome.class);
    MyEJB mybean = home.create();
    int a = 0;
    a= mybean.add(10,15);
    wdContext.currentContextElement().setSum(a);
    where ‘MyEJB’ is my EJB name and ‘MyJndi’ is my JNDI name
    To connect to Oracle , you can write the usual Java code (given below) as a business methos of the ejb (similar to add() method in the example). And access it like mybean.<businessMethodName>().
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@Oracle_server_ip:Oracle port:SID of the Database","user_name","password");
    Statement stmt = conn.createStatement();
    ResultSet rs = stmt.executeQuery("your query");
    Extracted from Re: Webdynpro and Oracle
    http://help.sap.com/saphelp_webas630/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm
    May be of use to understand the VA Conf /people/varadharajan.krishnasamy/blog/2007/02/27/configuring-jdbc-connector-service-to-perform-database-lookups
    Regards
    Ayyapparaj

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • How to start to work on MDM JAVA API by using webdynpro for java

    Hi all
    I have basic idea on MDM business package thru portal by using standard iViews.
    now i am planning to work on MDM JAVA APIs by using Webdynpro for Java as UI.
    1) can you please share the required documents on the same. how to start working on this by using MDM JAVA APIs in webdynpro for java
    2) what are the JARs files are required and how to integrate those jar files into webdynpro for java application.
    3)  is there any SDN help on MDM JAVA API with webdynpro for java? . can you please send the link on the same.
    4) can you please help by providing sample code on how to use JAVA APIs for retrieving,deleting,inserting and Updating the data in the database.
    if anybody helps on the same then it is the great help to me.
    points are always rewardable...
    Regards
    Suresh babu

    Hi Suresh,
    You can have the MDM JAVA API javadocs from the link
    http://help.sap.com/javadocs/MDM/SP06P2/index.html
    There you can see a package named com.sap.mdm.examples.The classes in it contains some examples using which you can start understanding the code.
    You need to have MDM JAR files for it. And these JAR files to be used at build time can be added to the project thru :-
    Right click on project-> properties->Java Build Path - > Add external JARs
    At run time you can add them the reference in
    Right click on project-> properties->web dynpro references->library reference.
    Thanks
    Namrata

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • Creating a multi level views in webdynpro for java

    Hi,
    My requirement is i need to create a webdynpro application with 3 screens .
    first screen will be a search screen for example with first and last names fields .so when i give search criteria it will display the search results in the second screen below the first screen(search screen) and some of the fields in the result screen wil have a hyperlink so when i click on that it will display the details of that row in the details view below that results view
    in simple terms
    search screen
    results screen
    detail screen
    please let me know the way to develop this kind of application in webdynpro for java
    points will be rewarded for the helpful answer.

    Hi Bala,
                Here you have two options.
    <b>I. Display all views at one time:</b>
    Open  Navigation Modeler,
    Create  a <b>ViewSet</b> with properties column 1, rows 3.
    1. In the tool selection list, select Embed View.
    2. In the layout area of the Navigation Modeler, click on the cell of the view set in which the view is to be embedded.
    3.In the wizard, choose Embed New View and, in the next window, enter a name for the view.
    4.Use the package that you entered for the component definition or select another package by choosing Browse.
    5.Choose Finish.
    Create 3 views with names search screen,results screen and detail screen.
    Use plugs to navigate.
    <b>II. Display one view at a time:</b>
    Create a main View. Insert <b>ViewContainerUIElement</b>
    Open  Navigation Modeler.
    1. In the layout area of the Navigation Modeler, click on the cell of the <u>ViewContainerUIElement</u>.
    2.In the wizard, choose Embed New View and, in the next window, enter a name for the view.
    3.Use the package that you entered for the component definition or select another package by choosing Browse.
    4.Choose Finish.
    Create 3 views with names search screen,results screen and detail screen.
    Use plugs to navigate.
    You can use <b>visibility</b> property also as another option to show/hide the views in both of these.
    regards,
    Siva

Maybe you are looking for

  • Transferring apps from Iphone 3Gs to PC so i can upgrade

    I have tried everything i can find to transfer my apps from my iphone 3GS to itunes on my PC so i can upgrade the phone but nothing works..Right click on phone on left side of screen, click transfer purchases and it only transfers 1 app which was a f

  • Freeze plus high pitch sound during win7 start up

    Hi, I have a problem with my new W520. During win7 start up, my computer often freezes, and when it does so, a high pitch sound sets in. After turning off the computer and trying again a couple of times (often 4-5) it suddenly works again. I think it

  • How can i get for back to 3G for iphone 5C?¿

    how can i get for back to 3G for iphone 5C?¿

  • Masterdata functionality in transaction data

    Hello guys, does SAP provides kind of guidline/matrix for the influence of wbs masterdata ? (influence of wbs' business area in PR, PO, down payment request and so on.. ) . can anybody share a link/sap note ? thanks guys, Laimonas

  • Embedding quicktime audio in webpage

    hello i have audio podcasts that i want to embed into my site... i got it to work but it keeps autoplay, autostart-ing even when i say false to them! with a page of 10 podcasts, i don't want that to happen can someone help me? thanks