ExtJs - Is it possible to have a tree with input fields in a leaf? - extjs

I'd like to expose the settings of my app to the user in a tree view. There should not be a problem to display. The setting and its value can be displayed as a text node.
Now comes the hard part. I'd like the settings to be editable. When I click on a setting, I want it to be editable, with different fields :
Display a checkbox
Display a textfield to change the value
Display a combobox with valid values
Is there a possiblity to achieve something similar, or do I imagine the impossible here ?
I saw an example which checkboxes, but I'm not sure if it is possible to mix fields.
I'm not asking for code, I just liked to know if someone already tried something similar.

That's exactly what Ext.grid.property.Grid does (minus the checkbox). Since a tree is a gridpanel with a special column, you should be able to mix the two. I would start by porting the propertygrid.

I never tried the the combobox-part, but everything else is definitely possible
All the fields are editable with with the celledit plugin
Hope this helps and I understood your question correctly

Related

ExtJS 4 - How to persist values of textfields in a floating panel when panel is hidden/shown?

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.

iAd Producer checkbox radio buttons?

I'm new to iAd Producer - what I'm really looking for is a replacement for Dashcode, since Apple seems to have abandoned it. But while it looks as though iAd Producer CAN produce iBooks Author widgets, it seems to be missing a few fundamental objects - namely checkboxes and radio buttons.
I'm sure there's a way to hack HTML and perhaps use jQuery to get the job done, but this was a relatively simple, straightforward thing in Dashcode. Am I missing something? With tools like buttons, sliders, and such, I'd think checkboxes and radio buttons would be included.
Anybody know an EASY way to replicate Dashcode functionality in iAdProducer?
Thanks!
I've had the exact same problem for the last week and finally came across a solution. You can "escape" the checkboxes in a way by including an empty onclick property to the checkbox or label that you want to affect. This should override native code that relates to cut-and-paste gestures and make checkboxes unusable. I've had success with this in iBooks Widget Tester.
Funny... we seem to be working on the same issue at the same time. Closest I've got to a solution is to build in iAd Producer using the HTML template. There you can add in the objects that are missing using HTML code while also adding drag and drop objects available in the software.
However, while I can populate my view with checkboxes and get them to be checked in iAd Producer's preview, when I preview on my iPad, I can't check the boxes. Radio buttons remain unresponsive too.

add checkbox to subtab on a NetSuite form

This may be a simple quesiton but I need to ask to be sure I am in the correct direction. In the Item Fulfillment form for example, there is a first column Fulfill that is a checkbox. Above it there are buttons for Mark All and Unmark All as well. What I would like to do is have similar functionality on one of my other subtabs. I already have a custom child record that lives on my subtab and added a checkbox bool field to the record. I could get that to somewhat work but what I would like to know is
1- is that the correct approach.
2- does it need to be a field that is selected to be saved,
3- for their functionality this only appears in Edit mode. is that a limitation?
4- I notice their "checkbox field" is not as wide as the one I made
5- Is there a way that I would only get this "field" to appear in the record when it is in a sublist and not when it is in its own custom form to create a new item? I would only have it as a checkbox in a subtab.
Or is my approach wrong and perhaps there is an easier way to do it?
Thanks
1 - You can create a check box using inline HTML field - script the check box that way. Call a client script's function to handle the click.
2 - Not really sure what you're talking about - if you mean "Store Value" in the field definition, the answer is "No".
3 - Edit mode, yes. You can't change values of a field when not in edit mode.
4 - Width of a field can be controlled on the form design.
5 - Create 2 different forms. The data entry form would not include the check box, the sublist form would.

ComboBox selection not reset to top of dropdown list (items) in javafx 2.2

