Add ViewAttributes in ViewObject (VO) dynamically

Hi OAF gurus,
I have requirement like,In Isupplier ASN createpage i need to add GlobalAttribute1..5 fields from table po_line_locations_all.I am already extended the "PosAsnLineInfVO" and add the global_attributes to the VO .But i am not getting any output after personalization. Beacuse the seeded VO is created based on view RCV_Transactions_interface ,what were data we are seen in that page is not came from the seadedvo execution. Progamatically all the attributes are populate. when isupplier done any transition on that page then only data is available in RCV_Transactions_interface .So i am try to Add GlobalAttribute1..5 in ViewObject (VO) dynamically by extending the "PoAsnCreateCO" and write below code and tested i am successfully see data of global_attribute1 only in page.But i need to add dynamically global_attribute2..4 also in that page.please suggest may i write code wrong.Please help,
is it possible add multipuleViewAttributes to ViewObject (VO) dynamically?
package xxosk.oracle.apps.pos.asn.webui;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import oracle.apps.fnd.framework.OAApplicationModule;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.webui.OAPageContext;
import oracle.apps.fnd.framework.webui.beans.OAWebBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageStyledTextBean;
import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;
import oracle.apps.pos.asn.server.PosAsnLineIntfVORowImpl;
import oracle.apps.pos.asn.webui.PosAsnCreateCO;
import oracle.jbo.RowSetIterator;
import xxosk.oracle.apps.pos.asn.server.xxoskPosAsnLineInfVORowImpl;
public class xxoskPoAsnCreateCO extends PosAsnCreateCO {
public xxoskPoAsnCreateCO() {
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
pageContext.writeDiagnostics(this, "we are in extended co stating ", 1);
OAApplicationModule am = (OAApplicationModule)pageContext.getApplicationModule(webBean);
Connection conn2 =(Connection) am.getOADBTransaction().getJdbcConnection();
OAViewObject vo = (OAViewObject)am.findViewObject("PosAsnLineIntfVO");
PosAsnLineIntfVORowImpl row=null;
pageContext.writeDiagnostics(this, "PosAsnLineIntfVO object name "+vo, 1);
if (vo != null)
try {
String l_att1 = vo.findAttributeDef("GAttribu1").toString();
pageContext.writeDiagnostics(this, "dynamic attribute adding try block ", 1);
catch (Exception exception)
vo.addDynamicAttribute("GAttribu1"); //Adding ViewAttribute to VO
vo.reset();
vo.next();
pageContext.writeDiagnostics(this, " dymanic attribute1 created", 1);
if (vo != null)
try {
String l_att2 = vo.findAttributeDef("GAttribu2").toString();
pageContext.writeDiagnostics(this, "dynamic attribute2 adding try block ", 1);
catch (Exception exception)
vo.addDynamicAttribute("GAttribu2"); //Adding ViewAttribute to VO
vo.reset();
vo.next();
pageContext.writeDiagnostics(this, " dymanic attribute2 created", 1);
if (vo != null)
try {
String l_att3 = vo.findAttributeDef("GAttribu3").toString();
pageContext.writeDiagnostics(this, "dynamic attribute3 adding try block ", 1);
catch (Exception exception)
vo.addDynamicAttribute("GAttribu3"); //Adding ViewAttribute to VO
vo.reset();
vo.next();
pageContext.writeDiagnostics(this, " dymanic attribute3 created", 1);
if (vo != null)
try {
String l_att4 = vo.findAttributeDef("GAttribu4").toString();
pageContext.writeDiagnostics(this, "dynamic attribute44 adding try block ", 1);
catch (Exception exception)
vo.addDynamicAttribute("GAttribu4"); //Adding ViewAttribute to VO
vo.reset();
vo.next();
pageContext.writeDiagnostics(this, " dymanic attribute4 created", 1);
if (vo != null)
try {
String l_att5 = vo.findAttributeDef("GAttribu5").toString();
pageContext.writeDiagnostics(this, "dynamic attribute adding try block ", 1);
catch (Exception exception)
vo.addDynamicAttribute("GAttribu5"); //Adding ViewAttribute to VO
vo.reset();
vo.next();
pageContext.writeDiagnostics(this, " dymanic attribute5 created", 1);
if (vo != null)
pageContext.writeDiagnostics(this, "PosAsnLineIntfVO object name "+vo.getRowCount(), 1);
int lRowCount = vo.getRowCount();
RowSetIterator yourIter = vo.createRowSetIterator("yourIter");
if(lRowCount > 0)
yourIter.setRangeStart(0);
yourIter.setRangeSize(lRowCount);
pageContext.writeDiagnostics(this, "before for loop ", 1);
for (int i = 0; i < lRowCount; i++)
String global1=null;
String global2=null;
String global3=null;
String global4=null;
String global5=null;
row = (PosAsnLineIntfVORowImpl)yourIter.getRowAtRangeIndex(i);
int localpoheaderid =Integer.parseInt(row.getPoHeaderId().toString());
pageContext.writeDiagnostics(this, "getPoHeaderId "+localpoheaderid, 1);
int localpolineid=Integer.parseInt(row.getPoLineId().toString());
pageContext.writeDiagnostics(this, "getPoLineId "+localpolineid, 1);
int locallocationid=Integer.parseInt(row.getPoLineLocationId().toString());
pageContext.writeDiagnostics(this, "getPoLineLocationId "+locallocationid, 1);
try
pageContext.writeDiagnostics(this, "select try starting ", 1);
String selquery="select pll.Global_attribute1 g1,pll.Global_attribute2 g2,pll.Global_attribute3 g3,pll.Global_attribute4 g4,pll.Global_attribute5 g5 from PO_Line_locations_all pll where pll.po_header_id=:1 and pll.po_line_id=:2 and pll.line_location_id=:3";
pageContext.writeDiagnostics(this, "after select ", 1);
PreparedStatement stmt;
stmt = conn2.prepareStatement(selquery);
pageContext.writeDiagnostics(this, "select executed ", 1);
stmt.setInt(1,localpoheaderid);
stmt.setInt(2,localpolineid);
stmt.setInt(3,locallocationid);
pageContext.writeDiagnostics(this, "after where class etting ", 1);
long starttime = System.currentTimeMillis();
pageContext.writeDiagnostics(this, "starttime "+starttime, 1);
for(ResultSet resultset = stmt.executeQuery(); resultset.next();)
pageContext.writeDiagnostics(this, "select for loop ", 1);
global1=resultset.getString(1);
global2=resultset.getString(2);
global3=resultset.getString(3);
global4=resultset.getString(4);
global5=resultset.getString(5);
pageContext.writeDiagnostics(this, " global attribute1"+resultset.getString(1), 1);
pageContext.writeDiagnostics(this, "global attribute2 "+resultset.getString(2), 1);
pageContext.writeDiagnostics(this, "global attribute3 "+resultset.getString(3), 1);
pageContext.writeDiagnostics(this, "global attribute4 "+resultset.getString(4), 1);
pageContext.writeDiagnostics(this, "global attribute5 "+resultset.getString(5), 1);
stmt.close();
long endtime = System.currentTimeMillis();
pageContext.writeDiagnostics(this, "endtime "+endtime, 1);
catch(Exception exception)
throw new OAException("Error in getting StandardPack,Primary Container, Secondary Container Details "+exception, OAException.ERROR);
pageContext.writeDiagnostics(this, "before GAttribu1", 1);
//Setting the calculated derived value in the newly created VO Attribute
row.setAttribute("GAttribu1", global1);
row.setAttribute("GAttribu2", global2);
row.setAttribute("GAttribu3", global3);
row.setAttribute("GAttribu4", global4);
row.setAttribute("GAttribu5", global5);
yourIter.closeRowSetIterator();
// Through personalization i am already create item with ID:GlAttr1 , style :OAMessageStyledTextBean
OAMessageStyledTextBean mst1= (OAMessageStyledTextBean)webBean.findChildRecursive("GlAttr1");
pageContext.writeDiagnostics(this, "getting from page GlAttr1 "+mst1, 1);
mst1.setViewUsageName("PosAsnLineIntfVO");
mst1.setViewAttributeName("GAttribu1");
pageContext.writeDiagnostics(this, "after GlAttr1", 1);
// Through personalization i am already create item with ID:GlAttr2 , style :OAMessageStyledTextBean
OAMessageStyledTextBean mst2= (OAMessageStyledTextBean)webBean.findChildRecursive("GlAttr2");
pageContext.writeDiagnostics(this, "getting from page GlAttr2 "+mst2, 1);
mst2.setViewUsageName("PosAsnLineIntfVO");
mst2.setViewAttributeName("GAttribu2");
pageContext.writeDiagnostics(this, "after GlAttr2", 1);
// Through personalization i am already create item with ID:GlAttr3 , style :OAMessageStyledTextBean
OAMessageStyledTextBean mst3= (OAMessageStyledTextBean)webBean.findChildRecursive("GlAttr3");
pageContext.writeDiagnostics(this, "getting from page GlAttr1 "+mst3, 1);
mst3.setViewUsageName("PosAsnLineIntfVO");
mst3.setViewAttributeName("GAttribu3");
pageContext.writeDiagnostics(this, "after GlAttr3", 1);
// Through personalization i am already create item with ID:GlAttr4 , style :OAMessageStyledTextBean
OAMessageStyledTextBean mst4= (OAMessageStyledTextBean)webBean.findChildRecursive("GlAttr4");
pageContext.writeDiagnostics(this, "getting from page GlAttr4 "+mst4, 1);
mst4.setViewUsageName("PosAsnLineIntfVO");
mst4.setViewAttributeName("GAttribu4");
pageContext.writeDiagnostics(this, "after GlAttr4", 1);
// Through personalization i am already create item with ID:GlAttr5 , style :OAMessageStyledTextBean
OAMessageStyledTextBean mst5= (OAMessageStyledTextBean)webBean.findChildRecursive("GlAttr5");
pageContext.writeDiagnostics(this, "getting from page GlAttr1 "+mst5, 1);
mst5.setViewUsageName("PosAsnLineIntfVO");
mst5.setViewAttributeName("GAttribu5");
pageContext.writeDiagnostics(this, "after GlAttr5", 1);
}

Hi,
your question is not clear and thus hard to answer.
I have 'Create form' with Application table from a VO. initially Createform should display the template of VO in Application table to insert new rows only.
What does the sentence above mean? You create an ADF form from a View Object (this I understand). But what do you mean by +"template of VO in Application table"+ ?
but when I click on 'Add Row' in Application table..the new entry is not coming
Thought you were using an ADF form? (see how confusing your question is ?)
Maybe this helps anyway: If you create new rows in a table, you don't use the Create but CreateInsert operation
Frank

Similar Messages

  • How to add a View in ViewContainerUiElement dynamically

    Hi All,
    I am facing some issues while trying to add a view in the dynamically created ViewContainerUIElement.
    Can someone please help me out.
    Thanks and Regards,
    Gaurav.

    Hi Gaurav,
    You will have to use dynamic programming to fix this
    in the domodifyview
    if ( firstTime )
      final IWDUIElementContainer group
        = (IWDUIElementContainer)view.getElement( "grInner" );
      group.destroyAllChildren();
      final IWDViewContainerUIElement container
        = (IWDViewContainerUIElement)view.createElement
             IWDViewContainerUIElement.class, null
      container.setViewContainer
         wdContext.currentContextElement()
           .getViewContainerName()
      group.addChild( container );
    Now you wil have to set the container name in init or some method.
    Regards
    Pankaj Prasoon

  • How do I do to add and remove Shape3D objects dynamically from TransfGroup?

    Hi, everyone,
    How do I do to add and remove Shape3D objects dynamically from TransformGroup?
    I have added two Shape3D objects in the TransformGroup and I wanted to remove one of it to add another. But, the following exception occurs when I try to use �removeChild� :
    �Exception in thread "AWT-EventQueue-0" javax.media.j3d.RestrictedAccessException: Group: only a BranchGroup node may be removed at javax.media.j3d.Group.removeChild(Group.java:345)�.
    Why can I add Shape3D objects and I can�t remove them? Do I need to add Shape3D object in the BranchGroup and work only with the BranchGroup? If I do, I think this isn�t a good solution for the scene graph, because for each Shape3D object I will always have to use an associated BranchGroup.
    Below, following the code:
    // The constructor �
    Shape3D shapeA = new Shape3D(geometry, appearance);
    shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeA.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeA.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    Shape3D shapeB = new Shape3D(geometry, appearance);
    shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeB.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeB.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    BranchGroup bg = new BranchGroup();
    bg.setCapability(ALLOW_CHILDREN_READ);
    bg.setCapability(ALLOW_CHILDREN_WRITE);
    bg.setCapability(ALLOW_CHILDREN_EXTEND);
    TransformGroup tg = new TransformGroup();
    tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    tg.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    tg.setCapability(TransformGroup.ALLOW_CHILDREN_READ);
    tg.setCapability(TransformGroup.ALLOW_CHILDREN_WRITE);
    bg.addChild(tg);
    tg.addChild(shapeA);
    tg.addChild(shapeB);
    // The method that removes the shapeB and adds a new shapeC �
    Shape3D shapeC = new Shape3D(geometry, appearance);
    shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
    shapeC.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
    shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_READ);
    shapeC.setCapability(Shape3D.ALLOW_APPEARANCE_WRITE);
    tg.removeChild(shapeB);
    tg.addChild(shapeC);Thanks a lot.
    aads

    �Exception in thread "AWT-EventQueue-0"
    javax.media.j3d.RestrictedAccessException: Group:
    only a BranchGroup node may be removed I would think that this would give you your answer -
    Put a branch group between the transform and the shape. Then it can be removed.
    Another thing you could try: This doesn't actually remove the shape, but at least causes it to hide. If you set the capabilities, I think you can write the appearance of the shapes. So, when you want to remove one of them, write an invisible appearance to it.

  • Add or edit step(s) dynamically in a sequence

    I am trying to add or edit step(s) dynamically in a sequence, based on the response from the user to a ui.  If I can not do this in the Test Stand language, how would I do it using a LabVIEW vi and  programmatically put that into a Test Stand sequence and run that sequence?
    cinsight

    The easiest way to edit the currently loaded SequenceFile is to use the existing Operator Interfaces that are shipped with TestStand.  The OI performs operations using Command objects.  It is also possible to implement your own Custom Commands.  Custom Commands make it possible to perform operations such as dynamic sequence editing.  The tutorial Adding Custom Commands to the LabVIEW Operator Interface covers Custom Commands in detail.  Note:  This requires that you have a TestStand development license in order to modify or save Sequence Files.
    Let me know if you have any specific questions.
    Regards,
    Tyler Tigue
    Applications Engineer
    National Instruments

  • Please!!!!!!   How can i add rows in html table dynamically [use jsp,bean]

    hello, i am a fresher in jsp. i want to add new rows in html table dynamically.In my coding, just only shows in one row . please help my problem with correct coding and i don't want to use database. Thanks ...............!
    Here is my coding-------------------
    ---------------- form.jsp --------------------->
    <%@ page import="java.util.*,newtest1.Validation" %>
    <jsp:useBean id="mybean" scope="page" class="newtest1.Validation" />
    <jsp:setProperty name="mybean" property="name" param="name" />
    <jsp:setProperty name="mybean" property="age" param="age" />
    <% s[i][j] %>
    <html>
    <head><title>Form</title></head>
    <body>
    <form method="get">
    <table border="0" width="700">
    <tr>
    <td width="150" align="right">Name</td>
    <td width="550" align="left"><input type="text" name="name" size="35"></td>
    </tr>
    <tr>
    <td width="150" align="right">Age</td>
    <td width="550" align="left"><input type="text" name="age" size="35"></td>
    </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
    <tr><td> </td></tr>
    <tr><td><input type="submit" name="submit" value="ADD"></td></tr>
    <tr><td> </td></tr>
    <tr><td width="100%" align="center" border=1>
    <% int count=mybean.getStart();
    for(int i=count; i<count+1; i++) { %>
    <tr>
    <td><jsp:getProperty name="mybean" property="name" /></td>
    <td><jsp:getProperty name="mybean" property="age" /></td>
    <td><%= count %></td>
    <% count+=1; %>
    </tr>
    <% } %></td></tr>
    </table>
    </form>
    </body>
    </html>
    ----------------- Validation.java ----------------->
    package newtest1;
    import java.util.*;
    public class Validation {
    private String name;
    private String age;
    static int start=0;
    public Validation() {    name=null;
    age=null;
    ++start;}
    public void setName(String username) { if(username!="")
    name=username;
    public String getName() { return name;  }
    public void setAge(String userage) {  if (age!="")
    {age=userage;}
    public String getAge() {  return age;   }
    public int getStart() {
    return start; }

    Hi, Do you mean to say,
    You have an HTML page in which you have a text field and an add button. If you enter anything in that text field and click on Add button the text field contents should be displayed in the same HTML page and you should be able to go on entering new values into the text field and you should be able to retain and display all the previously entered values..
    and finally the list of added items are not stored in the database..
    If this is the case
    i. Your html form should be submitted to the same page.
    ii. You need to have a Vector which holds the entered values.
    iii. Bind the vector object to the request object and collect the same vector object from the request and display its contents...
    I think this would help...

  • Add element in dropdown list dynamically

    Hi All,
    I am facing a problem in adding item in a dropdown list dynamically.
    When i get dropdown list through IgetElementById get null.
    var list = document.getElementById("targetgroupname");
    here list comes as null. Now I've to fill this list. I am using below code -
    for(var j=0;j< com.length;j++){
    iist.options[j]= new Option(com[j],com[j]);
    But it is not working. My list is not getting filled with these values.
    I doubt due to var list -> null it does not allow to add element.
    But I am not getting any clue, how to initialize it.
    Please suggest, I am new to javascript.
    Thanks & Regards,
    Sneha.

    Hi,
    Thanks for the reply, yes the select box has that id - targetgroupname.
    actually there are 2 dropdown lists, Based on the selection of first dropdown list another list shd be filled.
    So I've written a script at "onchange" of first dropdown list. It works fine when a value gets changed at first dropdown list.
    In some cases I've to display a preselected value at first list ( which comes from previous page as parameter), in that cases there will be no onchange on first list, so I've called the script function manually after creating the first list,like below :
    <SCRIPT> checkSource();</SCRIPT>
    and in this case it does not work & I get a null when i try to read the 2nd list.
    But I am not sure why it is happening.. may be it is not loaded /created on page when i am calling it.
    If yes, what shd I do ?
    Thanks for your time.
    Regards,
    Sneha

  • How can I add document signatures to a dynamic table?

    I have a table where I am adding rows dynamically by adding a + or - button to add or remove rows to add to the table.
    Right now I have a name field and an e-sign field. The problem I am having is that the document signature cannot be repeatable/ needs to be unique and so cannot be added to a dynamic table? Is there a work around for this?
    Ultimately what I want is to have a PDF form look like below:
    + -
    First Name | Last Name | Signature
    First Name |  Last Name | Signature
    When the user clicks on + from the form above, then it just adds a new row like:
    + -
    First Name | Last Name | Signature
    First Name |  Last Name | Signature
    First Name |  Last Name | Signature
    Problem is the e-signature is a new instance and it says it cannot be repeatable? I want these to be different signatures but on one form to be added dynamically. Does this make sense? How can I do this?

    I have a table where I am adding rows dynamically by adding a + or - button to add or remove rows to add to the table.
    Right now I have a name field and an e-sign field. The problem I am having is that the document signature cannot be repeatable/ needs to be unique and so cannot be added to a dynamic table? Is there a work around for this?
    Ultimately what I want is to have a PDF form look like below:
    + -
    First Name | Last Name | Signature
    First Name |  Last Name | Signature
    When the user clicks on + from the form above, then it just adds a new row like:
    + -
    First Name | Last Name | Signature
    First Name |  Last Name | Signature
    First Name |  Last Name | Signature
    Problem is the e-signature is a new instance and it says it cannot be repeatable? I want these to be different signatures but on one form to be added dynamically. Does this make sense? How can I do this?

  • Add prices and display in dynamic text box

    Hey,
    I have a combobox and radio buttons with specific prices that
    I want attached depending on the choice the user makes. I'm having
    trouble getting the application to add the total of the selections
    and display the total in a dynamic textbox.
    I am trying to use global variables. I set them to a certain
    value depending on what is selected. At the end I set add them up
    in the variable total and set that equal to the text box named
    totalPrice.
    Right now the value of the global variables is not being
    returned from their functions.
    Any suggestions for how to do this correctly?
    Thanks!

    kglad,
    Thanks for your quick response. I know that the return
    doesn't work and that is why I decided to post it. Your suggestion
    about updating "total" was something I hadn't thought of. Can you
    give me anymore in terms of how to get the values out of the
    function and update "total"?
    Thanks!
    Oh, if anyone needs a link to the fla...
    fla file in zip
    format

  • How to add new rows to LOV dynamically?

    We have requirement as follows:
    in a multirow region, each row has fields like from_serial and to_serial.
    A serial can have state (defined but not used/In stores) and status (Good/Bad).
    Each field is associated with LOV that lists 'Defined but not used' serials that are in "Good" status.
    User can either select a value from LOV or he can generate the serial on the fly (dynamic text should be allowed).
    Requirement is if user keys in a 'Defined but not used' serial with status as bad, then an error message should be thrown indicating that the serial is invalid. We already have a pl/sql API which does this validation along with several validations that can not be put into single LOV.
    I am not able to achieve this requirement as
    1. if I set DisableValidation property of field to True, then it allows free entry/dynamic entry
    but doesn't call validation API thru PPR...
    2. If I set DisableValidation property of field to false, then it allows to call pl/sql through PPR
    but doesn't allow free text entry.
    Currently, the LOV is not associated with any controller.
    Can someone help me to achieve the requirement?
    I guess if we set DisableValidation property of field to false and then somehow populate the keyed-in value in LOV itself then both requirements, Free text entry and calling validation API, can be soled.
    Question is "is there any way to populate additional row into LOV"?

    Hi,
    You can not add rows to LOV, I also faced similar problem around 2 yrs back where we need to add a new supplier to LOV, there I added one more entry using union in LOV VO with supplier name "New Supplier-Not Defined", when user want to add anew supplier the he will select this value from LOV and in LOV event I will check if value selected is "New Supplier-Not Defined" then I will render one more text box and there user can enter a supplier name which does not exist in the system.
    There could be some other solutions(work arounds) fro this, please clarify your requirements so that we can look for some other options as well.
    If you set the validation property to false then user may save wrong data into system, I think this is not a good option.
    Hope this will give you some clue.
    Regards,
    Reetesh Sharma
    Edited by: Reetesh Sharma on Aug 11, 2010 10:16 PM

  • Error occur after try to add attribute for ViewObject !!

    Hi
    Please someone help to suggest me !
    I have added filed in database table and I want this filed show on my UIX page. So I added new attribute to EO and VO which declare for this table. After that I add this field to my page . I run program but error is occured.
    Error show that
    Error
    1.Invalid column index
    2.JBO-25046: Requested row not available in row set iterator WorkflowsAllVO1.
    How should I do to correct this problem ?
    Thanks

    Now I can correct the problem ! In my viewobject I use expert mode for query and I forgot to add new column to query.

  • How to add columns for existing table dynamically?

    Hi,
    I created table structure only. I want to add columns for this existing  table. Columns are not fixed, according to the  user choice i  need to write code.
    Plz give me reply asap.
    Thanks
    Shirisha

    Hi Shirisha,
    I think the following code snippet will help you.
    int l_no_cols = 0;
    //Get the number of columns in this variable, something like the following
    //l_no_cols = wdContext().currentContextElement().get<Context_attribute_name>;
    IWDTable l_tab;
    IWDTransparentContainer l_tbl_cont = (IWDTransparentContainer)view.getElement("TableDataCont");//ID of Container
    l_tab = (IWDTable)view.getElement("TableData");//ID of Table
    l_tab.setVisible(WDVisibility.VISIBLE);
    l_tab.bindDataSource(wdContext.nodeTable_Data().getNodeInfo());
    for(int a = 1; a <=l_no_cols; a++)
    //Creating the column
    IWDTableColumn l_tab_col = (IWDTableColumn)view.createElement(IWDTableColumn.class,"COL"+a);
    //Creating Caption for Column Header
    IWDCaption l_tab_cap = (IWDCaption)view.createElement(IWDCaption.class,"Caption"+a);
    l_tab_cap.setText("Col"+i);               
    l_tab_col.setHeader(l_tab_cap);
    //Creating Table Cell Editor for column
    IWDInputField l_tab_cell = (IWDInputField)view.createElement(IWDInputField.class,"CellEditor"+a);
    //creating context node attribute for the column dynamically
    wdContext.nodeTable_Data().getNodeInfo().addAttribute("Col"+i,"com.sap.dictionary.String");
    l_tab_cell.bindValue(wdContext.nodeTable_Data().getNodeInfo().getAttribute("Col"+i));
    l_tab_col.setTableCellEditor(l_tab_cell);
    l_tab.addColumn(l_tab_col);
    l_tbl_cont.addChild(l_tab);
    Regards,
    Alka

  • Facing problem to add component in a panel dynamically

    I face serious problem to add component dynamically on a jpanel. can any one help me?
    I have one panel inside a frame. And I have another 3 or 4 panel. dynamically i want to change the panel inside the frame with the other panel.
    can anybody help me with source code?
    Your earliest response is highly appreciated.

    remove is reflected immediately without calling
    validate() but it does not work for adding. please
    give me some code.Post a small demo code that is generally compilable, runnable and could reproduce your problem. See: http://homepage1.nifty.com/algafield/sscce.html and http://www.yoda.arachsys.com/java/newsgroups.html

  • How to add Book to .Portal file dynamically

    Is it possible to add Book or page to .Portal file in Weblogic 8.1 Portal Application dynamically as there are classes for Book and Page are available....
    Brijesh

    To add a row of data to a JTable component, you need to add it to its table model. A simple implementation of a table model that supports appending row data is DefaultTableModel. By default, a table uses a DefaultTableModel.
        DefaultTableModel model = new DefaultTableModel();
        JTable table = new JTable(model);
        // Create a couple of columns
        model.addColumn("Col1");
        model.addColumn("Col2");
        // Append a row
        model.addRow(new Object[]{"v1", "v2"});
        // there are now 2 rows with 2 columns
        // Append a row with fewer values than columns.
        // The left-most fields in the new row are populated
        // with the supplied values (left-to-right) and fields
        // without values are set to null.
        model.addRow(new Object[]{"v1"});
        // there are now 3 rows with 2 columns
        // Append a row with more values than columns.
        // The extra values are ignored.
        model.addRow(new Object[]{"v1", "v2", "v3"});
        // there are now 4 rows with 2 columns

  • SMARTFORMS : add in loop an address dynamically

    Hi all,
    i loop on a table and i would like to add an address object, the number is dynamically so how can i pass it to the field adress number in general Attributes of my Address object ? I tried to add a field symbol but it don't work.
    Cheers

    Add the Address Node.
    Press the button "Dynamic field values" next to the input box of the Address Number.
    In the Address Number pass the variable which contains the Address number (i.e. ADRC-ADRNR). Like &WF_ADRNR&
    Here WF_ADRNR  contains the value of the ADRC-ADRNR.
    Regards,
    Naimesh Patel.

  • Grab Frame Number, add 6 and display in dynamic textbox

    Hey,
    I have a gallery that needs numbered images. To do this I
    need to grab the current frame number of a parent movie, add 6 and
    display in a dynamic textbox. Sounds simple!
    The frame number I need to grab is in:
    _root.gallery
    The dynamic textbox has the var name 'displayNumber' and is
    in:
    _root.gallery.controlbox
    I need this to refresh every time the frame number changes in
    the _root.gallery clip. This is a fairly urgent project so swift
    help is obviously appreciated!
    Thank you in advance

    your code will work if all you state is valid and there's no
    other _root.gallery.onEnterFrame overwriting the one you
    posted.

Maybe you are looking for

  • Blog Summary Page Does Not Update Picture

    For some reason, when I create a new blog entry by duplicating the last one and adding new content, the Blog Summary page will not update the picture. I sometimes either have to create a new blank blog entry, or drag a different picture into the plac

  • My waveform chart is suppose to be with respect to time but I've noticed it is plotted with respect to the number of times through my VI

    I was under the assumption that waveform charts in LabVIEW 6i atomaticly displayed wired data with respect to time in seconds. However, I noticed that my chart plots data with respect to the number of data points my VI has generated. Is there anyway

  • I pod 6.0

    Where do I get a copy of 6.0 cd upgrade for my I tunes , I have 4.0 I tunes now and when I try to download from website takes to long.I have dial up.I can't find anywhere on this site, That answers this question..

  • Report Painter Reports - Including a logo?

    Hi, I have created a number of reports in report painter and i hope to associate transaction codes with some of them, is there any way that i can include my company logo on any part of the screen or when the report is exported to excel? Any tips appr

  • Keyboard Issue in Leopard for Powerbook G4

    Since a fresh Leopard install, I have been having the following problems: the caps lock and num lock keys do not light up anymore, and the keyboard stops responding intermittently. The only fix I have found is to restart the computer. I have read abo