Bind Radiobutton to model

Hi,
I am trying to bind value of my radiobutton to the model. I
get the following erro:
Type mismatch in assignment statement: found Object where
String is required.
It is giving error at the following line:
<mx:Binding source="loption.selectedData"
destination="myDataModel.LOption" />
where myDataModel.LOption is defined as string. How else to
get the value of loption. I have defined loption as following:
<mx:RadioButtonGroup id="loption" />
<mx:RadioButton groupName="loption" data="Y" label="Yes"
/>
<mx:RadioButton groupName="loption" data="N" label="No"
selected="true" />
Thanks

Try casting the selectedData to a string:
source="{String(loption.selectedData)}"
Let me know if this works please.
Tracy

Similar Messages

  • RadioButtonSelectedOrNot[index] = bind radioButton[index].selected  problem

    Could someone please tell me why *radioButtonSelectedOrNot[index] = bind radioButton[index].selected;* is not working?
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.layout.*;
    import javafx.scene.control.*;
    def toggleGroup = ToggleGroup {};
    var radioButton: RadioButton[];
    var message: String[];
    var radioButtonSelectedOrNot: Boolean[];
    message[0] = "Display a slide show of car images.";
    message[1] = "Display the Car Race Simulation";
    message[2] = "Exit";
    for (index in [0..2]) radioButton[index] = RadioButton
        toggleGroup: toggleGroup
        text: "{index + 1} {message[index]}"
    for(index in [0..2])
        radioButtonSelectedOrNot[index] = bind radioButton[index].selected; // WHY ISN'T THIS WORKING?!
    def stage1 = Stage
        scene: Scene
            width: 600
            height: 400
            content:
                VBox
                    spacing: 5
                    content:
                        radioButton[0],
                        radioButton[1],
                        radioButton[2]
    }Any input would be greatly appreciated!
    Thanks in advance!

    Maybe this will help you.
    import javafx.stage.*;
    import javafx.scene.*;
    import javafx.scene.layout.*;
    import javafx.scene.control.*;
    def toggleGroup = ToggleGroup {};
    var message: String[] = ["Display a slide show of car images.",
                "Display the Car Race Simulation",
                "Exit"];
    var radioButton: RadioButton[] = [for (index in [0..2]) { RadioButton {
                        toggleGroup: toggleGroup
                        text: "{index + 1} {message[index]}"
    var radioButtonSelectedOrNot: Boolean[] = bind for (index in [0..2]) { radioButton[index].selected };
    def stage1 = Stage {
                scene: Scene {
                    width: 600
                    height: 400
                    content: [
                        VBox {
                            spacing: 5
                            content: [
                                radioButton
            }

  • Bind JAXB Content Model to html elements?

    We're trying to develop a system that passes an XML stream from server to client form.
    I created a JAXB content model to parse the XML so the elements can be mapped to gui components.
    A class, ContentTree, wraps the content model. ContentTree has a single method: public void loadXML(String).
    I have a jspx with a button which invokes a back-end service that returns the XML.
    I can't figure out how to bind the button's returned XML to ConentTree.loadXML(xmlData).
    Thanks!
    ps: maybe our approach is entirely lame. We need to pass the XML to the form, edit it, validate it, and send it all back to server.
    Edited by: user632544 on Feb 9, 2011 9:50 PM

    Hi Sudhakar,
    Could you please give us a more clear picture as to what you are doing. When you say HTML elements could you be speicific as to which HTML elements and how are you trying to bind these to HTML elements? Also you have mentioned about query on mulitple tables. There is a tutorial titled "Using Databound Components to Access Databases" at the page:
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/index.jsp
    The above tutorial explains how data from multiple tables can be retrieved and displayed.
    hth
    Cheers
    Giri :-)
    Creator Team

  • Can i Bind more than one Model object to the Custom controller or not

    Hi All, I trying to bind more than one model object to the custom controller, Both the model objects contains same attribute name called ( output). Both model objects created on to top of the BAPI. So when i bind first model object to the custom controller will work fine. When i am trying to bind the second model object to the same controller. This second model object also having the same attribute name called "output" . So it is giving an error of "Duplicate context element "Detail". Rename or uncheck duplicate elements.
    can i assign more than one model object to the single controller or not?
    But in the reference document, it has given that , we can create model object with more than one bapi.So in this case if both the bapis contains any element with the same name will also be problem. Any body give me the solution.
    Initially we have created one custom controller for each model object. But later i realized that, why con't we use same controller for all the model object. Because, the custom controller context is the public context. this context shared across all the view controllers.
    The concept which I am trying to do is right or wrong?

    Hi Vishal,
    of course, you can bind one controler to many models. When the same name occours you can simply RENAME binded node in controler.
    Regards
    Bogdan

  • Paradigm Shift: the WDP Model & the Power to Bind

    As a developer coming from an OO/java background, I recently started to study and use the Java Web Dynpro framework for creating enterprise portal applications.
    Up to this point, I've developped 2 or 3 WDP projects - and in so doing, I've tried to reconciliate my java-influenced development methods with the SAP way of doing things. I'd say for the most part it was rather painless. I did, however, find a serious problem as far as I'm concerned in the way SAP has promoted the use of the java bean model importer.
    <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/251697223">david Beisert</a> created this tool and presented it to the SDN community in 2004 in his <a href="/people/david.beisert/blog/2004/10/26/webdynpro-importing-java-classes-as-model The same year (don't know if it was before or after), SAP published '<a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/1f5f3366-0401-0010-d6b0-e85a49e93a5c">Using EJBs in Web Dynpro Applications</a>'. Both of these works presented simplified examples of invoking remote functions on EJB backends (an add() function in the case of David Beisert's example, and a calculateBonus() function in the case of the SAP publication). Accordingly, they both recommended the use of the Command Bean pattern as an implementation strategy for their respective examples. Which I don't totally disagree with, in these particular circumstances. A simple execute() method is perfectly suitable if one needs to EXECUTE a remote function call - whether it be a calculate() method invoked on a EJB Session Bean or an RFC call made to some remote ABAP system.
    Problem is, not everything in life is a function call ! To me, it makes very little sense to model everything as a command if it doesn't match your business model. The needs of your application should dictate the architecture of your model and not the other way around.
    This unjustifiable fixation on the Command Bean pattern is probably to blame for the fact that very little up to this point seems to have been written on the subject of the power of the binding mecanism as a most powerful tool in the arsenal of the Web Dynpro developer.
    What's this ?
    Binding can make it possible to abstract away most of the nitty gritty context node navigation and manipulation logic and replace it with more intuitive and more developer-friendly model manipulation logic.
    There was a time when programs that needed persistence were peppered with database calls and resultset manipulation logic. Hardly anyone codes like that anymore.. and with good reason. The abstraction power of Object Oriented technologies have made it possible to devise human friendly models that make it possible for developers to concentrate on business logic, and not have to waste time dealing with the low-level idiosyncrasies of database programming. Whether it be EJBs, JDO, Hibernate... whatever the flavour... most serious projects today utilize some sort of persistence framework and have little place for hand-coding database access logic.
    I feel that the WD javabean model offers the same kind of abstraction possibilities to the Web Dynpro developer. If you see to it that your WD Context and javabean model(s) mirror each other adequately, the power of binding will make it possible for you to implement most of your processing directly on the model - while behind the scenes, your context and UI Elements stay magically synchronized with your user's actions:
    +-------------+        +-------------------+         +--------------+        +------------+
    |    Model    |<-bound-| Component Context |<-mapped-| View Context |<-bound-| UI Element |
    +-------------+        +-------------------+         +--------------+        +------------+
                           o Context Root                o Context Root
                           |                             |
    ShoppingCartBean <---- +-o ShoppingCart Node <------ +-o ShoppingCart Node
    {                        |                             |
      Collection items <---- +-o CartItems Node <--------- +-o CartItems Node <-- ItemsTable
      {                        |                             |
        String code; <-------- +- Code <-------------------- +- Code <----------- CodeTextView
        String descrip; <----- +- Description <------------- +- Description <---- DescTextView
    Let's examine an example of this concept. I propose a simple but illustrative example consisting of a shopping cart application that presents the user with a collection of catalog items, and a shopping cart in which catalog items may arbitrarily be added and/or removed.
    The Component and View contexts will be structured as follows:
       o Context Root
       |
       +--o ProductCatalog       (cardinality=1..1, singleton=true)
       |  |
       |  +--o CatalogItems      (cardinality=0..n, singleton=true)
       |     |
       |     +-- Code
       |     +-- Description
       |
       +--o ShoppingCart         (cardinality=1..1, singleton=true)
          |
          +--o ShoppingCartItems (cardinality=0..n, singleton=true)
             |
             +-- Code
             +-- Description
    Let's examine how a conventional Command Bean implementation of this component could be coded. Later on, I'll present a more object-oriented model-based approach. We can then compare the differences.
    public class ProductCatalogCommandBean
       // collection of catalog items
       Collection items = new ArrayList();
       public void execute_getItems()
          // initialize catalog items collection
          items = new ProductCatalogBusinessDelegate().getItems();
    This command bean will serve as a model to which the ProductCatalog node will be bound. This happens in the supply function for that node in the component controller:
    public supplyProductCatalog(IProductCatalogNode node, ...)
       // create model
       model = new ProductCatalogCommandBean();
       // load items collection
       model.execute_getItems();
       // bind node to model
       node.bind(model);
    No supply function is needed for the ShoppingCart node, since it is empty in its initial state. Its contents will only change based on the user adding to or removing items from the cart. These operations are implemented by the following two event handlers in the view controller:
    public void onActionAddItemsToCart()
       // loop through catalog items
       for (int i = 0; i < wdContext.nodeCatalogItems().size(); i++)
          // current catalog item selected ?
          if (wdContext.nodeCatalogItems().isMultiSelected(i))
             // get current selected catalog item
             ICatalogItemsElement catalogItem = wdContext.nodeCatalogItems().getElementAt(i);
             // create new element for ShoppingCartItem node
             IShoppingCartItemsElement cartItem = wdContext.createShoppingCartItemsElement();
             // initialize cart item with catalog item
             cartItem.setCode       (catalogItem.getCode());
             cartItem.setDescription(catalogItem.getDescription());
             // add item to shopping cart
             wdContext.nodeShoppingCartItems().addElement(cartItem);
    public void onActionRemoveItemsFromCart()
       // loop through cart items
       for (int i = 0; i < wdContext.nodeShoppingCartItems().size();)
          // current shopping cart item selected ?
          if (wdContext.nodeShoppingCartItems().isMultiSelected(i))
             // get current selected item
             IShoppingCartItemsElement item = wdContext.nodeShoppingCartItems().getElementAt(i);
             // remove item from collection
             wdContext.nodeShoppingCartItems().removeElement(item);
          else
             // process next element
             i++;
    From what I understand, I believe this is the typical way SAP recommends using Command Beans as a model in order to implement this type of simple component.
    Let's see how the two same event handlers could be written with a more comprehensive object model at its disposal. One whose role is not limited to data access, but also capable of adequately presenting and manipulating the data that it encapsulates. (The actual code for these model beans will follow)
    // I like to declare shortcut aliases for convenience...
    private ProductCatalogBean catalog;
    private ShoppingCartBean   cart;
    // and initialize them in the wdDoInit() method...
    public wdDoInit(...)
       if (firstTime)
          catalog = wdContext.currentNodeProductCatalog().modelObject();
          cart    = wdContext.currentNodeShoppingCart  ().modelObject();
    Now the code for the event handlers:
    public void onActionAddItemsToCart()
       // add selected catalog items to shopping cart items collection
       cart.addItems(catalog.getSelectedItems());
    public void onActionRemoveItemsFromCart()
       // remove selected shopping cart items from their collection
       cart.removeItems(cart.getSelectedItems());
    I feel these two lines of code are cleaner and easier to maintain than the two previous context-manipulation-ridden versions that accompany the command bean version.
    Here's where the models are bound to their respective context nodes, in the Component Controller.
    public supplyProductCatalogNode(IProductCatalogNode node, ...)
       node.bind(new ProductCatalogBean(wdContext.getContext()));
    public supplyShoppingCartNode(IShoppingCartNode node, ...)
       node.bind(new ShoppingCartBean(wdContext.getContext()));
    Notice that a context is provided in the constructors of both models (a generic context of type IWDContext). We saw earlier that our model needs to be able to respond to such requests as: catalog.getSelectedItem(). The user doesn't interact directly with the model, but with the Web Dynpro UI Elements. They in turn update the context... which is where our model will fetch the information it requires to do its job.
    Also note that a model is provided for the shopping cart here, even though it has no need to access or execute anything on the back-end. Again, the model here is not being used as a command bean, but rather as a classic object model. We simply take advantage of the power of binding to make ourselves a clean and simple little helper that will update for us all the relevant context structures behind the scenes when we tell it to.
    Here are the ShoppingCartBean and ProductCatalogBean classes (I've omitted a few getter/setter methods in order to reduce unnecessary clutter):
    public class ShoppingCartBean
       Collection items = new ArrayList();
       IWDNode    itemsNode;
       public ShoppingCartBean(IWDContext context)
          // initialize shortcut alias for ShoppingCartItems node
          itemsNode = context.getRootNode()
                             .getChildNode("ShoppingCart", 0)
                             .getChildNode("ShoppingCartItems", 0);
       public void addItems(Collection items)
          this.items.addAll(items);
       public void removeItems(Collection items)
          this.items.removeAll(items);
       public Collection getSelectedItems()
          return ItemDTO.getSelectedItems(itemsNode);
    public class ProductCatalogBean
       Collection items;
       IWDNode    itemsNode;
       public ProductCatalogBean(IWDContext context)
          // fetch catalog content from back-end
          items = new ProductCatalogBusinessDelegate().getItems();
          // initialize shortcut alias for CatalogItems node
          itemsNode = context.getRootNode()
                             .getChildNode("ProductCatalog", 0)
                             .getChildNode("CatalogItems", 0);
       public Collection getSelectedItems()
          return ItemDTO.getSelectedItems(itemsNode);
    Notice that both classes delegate their getSelectedItems() implementation to a common version that's been placed in the ItemDTO class. It seems like a good place to put this type generic ItemDTO-related utility.
    This DTO class could also have been used by the Command Bean version of the event handlers.. would reduce somewhat the number of loops. At any rate, the ItemDTO class shouldn't be viewed as an "overhead" to the model-based version, since it usually will have been created in the J2EE layer,for the marshalling of EJB data (see <a href="http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html">Data Transfer Object Pattern</a>). We just take advantage of what's there, and extend it to our benefit for packaging some common ItemDTO-related code we require.
    // DTO made available by the EJB layer
    import com.mycompany.shoppingcart.dto.ItemDTO;
    public class ItemDTO extends com.mycompany.shoppingcart.dto.ItemDTO
       String code;
       String description;
       public ItemDTO()
       public ItemDTO(String code, String description)
          this.code = code;
          this.description = description;
       // returns ItemDTOs collection of currently selected node elements
       public static Collection getSelectedItems(IWDNode node)
          // create collection to be returned
          Collection selectedItems = new ArrayList();
          // loop through item node elements
          for (i = 0; i < node.size(); i++)
             // current item element selected ?
             if (node.isMultiSelected(i))
                 // fetch selected item
                 IWDNodeElement item = node.getElementAt(i);
                 // transform item node element into ItemDTO
                 ItemDTO itemDTO = new ItemDTO(item.getAttributeAsText("Code"),
                                               item.getAttributeAsText("Description"));
                 // add selected item to the selectedItems collection
                 selectedItems.add(itemDTO);
          return selectedItems;
    Notice that the getSelectedItem() method is the only place in our model where context node navigation and manipulation actually takes place. It's unavoidable here, given that we need to query these structures in order to correctly react to user actions. But where possible, the business logic - like adding items and removing items from the cart - has been implemented by standard java constructs instead of by manipulating context nodes and attributes.
    To me, using a java bean model as an abstraction for the Context is much like using EJBs as abstractions of database tables and columns:
                         abstracts away
               EJB model --------------> database tables & columns
                         abstracts away
      WDP javabean model --------------> context  nodes  & attributes
    Except that a javabean model (residing in the same JVM) is much more lightweight and easy to code an maintain than an EJB...
    Before concluding, it might be worth pointing out that this alternative vision of the Web Dynpro Model in no way limits the possibility of implementing a Command Bean - if that happens to suit your business needs. You will of course always be able to implement an execute() method in your WDP Model if and when you feel the need to do so. Except that now, by breaking free of the mandatory Command Bean directive, you are allowed the freedom to ditch the execute() method if you don't need such a thing... and instead, replace it with a few well-chosen operations like getItems(), addItems(), removeItems(), getSelectedItems()... which, as we've just seen can add significant value to the javabean model made available to your WDP component.
    Comments would be appreciated on this issue (if anyone has had the time/courage/patience to read this far...;). Am I alone here intrigued by the potential of this (up until now) scarcely mentionned design strategy ?
    Romeo Guastaferri

    Hi Romeo,
    thanks for sharing this with the community. I am little bit surprised that the command pattern was understood as the only way on how to use the Javabean model in conjunction with EJBs. The command pattern blog of mine was just a very simplified example of how a functional call can be translated to a Java Bean model. Actually it was to show how the paradigm of a model works. I personally use a similar approach to yours. It seldomly makes sense to map an EJB method one to one to a model, but the javabean model must be driven by the Userinterface and represents a bridge between the business service layer and the ui. I personally even think that often it does not make sense to map RFC function like they are to the Web Dynpro Context. Most often you end up writing ZBAPIs that return structures like they are used in the UI. But if you use a java bean model as a layer in between your service layer, you are more flexible in evolving the application. Anyways design patterns for the java bean model need to be discussed more on SDN as they really add very valuable possibilities you would never have when working with value nodes alone. With the Javabean model we are back in the real OO world where things like inheritance work, things that are really not too well supported by the native WD features. I encapsulate every context of mine as javabeans. This has nothing to do with EJBs (which I am personally not a fan of) but only with the fact that I want to work with the power of the OO world.
    rgds
    David

  • Binding 2 Models in the Same component controller

    I'm using 2 Import Adaptive RFC Models. I want to bind both the models in the component controller of the same web dynpro component.
    But when I try to do model binding for the second model, it does not allow me to do so. If I try to bind the same model in a different project, it happens perfectly and works fine. That means the model i.e. the BAPI is perfectly ok.
    Can anyone please tell why is it not allowing to bind 2 models in the component controller of the same web dynpro component?

    Hi Satyadev,
       If I undersatand your description properly, you have 2 models nodes in a webdynpro component, and you want to bind these two together. If this is the question, then, yes you cant do the bindings declaralatively, you have to do it dynamically...
    Look at the code snippet below, it may help you...
    Suppose ChildNode1 and ChildNode2 are the model node in the context of the component controller. Then you can map these two nodes dynamically....
    wdContext.wdGetAPI().reset();
         IWDNodeInfo testNodeInfo1 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode1", IWDNode.LEAD_SELECTION).getNodeInfo();
         IWDNodeInfo testNodeInfo2 = wdThis.wdGetAPI().getContext().getRootNode().getChildNode("ChildNode2", IWDNode.LEAD_SELECTION).getNodeInfo();
         testNodeInfo2.setMapping(testNodeInfo1, true);
         testNodeInfo2.addAttributesFromDataNode();
    Hope this helps,
    Please let me know if I have not understood your question properly...
    Regards,
    Vishnu Prasad Hegde

  • Error in model node binding

    Hi All,
    I am facing some strange problem of model node binding.I have bound the model node to a model class.I am using Wizard to generate this model node binding.
    To deploy this DC I am using NWDI .But the activation step is failing because of some build errors.moreover these build errors are not appearing at design time!!
    CBS error log is as below :
    [Error]   com.bhc.nextgen.sales.suppcatapp.SuppCatLookupComp --> ContextModelNode Zrfc_Sd_Quote_Supplier_Search_Input [modelClass]: The context model node has not been bound to a model class (Hint: A Context model node has to be bound to a model class or mapped to a model node of another controller.)
    Dose anyone know how to solve this?
    Thanks,
    Kanchan

    Hi
    I'm not sure if I understand you completely but instead of manually creating a model node which you bind to your model you could - in Diagram View - right click on the Data link and drag and drop your model from right to left and it will automatically create the needed model class references etc.
    Br
    Göran

  • Binding menu model to a tree component

    Hi,
    I have generated menu models to all my unbounded task flows in my application and I want to display the menus as a tree in the side bar ...
    The hosted demo here tells that we can add the same menu model to a tree component...
    http://jdevadf.oracle.com/adf-richclient-demo/faces/components/pagehierarchy/page.jspx?_afrLoop=14156998585414802&_afrWindowMode=0&_afrWindowId=null
    Is it possible to bind a menu model to a Tree component? If possible...how to achieve this? If not...Is there any other way we can display the application menu in the form a tree...using the existing menu models?
    Edited by: user12747136 on Apr 13, 2010 12:26 AM

    Hi,
    I don't understand your question. You simply can use the tree and specify the MenuModel as its value and define the right detailStamp, like any kind of tree. Or was your question more general like how to use a tree?
    ~ Simon

  • How to bind json model to List items?

    Hi guys,
    I'm following ui5 developer guide trying to build an application. The application has a list to which I want to bind a json model.
    But I'm so confused by the binding path( absolute, relative):
    Here's my json model:
    var players =
    "name": "aaron"
    "name": "mike"
    "name": "jone"
    var playersModel = new sap.ui.model.json.JSONModel();
    playersModel.setData(players);
    sap.ui.getCore().setModel(playersModel,"all_players");
    Here's what I did to bind the model to the list:
    var playerList = new sap.m.List({
      playerList.setModel(sap.ui.getCore().getModel("all_players"));
      playerList.bindItems("",
      new sap.m.StandardListItem({
      title:"{/name}"
    what's wrong with my code?
    Can someone advice how to specify the binding path correctly?
    What's the meaning about relative path and absolute path?

    Just figure out how to bind.
    var playerList = new sap.m.List({
      playerList.setModel(sap.ui.getCore().getModel("all_players"));
      playerList.bindItems("/",   //<- absolute path, normally followed by a property name of the model object, but for this case, the model is an array,
                                                // so nothing follows, path is just one slash
      new sap.m.StandardListItem({
      title:"{name}"  // <- the array objects have been bound to the list items, so specify a relative path
    absolute path starts with slash: "/aaa/bbb"
    it means the path starts from the top hierarchy of the model:
    relative path starts with a name of a property. "ccc"
    it means the path is relative to the absolute path, so the absolute path of this relative path is "/aaa/bbb/ccc"

  • Cocoa Bindings don't update UI when Model changes?

    Has anyone found a solution to this problem? I read all the Troubleshooting info at Apple and just about wore out the KVC/KVO and Cocoa Bindings documentation.
    I've got one TableView that updates fine, and two others that don't when the Model is modified.
    The Model: class VoterController, the variable is an NSMutableArray "playerArray" that contains 7 NSMutableDictionaries, read in from an XML plist. I set the @property and the @synthesize for it. You can't bind a Model, so no bindings for the array.
    The View: an NSTableView with one column. The column is bound to the voterController listed below.
    Column Binding:
    Bind To: voterController
    Controller Key: arrangedObjects
    Model Key Path: playerName (a key in each dictionary)
    The Controller: an NSTableViewController, class NSTableViewController.
    Bindings for this controller:
    Bind To: mainController
    Model Key Path: playerArray (the NSMutableArray)
    Controller "mainController":
    A simple NSObject (not an Object Controller despite the name) that has its class set as "VoterController", which is the class of the Model object (the array of dictionaries).
    Now the thing that has me stumped is that this NSTableView reads the Model data fine but does not respond to changes in it. In other words, if I delete one of the array elements, it does not show up in the View until I re-launch the app and it reads the changed XML from disk.
    Even more strange, I have another tableView that DOES dynamically change as I change values for any of the keys in the dictionaries that are the elements of the array. This working tableView has the bindings for each of its 5 columns as follows:
    Bind To:voterController
    Controller Key: arrangedObjects
    Model Key Path: playerName, voteCount, role, etc. for each column. Each of these is a key in the dictionaries. If I change programmatically any of the values of these keys, they are immediately changed in the View.
    Apple says the most common reason for Views not updating is non-KVO compliance in the model property. I have the array @property and @synthesize compiler directives, and one View updates and another does not, on the same controller.
    I dunno - I don't expect a solution but any tips I will rush off and try. Thanks in advance.

    "Is this because VIs which use ConfigData_v1.ctl were not loaded into memory at the time when I made the change to the typedef?"
    In short: Yes. Only the callers in memory are updated.
    =====================================================
    Fading out. " ... J. Arthur Rank on gong."

  • Issue in invalidating the model output node

    Hi All,
    I have a problem in invalidating the model output node. Below is the description of my approach and problem statement.
    REQUIREMENT: We have had the requirement to develop a custom WD java application in MSS which will fetch the appraisal data for each employee selection.
    APPROACH: To acheive the same, I have developed the custom WD java application and have associated it with the Standard Employee Search application. I have established the eventing between both the applications, such that on each employee selection in Employee Search, I get the PERNR for the selected employee.
                         I have mapped a local valude node to the UI elements of my custom application. I am having TWO RFCs; one to Read data based on PERNR and the other to Update/Save to R/3.
                         I read the RFC based on PERNR and save it to local value node which is binded to the UI elements. If the end user is editing the read data, I am passing the entire local value node to the Save RFC import parameter on click of Save button in my application.
                         Every thing is working as expected. I am able to Read and Save the data and its also updating the backend. But, in the same session, if I go back to the previously selected employee for whom the updation has happened, i am not able to see the new data.
                         Only when I refresh the session, I see the new data on employee selection. When I try to invalidate the Read Output Model node, on Save button, I do not see anything happening. The Read Output Model node always holds the old value.
                         I have currently binded the Read model output node to a table in the view to see what it holds in runtime. And what I see is , its always having the old record for the same employee, in the same session even after invalidating the same on Save button.
    I request you all to pleae try to understand the issue and let me know as how to get the new values in the same session.
    Regards
    DK

    Hi,
    When you are executing the read rfc ?? At the time of executing the read rfc try to bind the new object every time you execute and see what happens.
    Like..
    wdContext.node<READ_RFC_NODE>().bind(OBJECT of READ RFC);
    then execute it.
    Is there some kind of table which shows the employees and on selection you are showing the data? Can you give some more input on how you are reading the data?
    Best Wishes
    Idhaya R

  • Filtered model, but how to use it?

    Hi,
    we have a JSON model with around 2000 projects, prefetched at startup of the app. That is not an issue and it also runs smoothly on our tested smartphones (because you will never render all of the 2000 on the DOM).
    We bind this JSON model to a sap.m.table with growingScrollToLoad active and a threshold of 15 projects (otherwise it’s getting a bit laggy).
    We are filtering the list (using sap.ui.model.filter and table.getBinding() of the table). This is working fine without problems. But now we want to have a list of all projects that are currently in the table (so after filtering).
    If we use the JSON model to get all projects, the filter is not applied (of course, because we just used the binding of the table). If we use table.getItems(), we just get the items that already got loaded (problem growing).
    But we need the list of all projects, after filtering without the need to scroll to the end of the list to get the items loaded…
    Anybody an idea how to do that?
    Best regards
    Ben

    Hi Maksim,
    thanks for your answer!
    The private field aIndices is doing the trick. With that I can look up the indices in the oList to get the corresponding item...
    Not sure jet, if this is bound and I can change it directly or if I have to iterate over the model...but this is implementation stuff.
    The only real problem, which I see with this solution, is that I am using internal implementations of the binding. It is not documented in the API, because normally nobody should use it. No getter means do not touch it, right?
    Has anybody a good idea? Maybe a feature request in the OpenUI git hub repo?
    Nevertheless I marked your answer as correct.
    Best regards
    Ben

  • Model in WD ABAP

    Hi all,
      How to define Model in WD ABAP...?
    Thanks in advance...........!!!!

    hi ,
    model means the business data which is stored in the backend system .
    Data binding exists from model elements across context elements to control properties.
    pls refer the basic WD ABAP tutorials , available on SDN
    http://help.sap.com/saphelp_nw2004s/helpdata/en/03/0048413e466e24e10000000a155106/content.htm
    Main Topic Page:
    http://sdn.sap.com/irj/sdn/nw-wdabap#section2
    Tutorials for Beginners:
    Web Dynpro for ABAP: Tutorials for Beginners [original link is broken]
    eLearning Videos:
    /people/thomas.jung/blog/2006/06/20/web-dynpro-abap-demonstration-videos
    regards,
    amit

  • How to use byte[] in EJB Model

    Hi Colleagues,
    I have problem with binding byte[] to model attribute.
    So I have methos myMethod(byte[] byteArr).
    byte[] in the model is represent as Byte_Item type.
    So I fill this attribute in this way:
    inputFile is of type byte[]
    for (byte b: inputFile) {
                IImportedFileElement el = wdContext.nodeImportedFile().createAndAddImportedFileElement();
                el.setItem(b);           
    Then when I'm executing model object Ireceive.
    java.lang.NullPointerException: while trying to invoke the method java.lang.Object.getClass() of an object loaded from local variable 'value'
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.setPropertiesForModelClass(EJBGenericModelClassExecutable.java:485)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.buildModelClassListFromCollection(EJBGenericModelClassExecutable.java:655)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.setPropertiesForModelClass(EJBGenericModelClassExecutable.java:553)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.fillReturnParameterToMc(EJBGenericModelClassExecutable.java:711)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.execute(EJBGenericModelClassExecutable.java:158)
    Could you help me with this problem.
    Best Regards,
    Dimitar

    You can put your Javascript code in the Onmouseover property of the column.
    I don't have the Javascript code for changing the color but for example the following will pop up an alert
    <af:outputText value="#{row.DepartmentId}" onmouseover="alert(\'Unload event fired!\')">

  • RadioButton Not Selecting

    I have a form Item which contains RadioButtonGroup and a
    Repeater which dynamically loads up RadioButtons from model data:
    <mx:FormItem direction="horizontal">
    <mx:Label text="Status:"/>
    <mx:RadioButtonGroup id="statusType"
    selectedValue="{model.selectedValuation.valuationAdmin.valuation_status}"/>
    <mx:Repeater id="valStatus"
    dataProvider="{listModel.allValuationStatuses}">
    <mx:RadioButton id="vs" group="{statusType}"
    label="{valStatus.currentItem.title}"/>
    </mx:Repeater>
    </mx:FormItem>
    On creationComplete() I call init() which in turn calls
    loadUserInfo(). Here I call selectedValStatus and pass on selected
    data from model:
    private function loadUserInfo():void{
    if(model.selectedValuation.valuation_administration !=
    null){
    selectedValStatus(model.selectedValuation.valuation_administration.valuation_status);
    selectedValStatus() takes the data object passed to it, loops
    over the model list data and then checks to see if the model list
    data is equivalent to the data.title property, where i then set the
    selected value of the radio group:
    private function selectedValStatus(data:Object):void{
    if(listModel.allValuationStatuses != null){
    for(var i:int = 0;
    i<listModel.allValuationStatuses.length; i++){
    var item:ArrayCollection = listModel.allValuationStatuses;
    if(data != null){
    if(item
    .title == data.title){
    statusType.selectedValue = data.title;
    The Behavior:
    Data is present on creation complete.
    I have another radio group using the same code architecture
    that works perfectly, is in same form.
    On the form load the radio button is not selected.
    On a view index change and then return the button is selected
    properly.
    Thanks!

    John, thanks, This component is inside a VBox container so
    applicationComplete() isn't available to me here.

Maybe you are looking for

  • Import photos into Organizer Photoshop 7

    How can I import photos into Organizer from a Desktop folder in the same order that I have arranged and numbered them?

  • Visibility of Topics in RoboHelp8

    Within RoboHelp 8, is there a way you can create topics which can be searchable but are not displayed in the TOC when published? If so, how can this best be achieved please? Kind Regards, Campbell D.T. Craig Interactive Media Developer and Instructio

  • Player shuts off near beginning of s

    I just purchased the Zen Nano Plus GB and absolutely love it. I have transferred songs using Windows Media Player and have had no problems except for the songs I have downloaded from walmart.com. The songs will play for 3-5 seconds and then the playe

  • I've just ordered Iphone 5c I'm curious about the order.

    how long does the process take to go through shipping? Processing Items: We are processing your order now. You can modify your order details through online Order Status, or by contacting Apple Online Store Customer Service.

  • Account formula concatenate

    Hi, I am writing because I need to know how to make the following formula work: In the formula of account dimension: How can I concatenate the property YEAR of the dimension Time? .[10101],[Entity].[Risk],[Time].currentmember.Properties("YEAR").[JAN]