How do you get the selected object from a YUI 3 Autocomplete object? - yui

I am attempting to get the array object from the autocomplete code to be able to use a string stored in the array. When I perform the on change action, I can show a plain alert, but am unable to get the array from the autocomplete code. I use the resultTextLocator successfully in the same autocomplete code, but I use it to put a person's first and last name in the text box associated with the autocomplete code. I am attempting to get the person's user id that is also stored in the array. Thank you for your help.

Subscribe to the select event & take a look at the result object. Assuming that data passed into AutoComplete has the id it should be accessible there.

Related

Multi Select List Box Document Property with Search bar enabled

I am working on Multi Select List Box document property with search field.
It works fine when I give any keyword like 'An' it gives me Andorra, Angola, Anguilla etc. I can multi-select all these 3 records and make my underlying data table filtered.
Now the challenge is, if I search for the records that starts with Z in the search bar and click Enter then the above selection is deselected/disappeared (meaning the last search elements alone will be available).
Any ideas on how to make the current selection and newly searched elements available ?
Any inputs and suggestions would be much helpful.
Attached the sample dxp file and screenshots.
I think the filtering you are doing is based on the document property attached to this multi select list box.
You can make another property and attach this value to that doc property, whenever somebody changes this value run an IronPython to append to that doc property.
Give a reset button to clear this value when required

How can I create a user defined value in Construct 2?

I want to be able to have the user type a number or use the slider bar to pick a value and have that value be stored as a global variable. How can I do that?
For getting input from the user, you can use the TextBox Object in Construct 2. If you put one in your layout, you can access it's current value in the Event Sheet at any time. You can use the On Text Changed (below) event and grab the current value by using the Text property (also below) and assign it to a Global Variable.
TextBox Manual
https://www.scirra.com/manual/117/textbox
On text changed
Triggered whenever the text in the field is modified, by typing, backspace/delete, cut/paste etc.
Text
Get a string containing the text currently entered in to the field.
Check out this little tutorial video on variables in connect 2 http://blogs.msdn.com/b/gamewords777/archive/2015/07/20/10-minutes-with-construct-2-global-and-instance-variables.aspx
Also note - instance variables are handled differently than global.

Entering multiple values using #setfield

I have a text field/editable, allow multiple values, semicolon for both Multi-Value Options property, in which I want to save current user when they click a button. On the button I have the following code:
#SetField("fieldA"; #Name([CN];#UserName));
The previous value always gets overwritten by the new. What would be the solution to have multiple values stored in?
#SetField("fieldA"; fieldA:#Name([CN];#UserName));
That will append the current user's name to the item.
You might want to look into using the #Unique function. Remember there's a 32K limit of summary field data, so don't let this list grow indefinitely. See #Subset function. Also, bear in mind that the user can save the document without clicking your button, so a Querysave event might be a better place to do this.

Getting Value Picker and HughesConnect Viewpicker combination in XPages

I have an application that uses the Ext Lib value picker from a view and it works but it is very cludgy. The reason is that there are over a thousand choices and the user has to scroll through them all to get to where he/she wants to go. I want to use the HughesConnect.com picklist CC, which is very nice. However, I am having trouble with a particular issue that is probably very simple but I can't figure it out.
I want to be able to use the HughesConnect.com picklist CC to grab one value at a time and put it into a field. Then, when the user clicks on the button again, I just want them to have the ability to grab a value and append it to the same field. Every time I run it now, it is just overwriting the field. I can't use Multi Value in the CC because the view has multi values in the column from the same document. I have found that if this is the case, it doesn't work. No matter what I try. I am not very good with arrays in XPages, so I am likely doing something wrong and to be honest, I don't even have any sample code because everything I have tried hasn't worked.
I am starting to wonder whether it's even possible but it sounds so simple that it must be.
The Value Picker allows you to add a search with a view data source. Is there a reason for not using that? I can't remember if search support multi-select. It may not.
If you want to use Mark's view picker, how about getting a bit creative. Push the value into a Hidden Input field that has an onChange event. In the onChange event, append the value to a different multi-value field. If you bind the Dojo List Text Box to your multi-value field, it will make it easier for users to deselect entries. It's a bit creative, but should produce exactly the result you're looking for.

Xpages - How to save values to list box that have been entered by client side javascript

I have a list box that I am adding and removing items with client side javascript. The issue is that these new values are not being saved to the list box(binded to field). The only value that comes back is the original one that was set in list box. The values are all there on the client since I can loop through the array. How can I get these values to replace the value that is currently there?
By default the listbox have a validator that you may not see during save, (you need to add error controls to see it) and the validator do not accept new values added using CSJS
If you set disableValidators="true" in the listbox control you suppress the validator and the save works fine. you also need to select the entries in the listbox using CSJS before you save,
Credits goes to Jesse Gallagher
Thomas
In the List Box properties, you must to set mutiple = true

Resources