UI element in WebDynpro

Hi everyone,
I am trying to get the properties of a button in a webdynpro by doing :
IWDButton button = (IWDButton)wdContext.getCurrentElement().getAttributeValue("Go_ctx");
button.setEnabled(false);
I get a CastClassException.
Can someone help ?
Thanks.

Hello David,
"EP Content Development" is not really good place for questions regarding WD
Anyway, if you would like to access UI elements by name you need to implement this access in wdDoModifyView method. You have <i>IWDView view</i> as one of parameters.
Use something like:
<i>IWDButton okBtn = (IWDButton)view.getElement("btnOK");
okBtn.setEnabled(false);</i>
Cheers, Maxim R.

Similar Messages

  • UI element in Webdynpro to align the content area at the center of the page

    Hi Experts,
    I am looking for a UI element in webdynpro which can keep the entire content area aligned to the center of the page as well as can provide the borders along the content area.
    Please suggest if there exists any such UI element in webdynpro.
    P.S. We are using NWDS Version: 7.01.00
    Thanks in advance for the replies.
    Regards,
    Anurag

    Hi Anurag,
    What you can try is to put all of your UI elements in Group and then do the alignment. Set the visibility property of the group header to invisible. This will give you a border.
    Hope this solves your problem.
    Regards
    Abhinav Sharma

  • Text elements in Webdynpro for Abap

    Hi,
    Can anybody explain me how to create text element in webdynpro for abap?
    Regards,
    Soumya

    Hi,
    when you are in the component and that view, then click on menu->GOTO->TEXT symbols and maintain there.
    You can access them through this coding
    lv_str = wd_assist->if_wd_component_assistance~get_text( `016` ).
    Regards,
    Lekha.

  • Complete steps of RoadMap UI element in webdynpro

    hi all,
         Can some one tell me the complete steps of how to implement RoadMap UI element in webdynpro.
    Thanks in advance.

    Hi Amol
    I need help in implementing RoadMap.
    My code is as follows:
      public void onActionStep1(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionStep1(ServerEvent)
    final String stepId = wdContext.currentContextElement().getStepSelected();
    wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+wdContext.currentContextElement().getStepSelected());
    wdComponentAPI.getMessageManager().reportSuccess("stepId ---> "+stepId);
      if ("Steps1".equals(stepId))
         wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+stepId);
         wdComponentAPI.getMessageManager().reportSuccess("Welcome to Step 1");
      else if ("Steps2".equals(stepId))
         wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+stepId);
         wdComponentAPI.getMessageManager().reportSuccess("Welcome to Step 2");
      }else if("Steps3".equals(stepId))
         wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+stepId);
         wdComponentAPI.getMessageManager().reportSuccess("Welcome to Step 3");
      }else if("Steps4".equals(stepId))
         wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+stepId);
         wdComponentAPI.getMessageManager().reportSuccess("Welcome to Step 4");
      }else if("Steps5".equals(stepId))
         wdComponentAPI.getMessageManager().reportSuccess("step selected ---> "+stepId);
         wdComponentAPI.getMessageManager().reportSuccess("Welcome to Step 5");
        //@@end
    StepSelected is a context attribute of type String.
    RoadMap.selectedStep is binded with StepSelected
    RoadMap.onSelect event with the action Step1
    But i'm not able to display msg on selecting the step.
    The above code is from the following link:
    RoadMap!!
    9

  • Roadmap UI element in webdynpro java

    Hi,
    Can you please tell the steps, for how to use ROAD MAP UI ELEMENT in webdynpro java
    Regards,
    Boots

    use this
    http://help.sap.com/saphelp_nw04s/helpdata/en/11/01754276e4c153e10000000a1550b0/frameset.htm
    Complete steps of RoadMap UI element in webdynpro
    Complete steps of RoadMap UI element in webdynpro

  • OnSelect event for a Drop down UI Element in Webdynpro ABAP Select Options

    Hi Experts
    We have built our UI based on the webdynpro ABAP Select Options. We have a requirement that, when we change the value of a drop down box in the UI, I need to hide some fields. Can anybody help me out in handling of OnSelect event of a drop down box built using webdynpro ABAP Select Options. We are on SAP Netweaver 7.0 EHP1.
    Rrgards,
    Srikanth.
    Edited by: Srikanth Kancherla on Apr 29, 2010 10:43 PM

    Hi Srikanth,
    as you seem to be already aware, the component is dynamically built.
    so you would have to enhance the code that builds the element and insert a reference to a new action (enhancement) that could handle the onSelect event.
    What is it about this that you particularly want help with?
    Cheers,
    Chris

  • Event handling in Network UI element in Webdynpro

    Hi ,
       I am developing a hierarchial graph using Network UI element.I want to incorporate event handling so that the graph will respond to user actions like on double clicking a node an URL will be opened.I can notproceed with the event handling.
                         Can anyone tell me the procedure to do this from webdynpro java.
    Regards
    Nayeem

    Hi Nayeem,
    The Network UI element has lots of events defined for it which can be handled to get the desired functionality.
    Go to the View in which you have added the Network Element, select the Element and go to the
    properties tab.
    Under events , you can see a list of events defined for this UI element.
    Select the event you wish to handle and press the Create button which gets visible once
    an event say onNodeSelected is selected
    You can then give a name to the action say UserClicked and save it .
    In the properties tab of the UI element , the action will be registed against the event .
    Now select the event again and press the go button.
    It will redirect you to the java editor of the view where in you can place your event handling logic.
    Alternatively, if you have created the UI element dynamically then you can add the event to the UI element by using the following code
    IWDNetwork network = (IWDNetwork)view.createElement(IWDNetwork.class);
    network.setOnNodeSelected(/*Your Action handler already defined in the View*/);
    Regards,
    Ashish

  • Table ui element in webdynpro java.

    Hi Friends,
    I am krishna i am working as sap webdynpro abap consultant . But right now i got the requirement on sap webdynpro java.  
    so please give me the required details.
    Here are my questions.
    1. how to populate the data into the table.
    2. and the back end is erp, i have to use rfc. to display the data into the table .
    3. so how to integrate the rfc into webdynpro java.
    if u send with screen shots that would be very help for me.
    Waiting for your reply.
    Thanks & Regards.
    Krishna.

    It's very simple.
    1) Import your RFC.
    For this:
    -Right click on Models->Create Model->Select Import Adaptaive RFC then follow the steps.
    -Go to Used Models. Right click -> Add... -> then select the model that you created.
    2) I guess you have a view that is using a controller (Custom/Component) so:
    -Go to Context Tab-
    -Create a model node.
    -Bind the model node with the model that you created.
    -Go to the view where you want to put the Table ui element and add the table (Outline window->right click->Insert Child->Table)
    -Go to context tab, add a model node, en map it (Edit context mapping) with the model node that you created in the controller.
    -Go back to layout tab. Then in table properties, in datasource click on the "..." and select the output node of the model that you have created in the view.
    -Then in Outline Window-> Right click on the table element-> Create binding-> check the attributes that you want to be binded to the table.
    -Then follow the steps.
    You have now your table binded to the rfc.
    Finally what you have to do is to create a method to execute the rfc. Usually it is written in the controller. Something like this:
    public void execute<YourBapiName>( )
        //@@begin execute<YourBapiName>()
         IWDMessageManager manager = wdComponentAPI.getMessageManager();
         try
           wdContext.current<YourBapiName>Element().modelObject().execute();
           wdContext.node<YourBapiOutputNode>().invalidate();
           wdContext.current<YourBapiName>Element().modelObject().modelInstance().disconnectIfAlive();
         catch(WDDynamicRFCExecuteException e)
           manager.reportException(e.getMessage(), false);
        //@@end
    To call this method, first, you have to bind the input parameters and then execute it (you can do this wherever you want):
    <YourBapiName> input = new <YourBapiName>();
    input.set<YourBapiParameters>(<YourParameter>);
    wdContext.current<YourBapiName>Element.bind(input);
    wdThis.wdGet<YourControllerName>(Controller().execute <YourBapiName>();
    I hope it helps.
    Bye bye.

  • PageHeader UI Element in WebDynPro ABAP

    Hi,
    We are not using SAP Portal and want to make modifications to the e-recruiting webdynpro applications.
    We want to change the color and font size/ type of the pageheader UI element in ABAP WebDynpro.
    The eclipse theme editor does not show the PageHeader element. Hence there is no possibility of that being changed in the eclipse theme editor.
    Is there any other way we can do it? Has anyone found a solution to this issue? I've searched SDN but could not find anything that can point me to the solution.
    Need your expert advise as soon as possible.
    Regards,
    Sanjiv Tyagi

    HI Roman,
    Sorry for the late response. Here are the details that you wished to know.
    Software Component..........Release..........Level..........Heighest Support Package
    SAP_ABA............................700.................0020..........SAPKA70020
    SAP_BASIS..........................700................0020..........SAPKB70020
    ERECRUIT..............................603...............0005..........SAPK-60305INERECRUIT
    Let me know if you could find something.
    Thanks,
    Sanjiv

  • How to Create our own Custom Design for UI Elements in WebDynpro Java

    Hi Experts,
    As of now i am using the Standard design for the  UI Elements in the WebDynpro Java Applications.
    For example:
    header1,header2,monospace etc are available in design for UI Elements.
    Now i want to give my custom design to the UI Elements.
    So how can i create this. and Is it possible to create in NWDS.
    Thank You.
    DS

    Hi DS
    Eclipse Theme Editor for NetWeaver 2004
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a026b4ce-de48-2a10-7285-fb457ee6c7ed
    Eclipse Theme Editor for NetWeaver 7.0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/136dd890-0201-0010-1b9d-bd09a0d3b1d8
    Hope this will be use ful for u
    Regards
    sriram

  • E-Recruiting: New Text element on WebDynpro page of External candidate

    Hi,
    I have a requirement to add a new text element on the personal data tab of the candidate profile. I have tried this through application configuration method, but the existing Text elements are not sufficient to accomodate the text matter that i need to insert.
    I want some additional elements where they can accomodate my new text.
    Is there a possibility of doing this without making the compeonent a 'Z' one?
    Thanks,
    Suresh

    Hi Suresh,
    Yes there is one possibility to do this .After you accomodated the new text thru the component config and
    if you are still left with the text which needs to be added then create an enhancement and add an text element and bind it to the attribute just below the text element required and in the modify view method of the view bind the text to the attribute.
    All this has to be done thru enhancement in the std component.
    Thanks & Regards,
    Dipu.B

  • Searching for a UI element in WebDynpro

    Hi guys,
    I would like to have a toolbar like in Service Marketplace when you log a message to SAP. There's the roadmap UI element at the top (Choose system, Prepare solution search...), after there is an horizontal gutter and then there is a toolbar with buttons likes save messages, sent message. The background of the toolbar is blue. How do I create this toolbar. In web dynpro, toolbar can be inserted inside a tray or group but here there is not tray or group UI element. I can create a button row but how to set up the background as blue like the in the toolbar, how do SAP create that?
    Thanks
    Alex

    Alexandre Giguère wrote:
    > Thanks, but when I right click on the rootuielement to insert an element, I don't have the option to add a toolbar. Maybe it's a new functionnality.
    >
    > We are on SAP_ABA SP 15, the toolbar option is not there, I mean, I can't insert the toolbar as a standalone UI element.
    >
    > Alex
    I didn't think it was newer functionality, but evidentally it is. I'm running 7.0 EnhP1.  When I right click on ROOTUIELEMENT and choose insert an element, toolbar is one of my options.

  • What is the maximum File size Limit in FileUpload UI element in Webdynpro JAVA/ABAP??

    I need to upload file with more than 15,000 records, which can exceed more than 1 GB.
    Regards,
    Sakthi

    It's an UI element but apparently only in WDA. I guess SAP hasn't back ported it to WDJ as confirmed by SAP note 1145874. See also SAP note 1303325 regarding limitations of FileUpload control in WDJ. Maybe there is a Java EE solution you could leverage. Another option would be to look into Multiple File Upload of KM or even cFolders.

  • Set the maximum length of textedit element in webdynpro

    Hi All,
      How to set the maximum length of texedit element to a some constant characters.setting col and row property to 10 and 2 didnot set max length to 40.setting width and height also didnt helped to limit the characters user can enter to 20.
    Thanks,
    pkv

    >
    pkv wrote:
    > Hi All,
    >
    >   How to set the maximum length of texedit element to a some constant characters.setting col and row property to 10 and 2 didnot set max length to 40.setting width and height also didnt helped to limit the characters user can enter to 20.
    >
    > Thanks,
    > pkv
    Hi,
    Setting row and height is for layout purposes and not for the limiting of text in a TextEdit UI Element.
    To ensure that the Text Exit has only 40 characters in 04s - you can do as Alka has suggested.
    For doing the same in CE 7.1 - you can use the onChange Action and write code inside that method to limit the number of characters.
    I would suggest that you use IWDMessageManager to show a message in the MessageTray whenever the user goes over the limit of 40 characters - rather than accept the whole text and then show some sort of popup.
    Thanks.
    p256960

  • How to  disable a table UI element of Webdynpro  for java

    Hi friends,
    I am having the following scenario regarding the table element.
    I am having  two buttons  "createTask" and "EditTask" . in taskView
    when i click the the  create button the table should not visble and on click of the EditTask button the table has to visible with  filled rows.
    please help ful regarding the same ASAP.
    thanks and regards
    Ratnakar reddy

    Hi Abhijeet,
    I followed all the steps  which you suggested.but the problem is at the time of binding the visibile  property of  table with the context attribute .
    first i created the  simple attribute of type visibility in the local dictionary and then created a context attribute in the view and  bind the property of  context attribute with  local dictionary's visibility attribute  which i have  created  in first step .
    But i  am not able to select the  context attribute because it is asking like selecte  the attribute type Vibsibility.
    here only i am basically getting strucked
    thanks and regards
    Ratnakar

Maybe you are looking for