What to do to add some UI elements in a group element on click of a button?

I want to add Input fields and labels in the a group in a view on click of a button.
How to :
1)Access the right gropu in view through code?
2)Create elements in the group through code?
Please reply soon!
Sumit

You need a flag to signal that the elements should be added with the next call to wdDoModifyView().
Add a boolean context attribute "AddFields" to the view context and set it to true in the action handler for the button:
void onActionAddFields(...)
  wdContext.currentContextElement().setAddFields(true);
In method wdDoModifyView(), check the flag and reset it after the code that adds the fields:
(I assume the group has a MatrixLayout)
static void wdDoModifyView(...)
  if (wdContext.currentContextElement().getAddFields())
    /* access group by ID given at designtime */
    IWDGroup group = (IWDGroup) view.getElement("groupID");
    IWDLabel label = (IWDLabel) view.createElement(IWDLabel.class, null);
    /* if new row in MatrixLayout should be started: */
    IWDMatrixHeadData labelLayoutData = label.createLayoutData(IWDMatrixHeadData.class);
    /* change settings for layout data if needed */
    label.setText("whatever");
    IWDInputField field = (IWDInputField) view.createElement(IWDInputField.class, null);
    /* if in same row as label: */
    IWDMatrixData fieldLayoutData = field.createLayoutData(IWDMatrixData.class);
    /* change field layout data if needed */
    field.bindValue("context.attribute.path");
    label.setLabelFor(field);
    group.addChild(label);
    group.addChild(field);
    wdContext.currentContextElement().setAddFields(false);
Armin

