How to add a tick symbol to AutoCompleteTextView item suggestion? - kotlin

I already have a AutoCompleteTextView with custom layout and adapter. How can I control the visibility of a tick symbol next to each item to show if the item has already been added? By added I mean, it's compared with another list that's fetched from storage that I compare with the AutoCompleteTextView suggestions?

What do you mean is an Exposed Dropdown Menus, available in the latest material design library.
Please read the documentation about how to implement it: https://material.io/develop/android/components/menu/

What I needed to do was to have the tick icon in the custom layout be View.INVISIBLEby default. Then in the getView() method of the custom adapter, change the visibility according to the requirement for that specific situation. The point is, the getView() method is responsible for any changes to related to the UI of the items.

Related

Refresh button in React-admin

I'm trying to access the refresh button in react-admin project. I tried using getElementsbyClassName it returns HTMLComponents Object but it isn't accessible i.e I can see the component on printing it to console but isn't accessible by code. Is there a way for me to disable this refresh button wherever I want?
I'm not sure the exact use case here, but you can create your own custom AppBar that renders essentially whatever you want: https://marmelab.com/react-admin/Theming.html#replacing-the-appbar.
also see this GitHub issue that mentions removing it entirely: https://github.com/marmelab/react-admin/issues/3383
Within your custom AppBar you could have some logic checks within your custom AppBar if you know ahead of time when you'll want it disabled (like on a certain page/component).
If you need it to be more dyanimcally disabled, you could probably have a very high-level context/state to control that as well..
**NOTE: I have built a custom AppBar before, but I haven't done any selective rendering or disabling within it. So, I can't guarantee that this is exactly correct, but it fits with other custom components I've built.

Where can we add our event data to cytoscape triggered events?

Looking to find where we can insert our own data for triggered events.
I have an extension that use to call onImpl(events, selector, data, callback), but that was back in 2.3.7. What is the updated way to add my event data if I want to pass data that can be used with the event?
As far as I know, it is not possible to pass data to core events anymore. But you can do it when you emit the events programmatically.
I'm assuming this is the extension that you mentioned. If you just want the paz/zoom functionality, you can use the pan-zoom extension.
I'm not sure if a toolbar extension would be any useful. The customization of the toolbar with an extension would be very limited. You can create a fancy toolbar, style and position it as you like and connect the buttons with Cytoscape events with jQuery or other similar libraries.
P.S: instead of passing the data to the event, you may keep the data in a global variable and access it from callback function.

xpages view picklist custom control

I am using mark t hughes view picklist custom control from open NTF.
Link to control on openNTF
I have set all the paramenters etc, however when I load the page with the control on, I get my custom error page, and the error below in my error logging database
Error on dialog1button5999 null property/event:
1:
Script interpreter error, line=1, col=35: [ReferenceError]
'compositeData' not found
compositeData.picklistButtonClass + " domfindmebutton5999"
This is trying to set the styleClass of a button in the custom control here:
<xp:this.styleClass><![CDATA[#{javascript:compositeData.picklistButtonClass + " domfindmebutton5999"}]]></xp:this.styleClass>
I am also definately passing this parameter is with the default code:
picklistButtonClass="button2"
I also followed the video Here to the letter, and still get exactly the same issue.
Has anyone come across this before or have any pointers as to where I should be looking to resolve it? Im not sure where to start, as all the instructions and video's explain how to complete the custom properties of the control, but there is never any mention of a need to actually modify any code WITHIN the custom control....
Thanks
(as a side note, I am using bootstrap, should this make any difference)
This is because of the theme definition. Look at the Mark Leusink's blog entry here. http://linqed.eu/2014/08/28/xpages-gotcha-modeconcat-in-your-themes/
If a theme has a "concat" definition, that will be computed at a very early phase. To concat values, it needs to compute the initial value. However, in some cases (e.g. Repeat, Custom control, etc.), the initial value cannot be computed at the page-load section.
For such cases, you can override the theme with a special themeId, as Mark suggested.

change cell styling in KendoGrid

Just discovered the KendoGrid and was trying to change the style of an individual column(cell) after changing another cellvalue. For example I have a grid with a shipname and shipcity column. Suppose I have a business rule that says :
'Make shipcity cell value disabled when the shipname on the same row has the same value'
I found this sample which uses the blur event which I probably use, what would be a good way of implementing this rule?
Also nice to know your opinion in relation to asp.net mvc integration.
jsfiddle link:http://jsfiddle.net/dingen2010/begjT/1/
Updated the link:
You can try the updated fiddle example here
Basically conditional editor templates are not supported out of the box. You have two options.
Either use the edit event of the Grid find the editor inside e.containder and disable it the way it needs to be (if using Kendo widget use the enable(false) method, or add the readonly attribute if regular input).
The other options is to define custom editor like demonstrated in this JsBin example.

How do I call DSOperationType.REMOVE to remove the selected record from a drop-down grid?

I am trying to delete the selected record from the drop-down grid.
In trying to do this, I've so far learned that DSOperationType.FETCH is called when the fetchData() method is called on ValuesManager class. So now I want to know what line should be executed for calling DSOperationType.REMOVE.
Or is there a better way to accomplish this task?
DSOperationType.REMOVE will be called only when removing data/row from list grid or tree grid. It can be triggered functionally by calling ListGrid.removeData(someData) or ListGrid.removeSelectedData();
But for ComboBox/SelectBox (DropDown) type item there is no functionality to remove data from list as it can only be selected from a list of data (while loading data for list FETCH operation will be called).
You can implement the functionlity indirectly by using Combobox/SelectItem with listgrid - (ex:http://www.smartclient.com/smartgwt/showcase/#dropdown_grid_combobox_category). In listgrid you can have remove data functionality. Also check other types of functionality that can be implemented with combobx http://www.smartclient.com/smartgwt/showcase/#multi_select_combobox_category