Dynamic Tray creation at runtime

hi experts,
we have a requirement where we are showing employee details in the tray UI element.
we have 1 tray at design time showing employee details obtained from a Bapi.
Now we need to display spouse details(if available) and children details(their number can be any~known at runtime) in seperate trays. eg each tray for 1 person..so if there are 6 children, there are 8 trays including one for employee and spouse...
Now what I need is the source code  or method to dynamically generate tray at runtime along with the labels and textviews they contain..
thanks in advance

HI,
solved the problem....
i was doing some search here and there and finally got the code to do it. when i came back to the thread i found Ramesh suggested the same stuff which i had used.
thanks gurus.
I am writing my code here for other people looking for the same thing:
IWDTransparentContainer container =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
     wdContext.currentContextElement().setIpvalue("Demo Name");   //this is my context attribute.
for(int i=1;i<3;i++)
     IWDTray tray=(IWDTray)view.createElement(IWDTray.class,null);
               tray.setExpanded(false);
               tray.setWidth("700px");
               IWDLabel label=(IWDLabel)view.createElement(IWDLabel.class,null);
               label.setText("your name is");
          IWDTextView textview1=(IWDTextView)view.createElement(IWDTextView.class,null);
          textview1.setText(wdContext.currentContextElement().getIpvalue());
          IWDLabel label1=(IWDLabel)view.createElement(IWDLabel.class,null);
          label1.setText("Employee age");
     IWDCaption caption =(IWDCaption)view.createElement(IWDCaption.class,null);
     caption.setText("WElcome to employee information");
               tray.setHeader(caption);
     IWDLayout layout=(IWDLayout)tray.createLayout(IWDMatrixLayout.class); //setting tray layout to matrix
     IWDLayoutData layout1=(IWDLayoutData)label1.createLayoutData(IWDMatrixHeadData.class);
     tray.addChild(label);
     tray.addChild(textview1);
     tray.addChild(label1);
               container.addChild(tray);
P.S. Awarding points to Ramesh.

