Dynamic creation of control

Hi is it possible to create control buttons in run time based on the input given by the user.Do any one have the demo program

Intaris a écrit:  Yes, but that's not strictly creating controls, is it?  It's mimicing controls. It's certainly a nice feature to have when you come up against a fundamental limitation of LV, but I think someone who is not yet aware of the fact that LV in itself does not support dynamic control creation should try first to write code in a way that is compatible with this....
My point of view is different. When somebody ask a question, for which there is indeed a solution, I'll try to avoid saying "No, there is no solution". I'll balance my reply to take into account "environment" parameters (difficulty, cost, time, compactness...). As a university professor, this is a situation I have to face with my students on a daily basis. And, from experience, I found it is most often more rewarding for everybody to say "Yes you can...but...". It leaves the parter the possibility to decide himself if the solution fits his needs.
In the specific case of LabVIEW limitations, I also think that it is better to acknowledge the limitation and propose a workaround (= a way to write code that is compatible with the problem) that is most often more efficient than the way the "customer" was considering.
There are no problem, just solutions 
Message Edité par chilly charly le 09-18-2008 08:47 AM
Chilly Charly    (aka CC)
         E-List Master - Kudos glutton - Press the yellow button on the left...        

Similar Messages

  • Dynamic creation of Controls in JSF ??????

    i just started on JSF...I've good experience with ASP.NET....
    I have liked what I've seen so far in JSF.....It's pretty straight forward ...neat clean and simple...
    What I am looking for in JSF is a way to create controls in a page dynamically.... A simple thing like UIRootView.....parent control...add(controltype).. something like that.....
    Is it possible ? ie, can we have a staright forward access to the control tree at some stage of life cycle of a request without having to write view handlers or Phase listeners ?
    Pardon my ignorance....I am just a new guy who is getting sold on the JSF idea ....

    Thanks... but I am not sure if I understand you correctly. can you elaborate on it ?
    also, what's stopping me from accessing the API to do that same thing as ASP.net ? Tree,TreeFactory etc. might be the answer. There's got to be some API which does the management of control tree in the first place.
    Now the quest is to find it and use it.
    Any clues on this front ? Also, maybe this thread will catch the attentoin of someone who can add to the "wishlist" for JSF...It is an useful feature
    for the dynamic world we live in....DON'T YOU THINK ?

  • Dynamic creation of controls on the fly

    Hi,
    I want to populate the labview front panel with controls read from an XML Sheet.
    Is this possible in LabVIEW????
    At the start , I will read the xml and the depending the controls writen in the XML file i will palce them on the LabVIEW front panel.
    This feature of creating dynamic controls is easily avaible in other programming languages like VB .
    Please help me if such type of feature is avaible in LabVIEW too...
    Thanks a lot in advance
    Avni

    avni wrote:
    This feature of creating dynamic controls is easily avaible in other programming languages like VB .
    Please help me if such type of feature is avaible in LabVIEW too...
    Hi Avni,
    Please try searching these forums for the title "Scripting in LabVIEW" & also the lava.org forums for the same; you ll get a lot of ideas.
    - Partha
    LabVIEW - Wires that catch bugs!

  • How to dynamically create sqlldr control file using stored procedure

    I am trying to dynamically create the control file (.ctl) and execute the same using a stored procedure.I would be passing the file name as a parameter to this procedure. How do I go about doing this?
    The control file has the following structure. The file name (mktg) varies and is passed as an input to the stored procedure.
    SPOOL mktg.ctl
    LOAD DATA
    INFILE 'mktg.csv'
    INTO TABLE staging
    FIELDS TERMINATED BY ','
    TRAILING NULLCOLS
    (COMPANY_NAME,
    ADDRESS,
    CITY,
    STATE,
    ZIP)
    SPOOL OFF ;
    sqlldr scott/tiger CONTROL= mktg.ctl LOG=mktg.log BAD=mktg.bad

    We are using oracle 9i rel 2.
    I have not had much success with the creation of log and bad files using external tables when they are being used within a dynamic sql.
    Plz check this:
    Re: problems related to data loads from excel, CSV files into an oracle 9i db

  • Issue in creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshots.
    Any pointers will be highly appreciated.
    This thread is further to the threads in Production Planning and LE/WM Forum. I could not resolve the issue with the threads.
    Hope that I will get any pointer in EWM forum.
    http://scn.sap.com/thread/3609441
    http://scn.sap.com/thread/3610822
    With Regards,
    Malay

    Hello Malay,
    Can first contact your ABAPer and ensure the bottom screen is not an Screen Enhancement?
    If it is a some custom development, your ABAPer can help you on the logic behind it.
    Else, Let us know.
    Regards,
    Sathish

  • Issue during creation of control cycle

    Dear Gurus,
    During creation of control cycle (LPK1), the fields for source information is not appearing in my system.
    I compared control cycle in a different ECC system where source information is appearing.
    How can make the screen appear in my ECC system.
    Please find the screenshot.
    Any pointers will be highly appreciated.
    This thread is further to the thread in Production Planning Forum
    http://scn.sap.com/thread/3609441
    With Regards,
    Malay

    Manish,
    I do not understand how this going to solve the issue because why we need both KANBAN and WM control cycles for one material withdrawal for production?
    Br
    KK

  • Dynamic creation of TabStrip

    Hi,
    I want to create a tabstrip dynamically.The tabstrip should have 3 tabs, and in each of the tabs i want to put some UI elements like a label, input field, dropdown, tables.........etc.
    Im able to create the tabstrip and add tabs to it dynamically.
    I've even created the UI elements which i wanted to put in the tabs.............But im not able to proceed as i dont know how to add the UI elements to the tabs.......
    Can anyone tell me how to add UI elements to a tab in a tabstrip?
    Regards,
    Padmalatha.K
    Points will be rewarded.

    Hi,
    Following code will help you to understand the dynamic creation and adding them
    //Tabstrip
           IWDTabStrip tabStrip = view.createElement(IWDTabStrip.class);
           //Tab
           IWDTab tab = view.createElement(IWDTab.class);
           //Input Field
           IWDInputField inputField = view.createElement(IWDInputField.class);
           //Adding inputfield to tab
           tab.setContent(inputField);
           //Adding tab to tabstrip
           tabStrip.addTab(tab);
    //Finally add this tabstip to either your root container or some other container.
    Regards
    Ayyapparaj

  • Dynamic creation of ComponentUsage

    Hi people,
    I want to reuse a view (ViewA) in different views (ViewB, ViewC, ViewD).ViewA has a quite complex logic, so it is necessary to outsource this view.  Not only the logic, but also the count of UIElements and contextelements is quite large, for this I don't want to implement this part redundant in the views A, C and D.
    I have to use ViewA in a table in  the TablePopin UIElement. Every line of the table should have its own instance of ViewA. Is that possible?
    My idea is it, to put the view in an own component. For every tableline I need an instance of the componentUsage. My problem is now, that I'm not able to create at runtime a ComponentUsage and at designtime I don't know how many instances I need. Is it possible in webdynpro to create dynamic instances of ComponentUsage?
    If you know an other way, that prevents me from implementing the view and its logic more times, please tell me!
    Thanks in  advance,
    Thomas Morandell

    Hi Thomas,
    just for clarification. Principally it is possible in Web Dynpro to dynamically create new component usages of the same type like an existing, statically declared one. This means after having defined a component usage of type ISomeComp (component interface definition) you can dynamically create new component usages which all point to the same component interface definition ISomeComp:
    wdThis.wdGetISomeCompUsage().createComponentUsageOfSameType();
    But this dynamic creation approach implies, that you must also embed the component interface view of this component usage to the view composition dynamically; and this is (unfortunately) quite cumbersome and complicated based on the existing Web Dynpro Java API (it is not yet optimized for a simple dynamic view composition modification.
    Additionally, like Valery pointed out, the dynamic creation of new component usages is not compatible with table popins.
    Regards, Bertram

  • Dynamic Creation of UI in adobe forms??

    Hi Experts,
    I need to create a dynamic interactive form and dynamic UI elements in the interactive form.
    As per my requirement I need to display a pdf and I will be getting values from the RFC's. I need to show the form segments and the UI elements only when there's a data from the RFC else not. I am unable to understand whether this requirement needs generation of the UI elements dynamically or I can do it statically as well.
    The form thus generated will be having data from the RFC which based on the data quantity may exceed to n number of pages.
    In case it needs dynamic creation can you suggest me please how to achive it in interactive forms?
    Helpful answers will be appreciated.
    Warm Regards,
    Gaurav

    Hi,
    subForm1:-
    Flow content
    Allow page breaks
    Place: following previous-----> This means when you are repeating the subform the previous one should be followed.
    Say you have a table and have 3 columns in it.
    After 1st column is completed, the next column should come with 1st comun
    After: Continue filling parent--->Continously fill the data with the parent element
    Repeat sub form min count is 1 : Minimum of 1 line item will be printed
    Height: Expand to fit is true.: If the field height is increased it automatically expands.
    For help in Adobe Press F1 or Goto Help--> Adobe Designer Help in Adobe Designer
    After installing Adobe Designer, goto the specific folder
    C:\Program Files\Adobe\Designer 8.0\EN you can get sample documents.
    For help press F1 after opening designer.
    Sub Form1: Content--> Flowed, Flow direction --> Top to bottom
                       Binding --> Check the checkbox Repeat Subform for each data item
    Subform 2: Content --> Positioned, No pagination No binding settings changes needed.
    Hey i forgot to mention the Header Subform where you create all these subforms should be flowed.
    Try it once like this and lte us know
    Edited by: Sankar Narayana on Oct 3, 2008 5:06 PM

  • Dynamic creation of date in selection variant

    Hi All,
    I have a Z program for updating a field in BOM item. One of the input field in the report is "Valid From Date". Actually the current date is automatically fetched through a function module and it is defaulted in that field. 
    Our client is using selection variant for ease of use. The problem here is old date in the selection variant  is replacing the current date. I want current date to be created automatically during insertion of variant also. How can i solve this problem. Is there any selection variable inside the variant for dynamic creation of Date?
    Thanks
    Sankar

    As I know there is no setting for this. For any std or Z report variant function with L should act same way...anyway you discuss with your ADABer.
    See the help for variables
    Selection Variables                                                                               
    The following three types of selection variables are currently          
        supported:                                                                               
    o   Table variables from TVARV                                          
            You should use these variables if you want to store static          
            information. TVARV variables are proposed by default.                                                                               
    o   Dynamic date calculations:                                          
            To use these variables, the corresponding selection field must have 
            type 'D' (date). If the system has to convert from type T to type D 
            when you select the selection variables, the VARIABLE NAME field is 
            no longer ready for input. Instead, you can only set values using   
            the input help.                                                     
            The system currently supports the following dynamic date            
            calculations:                                                       
            Today's date                                                        
           From beginning of the month to today                               
           Today's date +/- x days                                            
           First quarter ????                                                 
           Second quarter ????                                                
           Third quarter ????                                                 
           Fourth quarter ????                                                
           Today's date - xxx, today's date + yyy                             
           Previous month                                                                               
    o   User-specific variables                                            
           Prerequisite: The selection field must have been defined in the    
           program using the MEMORY ID pid addition. User-specific values,    
           which can be created either from the selection screen or from the  
           user maintenance transaction, are placed in the corresponding      
           selection fields when the user runs the program.                                                                               
    The SELECTION OPTIONS button is only supported for date variables that 
       fill select-options fields with single values.                         
    i.e means we can do that with D also.

  • Is it possible to change nunmber of columns dynamically in table control

    Is it possible to change number of columns dynamically in table control? if so how it could be done?
    Thnaks in advance.
    Sounder

    You can update the table control in your program, the table control is a structure of the type CXTAB_CONTROL of TYPE-POOLS cxtab.
    There you can hide or display column the same way you do for fields in LOOP AT SCREEN. there you will ahve to LOOP AT <control>-COLS.
    TYPE-POOL CXTAB .                                                                               
    TYPES:                                                                               
    BEGIN OF CXTAB_COLUMN,                                                          
             SCREEN      LIKE SCREEN,     "Attributes struktur SCREEN                      
             INDEX       TYPE I,         "Position of a column on the screen               
             SELECTED(1) TYPE C,          "Indicator 'column selected'                     
             VISLENGTH   LIKE ICON-OLENG, "Visualised length of a column                   
             INVISIBLE(1) TYPE C,         "Indicator 'column invisible'                    
           END   OF CXTAB_COLUMN,                                                                               
    BEGIN OF CXTAB_CONTROL,                                                         
             FIXED_COLS    TYPE I, "Number of fixed columns                                
             LINES         TYPE I, "Number of lines to display                             
             TOP_LINE      TYPE I, "Top line during next PBO                               
             CURRENT_LINE  TYPE I, "Current line during LOOP/ENDLOOP                       
             LEFT_COL       TYPE I, "Fist scrollable column after fixed area               
             LINE_SEL_MODE    TYPE I, "Line-selection  : none(0), single(1),               
             COL_SEL_MODE     TYPE I, "Column-selection:        multiple(2)                
             LINE_SELECTOR(1) TYPE C, "Indicator: 'With line-selection col'                
             V_SCROLL(1) TYPE C,            "not used                                      
             H_GRID(1) TYPE C,        "Indicator: 'Horizontal  grid-lines'                 
             V_GRID(1) TYPE C,     "Indicator: 'Vertikal    grid-lines'                    
             COLS      TYPE STANDARD TABLE OF CXTAB_COLUMN                                 
                            WITH NON-UNIQUE DEFAULT KEY,                                   
             INVISIBLE(1) TYPE C,                                                          
           END   OF CXTAB_CONTROL,                                                         
    Regards

  • Dynamic Tab Access Control?

    Is there a way to set up dynamic tab access control? For instance if I wanted a professor to only have Shared access to a particular tab in a course page is there a way to define the credential to indicate which tab they should have access to?
    Thanks,
    Jason

    Is there a way to set up dynamic tab access control?
    For instance if I wanted a professor to only have
    Shared access to a particular tab in a course page
    is there a way to define the credential to indicate
    which tab they should have access to?
    I haven't tried this, but I think you could create a new course template that uses the instructor and student roles, and set the access control option in that to allow an instructor shared access to a given tab. New courses based on that template would use the same permissions. I don't think there's any need to include access control information in the credential itself (as the credential is just used for authentication; iTunes U itself decides what you get to).
    Or am I missing something in your question?
    Ken

  • Dynamic creation of business graphics.

    Hi,
    i have a piece of code which dynamically create a business graphics. If i use the same node data and create BG in statically.. i am able to view the graph. In case of dynamic creation , i am getting graphical rendering error. Have i missed something here..
    The piece of code i had used is..
         IWDBusinessGraphics bg = (IWDBusinessGraphics)view.createElement(IWDBusinessGraphics.class,null);
              IWDCategory c = (IWDCategory)view.createElement(IWDCategory.class,null);
         //     c.setDescription("tableutility");      
              c.bindDescription(wdContext.getNodeInfo().getAttribute(IPrivateSDNUtilityView.IContextElement.TEST));                                                                               
    bg.setCategory(c);
              bg.setDimension(WDBusinessGraphicsDimension.PSEUDO_THREE);
              IWDSimpleSeries ss = (IWDSimpleSeries)view.createElement(IWDSimpleSeries.class,null);
              ss.bindValue(wdContext.nodeDepartments().getNodeInfo().getAttribute(IPrivateSDNUtilityView.IDepartmentsElement.NO_OF_PEOPLE));
              ss.setLabel("Simple Series");
              ss.setLabel("No of People");
              bg.addSeries(ss);
              bg.setChartType(WDBusinessGraphicsType.COLUMNS);
              bg.bindSeriesSource(wdContext.nodeDepartments().getNodeInfo());
              bg.setIgsUrl("http://<hostname>:40080");
    Please help.
    Regards
    Bharathwaj

    Please got through following link
    <a href="/people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities:///people/sap.user72/blog/2006/05/04/enhancing-tables-in-webdynpro-java-150-custom-built-table-utilities

  • Dynamic Creation of Buttons and Actions HELP

    Hi there,
    I have got a problem (or maybe even two) with the dynamic Creation of buttons. The code below creates the buttons.
    My main problem is, that the parameter created for the button's action isn't propagated to the assigned event handler. I get a null, though the name of the parameter in the event handler and the name of the parameter added to the action are the same.
    Could it also be that I'm always using the same action? I.e. does wdThis.wdGetAddElementAction() always return the same action instance? If yes, how can I create individual actions for each button?
    Any help is appreciated!
    Cheers,
    Heiko
    "    for(int i=rootContainer.getChildren().length; i<wdContext.nodeFeature().size();i++)
                   IPrivateVCT_Feature.IFeatureElement featureElement = wdContext.nodeFeature().getFeatureElementAt(i);
                   IWDTray featureTray = (IWDTray) view.createElement(IWDTray.class, featureElement.getName());
                   IWDCaption header = (IWDCaption) view.createElement(IWDCaption.class, featureElement.getName()+"_Header");
                   header.setText(featureElement.getName());
                   featureTray.setHeader(header);
                   featureTray.setExpanded(false);
                   rootContainer.addChild(featureTray);
                   IWDButton button = (IWDButton) view.createElement(IWDButton.class, featureElement.getName()+"_Button_AddElement");
                   IWDAction actionAddElement = wdThis.wdGetAddElementAction();
                   actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
                   button.setOnAction(actionAddElement);
                   button.setText("Add Element");
                   featureTray.addChild(button);

    Hi Heiko,
    You have done everything correctly....except for 1 line
    in the code...
    Replace the following line in your code:
    actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
    Replace the above line with this code:
    button.mappingOfOnAction().addParameter("featureIndex",i);
    Actually in your code, you are not associating the parameter with the button...
    Note that addParameter(...) comes with two signatures: addParameter(String param, String value) and addParameter(String param, int value). You can use any of them based on yuor need.
    Hope it helps,
    Thanks and Regards,
    Vishnu Prasad Hegde

  • Dynamic Creation Form

    Hi friends,
    Is there a way to create dynamic creation forms in ADF,in jdev 10.3.3?
    By this I mean--I need to populate a table in my DB and on my page I have an add button,
    now at each click of add button,a new creation form should be displayed on the page one below the other.
    finally there would be a Save button that would save all my entries to the table.
    I searched a lot for the same...Please do help if anybody has any ideas..
    Thnks in Advance..c ya
    kavitha
    Edited by: user6403440 on May 5, 2009 2:22 AM

    Hi,
    well, the easiest would be to create an updateable table and add new rows. If you need a form then you can use af:forEach or af:iterator with the table binding to render input form elements (more like a custom table rendering). However, its quite a bit of development that is required for this.
    Frank

Maybe you are looking for

  • MdsId=blahblah .pxml not found

    Hello I am trying to portlize an hello world ADF application but am unable to do so because of the situation describe below. I have tried all the options given on this post but nothing seems to resolve the issue. I have followed the instructions of p

  • Windows - Blinking Cursor on First Boot

    I had Vista running fine before, except for a weird issue that caused me to want to format and reinstall, this time with Windows 7. My optical drive is broken so I installed via USB DVD drive. When I boot into the Windows drive, it just appears as a

  • External Web Service in ABAP

    Hi, I want to consume External Webservice from internet in ABAP, can you pls suggest the process steps for that. when trying to generate client proxy it fails saying error 'Exception occurred in library handler'. Regards Vishal

  • My hp photosmart c5280 wont print in color

    my printer will not print in color even though i have new color cartridges.

  • XDG standards updated re MIME-type associations + default applications

    In April the XDG standards regarding Association between MIME types and applications was updated, and the changes are quite significant. For example, to specify default applications you should now list them in the [Default Applications] section of a