Change view of form on click of button or checkbox - codenameone

I have to make a form codename-one in which i have a check box. if check box is checked then bellow it i want to display 2 combo box and if check box is unchecked then i want to display 2 text field.
How can i do it.
I have tried setVisible(true/false) but in it space consumed by label or text field is never covered up.
Please help.

You need to remove/add the components and then invoke either revalidate() or animateLayout(int) to refresh the UI.

Related

ExtJS - RadioGroup shows two selected items except one

Dears,
I have implemented a pop-up window to be shown by clicking a trigger-button of a textbox, and it has a radioGroup in it. in some cases I have to check the radio based on user input.
The problem is that if I try to invoke radioGroup.setValue() before opening the popup once, I face with two selected items in radioGroup. The issue doesn't occur if open-close the popup before trying to set the checked radio.
Is it a rendering issue or something like that?!

how to access the value of input text was nested in ui-grid cell

enter image description here
I made a cell template(ui-grid) which contains a label, a textfield, and a button. I bind a ng-click on the button. But I dont know how to access the value of textfield. Because what I want to implement is when user input value in the field and click save imagebutton and it will call ajax then do some update in web service.
I was wondering that is it possible to access the textfield from row entity, but I could not find the textfield property in the grid-cell.
thank you so much
ui-grid has built in row editor features. Try the link below.
http://brianhann.com/create-a-modal-row-editor-for-ui-grid-in-minutes/

binding ng-model to ionic popover

Need help on this.I created the following code http://play.ionic.io/app/b9c6216003eb
When the user click on the search button after typing in some text,if the text is present in 'myArray' then it should be displayed in the popover otherwise nothing
Implemented example whenever text field contains more than 4 characters, it shows popup and hides popup when it is empty.
Following is the link
http://play.ionic.io/app/1b21d83b71ba

Select Combobox with Selenium IDE

In my application I have lot of combo boxes available. I need to click an arrow button which is on combo box. I am using Selenium IDE. When I record the clicking of the arrow button from combo box it will work at that time, but when I come back to same page it will display that the element is not found.
Thank you in advance.
I recommend you to understand first, how values are coming into your combo boxes. I think when you clicked on combo box, AJAX call will be fired and values will be loaded into your combo boxes.
You can use the command "waitForElementPresent" or "waitForTextPresent" when clicked on combo box.
Do not click on combo box button while recording.......
Do right click on button and get element by ID

Clear fields that have been hidden

I have this form.
When the user checks a check box, some fields get hidden, others appear.
What is the correct way to clear the fields that have been hidden?
Use a watch?
On the click event of your checkbox clear all the fields that it controls.

Resources