Similar Messages

  • Dynamic Report Creation At Runtime

    I am trying to create a dynamic crystal report at run time from Visual Studio 2013 using C#.  My back end database is SQL Server 2005.  The source for my crystal report is a SQL Server stored procedure which takes two parameters, a year (smallint) and a quarter (tinyint).  The stored procedure uses dynamic SQL and creates a dynamic temp table.  It returns the result set from a select on the temp table.  The number of columns in the result set will be determined at run time.  Right now it returns 40 columns.  It can return additional columns in multiples of 6.  All of these columns will need to be displayed on the crystal report at run time.  The C# application will run on 64 bit Windows 7 machines and the SQL Server database is on a 32 bit server.
    I have been successful in designing a crystal report within the Visual Studio IDE using this stored procedure and running it and displaying it in the crystal reports viewer from within the C# application.  So when the appropriate application's menu item is clicked, the form with the crystal viewer on it opens and displays the report.  So I know that I can connect to the database and display the report.  However as stated in the preceding paragraph, I need to create the crystal report at run time as the number of columns on the report will be variable.
    I have looked at the CrystalDecisions SDK and API and tried without success to do this.  I am getting errors when trying to connect to the DB through the API and am not able to retrieve the data.  I have played with the code for about a week with no success.  I have tried the code in the discussion forums without success.  The documentation for the SDK API's does not provide the level of detail that I need.  The CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo class has an attributes property that needs to be set.  I don't know what the proper settings should be.
    I prefer to use the OLE DB native client for SQL Server.
    Any help would be greatly appreciated.
    Martin

    Hi Ludek,
    I have made some small progress.  I can now login from work as well as get to links.  But it seems I am still blocked for zip files.
    I also have the utility working.  But whenever I try to add my dummy crystal report (dummyreport.rpt) to the project, visual studio 2013 hangs up and I have to kill VS.
    I added the following code to my form and ran it but I get the following error:
    System.Runtime.InteropServices.COMException was unhandled
      HResult=-2147352565
      Message=Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
      Source=CrystalDecisions.ReportAppServer.DataDefModel
      ErrorCode=-2147352565
      StackTrace:
           at CrystalDecisions.ReportAppServer.DataDefModel.TablesClass.get_Item(Int32 Index)
           at Retail_Incentive_Plan.ReportForm3..ctor() in u:\Incentive\Front_End\Visual_Studio_2013\Projects\Retail_Incentive_Plan - Copy\Retail_Incentive_Plan\ReportForm3.cs:line 123
           at Retail_Incentive_Plan.MDIParent.ShowNewForm(Object sender, EventArgs e) in u:\Incentive\Front_End\Visual_Studio_2013\Projects\Retail_Incentive_Plan - Copy\Retail_Incentive_Plan\MDIParent.cs:line 27
           at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
           at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
           at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
           at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
           at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ToolStrip.WndProc(Message& m)
           at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at Retail_Incentive_Plan.Program.Main() in u:\Incentive\Front_End\Visual_Studio_2013\Projects\Retail_Incentive_Plan - Copy\Retail_Incentive_Plan\Program.cs:line 18
      InnerException:
    The error occurs at this line of code:
    boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);
    I'm sure it must be something with the attributes that I am setting.  But I'm not sure of what the correct values for some of these attributes should be.  By the way, I am using the RCAPI approach rather than the formulas approach (for now).
    Here is my code that is in the form:
    public ReportForm3()
    //**************************   ChangeConnectionInfo   ******************************************************************************************************************
    ReportDocument boReportDocument = new ReportDocument();
    //**EDIT** Change the path and report name to the report you want to change.
    boReportDocument.Load(@"c:\Retail_Incentive_Plan\DummyReport.rpt", OpenReportMethod.OpenReportByTempCopy);
    //Create a new Command Table to replace the reports current table.
    CrystalDecisions.ReportAppServer.DataDefModel.CommandTable boTable =
    new CrystalDecisions.ReportAppServer.DataDefModel.CommandTable();
    //boMainPropertyBag: These hold the attributes of the tables ConnectionInfo object
    PropertyBag boMainPropertyBag = new PropertyBag();
    //boInnerPropertyBag: These hold the attributes for the QE_LogonProperties
    //In the main property bag (boMainPropertyBag)
    PropertyBag boInnerPropertyBag = new PropertyBag();
    //Set the attributes for the boInnerPropertyBag
    boInnerPropertyBag.Add("Auto Translate", "-1");
    boInnerPropertyBag.Add("Server", "MyServerName");
    boInnerPropertyBag.Add("Connect Timeout", "15");
    boInnerPropertyBag.Add("Data Source", "vancsdb02");
    boInnerPropertyBag.Add("General Timeout", "0");
    boInnerPropertyBag.Add("Initial Catalog", "Retail_Incentive_Plan");
    boInnerPropertyBag.Add("Integrated Security", "True");
    boInnerPropertyBag.Add("Locale Identifier", "1033");
    boInnerPropertyBag.Add("OLE DB Services", "-5");
    boInnerPropertyBag.Add("Provider", "SQLOLEDB");
    boInnerPropertyBag.Add("Tag with column collation when possible", "0");
    boInnerPropertyBag.Add("Use DSN Default Properties", "False");
    boInnerPropertyBag.Add("Use Encryption for Data", "0");
    //Set the attributes for the boMainPropertyBag
    boMainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    boMainPropertyBag.Add("QE_DatabaseName", "Initial Catalog=Retail_Incentive_Plan");
    boMainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    //Add the QE_LogonProperties we set in the boInnerPropertyBag Object
    boMainPropertyBag.Add("QE_LogonProperties", boInnerPropertyBag);
    boMainPropertyBag.Add("QE_ServerDescription", "MyServerName");
    boMainPropertyBag.Add("QE_SQLDB", "True");
    boMainPropertyBag.Add("SSO Enabled", "False");
    //Create a new ConnectionInfo object
    CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo boConnectionInfo =
    new CrystalDecisions.ReportAppServer.DataDefModel.ConnectionInfo();
    //Pass the database properties to a connection info object
    boConnectionInfo.Attributes = boMainPropertyBag;
    //Set the connection kind
    boConnectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    //**EDIT** Set the User Name and Password if required.
    boConnectionInfo.UserName = "myUserName";
    boConnectionInfo.Password = "MyPassword";
    //Pass the connection information to the table
    boTable.ConnectionInfo = boConnectionInfo;
    //Get the Database Tables Collection for your report
    CrystalDecisions.ReportAppServer.DataDefModel.Tables boTables;
    boTables = boReportDocument.ReportClientDocument.DatabaseController.Database.Tables;
    //For each table in the report:
    // - Set the Table Name properties.
    // - Set the Command table's command text.
    // - Set the table location in the report to use the new modified table
    boTable.Name = "Command";
    boTable.QualifiedName = "Command";
    boTable.Alias = "Command";
    //boTable.CommandText = "select country, region, city from customer where country='usa'";
    boTable.CommandText = "exec get_branch_ranking_data, 2015, 1";
    boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable);
    //Verify the database after adding substituting the new table.
    //To ensure that the table updates properly when adding Command tables or Stored Procedures.
    boReportDocument.VerifyDatabase();
    //return boReportDocument;
    //**************************   End ChangeConnectionInfo   ***************************************************************************************************************
    I'm sure that "vancsdb02" is incorrect in the Data Source in the code above but I'm not sure what goes there.
    All of my assemblies are set in my project as well as in the top of my code.  I just didn't show it here for brevity.
    Will pick up again with this on Monday.
    Martin

  • How to dynamically resize JPanel at runtime??

    Hello Sir:
    I met a problem, I need to resize a small JPanel called panel within a main Control JPanel (with null Layout) if I click the mouse then I can Drag and Resize this small JPanel Border to the size I need at runtime, I know I can use panel.setSize() or panel.setPreferredSize() methods at design time,
    But I have no idea how to do it even I search this famous fourm,
    How to dynamically resize JPanel at runtime??
    Can any guru throw some light or good example??
    Thanks

    Why are you using a null layout? Wouldn't having a layout manager help you in this situation?

  • Dynamic Table Creation & Fill Up

    Hello,
    Can anyone please guide where I can find examples for dynamic table creation (programmaticaly), with dynamic number of columns and rows, used to place inside text components (or whatever) to fill them with data.
    All programmatic.
    Using JSF, ADF BC
    JDeveloper 10.1.3.1
    Thanks
    Message was edited by:
    RJundi

    Hi,
    Meybe this article helps: http://technology.amis.nl/blog/?p=2306
    Kuba

  • Declare dynamic internal table during runtime error

    Hi Gurus,
    I have encounter a problem here. I would like to have several block of alv list output; for each customer open items details. Thus, i need to create dynamic internal table duirng runtime as i do not know how many customers that should be output before user enter from the selection screen field for customer code.
    I tried to search in the forums and found this website [Runtime Declaration of Internal Table;.
    But when i tried to execute it, i have an error. The field symbols that i passed into the call function REUSE_ALV_BLOCK_LIST_APPEND for parameter t_outtab does not match. May i know how do i go about it?
    Or are there any other solutions to display this kind of reports? I ever think of using hierarchy list alv. But it does not match the requirement. I would like to display the total amount for each customer. Can hierarchy list able to do so? Or it can only display as the grand total at the end of the report? I think it would be best to display as alv block output.
    Your help will be much appreciated. <offer removed by moderator>
    Thanks
    Edited by: Thomas Zloch on Oct 22, 2010 11:23 AM

    the problem comes up, when there are fields in the table which represent numbers with decimals (type p). Best is to reference the field directly what comes from SAP. Replace the LOOP At idetails ... ENDLOOP with:
    LOOP AT idetails INTO xdetails.
        CLEAR xfc.
        xfc-fieldname = xfc-ref_field = xdetails-name .
        xfc-ref_table   = p_table.
    *    xfc-datatype = xdetails-type_kind.
    *    xfc-inttype = xdetails-type_kind.
    *    xfc-intlen = xdetails-length.
    *    xfc-decimals = xdetails-decimals.
        APPEND xfc TO ifc.
      ENDLOOP.

  • Does Seeburger's SFTP adapter support dynamic filename creation

    Hi all,
    Does the SFTP adapter support dynamic filename creation.
    If yes, then do we have to use UDF's and are there any specific settings that have to be done in the SFTP communication channel.
    Please provide a blog which helps in the configuration process of the above case.
    thanks,
    younus

    Dynamic Creation of File using counter in Seeburger Variable:
    1. Configuration Needed in the Communication Channel:
    The process of dynamic creation of files can be done we have to select the following checkbox in the receiver channel:
    Dynamic Attribute in receiver Channel:
    Import the following modules:
    Localejbs/Seeburger/solution/sftp
    Localejbs/Seeburger/AttribMapper
    Localejbs/ModuleProcessorExitBean
    Enter  the desired file naming convention:
    Use the Parameter GetCounter("ID") to the place where the counter is expected to come.
    2. Configuration Needed in the SeeBurger Workbench:
    If the J2EE server is listening on a port different from 50000 (which is the standard for the SAP client 000), the port number must be configured:
    Login into the seeburger workbench using the URL
    http://<localhost>:<port number>/seeburger/index.html
    Select Property Store.
    Create or edit the following property:
    Parameter
    Value
    Namespace
    http://seeburger.com/xi/SeeFunctions
    Key
    provider.servlet.server
    Value
    http://localhost:50000/ (where the port number 50000 must be set
    accordingly to the J2EE server configuration).
    Note: The configured value (server URL) has to end with a slash (/). Otherwise,
    SeeFunctions will not work correctly.
    If we need to start the counter from any specific value , it can be configured in the SeeBurger workbench, this value can be maintained in Mapping Variables :

  • Dynamic tray selection - SAPScript

    Hi,
    I need to dynamically select a tray to print a form using SAPScript, depending on some condition.
    Need to know how to do this?
    Thanks in advance!
    regards,
    Karen

    There are 2 options. The first one I have not used before but I think it is the better way.
    Example: You want print out an invoice on different paper.
    In SAPscript you have in this invoice 2 pages:  "FIRST" and "NEXT"
    Salesorganization 1000 = TRY01
    Salesorganization 2000 = TRY02
    **************************************************************************************** 1st option
    1st option: (As mentioned in this thread): Create not 2 but 4 pages:
    F_01 and N_01          both with Resource Name = TRY01
    F_02 and N_02          both with Resource Name = TRY02
    Page F_01:   in field "Next page":  N_01
    Page N_01:   in field "Next page":  N_01
    Page F_02:   in field "Next page":  N_02
    Page N_02:   in field "Next page":  N_02
    In the print-program you have to decide if you want to have page F_01 and N_01 or F_02 and N_02.
    For this reason call function  "OPEN_FORM"  without the name of the form (SAPscript) because in
    call function START_FORM you can export the page.
    data:   GV_STARTPAGE type TDPAGE.
    if vbdkr-vkorg = '1000'.
      GV_STARTPAGE = 'F_01'.
    endif.
    if vbdkr-vkorg = '2000'.
      GV_STARTPAGE = 'F_02'.
    endif.
    call function START_FORM
      FORM = name of form
      LANGUAGE = nast-spras
      STARTPAGE = GV_STARTPAGE
      and so on
      call function WRITE_FORM
      call function WRITE_FORM
      call function WRITE_FORM
    call function END_FORM.
    call fuction CLOSE_FORM.
    **************************************************************************************** 2st option
    Short description:
    Normal SAPscript only FIRST and NEXT, both with same tray.
    ABAP: Do not print, only get OTF-data.
    Change the tray in OTF-data.
    Print OTF-data.
    I have done this before and I know it works. But I think the 1st option is better.
    You can change the field for the "Recource name" from TRY01 to TRY02 in the print program but only with a trick.
    Do not print out in a normal way (Open_form; write_form; close_form).
    Solution:
    In function OPEN_FORM     set field    OPTIONS-TDGETOTF to 'X'.
    This means: The function CLOSE_FORM will not print into spool and maybe from spool to the printer but the print data will only be stored into a table.
    In SAPscript you have 2 Pages. FIRST and NEXT; both with Recource name = 'TRY01'.
    At the end nn CLOSE_FORM you can receive the table OTFDATA.
    data: GS_OTFDATA type ITCOO,
            GT_OTFDATA type standard table of ITCOO.
    call function CLOSE_FORM
      tables OTFDATA = GT_OTFDATA.
    * Up to now no data have been sent to spool.
    * If you have a look now into table GT_OTFDATA (field TDPRINTPAR) you will
    * find in the first lines  "TRY01"
    * You can change this
    If vbdkr-vkorg = '2000'.
      loop at GT_OTFDATA into GS_OTFDATA.
    *   Find the pattern "TRY01" in GS_OTFDATA-TDPRINTPAR
    *   with commands FIND or SEARCH or something like that.
    *   Change the pattern "TRY01" in GS_OTFDATA-TDPRINTPAR to "TRY02"
    *   and take over this change to table GT_OTFDATA with command "MODIFY".
    *   Please notice: In table GT_OTFDATA the pattern "TRY01" can occure more than 1 time.
        modify GT_OTFDATA from GS_OTFDATA.
      endloop.
    endif.
    * Now print the OTF-Data
    call function PRINT_OTF
    * the paramters are   PRINTOPTIONS (same as in OPEN_FORM)
    *                   and tables OTF = GT_OTFDATA.
    Ok, I know the problem and the thread are very old but maybe someone wants to have a more detailed solution.
    Keywords in English: SAP ABAP SAPscript  Resource Name ITCTG-TDPAPERRES   from program dynamically dynamic dynamically
    TRAY  TRY01 TRY02 TRY03
    Keywords in German: SAP ABAP SAPscript  Resourcenname   ITCTG-TDPAPERRES vom Programm aus dynamisch TRAY  TRY01 TRY02 TRY03 Druckerschacht Schachtsteuerung Druckerschachtsteuerung verschiedenes Papier
    best regards
    Norbert Zanders

  • How to dynamic select based on runtime value ?

    how to dynamic select based on runtime value ?
    I want to write a select function, which do selecting based on parameters. eg,
    CREATE OR REPLACE FUNCTION myfunction
    (tableName VARCHAR2, pkName VARCHAR2, pkValue VARCHAR2, requestString VARCHAR2)
    RETURN VARCHAR2 AS
    BEGIN
    select requestString from tableName where pkName=pkValue;
    RETURN NULL;
    END;
    myfunction('users', 'user_id', '100', 'user_name'); it will select 'user_name' from table 'users' where 'user_id' = '100'.
    This way could save lots of coding. but it can't pass compiler. how to work out ?
    Thanks.

    While this may save code, if used frequently it will be ineffecient as all [explicative deleted]. The danger is that it would be used even for repeatable statements.
    This mode of operation ensures that every statement [calling the funciton] needs to be reparsed, which is extremely expensive in Oracle (in CPU cycles, recursive SQL and shared pool memory).
    Such reparsing is rarely a good thing for the environment ... it could easily lead to buying more CPU (bigger box) and therefore adding more Oracle license ... which could quickly exceed the typical developer's salary.
    However - if you really, really want to do this, look up 'execute immendiate' in the PL/SQL manuals.

  • Does UCM support dynamic page creation on contributor mode.?

    Hi All,
    Does UCM support dynamic page creation on contributor mode.
    We want to create new pages and link it into the existing pages
    is that possible?
    Thanks
    ~Hari

    You can create new secondary pages in contributor mode - you would normally do this via a dynamic list fragment though technically you could also achieve it by switching region content and creating new data files. You can then use the linz wizard to link between pages.
    If you are talking about creating new primary pages and sections in your site then you would need to use something like Site Studio Manager fragment.
    Tim

  • RE: dynamic widget creation

    This is a good tech note about this on the Forte website.
    -----Original Message-----
    From: Matthew Middleton [SMTP:[email protected]]
    Sent: Friday, 25 June 1999 11:11
    To: [email protected]
    Subject: dynamic widget creation
    I have done a few windows with dynamic widget creation. Sometimes it
    seems I have to have done self.Open before, to get things to appear
    properly, and sometimes not.
    What I would like is a summation of the issues involved here so I can
    write such code without resorting to trial and error.
    with advance appreciation,
    Matthew
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Tech Note 5156, which I have attached for your information.
    -----Original Message-----
    From: Foster, Todd [SMTP:[email protected]]
    Sent: Saturday, 26 June 1999 1:27
    To: 'Jason de Cean'
    Subject: RE: dynamic widget creation
    ? What technote ?
    -----Original Message-----
    From: Jason de Cean [SMTP:[email protected]]
    Sent: Thursday, June 24, 1999 9:19 PM
    To: 'Matthew Middleton'
    Cc: 'Forte Users'
    Subject: RE: dynamic widget creation
    This is a good tech note about this on the Forte website.
    -----Original Message-----
    From: Matthew Middleton [SMTP:[email protected]]
    Sent: Friday, 25 June 1999 11:11
    To: [email protected]
    Subject: dynamic widget creation
    I have done a few windows with dynamic widget creation. Sometimes
    it
    seems I have to have done self.Open before, to get things toappear
    properly, and sometimes not.
    What I would like is a summation of the issues involved here so Ican
    write such code without resorting to trial and error.
    with advance appreciation,
    Matthew
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>

  • Nesting dynamically created movieclip at runtime?

    Is it possible to nest a movieclip into another dynamically
    created movieclip at runtime? The commented line of code works, but
    I am trying to nest a movieclip after it is created into
    another.

    you can nest movieclips by using your commented code.
    however, you cannot change a movieclip's parentage after it's
    created.
    you can "fake" a parentage change by creating a movieclip
    with the parentage you want, copying its assets to the newly
    created movieclip with the desired parentage and finally removing
    the original movieclip.

  • Dynamic UIElement Generation at Runtime

    Hi everybody,
    My problem is, that I want to create a number of elements at runtime. The number depends on the records in the database. So when I got 30 records in my database. I want to create 30 elements. So far, so good.
    The connection through the WebServices works very well.
    Now I got my problems with display the elements. I want to use the tray element.
    Now my Code looks like this:
    //... much code before! :-)
    //here you get the number of affected rows
    length = req.getResponse().getResultAsArray().length;
    //dynamically create trays, after the number of selected rows
    for (int i = 0; i < length; i++)
    IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
    IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
    //I don't want any more options at the moment ;-)
    tray.setEnabled(true);
    tray.setExpanded(false);
    transparent.addChild(textView);
    transparent.addChild(tray);
    So but nothing is shown on the screen.
    Now there exists the method setVisible(), I think this is the key to solve my problem. But this method expects a WDVisibility parameter and I don't know what I must type in.
    I tried it with com.sap.ide.webdynpro.uielemtdefinitions.Visibility, it doesn't work.
    Then I created a context attribute with this type!
    doesn't work, too.
    My you can help me?
    Kind Regards,
    Andre

    Hi,
    for (int i = 0; i < length; i++)
    <b>IWDTransparentContainer container = (IWDTransparentContainer)view.getElement("RootUIElementContainer");</b>
    IWDTransparentContainer transparent = (IWDTransparentContainer) view.createElement(IWDTransparentContainer.class, "TC."+i);
    IWDTray tray = (IWDTray) view.createElement(IWDTray.class, "tray."+i);
    //I don't want any more options at the moment
    tray.setEnabled(true);
    tray.setExpanded(false);
    transparent.addChild(textView);
    transparent.addChild(tray);
    <b>container.addChild(transparent);</b>
    Hope it helps,
    Regards,
    Nagarajan.
    Message was edited by: Nagarajan Kumarappan

  • Dynamic Tray Selection

    Hi All,
    When the print out is issued from the SMARTFORM, it should automatically determine the tray for the paper (based on a pre-defined logic):
    The trays can be:
    Tray 1
    Tray 2
    Manual Feed
    I tried sending Dynamic Value in RESOURCE NAME field of Smartform Page. The Value i tried in TRY1, TRY2. But printer is not selecting according to the value passed at runtime in field RESOURCE NAME. Could someone please let me know about the exact name to be specified in RESOURCE NAME as the field is 20 characters long.
    If GET_PRINT_PARAMETERS is to be used, please let me know where should i pass the internal table which i get from GET_PRINT_PARAMETERS FM.
    Thanks,
    Best regards,
    Prashant

    Hai prashant,
    Do you want to define the tray statically?.
    Then you can mention the tray at the page level.
    Select the page and select 'output options' tab.
    There you can mention the tray name with the resource field.
    if you want to select the tray dynamically then ,refer the OSS note 367128 and apply the OSS note which is applicable for release 4.6 C.
    Implement the program correction. Afterwards, you can also enter a field (for example, ) in field 'Resource'. This field must be defined in a global manner (the type must be RSPORESNAM). You must set the value of this field before you call up the page. That is, you must either supply the value on the first page via the interface or you must set it during the initialization. If you call a page via an explicit page break, you must have set the value before the page break.
    I hope this should resolve your issue.
    You can even try using cal functions.
    CALL FUNCTION 'GET_PRINT_PARAMETERS'
    GET_PRINT_PARAMETERS
    Regards,
    Srikanth.
    Please reward points If it is helpful

  • Dynamic JDBC URls at Runtime

    Hi Experts,
    I did my application in jdev 11.1.1.6 and deployed using Jdbc Url connections and it worked successfully (Actually I m working with 2 diff Database connectiosn in my application)
    But the thing is my company need me to do something like I should be able to dynamically use Jdbc url connections at runtime so that they want to have QA db and PROD db inside the application
    and dynamically change them itseems. (i.e I will have 4 Db in which 2 for QA and 2 for PROD)
    Is there a way where I can achieve them. If so help me out.
    Thanks,
    933601

    Hi,
    You could store the database URLs in a properties file in the app server filesystem, then look them up in the dynamic JDBC code before setting the session attributes. So your QA app server has a properties file containing the URLs for the 2 QA databases and the PROD app server has a properties file containing the URLs for the 2 PROD databases.
    If you want a single app server to talk to multiple sets of databases you could pass a parameter to the login screen. Based on this you decide which database(s) to connect to.
    Kevin

  • Dynamic class loading at runtime issues

    Hi,
    my system works by loading lots of classes located in numerous jars at runtime, it works ok but there are a few things i would like to resolve.
    1. When i come to implement an interface that is located in a jar with my IDE, the names of method variables are lost. So instead of the method having the inputs I set such as "String name, String type", i see "String s1, String s2". This is inconvinient and very error prone!
    2. If an exception is thrown in one of my dynamically loaded classes, the line at which the exception occoured at is lost. So instead of saying "some.package.FautlyClass.method(FautlyClass.java:39)" in an exception it says " some.package.FautlyClass.method(Unkown Source)". This even happens when i output a log from the class from which the exception is thrown.
    If anyone has any help/advice/solutions with these issues it would be much appreciated.
    Ck

    Most IDE's have an option, usually in the compiler preferences or project area, to "save local variable names". That should remove the "unknown source" message, but it will depend vastly on your IDE's options.
    Which IDE are you using? I've never heard of one dynamically renaming variables on the fly, unless you are specifically asking it to obfuscate your code.
    - Saish
    "My karma ran over your dogma." - Anon

