How to get reference of UI controls in a JSON Controller?

Hi Experts,
This time I was looking to create a JSON view and I was successful in creating and including various UI controls in the view. However, I am not able to get the reference of the UI controls within the controller. Initially, I thought using same set of methods of CORE I can get their reference. But I, I am not able to see any thing getting filled.
Please find the below screen shots about my view definition and controller implementation.
Please provide some inputs
Regards
Pavan

Hi Robin,
Ok, then Let me conclude my understanding based on your opinion
1. A View definition consists of UI controls, and their associated binding definitions(anything missing?)
2. A Controller consists of Model implementation , and as you said initializations, event handlers, and helper methods.
If my understanding is correct then an application can have various models and do the view recognizes or  understands all of them.  Otherwise what kind of approach should we follow.
In the controller definition do I have to include the line sap.ui.core.getCore().setModel() for each of the models that I define. As per my understanding this statement makes the model available for all the elements within the view.
Please correct me if my understanding is incorrect.
I agree with your point but still if I have to access the reference of UI element in the controller how can I get that in the above context.  Please Share some inputs
Thanks for pointing me in right directions
Regards,
Pavan

Similar Messages

  • How to get background color of controls ?

    Hello everyone.
    How to get background color of controls ?
    When we use AWT/Swing,
    we can get background color of component by using Component.getBackground()
    It is regret that I can not find any method for such a method in JavaFX.
    And how do we detect the change of background color of controls ?
    Best regards.

    Hi Tadashi,
    try this.
    @Override
    public void start(final Stage primaryStage) {
        primaryStage.setTitle("Test ChangeListener");
        Button btn = new Button();
        btn.setText("change background");
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                primaryStage.getScene().setFill(Color.rgb(
                        (int)(Math.random() * 255),
                        (int)(Math.random() * 255),
                        (int)(Math.random() * 255)));
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.getScene().fillProperty().addListener(new ChangeListener<Paint>() {
            @Override
            public void changed(ObservableValue<? extends Paint> arg0, Paint arg1, Paint arg2) {
                System.out.println(
                        "old color: " + arg1.toString()
                        + ", new color: " + arg2.toString());
        btn.getOnAction().handle(null);
        primaryStage.show();
    }Peter

  • How to get reference of a SessionBean From RemoteClient

    How to get reference of a SessionBean in a ApplicationServer from another SessionBean running in Another ApplicationServer

    Hi
    There is a method, getHandle() on the EJBObject interface that your remote interfaces extend. This handle can be used to pass a reference to an EJB to someone else (possibly running in another JVM). You can then call getEJBObject() on the Handle instance and get your remote interface on which you can call methods. Should be able to cast it to your specific bean.
    I haven't done this, so definitly test it out, but I think this is what you want to do.
    check it:
    http://mail-archive.objectweb.org/jonas/2000-12/msg00064.html
    I suggest u not to go for more complex code, make it simpler, or if its really required use it as a webservice
    Regards
    Abhijith YS

  • How to get Reference on files of my ADF Shared Library

    Dear All,
    Use case:
    I have compiled one project into a shared ADF library. This project has a ViewController.
    In it are some common css files that I would like to reuse.
    Now, I have a new project and have linked to that ADF library using Resource Palette.
    In my JSFF file, I tried to link to the CSS in my shared library
    <af:resource type="css" source="/com/test/common.css"/>But I cant seem to get the styleclasses in that shared library.
    I have checked at Firebug console and I notice that I am getting a 404 when I am requesting for the said file.
    What should be the correct path for me to get a reference to the CSS Files?
    Thanks
    JDEV 11G PS3

    Duplicate of How to get Reference on files of my ADF Shared Library
    Edited by: Bijesh Krishnadas on Aug 17, 2011 9:13 PM

  • How can I reference a winforms control using a variable in Powershell?

    I have a powershell winform that has a lot of text boxes, but for the sake of this post, lets say I have 5. I want to loop through the 5 text boxes to see if their text property is empty. If the textbox contains something, I want to add the text value to
    an array. Here's an example of what I'm trying to do.
    textbox1.text = "Red"
    textbox2.text = ""
    textbox3.text = "Blue"
    textbox4.text = ""
    textbox5.text = ""
    $MyArray = @()
    for ($i = 1; $i -le 5; $i++) {
    If ($textbox[$i].text -ne "") {
    $MyArray += $textbox[$i].text
    I realize the textbox object is not an array so this code will not work. I guess the simple question is, How can I reference a set of static controls using a variable without having to do something like this
    [object[]]$textboxes = New-Object System.Windows.Forms.TextBox
    For ($i = 1; $i -lt 5; $i++) {
    $textboxes += New-Object windows.forms.textbox
    $textboxes[$i].DataBindings.DefaultDataSourceUpdateMode = [System.Windows.Forms.DataSourceUpdateMode]::OnValidation
    $textboxes[$i].Name = $textboxes[$i]
    $BoxItems.Controls.Add($textboxes[$i])

    Hi D-Dub,
    here are two ways to retrieve the text value of $Textbox1:
    $Textbox1.Text
    (Get-Variable "Textbox1").Value.Text
    Now what could you do with the second way, inside a loop, I wonder ... ;)
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • CS3 VB how to get reference to a text frame?

    Hi there,
    I got a text frame in a document with a table inside. In first cell of the table there is another text frame with table. How to get a reference to the first text frame from the frame inside of the cell?
    text frame in a cell has a character as parent, character has a cell as parent, cell has table as a parent - in this place there should be the right text frame as a parent of a table, but unfortunatly there is a story! so any idea how to get the text frame from there?
    regards

    thx again Harbs,
    believe me - I am watching all stuff at the watch window of VB6 - there is not even one insertion point which has a ParentTextFrames - if I try to adres it I get an error. VisualBasic do not allow syntax like InsertionPoints[1] - it allows something like this:
    InsertionPoints(1) but it is the same like InsertionPoints.Item(1). In both cases it doesn't works - all object has ParentTextFrames.Count = 0.
    Anyway I found a solution for my problem:
    innerFrame.Parent.ParentStory.TextContainers.Item(1) is the right text frame - don't ask me why....
    regards

  • How to get references to project´s entities?

    Hi there,
    is there any straightforward way of getting reference to project´s entities? The idea is get a collection/array of all the entities enumerated at the persistence.xml via some JPA class. Is this possible?
    Thanks for any hint!

    Hi
       You should not set the attributes at the DOINIT, as the view will not be created that time.So what i suggest is , create it DOMODIFY .
    As i said in my previous post , create five attributes in the component controller.
    like l_view1,l_view2,l_view3...etc. of type if_wd_view_controller.
      And now go to each view's modify method. And write the following code.
    Data: lo_api               TYPE REF TO if_wd_view_controller.
    If first_time = 'X'.
      lo_api = wd_this->wd_get_api( ).
      wd_Comp_Controller->l_view1 = lo_api.
    endif
    And you could access this view controller , anywhere u want by using  wd_Comp_Controller->l_view1
    Thanks
    Anzy
    Award points if this solves your issue.
    Message was edited by:
            Mohammed Anzy S

  • How to get javabean data in Servlets.( JavaBean -- Servlet(Controller)

    how to get javabean data in Servlets.
    1) I am using name ,password in Jsp(View )
    2) when I submit this Bean will be called and Setter methods will be called .
    3) In ServletController (controller) I want to get data of javabean.
    In this I have to do validation of user.
    I want to pass the javabean obj as like -->
    request.getAttribute("beanObj");
    My intention is to get all the poperties in javabean by passing bean id
    or beanobj ,
    Is there any way to get all the data using bean id or beanObj.
    Plz Reply,

    Now in the Servlet we can get the same bean by this code:
    PageContext pageContext = JspFactoryImpl.getDefaultFactory().getPageContext(this, request, response, null, true, 8192, true);
    UserBean userbean = (UserBean)pageContext.getAttribute("userbean", PageContext.SESSION_SCOPE);
    String userid = userbean.getUsername();
    For this code to work it is needed to import 2 files:
    import org.apache.jasper.runtime.JspFactoryImpl;
    import javax.servlet.jsp.PageContext;
    The JspFactoryImpl is in jasper-runtime.jar file provided in tomcat dir.It seems to me that you are exactly knowing what you are doing :-(
    You can get a Bean stored in a Session by
    request.getSession().getAttribute("userbean");
    In the login.jsp page for example we have the code
    <jsp:useBean id="userbean" scope="session"class="com.newproj.UserBean" />
    <jsp:setProperty name="userbean" property="*" />the jsp:setProperty is not called when you click on the submit button
    if fills the bean with the request values from the previous request.
    andi

  • How to get oracle.jbo.domain.date from page to controller

    Hi All,
    I want to get date from my Advanced table bean to Controller. I am getting date as java.sql.Date i want to convert it to oracle.jbo.domain.Date. Any pointers in this will be helpful.
    Thanks in advance.
    With Regards,
    Anjani.

    get your date through ViewObject, you will get it in jbo.domain.date format
    vo.next().getAttribute("DateAttributeXXXX");
    --Prasanna                                                                                                                                                                                                                                                                                       

  • How to get request_ Id  in control file?

    Hi,
    I am using "fnd_global.conc_request_id" in control file to get request_Id
    but always getting request_id value as '-1' while running the SQL *Loader program.
    Any setup is missing here or is there any other way to get request_id in control file.
    Thanks & Regards,
    Sagarika

    Pl see your duplicate post here - How to capture SQL *Loader program parameter value in control file?
    Srini

  • X6 : how to get next and previous controls working...

    Hi,
    May be i am missing how to do the same...but i can't get the the next video by pressing the next icon on the real player...i am viewing the video files from the gallery..Or the next and prev controls won't work..

    Hi,
    In that case it's too bad..

  • How to get reference of second diagramm axle

    i want to to scale my diagramm automatically, but i don´t know how i can get the reference of the second y-axle?Message Edited by reen on 06-01-2005 03:28 AM
    Message Edited by reen on 06-01-2005 03:28 AM
    Attachments:
    frontpanel.JPG ‏63 KB
    diagramm.JPG ‏50 KB

    hello,
    if it's an chart, then use the property "History Data", which is in the bottom of the property menu and wire an empty array.
    regards,
    robert h

  • How to find references to ActiveX control

    Is there a way to determine where an activex control is used within a labview project?  I have a moderately large project that previously used an adhoc combination of XML parsers, including the ActiveX XML parser from Microsoft (MSXML).  I am trying to replace all instances of MSXML with either the builtin labview XML VI's or calls to our own DLL that make more complicated sequences of calls to the Xerces/Xalan XML libraries.  I want to make sure I replaced all references to the MSXML parser without having to inspect all the VI's in the project.  I was hoping that I could right click on an "Open Automation" function block and select the "Find All Instances" option, but apparently this is not availible as it is for a VI I created.  Also, I was hoping that if I went to the Project Explorer, it would show that the msxml.dll file was listed as a dependency where I could do a "Find Callers" like an ordinary dll referenced through a "Call Library Function Node".  Does anyone have a suggestion on how I can automate this search?  
    Thanks.
    Solved!
    Go to Solution.

    The "Find all Instances" is only available for VIs that you create, but you can still search for the Automation Open function in your project. Just open your project and open up a VI. Then select Edit -> Find and Replace. In this dialog you can search for specific functions across the entire project.

  • How to get value in data control at run time based on bind variable in VO

    Hi,
    we are capturing the value of customer id at run time. we are associating the captured value of customer id to bind variable of the view object.
    View object is returning the data of that customer id, this view object is part of the application module ,this application module is exposed as data control,so than we have drag and drop this view object response on the
    page from data control.
    How ever after assigning the customer id to bind variable but still it is not showing on jsf page,even we refreshed the data control manually with the help of java code so kindly provide some solution for it.

    Hi,
    If i got your post correctly,you can filter your VO using defining view criteria see following samples
    Oracle ADF - Create View Criteria and Execute using Bean.
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • How to get Reference Doc from copy from button

    Hi..
    I would like to know if there is a way to get the source document or reference document number with-out  sdk or add on development , if you used the copy from button to populate the data?
    sample
    in order entry you can populate the data by using the copy button then choose sales quotation,  then using formatted search or select statement could i get the source documents (sales quotation number)..
    thanks
    Loren

    Hi Loren,
    If you need to get the BaseRef field before saving the document you can use the screen reference in your query:
    SELECT $[$38.44.0]
    Just selects the BaseDocument reference number from a row.  You may want to also use:
    SELECT $[$38.43.0]
    To get the Base Document Type (sales quotation, delivery etc.)
    Bob Richardson

Maybe you are looking for

  • Is it possible to trade in a ipod 4th generation for one of the new ones?

    Is it possible to trade in an ipod 4th generation for one of the new ones?

  • Dropdown menus flicker only & can't be selected

    When I type a web address, a drop down menu used to appear with suggestions. Now it flickers but cannot be viewed or selections made. Similarly the Most recently viewed dropdown box only flickers. Same this happens when using the quick search box at

  • Including HTML pages

    Hi there. I'm new to Flash but I've been working on a website that came from a Flash template. Half of the pages are in Flash, the other half are HTML (done in Dreamweaver). Is there some way I can call out to the HTML pages and include them into the

  • Add variant to broadcast settings

    Hello, I want to add a variant to a broadcast setting. I have created a varaint in the bex analyzer and one in with RSRT. When I am creating the broadcast setting and want to use the variant, I can't see the variant. Does somebody how I can see the v

  • Mail settings and accounts gone

    I have mail 3.6 and when I open the mail.app program, it start with a welcome screen. I complete the welcome, quit, restart, then the welcome screen appears again. I found the mail folder in the library and it has all my accounts and emails, but mail