PlayBook not displaying user interface components do not

I have the following code inside a class that extends the container:

var button:LabelButton = new LabelButton();
button.label = "Button 1";
addChild(button);

var button1:LabelButton = new LabelButton();
button1.label = "Button 2";
addChild(button1);

When I run in the Simulator, all I can see is the button with the label "Button2". I guess "Button 1" is below. Why is this?

Problem solved, I needed to set the size of the container... buttons then displayed correctly.

container.setSize (...,...);

Tags: BlackBerry Developers

Similar Questions

  • [ADF, JDev12.1.3] How to add user interface components in a page before you display it or hide it?

    Hallo,

    I started to raise this issue with the rohanwalia type () in this thread Re: Re: [ADF, JDev 12.1.3] how to hide menu items based on the logged-on user but maybe it's better to make the question in a separate thread.

    I have a page home.jspx with some user interface components (menus bars, text entry, buttons,...).

    Unbounded workflow

    loginPage.jspx - loginSuccess-> home.jspx

    Based on the logged in user, I programmatically to hide (for example some buttons and menu items) or to add UI components on the page home.jspx.

    Thus, in the managed bean (request scope, right?), associated with the page I want to write a method that before appear the home.jspx makes the task above.

    {initPage()}

    Here, I call an AM method for each component that says that if

    -According to the user - it should be visible or not.

    This information is stored in a Boolean vars, one for each component.

    IT1.setVisible (it1visible);

    IT2.setVisible (it2visible);

    B1.setVisible (b1visible);

    ...

    }

    How can I do to make this method runs automatically when the page is rendered?

    Thank you

    Federico

    Hi Federico

    you use links to visible false, but before pageload links are not accessible at the bean so when you call after the page load button works but before pageLoad, it won't

    so rather than use binding use variables of bean to the value true or false and provide references to the visible property of inputField

    Suppose that to create a Boolean variable and getter setter now is the button click set a value false

    Thank you

  • bean, containing the business logic and user interface components

    Hello experts design ADF, please guide me.   I came across a critical design aspects.  I have the homepage with a lot of UI, region 1, region 2 components. I bind the components of the user interface of the page at a session scope managed bean and is the reason why, when control passes to the region 1 or region 2, I'm going to do a lot of processing logic and then on that basis, I have to update the page user interface components.   Same thing with region 2 also.  And then I should be able to access the information in all regions and also through other components of interface user etc.

    I see only the scope session bean can help me here to get my tasks in all regions and in all the other components of the interface user to the page because I'm not able to spend too many parameters in all regions.     Now the problem is, I can't serialize this bean because as I've mentioned a lot of user interface components are updated based on logic.

    If I do not serialize the bean, I might have a problem in the future when the application must be deployed to the cluster envt.

    I don't know how can I go with my design now.   Please give me ideas, brilliant and very grateful for your advice.

    Thank you

    Hello

    I did not follow the entire thread, but this last message, I can tell that you are not using ADF how it should be used. So let me address two issues

    1. I use data controls generated on methods of bean managed my areas (workflow).

    If you create a POJO data control that you configured as controlled beans then this will be two instances (separated) from the same Java class. This means that they do not share anything. The only option to share state between a managed bean and a data control is if you would have the data dynamically control bean up the bean managed using the language of Expression of the 8which then however creates a dependency between the DC and the bean - however, there are use cases like that)

    2 activation / deactivation of the buttons in the parent view of a region

    This can be done using bean-injection, which is a bean managed in extended view defined on the parent view that you pass as parameter for the workflow. See: http://www.oracle.com/technetwork/issue-archive/2013/13-may/o33adf-1920483.html

    As said, I haven't read the entire thread, but want to point out that there is enough information in writing (product documentation) and video (Insider ADF - who teach the development of SFM practices http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfinsider-093342.html take the time to review this)

    Frank

  • Interact with the user interface components

    I'm trying to find a GOOD way to interact with the external classes user interface components. For example, that you have a 'controller' class that needs to access the view of the user interface in some way (define a label text or something else). The controller class does not do anything, it discusses only the logic of what should be the case. Currently, it is created by my top-level class when the program starts. He listens to some events occur and needs to update/interact with the user interface or the State of the application depending on what events are. I do not seem to be a way for this controller class to easily access the UI component that I need to get my hands on.

    I'm trying to do to reduce the size of a file of mxml WindowedApplication growing (LOOK cool but that is not important) and take part of the logic of the application of this file.

    It's complicated by the fact that the label is in a State that does not have the status of 'base' (so it is not a child, or even a subsidiary child of the main class at boot time) and by the fact that it is not yet near a high school component. (If that were the case, I could probably just pass the label object in the constructor for the outdoor classroom.)

    In other words, I can't just call getChild ("labelName") on my 'main' request object because it is buried nested inside OTHER components. I don't think I like the idea to browse all components and sous-composants recursively looking for the component that my outer class trying to ask. I thought about other ideas, but I don't like any of them enough to try them, eh.

    I'm at the point now about where I come to the conclusion that my fundamental design strategy is wrong, or Flex just not allowing complex applications where the GUI components can interact with external classes relatively pain-free. I'm not convinced that "Flex cannot do', I'm looking for advice on some great Flex application in all design patterns.

    Where do you put this kind of control logic, and what happens when it starts to overflow and become so large that you need to break in other files?

    Found a solution, I think that's what I've been looking for:

    http://labs.Adobe.com/wiki/index.php/Cairngorm

  • Panel/container for the user interface components?

    Forgive my ignorance, I'm sure this is a stupid question with a simple answer, but I am new to both Adobe dev and QNX.

    Is there anything for an Air application on the Playbook that acts as a container for the elements of user interface - similar to, say, the StackPanel in Silverlight? My preliminary research on Actionscript itself says not, but so far, the QNX components have been the saving grace of this platform, so I hope that there is a component of QNX UI that I don't know

    Thank you.

    Hey deeko,.

    Yes, there is a class called (ironically) container that can help you with what you want. Here is the Doc of the API and information with examples for this:

    http://www.BlackBerry.com/developers/docs/airapi/1.0.0/QNX/UI/core/container.html

    im going to assume that you have not yet watched on the COMPRESSED AIR SDK library yet, so here is the link in case you were curious about other things you need in the future:

    http://www.BlackBerry.com/developers/docs/airapi/1.0.0/index.html

    hope that helps. Good luck!

  • XML, binding of user interface components

    Can I link to the user interface component properties to XML data that is read from an HTTPService? I would like for example bind the text property of a TextInput to the myXML node tag.

    (no real source)
    [Bindable]
    private var myXML:XML is the event.result returned by a formatted HTTPService-e4x;.

    It does not work
    BindingUtils.bindProperty (myXML, "Node", myTextInput, "text");

    < mx:TextInput id = "myTextInput" >


    I know that this is possible to do with < mx:XML > and < mx: Model >, but this habit ever because these tags need to know the source XML during compilation (right?).

    Thanks for any help.

    EDIT:

    Nevermind :), it works very well!

    Can I link to the user interface component properties to XML data that is read from an HTTPService? I would like for example bind the text property of a TextInput to the myXML node tag.

    (no real source)
    [Bindable]
    private var myXML:XML is the event.result returned by a formatted HTTPService-e4x;.

    It does not work
    BindingUtils.bindProperty (myXML, "Node", myTextInput, "text");

    I know that it is possible to make the and , but this habit ever because these tags need to know the source XML during compilation (right?).

    Thanks for any help.

    EDIT:

    Nevermind :), it works very well!

  • How to expose the user interface components in a managed bean?

    Hi all
    I created a jsf page without exposing user interface in controlled beans components.
    And the page is created successfully.
    But now I want to expose components from user interface again controlled beans
    How to do this?
    Help, please

    Select your device in the main menu Jdeveloper, in the property Inspector find Binding property--> click on edit to bind this component to a property of the managed bean.

  • Need to reference the style user interface components

    Hello

    I am struggling to find good documentation with examples on how to style

    buttons, background - color, border, background...

    I am developing an application with a clear with blue background

    three main links/keys that blend into a background that change color

    on hover.

    I want to make it look like links on the web page that don't stand

    on the color of fonts and that hover slightly change.

    At the moment I have three buttons, but they look very big and clunky and I

    don't know where to find a good guide to change style for user interface elements.

    Could someone please provide link to these resources or examples.

    Thank you advance.

    (if you intend to say 'have you tried Google', please Don't)

    On the bottom

    ------------------------

    Through these discussions.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=45613#M45613

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=39156#M39156

    On the button

    ------------------

    Audit of the custombuttons sample shipped with the JDE.

    Also give a glance to the next CustomButton.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=37909#M37909

    Concerning

    Bika

  • The Source Air open (fuse) user interface components

    Hello

    I have seen that RIM is very friendly toward software open source. You guys make a nice contribution to major projects such as Qt and WebKit. You also have cool open source products like waving and WebWorksSDK. You still contribute to the porting of many C/C++ libraries open source and executives for the NDK.

    This is impressive. But isn't something missing?

    No AIR open source, frameworks libraries what so ever? At least, I couldn't find anything. Y at - it all? You guys make contributions to any Air project open source? If so, please share and market them.

    My plead and I guess that's also him argue many other Air developers, must throw open sourcing your Air projects such as the fuse of UI components.

    This idea is an absurd idea given what we saw? It would not correspond to that guys are trying to achieve with other frameworks?

    Let's talk. I guess that we all want to hear.

    See you soon.

    Hello world. We do not have any current plans to open source the components of our BlackBerry SDK for Adobe AIR. There are intellectual property issues with going in this direction. If we are able to change this in the future, I will let everyone know.

    Kind regards

    Dustin

  • Suitable dark theme on the user interface components

    Hello!

    I was wondering if there is a way to allow simply dark skin of QNX ui in your application, without defining each SkinAssets components one by one?

    import qnx.ui.theme.ThemeGlobals;
    
    ...
    
    ThemeGlobals.currentTheme = ThemeGlobals.BLACK;
    

    Is supposed to do, but not all QNX controls seem to pick it up.

  • [ADF, JDev12.1.3] Scope of session bean: it can contain attributes related to the Value property of user interface components?

    Hallo,

    I have a defined session bean in which I put a string attribute that is bound to the Value property of an InputText in my testPage.

    public class SessionClass {
    
      private String text;
    
      public void setText(String text) {
        this.text = text;
      }
    
      public String getText() {
        return text;
      }
    }
    

    When I run the testPage, it is not displayed.

    Perhaps this kind of linking is not possible?

    Thank you

    Federico

    Never use prefix in scope to the standard servlet scopes (request, session, application)

    So it would be: #{sessionClass.text}

    Dario

  • problems with disappearing/reappearing user interface components

    We are developing a Flex application for web environment in our society and have stumbled on a rather strange problem. Me and a college of mine have been scratching our heads for several days for this.

    We use navigator tab to switch between different custom components. Custom components all work as they should, but the problem sometimes occurs when you switch from one tab to another. The content of the tab disappears and so does the other tabs, apartment of one selected and the two buttons we are having above the tab navigator. Then the interesting part, all buttons and tabs reappear when I get my mouse on them, not all at once, but when I get my mouse on them. The text that is contained in the tab appears at the time where I change the tab in my browser and come back to enforcement tab setting tab browsers creationPolicy = "all" only sort of fixes the problem the buttons no longer disappear. This does not create a new kind of difficult problem, some of the features other tabs fires a little too early in a sense that they are not necessary at this time to fire, in fact they are not ment to be fired before selecting this particular tab in fact.

    I hope I wasn't too little clear explaining the problem. Does anyone have an idea what would cause the problem? Any help would be greatly appreciated. Thank you in advance.

    Maybe an invalidateDisplayList() call the browser to tab after a click will set the whiteness.

    Custom components, particularly those written in AS3 which draw and discount isn't like the rest of the Flex Framework seems to cause random white boxes in my experience.

  • User interface components

    I noticed in my flash MX 2004 UI components and want to use the ComboBox control to a quiz.
    I want the user to select the issue of 2 combo and when you click a button, it will lead the user to this question, the user has selected.

    For example. Term 1 year 10 (term is a combo and the exercise is another combo for the user to choose)

    But I don't understand what makes the 'data', 'editable', 'labels' and 'rowCount' in the component settings tab.
    How to use the drop-down list boxes to allow the user to choose the question he or she wants to try?

    Sorry for the inconvenience.

    FiOh

    In your application, create a dynamic text field and set its property of the var in the property inspector as "quesStr". Put the two components of radio button and name it as "r1_btn" and "r2_btn". Put the two drop-down list boxes and name them as 'cbTerm' and 'cbExercise '. Finally, place an instance of button and name it as "disp_btn".

    The label for the drop-down list box property indicates the list when you pull it down. (if you set the property editable to true, then you can change the text box and provides the rowcount property to display the number of items when you pull the bottom. ownership of data is associated with the database)

    In the label property, enter '1' and '2' for the combobox cbTerm and '9' and '10' for the cbExercise combobox control.

    Now, fix the code.

    Make sense?

  • How to render the permission-based user interface components

    After login, the welcome.jspx will be open to authenticated users. It has some components such as the 3 inputtext fields and delimited tables.
    User A and B are at different levels of security. The user can see 2 inputtext fields. B can see all the components.
    How to make these components of this page? Can someone tell me where is the tutorial?

    You can set the visible property to a method inside a bean.
    to get the name of the authenticated user, visit this link:
    http://Biemond.blogspot.com/2009/03/some-handy-code-for-backing-beans-ADF.html

  • Problem with user API 5.0 interface components

    Hello!

    I have a problem with the user interface components.

    My application needs of the analogues of the toolbar and PaneManager (as in api 6 and higher) in BB API 5, but I have no idea how to make them.

    Please, need help

    Toolbar can be made with evenlyspacedhorizontalfieldmanager in the Advanced UI package available on the java dev site of bb.

Maybe you are looking for