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.
Related
I don't know if it's possible, but I want on columns Panel- DataGrid, that when only one column is visible, I can no longer click on the button to hide it. For example, in the attached picture, the button for Column3 should be disabled, so that I cannot hide it. I searched in the documentation but did not find certain props that would help me. . Do you think this is possible or are there certain props that would help?
Thank you !
I have a Problem with longer Names in my Buttons. I made the Text of buttons centered in the designer but it seems there are Problems with longer names. Here is a screenshot:
Second thing is about the Validator. I have equal Validators on a new and edit Form. The new form is perfectly, but when the user wants to edit, the TextFields are filled already with his former input, though, the Validator says that the user has to add something to the required TextField, only when the user taps the TextField and untaps it again, the Validator accepts the values. Is this a known bug or am I doing something wrong?
Thank you in advance.
If you call setText() after setting the validator it might not be triggered. You should install the validator after setting the text.
I am building an ExtJS4 Web Application and there's a part where the user is shown a "Search Panel". It's basically a floating panel with textfields and a gridView. The textfields allow the user to put his or her input for first name and last name filters. There's also a combo box that the user can use to filter the search. The results are shown in the gridView. The search functionality works well.
However, when the floating panel is hidden and then shown, the fields are reset and the user would have to enter the input once more.
What I want to happen is for the textfield and combobox values to persist even though the panel is hidden then shown again. I have tried using setVisibility(false) then using setVisibility(true) but that did not work for me.
How can I persist values of fields when their parent view is hidden/shown?
The fields should have retained the value as you are just hiding and showing the search panel. It seems there is a bug in your program, but I cannot ascertain that without seeing some code. Assuming that your search panel includes a close button, I would suggest you to use closeAction: 'hide' on the panel instead of using setVisibility(). Also make sure that you are not creating multiple instances of search panel, use a single object of search panel.
Here is a quick fiddle http://jsfiddle.net/DirtyParadoxx/gL9aekzz/
If you want to use cookies, then as Nikolay Lopin suggested, stateful: true would be a nice way of doing it.
I have created a web page which consist of text boxes and check boxes. The collaboration between the text boxes are working fine but there is no check boxes collaboration. How to do coding for the check boxes so that the collaboration can happen? An example will help greatly. Please advise...thanks.
You need to store the state of the checkbox somewhere in the data model, probably as a boolean. You update the value when the user checks the checkbox, and listen for change events to find out when a collaborator changed it and then update the checkbox yourself.
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.