Maybe you are looking for

  • Cannot connect to Web Service to change IP address

    Already said, I have a LaserJet Professional P1606dn printer, had it for a while now. Someone sent a print job to it, nothing out of the ordinary, and all of a sudden, it printed that print job over and over. I checked in the print queue, nothing was

  • Read only specific Columns into the cursor

    Hey everybody, I'm trying to make a cursor which takes only column 2 to n-2 (when n is the number of cloumns). The table size should be variable. Is there any possibility to do that? Like CURSOR nodes IS SELECT * FROM nn_input WHERE column_id > 1 AND

  • What the hell good is Flash?!

    I mean really? After taking time on a few different occassions to try and google and find what I can do w/ flash on Android 2.2 and finding nothing I have to ask myself this. I know it's not their fault that Hulu and Netflix want to be #$#$@s and blo

  • Basics in JDBC

    I'm just started to learn how to use javato connect to the database ( it's oracle ). The tutorial gives me the direction to establish connection, so i'm using these code to load a driver and making connection: Class.forName("sun.jdbc.odbc.JdbcOdbcDri

  • How to pipe postscript into Preview.app

    I thought it couldn't be done, but on MacOSX hints, someone suggested this to view postscript-formatted man output: pman() { man -t "$@" | /usr/bin/open -f -a Preview; } I still couldn't get it to work on a generic postscript stdout. Then I decided t