Similar Messages

  • Javascript code to add current date and time in a textfield on click of a button

    Hi,
    I have done a lot of googling .....But could not found a viable solution to populate a text field in LC Designer ES 8.2 and above at runtime with the current date/time. on click of a button. I need Javascript code and not formcalc.
    Please help .
    Thanks
    Kapil

    I have found a solution for you - 3 variants for you:
    Textfeld1.rawValue = util.printd("dd.mm.yyyy HH:MM", new Date());
    Textfeld2.rawValue = util.printd("dddd d. mmmm yyyy HH:MM ", new Date());
    Textfeld3.rawValue = util.printd("date{EEEE, D. MMMM YYYY} time(de){HH:MM:SS Z}", new Date(), true);
    I hope this is helpfull,
    Mandy

  • When I double clicked the home button my screen changed to what looks almost like a picture negative (muted colouring) I turned it off and on but noo luck. How do I get back to my usual screen colours? Thanks for your help!).

    First time using the Apple Support Community. Trying to reset my screen so colors don't look like what can only be described as a picture negative. I recall double clicking the home button when this happened before but as that didn't work  this time would be grateful for some help. Many thanks!

    So when you triple tap the home button then it goes to negative colors, it is simple to go back. All you have to do is triple tab the home button again and it will go back if it doesnt then, go to Settings>General>Accessibility>And then switch off Invert Colors

  • I just made the switch to mac. I am have installed all the new PS6 CC and bridge and I am now trying to add some presets to my  ACR but when I search for the folder to place them it is not there.  From what I researched it says it should be under camera l

    I just made the switch to mac. I am have installed all the new PS6 CC and bridge and I am now trying to add some presets to my  ACR but when I search for the folder to place them it is not there.  From what I researched it says it should be under camera library/application support/adobe/camera raw/settings but I can only get to library/application support/adobe/ and then there are two different camera raw options I have checked both and there are not settings folder. If anyone can help me please thanks

    Apple most likely has the same poor taste that Microsoft does when it come to defaults.  Microsoft likes to hide things like  settings, preset, folders etc from normal users  think the dumb or something else.  If Apple also hide things you will have to  make some system setting changes that will allow Finder to do it job and find it for you.

  • Dynamically add some elements in WebService operation request

    Hi, 
    I have a WebService element defined in my mxml which use to make soap calls. 
    I need to dynamically add some repeating groups for action (dependent on action) in the following example. 
    How can I add this in Action Script section? Can I access the WebService  by id userRequest and specify " 
    userRequest.operations.DoAction.request.DoItemActionRequest.action.requiresAdditionItems.n ameValuePair.name = "SomeName"; 
    userRequest.operations.DoAction.request.DoItemActionRequest.action.requiresAdditionItems.n ameValuePair.name = "SomeValue";  
    <mx:WebService  id="userRequest" wsdl="{Application.application.wsdl}" > 
         <mx:operation name="DoAction" resultFormat="object" 
          fault="faultHandler(event)" 
          result="DoActionHandler(evnt)">
            <mx:request> 
              <DoActionRequest> 
                 <userId>{Application.application.userID}</userId> 
                  <action> 
                     <actionId>{selectedItem.actionId}</actionId> 
                 </action> 
              </DoActionRequest> 
             </mx:request> 
           </mx:operation> 
    </mx:WebService>
    Thanks,
    Amitava

    Hi miguel8312,
    Thanks for your suggestion. I understand the steps you explained for defining, calling and processing the result from a webservice from a MXML body.
    My query is specifically, can I modify the webservice request defination from AS function before making the call?
    In my example, if I need to dynamically add a name value pair for <action> tag (e.g. actionParam ), how do I do that?
    Thanks,
    Amitava

  • How do I add an outline around an image in Elements 10

    I have an image that I created via Elements 10... The main body of the image is black and I am wanting to add a white outline around the image so I can place the image on a black background... Can someone advise how to add an outline including colorizing the outline around the image... Thanks

    Depending on what you want, you may need to add some canvas to give the border a place to be (Image>Resize>Canvas Size) but you can just press Ctrl+A/Cmd+A to select all, then go to Edit>Stroke (outline) selection, where you can choose the parameters of the border stroke. You can't choose Outside for the location, though, since that would put it off the canvas entirely where it wouldn't be visible.

  • Is there a way of determining what element in an array is being clicked on?

    Hi all.  I would like to setup an event to determine what element in an array is being clicked on/hovered over.  I think I tried this before and found it wasn't working due to limitations of LV 7.0.  If this code already exists, it would be great if I don't have to do a scavenger hunt for the solution.
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    The second possiblity is to get the on click event, and somehow determine which element in the array it is.  This doesn't sound too difficult as it should be a simple calculation, but may get in to some hairryness based on if the indicies are visible or not, and if I am using a new or old array with new or old control (calc would change based on boarder size of the controls).  I might just simplify it by removing indicies and using older control set which has minimal boarder size.
    And just for fun, can I force a tool tip to show up?
    Thanks all,
    A
    Using LV7.0 on WinXP.

    blawson wrote:
    Been bitten by LabVIEW wrote:
    I think one possibility I nixed was to use the refnum of the elements to determine which one it is.  IIRC, this is not possible because the refnum of the element is for the edit box only.
    Using LV7.0 on WinXP.
    This is indeed possible, at least in the newer versions I use.
    Take the array refnum from the click event data terminal and get a reference to the array element.  This refers to the element that was clicked, but you do need to work out how to get the index.  My method is to use property nodes to get the screen position and size of the element and the screen position and size of the array, as well as the array's Visible Index property. For each direction, take the quotient of the relative position of the element (account for padding!) over the size of an element.
    I suspect that taking the mouse coords and comparing to the array's sizes in pixels is similar, although I trust my method for events that don't have mouseclicks (what coords does Array:shortcut menu selection(User) return if you used the keyboard?)
    Here's an old version I happened to have open.  I've posted about this before, I suspect I have a clearer version in my gallery.  I use this method in my example code contest entry to work out which square of the chessboard is clicked.
    Thank you for that one!
    I am currently "locked up behind a down-rev fence" (working an old app in an old version) so I had not heard of that.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Want to add some animated 3D visualizations to my Keynote Presentation

    I want to kick my Keynote presentation up a notch and add some animated 3D visualizations to further enhance my design explanation. It would involve creating some basic 3D models from scratch and then animating a sequence to explain how it is put together along with some other effects.
    Can this be done in Final Cut Studio 2? or do I need to look further? Anybody know what my options are?
    Thanks,
    Bill

    Bill ~ I haven't worked with 3D, but Final Cut Studio 2 includes _Motion 3_ which appears to allow only 2D objects (images & video) to be animated within a 3D space. If that's so, then _Maxon Cinema 4D_ may provide what you're looking for. More sources for Mac animation s/w is here:
    http://www.pure-mac.com/3d.html
    http://www.apple.com/downloads/macosx/imaging_3d/index.html

  • I am trying to add some new software and am told I have an incorrect software that I already confirmed is correct.  Can anyone help???

    I am trying to add some new software and am told I have an incorrect software that I already confirmed is correct.  Can anyone help???

    Please confirm you are actually running the ancient OS 8.6.
    What software is this?

  • WAN TO ADD SOME FIELDS IN EAN CATEGORY TAB" in Service Master.

    Dear Experts,
    There is clients requirment regarding EAN Category in Sevice Master. My actual  requirement is " I WAN TO ADD SOME VALUES  IN EAN CATEGORY  FIELD " in Service Master. Can some one guide me how can this possible. What are config is requires?
    I am waiting for reply. Thanks in advance
    Regards,
    Manzoor Ahmad

    Hope this link will help you
    Add a field in Material Master-QM view

  • Can We Add Some More Fileds To the Imported IDOC ??

    Hi All,
    Can We Add Some More Fileds To the Imported IDOC ??
    If I Imported IDOC to IR. But I Want to Add Some More Fields To IDOC.
    Then Can I Go For this Process ??? Is This is Correct ???
    Please Correct Me If Iam Going Wrong
    1) Open the Imported IDOC in IR
    2) Export it as XSD File in to your Local Machine
    3) Add Necessary Fields & Save it
    4) Come to IR And Import it into external definition
    Is this is the Correct way of Doing ???
    If Not What is the Problem in Doing This ??
    Regards
    Vamsi

    Hello Vamsi,
    That is NOT the correct way to play around with IDOCs.
    the correct way is to create an enhancement to an exiting IDOC (this is done on the SAP R/3 side) after you craeted an enhancment you reimport the IDOC in XI from the R/3 and then you have a new structure with the new fields you need.
    worst case scenario you can define a new IDOC type just with the fields you need.
    you can check out the SAP library at http://help.sap.com/saphelp_erp2005/helpdata/en/0b/2a60bb507d11d18ee90000e8366fc2/frameset.htm
    on how to do that.
    Have a good one,
    Uri Lifshitz.

  • WANT TO ADD SOME FILELDS IN BDC

    Hi
      experts can u please tell me that can we add some fields in bdc.like i have created a bdc
    program using transaction va02.but in that tracking no. & supply plant has not been working we have to explicitly fill those area for execution.so experts what should i do.

    iu can get the screen number and screen fieldname in Va02. and can insert in the BDC program.
    PERFORM bdc_dynpro      USING 'SAPMF05L' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05L-BUKRS'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'RF05L-BELNR'
                                  '3000959712'.

  • How to add some reference into naming/ejb service?

    are there some ways to add some reference into naming/ejb service for them to visit my library/interface/service.
    thanks for your reply.

    I am not sure of what you are asking, can you elaborate please?
    Check out the "Application Reference" concept at <a href="http://help.sap.com/saphelp_nw04/helpdata/en/28/c9a3a9606f434ea757a3536d220704/content.htm">Application references</a>
    Regards,
    Kiran

  • Want to add some neat Flash "things" to a site

    I want to add some neat little Flash things to my site... I
    don' t know exactly what... but where are some good FREE sites that
    have flash. I don't know Flash... but I know how to add it into
    Dreamweaver.
    Thanks - Angie

    > Ahhh Darrel... come on.... you have any good free flash
    sites up your
    > sleeve?
    > hahahahahaha
    Sorry, I'm a form follows function kinda person. ;o)
    -Darrel

  • Help need to change black & white pic to add some color?

    I have Adobe Photoshop Elements 8 and Im tryin to find where I can take a black and white pic I took today few of and want to add some color to few areas on it like flowers ect..
    Ive been tryiin to find out where it says in the book but I cant find it.
    Also, how does one place a watermark of somekind on my pics like a small one down in a corner?
    Thanks, appreciate it!

    There are several ways to do this. Here are a few.
    One way, is to create a blank layer over your image. Change this blank layer's blend mode to either color blend mode or soft light blend mode. Use the paint brush to apply color(s).
    You might also consider using a Hue/Saturation adjustment layer over your image.  If you have a color in mind, make that your foreground color in the tool box before you create a hue/saturation adjustment layer. After you create the layer, change it's blend mode to either color or soft light. Fill the mask with black to hide the effect. Grab the paintbrush tool and select white as your foreground color. Paint where you want color applied to your photo. (If you over paint switch to black and paint over mistakes.) You can apply a little bit of Gaussian blur on the mask to make the edges transition from black and white to color smoother.)
    Another possibility is to duplicate your image then use color variations to color the duplicate. Once happy with the coloration, use eraser to remove color you don't desire or better yet use a clipping mask with an adjustment layer as the base so you can mask the image and use black/white paint to define areas that will be colored.
    Clipping mask reading material:
    http://www.photokaboom.com/photography/learn/Photoshop_Elements/layers/layer_groups_clippi ng_masks/1_layer_groups_clipping_masks.htm
    http://help.adobe.com/en_US/PhotoshopElements/8.0/Win/Using/WSae2ea3b149d0c3591ae939f10386 0b3d59-7f86_WIN.html

