Fuelux Tree: How to filter items based on status checkboxes - fuelux

I have successfully implemented the FuelUx tree control but I want the user to click a different status check mark (IE active or archived) and only display the child items in the tree that contain the selected status.
Any suggestions on how to implement this feature?
Thanks,
Greg

My first inclination would be to add an active/inactive/archived/whatever class to the data source attr.cssClass key.
http://getfuelux.com/javascript.html#tree-usage-datasource
This would allow you to toggle which item state is being displayed at a given time. You could also use styles connected to the class to customize the icon based on the state.

Related

Vuetify v-combobox automatically selects the typed word when updating items

When the user starts to typing something in the v-combobox component, an axios request is sending to search users in the database. The content of the list is updating dynamically. The problem is that when items in the combobox has been updated, it automatically selects the word previously typed by the user and updates v-model (and in my case, it creates a chip on the frontend). How to prevent automatic select when updating items?
You may want to use a v-autocomplete component to get the behaviour you're expecting. You can think of combobox as a select so any input is a change/selection and autocomplete as a text field where input filters the dropdown options.
I solved the problem as follows.
Changed the v-combobox component to v-autocomplete. Made a form for adding a new user. Since v-autocomplete does not allow displaying items outside of the list, I disabled the display of v-model contents using a slot and made a custom display of v-model items using v-chip component with deletion.

Ag-Grid keep custom filter open during interaction with dropdown

I have a custom filter component I'm giving Ag grid for each column. The component contains a dropdown. When user selects an option from dropdown, the filter closes immediately on selection rather than staying open like it should.
How can I keep the filter component to stay open on selection of option from dropdown?
Reading the docs more, I found the answer here:
https://www.ag-grid.com/javascript-data-grid/component-filter/#custom-filters-containing-a-popup-element
Custom Filters Containing a Popup Element
Sometimes you will need to create custom components for your filters that also contain popup elements. This is the case for Date Filter as it pops up a Date Picker. If the library you use anchors the popup element outside of the parent filter, then when you click on it the grid will think you clicked outside of the filter and hence close the column menu.
There are two ways you can get fix this problem:
Add a mouse click listener to your floating element and set it to
preventDefault(). This way, the click event will not bubble up to the
grid. This is the best solution, but you can only do this if you are
writing the component yourself.
Add the ag-custom-component-popup CSS
class to your floating element. An example of this usage can be found
here: Custom Date Component

What is the proper way to display a shared info panel for a list of items?

I am developing a web page. This page contains a list of items on the left side, and a information panel on the right side to show some summary information specific to the selected items see below:
When one item is selected by user, the information panel's content should be updated to show the active item's content.
My Question:
What is the proper way to implement this:
Spawn one information panel per list item. Then hide/show the the information panel for the active list item.
Make only one information panel globally. Then update the information panel's content based on list item selection?
Because I am using Angular 2 and Bootstrap, advices specific to these libraries are appreciated. (For example, shall I use route to implement the item-click-to-summary-display? Is there a component in Bootstrap library that is specifically for such purposes? )

Vaadin: Reload ComboBox List while typing

I got a ComboBox in Vaadin and want to reload (from db) the set of entries in the dropdown list while typing in the text field of the ComboBox. I always got the exception:
java.lang.IllegalStateException: A connector should not be marked as dirty while a response is being written.
I tried to lock the session (getUI().getSession().getLockInstance().lock();), but it didn't help.
Is it possible to dynamically set/load the selection list of a ComboBox?
Cheers
Stefan
why do you want to change the content from DB as the user type? you'll get a postback and a query every key the user presses... isn't better to use the standard combo feature (which tries to autocomplete the value given what the user is typing)?
Anyway, if you really need this feature, you may extend the standard behaviour of combo extending the container behind the combo, as the data shown is taken from a container.

Apex radio button check from controller

I have a scenario and i ma getting no where:
I am having 20 record and i m using pagination via standartcontroller and my page size is 1.
one by one record are displayed on the screen and i am having a list or radio button to select options.
When user select a radio button i am getting its value and fill a map with record,value for some processing.
What i want to do is that when a user hits back button the option he has selected in radio button must be visible there. But its not coz every time i m filling new values in the radiobutton list so old values are not sustained.
What i want is when user hits back button he should be able to see the old radio button selected.
How can i achive this:
1.Is there any way to make a radio button list's values be checked through controller.
2.Do I need to use wrapperclass to do this.
Help needed.! Thanks
It will be easier to put this field into object. If you don't have such field in you sObject than I would suggest to create wrapper class in your controller and display list of this wrappers instead of your native sObject.
If your radio button field is already part of the object, then there's no need for a wrapper class, but if the radio button doesn't need to be part of the object then use a wrapper class to keep the object simple.
Check out this example of a wrapper class with check boxes.
Wrapper classes don't have to be complex.

Resources