I have a Source ComboBox to populate source fields (25-30 items) shown below in first page
"A"
"B"
...
"Z"
I have selected last item from ComboBox as shown below
"Z"
and when traversing to the next page after saving, i need to make the source combo selection blank, so i have return the below code to reset the Source combobox to point to first item (to reset the display to start from top of dropdown list for user selection)
// my first value in source List is empty space - “”
sourceComboBox.setValue("");
even if you use below code snippets like
sourceComboBox.getSelectionModel().selectFirst();
sourceComboBox.getItems().clear();
sourceComboBox.getSelectionModel().clearAndSelect(0);
but when i click open the combobox dropdown it still shows dropdown display from bottom as shown below
...
"X"
"Y"
"Z"
I am unable to post images for representing combobox values, so has put in above examples.
This looks like a graphics bug to me or am I doing something wrong?
I have seen similar issue reported in below question but no work around suggested so far
Combobox clearing value issue
If you want to simply "reset" the combo box, I think all you have to do is set the value to null, like so:
sourceComboBox.setValue(null);
I ran into nearly the exact same situation and came across your question while looking for a solution. Fortunately, I came up with a workaround that forces the ComboBoxes to reset. When you reset the data on your pane, instead of doing something like:
sourceComboBox.getSelectionModel().clearSelection();
sourceComboBox.getItems.clear();
do something like this...
parentNode.getChildren().remove(sourceComboBox);
sourceComboBox= new ComboBox(); // do whatever else you need to format your ComboBox
parentNode.add(sourceComboBox);
You'll also need to do a setItems() again on your ComboBox so the new one will be populated. This is not an ideal solution but it seems to be working as I expect the provided clearSelection() method would.
Below is the code you're looking for. It will reset it to whatever index you give in within the parenthesis.
sourceComboBox.setSelectedIndex(0);
Goodluck
Most of the things were giving me an error when I tried them. What worked best for me was to use this
comboBox.getSelectionModel.clearSelection();
This will essentially set the value of your ComboBox to null. Because of this, if you are referring to the value of the ComboBox in another place, it becomes important to check for whether the value of the ComboBox is null using this
if(comboBox.getValue() != null)
//Code segment here
The ComboBox control has not a method like scrollTo(index) of the ListView. So it seems hard to workaround that behavior. You can issue a feature request at JavaFX Jira.

Cannot tab out of databound Winforms dropdown list

This is a bit of a strange one, but I've been struggling for a few hours now and I can't understand what is happening.
I was wondering if anyone else has experienced this problem, and can perhaps explain it. I'm building a simple Winforms app and trying to use many of the built in controls.
Basically, I've got a form with a user control and some data capture fields. 3 of the fields are dropdown lists and on the user control I have a bindingSource control that binds directly to a Product class.
At run time I provide an instance of the Product class to the BindingSource and the class contains a property of ProductType. For simplicity I also added a List<ProductType> ProductTypes to the Product Class which loads itself when queried, which means I can just use the same bindingSource and choose the ProductTypes Data Member as the Datasource for the dropdownlist.
Upon running the form, the list binds perfectly and I can see all the product types listed, and I can select one and tab or click to the next field. But obviously the selected value won't bind because I've not chosen any bindings-SelectedValue for the dropdown, only a datasource. As soon as I make sure that the drop down modifies the instance of the Product by binding to the Bindings-SelectedValue, and then run the form, the list still gets populated perfectly and I can tab through the controls as long as I don't make a selection from the dropdown. If I make a selection from the dropdown then the dropdown holds focus. I cannot tab out for love or money and can't even click cancel button on the form, the close button top right is the only button I can click which works and I can't click any other field or dropdown. This affects all three dropdowns as soon as a selection is made.
Anyone have any ideas what I'm missing?
I have tried changing a few things and had some success by feeding the dropdown values a string[] instead of a member of an object. That seems to work, but defeats the object of using databinding doesn't it?
Any help appreciated!
Just guessing here, because I don't have time to set up a test and confirm right now, but are you doing any validating? I seem to remember that data-bound controls won't let you leave if the contents don't validate. Even if you aren't explicitly, try setting CausesValidation to False to see if there's any sort of validation going on behind the scenes, that might at least give you a hint.
Thanks for the input on this, helped me wrap my head around this.
In my case, it turns out that an exception was being thrown in one of the EventHadlers for my ComboBox.Validating event. It was hard to track down, because the IDE didn't show me that exception. I was able to modify the Exception behavior (in the debug menu) and have it show me any InvalidOperationException that was being thrown, and then I was able to track it down.
As Tom suggested, turning off CuasesValidation was the ticket to figuring it out.
For Infragisticst Dropdowns (may not be true for other winform dropdowns): If you have "LimitToList" set to true you can be stuck in a dropdown that you can't get out of without realizing it. Use the ItemNotInList even to trigger a warning message.

Resources