Maybe you are looking for

  • Getting ORA-27102: out of memory while creating DB using DBCA

    Hi All, I am working on 11.2.0.3 oracle version and linux OS. I am trying to create a new database using dbca and getting error "ORA-27102: out of memory". Please find the DB version and OS level parameters info below and let me know what i need to d

  • Using UTL_HTTP.GET_RESPONSE function (PL/SQL)

    Hello, I have a problem using the UTL_HTTP.GET_RESPONSE (URL, 'POST') function while I try to call a function that returns an XML; The function returning my XML is: FUNCTION MyFunction return XMLTYPE is begin return XMLTYPE('<PROVA>test</PROVA>'); en

  • Hooking up a PC and Macbook to 1 firewire harddisc

    I still got an old pc for some stuff for school and audio. I would like to be able to hook both my macbook and my pc up to 1 firewireharddisc to easily exchange files. Is such a thing possible? what equipment do i use?

  • Why is the LCMCLI ignoring my use of the "-includeSecurity=true' parameter?

    I'm using the LCM Command Line Interface (LCMCLI) to promote content (e.g., AOLAP reports, Webi reports, etc.) between CMS environments. The objects' User Security includes the BI Platform's built-in groups as well as mapped Active Directory groups.

  • Can't install XP Pro on Satellite A200-25H

    Can't Install XP Pro on Satallite A200-25H During F6 install XP pro i use USB floppy drive and Intel 82801 HEM/HBM SATA AHCI drivers, and it lets me format drive NTFS. Then asks for Intel Matrix Storage Manager Driver. in Drive A:. THe Bios wont allo