UI Element mapped to Model Context is ReadOnly

Hi,
I have a webservice mapped to a model, that performs read/ write operation on an excel sheet.
Problem Statement  :
1) I have binded the model to a particular component in my webdynpro application
2) I have a view that takes value in the input field - and this is mapped to a model function insert.
The problem lies here : The input field is not accessible - I am not able to insert any value, it's deactive.

there is two solutions:
1) you have to specify input for all the parameters in the input field of the model.
or
2) create value attribute and accept user input in the value attribute, then assign those values to the model parameters before executing the model
the second way is good.
regards,
nikhil

Similar Messages

  • Webdynpro model context mapping issue

    Hi,
    I have created a faceless Web Dynpro model component (DC1) and an UI Component (DC2).
    DC1 is an used component in DC2.
    After mapping the model node from the interface controller of DC1 to DC2 it says "Referenced model class is missing".
    I asume, I should add the model as used model to DC2 as well.
    But when I proceed this way I am wondering why you should create a seperate model Web Dynpro DC? Where are the Pros?
    Can anybody tell my how to proceed with this issue?
    Are there any best practices how to use a central model DC in Webdynpro and access the data via interface mapping from other DCs?
    Thanks ahead

    Hi Bernd,
    For reusability, model component and functional components are seperated. In model component, all the model created which are used for all func components. and In Func component usage model component based on the requirement to use number of model that web dynpro componetization
    >But when I proceed this way I am wondering why you should create a seperate model Web Dynpro DC? Where are the Pros?
    Can anybody tell my how to proceed with this issue?
    For seperation of business logic model component from visual component.
    Componentization, resualbilty, easy to maintain etc
    Are there any best practices how to use a central model DC in Webdynpro and access the data via interface mapping from other DCs?
    Please refer to [Here |http://www.williamcui.com/blog/resources/principles_patterns_and_practices_in_web_dynpro_for_java.swf] and go through [Articles|http://www.sdn.sap.com/irj/scn/articles-webdynpro-all?startindex=161] and [Blogs|http://www.sdn.sap.com/irj/scn/weblogs?blog=/weblogs/topic/43] and [Wikkies|http://wiki.sdn.sap.com/wiki/display/WDJava/WelcometoWebDynproJava%21]
    Hope it helps
    Regards
    Arun

  • Passing Parameters to Webservice model context--Exception in execution

    Hi
    I have a problem while passing the values to the webservice model context.I have 9 input fields in my view 5 of them binded to directly to the model context after mapping. 4 input fields i have binded to seperate node of cardinality 1:1.
    My structure is like this
          Req_Identity_In(model root node)
            Req_Ide_SYNC (Input node of model)
                  Identity( node )
                 UserAccount(node)
                  PersonalAddress(node)
                     PersonName(Node)
                             |
                          givenname,middlename,familyname etc (Attributes)
    This structure is similar to bapi user create ECC Function module after exposing as a webservice.
    I am using the following code for bindings
    ==================
           String givenName = wdContext.currentPersonNamesDataElement().getGivenName();
           String middleName = wdContext.currentPersonNamesDataElement().getMiddleName();
           String familyName = wdContext.currentPersonNamesDataElement().getFamilyName();
           String additionalFamName = wdContext.currentPersonNamesDataElement().getAdditionalFamilyName();
           //getting the data from user for personNames
           //passing the data
           UserAccountCreateModel userAccountCreateModel = new UserAccountCreateModel();
          Request_IdentityUserAccountCreateRequestConfirmation_In request_IdentityUserAccountCreateRequestConfirmation_In = new Request_IdentityUserAccountCreateRequestConfirmation_In(userAccountCreateModel);
           IdentityUserAccountCreateRequestMessage_Sync identityUserAccountCreateRequest_Sync = new IdentityUserAccountCreateRequestMessage_Sync(userAccountCreateModel);
          request_IdentityUserAccountCreateRequestConfirmation_In.setIdentityUserAccountCreateRequest_Sync(identityUserAccountCreateRequest_Sync);
          IdtUsrAcctCrteReq_SyncIdt identity = new IdtUsrAcctCrteReq_SyncIdt(userAccountCreateModel);
          identityUserAccountCreateRequest_Sync.setIdentity(identity);
              IdtUsrAcctCrteReq_SyncUsrAcct userAccount = new IdtUsrAcctCrteReq_SyncUsrAcct(userAccountCreateModel);
              identity.setUserAccount(userAccount);
              IdtUsrAcctCrteReq_SyncDfltSettings defaultSettings = new IdtUsrAcctCrteReq_SyncDfltSettings(userAccountCreateModel);
              userAccount.setDefaultSettings(defaultSettings);
              java.util.List<NOSC_PersonalAddress> personalAddress = new ArrayList<NOSC_PersonalAddress>();
              userAccount.setPersonalAddress(personalAddress);
              NOSC_PersonName personName = new NOSC_PersonName(userAccountCreateModel);
              //kalyan
              //create the personalAddress model
              NOSC_PersonalAddress personalAddrModel = new NOSC_PersonalAddress(userAccountCreateModel);
              //create a element for PersonalAddress Node and node element.
              IPersonalAddressNode paNodeRef = wdContext.nodePersonalAddress();
              IPersonalAddressElement paNodeEle = wdContext.createPersonalAddressElement(personalAddrModel);
              //creating an element in Personname subnode and pass the data
              IPersonNameNode personNameNodeRef = paNodeRef.nodePersonName();
              IPersonNameElement personNameEle = personNameNodeRef.createPersonNameElement(personName);
              personNameEle.setGivenName(givenName);
              personNameEle.setMiddleName(middleName);
              personNameEle.setMiddleName(familyName);
              personNameEle.setAdditionalFamilyName(additionalFamName);
              //personNameNodeRef.addElement(personNameEle);
              //add the PA element to the PA node
              paNodeRef.addElement(paNodeEle);
              //add to the list
              personalAddrModel.setPersonName(personName);
              personalAddress.add(0, personalAddrModel);
              //kalyan
              NOSC_BasicBusinessDocumentMessageHeader messageHeader = new NOSC_BasicBusinessDocumentMessageHeader(userAccountCreateModel);
              identityUserAccountCreateRequest_Sync.setMessageHeader(messageHeader);
              Response_IdentityUserAccountCreateRequestConfirmation_In response = new Response_IdentityUserAccountCreateRequestConfirmation_In(userAccountCreateModel);
              request_IdentityUserAccountCreateRequestConfirmation_In.setResponse(response);
              IdentityUserAccountCreateConfirmationMessage_Sync identityUserAccountCreateConfirmation_Sync = new IdentityUserAccountCreateConfirmationMessage_Sync(userAccountCreateModel);
              response.setIdentityUserAccountCreateConfirmation_Sync(identityUserAccountCreateConfirmation_Sync);
              NOSC_Log log = new NOSC_Log(userAccountCreateModel);
                  identityUserAccountCreateConfirmation_Sync.setLog(log);
                  java.util.List<NOSC_LogItem> item = new ArrayList<NOSC_LogItem>();
                  log.setItem(item);
                  wdContext.nodeRequest_IdentityUserAccountCreateRequestConfirmation_In().bind(request_IdentityUserAccountCreateRequestConfirmation_In);
           //passing the data
           wdThis.wdGetUserCreateCompController().executeIdentityUserAccountCreateRequestConfirmation_In();
           //success
           //wdComponentAPI.getMessageManager().reportSuccess("The user created successfully");
    ================================================
    After executing i am getting the error like this
    Exception on execution of web service with WSDL URL 'http://<host>:<port>/sap/bc/srt/wsdl/bndg_DDB660678B8DB6F1934200142220669B/wsdl11/allinone/ws_policy/document?sap-client=XXX&sap-user=XXXXX&sap-password=XXXX' with operation 'IdentityUserAccountCreateRequestConfirmation_In' in interface 'IdentityUserAccountCreateRequestConfirmation_In'
    Is there any wrong in the code while passing the values to the model.
    What are the possible causes for this exception.
    Regards
    Kalyan

    I am no more working on this.

  • How can I create an element in the model node?

    Hi, Experts,
    I create a model node that name is containerNode in the contxt. Cadinility is: 1..n
    I write the code in the method:
      private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){
           String betrgSumStr = "";
         int index = 0;
         Vector containerVector = new Vector();
         int size = wageTypePayslip.size();
         IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.
         BigDecimal betrgSum = new BigDecimal( 0 );
    I try to create a element in the containerNode, But the system report error when I run the application.
    java.lang.IllegalArgumentException: model object must not be null
         at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)
         at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)
         at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)
         at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)
         at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)
         at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)
         at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)
         at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)
         at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
    How can I create an element in the model node ?
    Best regards,
    tao

    Hi,
    You need to execute the model before creating the element.
    Regards
    Ayyapparaj

  • How to add a new element to a model node in the view controller?

    View Context
        myNode
             attri1
             attri2
    myNode is a web service model node. How to add a new element to this node?
    Regards,
    Hui
    Edited by: Hui Wang on Feb 15, 2008 12:05 PM

    Sudhir Gorantla wrote:>
    > Hi,
    >
    > myNode
    > attri1
    > attri2
    >
    > IMyNodeElement ele=wdContext.myNode().createMyNodeElement();
    >
    > ele.setAttri1("");
    > ele.setAttri2("");
    >
    > wdContext.nodeMyNode().addElement(ele);
    >
    > Regards,
    > Sudhir
    Hi we need a model as an input parameter when creating a element for a model node. How to get the instance of the model?
    Regards,
    Hui

  • Search help does not work when view context is mapped to comp context

    Hello,
    I am trying to display search help for an input field of a view. The context to which the input field is bound is a node with an attribute. I have specified Dictionary Search help for the attribute. Now when I execute the application, I am able to get the search help in the screen.
    But, I  need to map this  view context node to its comp controller context. When I do the mapping, the search help does not appear when executed.
    It would be a great help if someone can point out an answer to this.
    Thanks,
    Maya

    Hi Maya
    Follow these steps:
    1.Delete the context node/attribute which is bound to search help from the View.
    2.Now Save metadata.
    3.Perform Context mapping again .In the Edit Context Mapping window drag the node/attribute FROM RIGHT PANE TO LEFT PANE and select the entry.
    4.Delete the Input Field from the view.
    5.Save again
    6.Close NWDS and reopen it.
    7.Create input field again and bind it to the context element.
    Hope this solves the problem.
    Regards
    Ananda

  • Pass value between model context

    Hi,
    i want to pass output of the one model contex attribute to another model context attribute input.
    >Test1ModelNodeInput
      > OutputNode1
        > Node1
           --Attr1(output model attribute)
    >Test2ModelNodeInput
    >OutputNode2
    --Attr2(input model attribute)
    Regards
    Anumit

    Hi Anumit,
    To copy data from master node to target node
    try
    IPrivateDialogView.ITargetNode TargetNode = wdContext.nodeTarget();
    IPrivateDialogView. IMasterNode masterNode = wdContext.nodeMaster();
    int size = masterNode.size();
    for (int i = 0; i < size; i++)
    IPrivateDialogView. IMasterElement masterElement = (IPrivateDialogView. IMasterElement)wdContext.nodeMaster ().getElementAt(i);
    IPrivateDialogView.ITargetNode node = wdContext.nodeTarget();
    IPrivateDialogView.ITargetElement element = node.createTargetElement();
    WDCopyService.copyCorresponding(masterElement, element);
    node.addElement(element);
    catch(Exception e)
    e.printStackTrace();
    or you can use this code also
    try{
    WDCopyService.copyElements(wdContext.nodeMaster(),wdContext.nodeTarget());
    catch(Exception e)
    e.printStackTrace();
    Re: Displaying Data in Table
    Regards,
    Mithu

  • How can I add values on a Drop Down by Index Webdynpro Element by a Model?

    How can I add values on a Drop Down by Index Webdynpro Element with a Model RFC?

    Hi Jesus,
    Please use the below code for DropDownByIndex Elements :-
    Suppose you have model node ABC and attribute xyz. Now you have created custom node CustNode and attribute CustAtt.
    ICustNodeElement  ele = null;
    if(wdContext.nodeABC().size > 0)
                  for(int i=0; i< CustNode< wdContext.nodeABC().size; i++
         ele = wdContext. createCustNode();
                          ele.setCustAtt(wdContext.nodeABC().getABCElementAt(i).getXYZ)
         wdContext.nodeCustNode.add(ele);
    Refer to http://help.sap.com/saphelp_nw70/helpdata/en/3b/f1754276e4c153e10000000a1550b0/frameset.htm
    Best Regards
    Arun Jaiswal

  • Message mapping - Map 2 source contexts into one target context

    Hi,
    I have an issue as follows:
    Source context 1 (defined as 1.....unbounded)
    Source context 2 (defined as 1.....unbounded)
    Target context 1 (defined as 1.....unbounded)
    I need to map both source contexts into the single target contexts.
    For example....
    Source context 1 has 3 entries
    Source context 2 has 2 entries
    Target context would have 5 entries in total (Source context 1 and Source context 2)
    I have only limited knowledge of working with multiple contexts so need a bit of advice.
    Can someone provide an easy way to do this ? I'm sure there is.
    Cheers
    Colin.

    The answer is quite simple.
    Right-click on the target node in the mapping editor and select the option "duplicate subtree".
    You will then have two destination nodes.
    Now you can map source1 to target1 and source2 to target2

  • Override the element mapped in the IMPL.xsl file to NULL in CUSTOM.xsl

    Hi Guys,
    we are trying to override the element mapped in the IMPL.xsl file to NULL in CUSTOM.xsl file using call template. But we are getting the target mapped twice instead of overriding. kindly help.
    IMPL.xsl_
    <db:LONG_DESCRIPTION xml:id="id_102">
    <xsl:value-of select="corecomEBO:RevisedItem/corecomEBO:Description" xml:id="id_103"/>
    </db:LONG_DESCRIPTION>
    <xsl:call-template name="LONG_DESCRIPTION_Custom"/>
    Custom.xsl_
    <xsl:template name="LONG_DESCRIPTION_Custom">
    <db:LONG_DESCRIPTION xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/INV_EBI_CHANGE_ORDER_PUB/PROCESS_CHANGE_ORDER_LIST/" xml:id="id_102" >
    <xsl:value-of select="''"/>
    </db:LONG_DESCRIPTION>
    </xsl:template>
    OUTPUT_
    <db:LONG_DESCRIPTION xml:id="id_102">XXX</db:LONG_DESCRIPTION>
    <db:LONG_DESCRIPTION xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/INV_EBI_CHANGE_ORDER_PUB/PROCESS_CHANGE_ORDER_LIST/" xml:id="id_102" />
    Needed OUTPUT_
    <db:LONG_DESCRIPTION xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/INV_EBI_CHANGE_ORDER_PUB/PROCESS_CHANGE_ORDER_LIST/" xml:id="id_102" />
    Thanks in advance.

    Just change what you're doing in that servlet to write that extra line.
    Since you didn't say anything about how you're writing your XML file, it's pretty hard to suggest what exactly you should change.

  • element xsi:type="T3" attribute="USD" 1.99 /element mapping error ......

    Dear All,
    I have following source structure from WSDL file which cannot be change.
    I have map it with target structure by one to one mapping. But getting following error.
    Please guide me do I need to use some node function/technique to map this element with target?
    because direct mapping is giving error.
    Structure         Occurance     Type
    -<Node>             1..1                T1
    --<element>        1..1                T2
    ---<attribute>      1..1                T3
    <element xsi:type="T3" attribute="USD">1.99</element>    it is mapped one to one graphical mapping with   <element></element>
    But in mapping test I am getting error:
    The prefix "xsi" for attribute "xsi:type" associated with an element type "<element>" is not bound.
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: The prefix "xsi" for attribute "xsi:type" associated with an element type "<element>" is not bound.
    at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:253)
    at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:79)
    Caused by: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:type" associated with an element type "<element>" is not bound.
    Regards

    Hi Raj,
    Thanks for reply..
    I am not trying to map attribute to target element.
    I am trying to map element (having value like 1.99) to the target element.
    This element having type as well as attribute.
    But in testing getting error"The prefix "xsi" for attribute "xsi:type" associated with an element type "element" is not bound."
    But when I am removing type declaration from WSDL then there is no error: example following
    <element attribute="USD">1.99</element> <<-mapped with>> <target element>
    error is coming when source structure is like:
    <element xsi:type="T3" attribute="USD">1.99</element> <<-mapped with>> <target element>
    i.e. source structure is having both type & attribute.
    Regards

  • Attribute vs. Element Mapping

    Is there a way in Workshop to specify an attribute XML mapping instead of an element
    mapping, i.e., instead of:
    <CustomerDetails xmlns="http://systinet.com/wsdl/default/">
    <ContactEmail>[email protected]</ContactEmail>
    <Id>1234</Id>
    <Name>Chris Peltz</Name>
    </CustomerDetails>
    I would like:
    <CustomerDetails ContactEmail="[email protected]" Id="1234" Name="Chris Peltz"></CustomerDetails>

    Hi Chris,
    Have you already tried the following?:
    * @jws:operation
    * @jws:parameter-xml xml-map::
    * <addCustomer>
    * <CustomerDetails ContactEmail="{email}" Id="{id}" Name="{name}">
    * </CustomerDetails>
    * </addCustomer>
    public void addCustomer(String id, String name, String email)
    Regards,
    Mike Wooten
    "Chris Peltz" <[email protected]> wrote:
    >
    Is there a way in Workshop to specify an attribute XML mapping instead
    of an element
    mapping, i.e., instead of:
    <CustomerDetails xmlns="http://systinet.com/wsdl/default/">
    <ContactEmail>[email protected]</ContactEmail>
    <Id>1234</Id>
    <Name>Chris Peltz</Name>
    </CustomerDetails>
    I would like:
    <CustomerDetails ContactEmail="[email protected]" Id="1234" Name="Chris
    Peltz"></CustomerDetails>

  • "Edit in Photoshop Elements" missing from windows context menu.

    How do I get the "Edit in Photoshop Elements" back in my context menu? I think what happened was that after installing PSE 13 I uninstalled PSE 12 and that may have removed the context menu item. Just guessing. Is there a way to add it back without re-installing PSE 13?

    Right click on a photo file of the type that you will want to open in PSE. In the context menu, mouse over Open With to open the menu. Select "Choose default program" and in the window that opens select PSE 13 if it appears in either Recommended or Other. If it isn't shown, choose Browse and navigate to the PSE 13 .exe file in Programs/Adobe/Photoshop Elements. If you want files of this type to always open in PSE when double-clicked, check the box "Always use the selected program". If you want PSE 13 to only appear in the Open With menu, be sure the box is not checked. Click OK.

  • Why no setProperty() method on the sap.ui.model.Context Class

    With a model context object I can do the following to obtain a value from a model:
    oModelContext.getProperty("name");
    Is there any reason why a setProperty() method is also not provided ?
    oModelContext.setProperty("name","Trevor");
    It seems that the model context object has all the necessary information to support this function:
    var oModel = oModelContext.getModel();
    var sPath = oModelContext.getPath();
    oModel.setProperty(sPath + "/name","Trevor");
    Thanks,
    Trevor

    With a model context object I can do the following to obtain a value from a model:
    oModelContext.getProperty("name");
    Is there any reason why a setProperty() method is also not provided ?
    oModelContext.setProperty("name","Trevor");
    It seems that the model context object has all the necessary information to support this function:
    var oModel = oModelContext.getModel();
    var sPath = oModelContext.getPath();
    oModel.setProperty(sPath + "/name","Trevor");
    Thanks,
    Trevor

  • How is the Model Context populated?

    How does the Model context get populated from the model u2013 ie., Is there code somewhere? If there is no code, how does the framework populate the model context from model?

    Then I suggest you ask in the web dynpro forum. They will be better able to explain the mechanics of web dynpro...

Maybe you are looking for