I do not see any way of doing this. If the tab sequence on the textbox is set to 1, and the page is refreshed, then it refocuses the textbox first. I tried using some kind of session variable button click combination where the value for the textbox is stored and reloaded into the textbox automatically, and the whole mashup refreshed upon button click, but this didn't work.
Ok, I got it! You can force refresh the page, and this will force auto-select the textbox so long as it is set to tab sequence 1. Here is what you need to do:
1. Create a session variable (see KCS Article CS249180 for a basic session variable example)
2. Because you are binding the value from this textbox to a session variable, back to the same textbox, you need to use a setter method and getter method. Otherwise, the textbox session variable will just be overwritten when the page is refreshed
4. Import this setter method and the GetGlobalSessionValues service from the CurrentSessionInfo resource in the Data tab on a mashup:
5. Add a textbox, button, and validator widget to the mashup
6. Bind the "Text" target from the textbox to the set service
7. Bind the session variable under All Data in GetGlobalSessionValues to the textbox "Text" target
8. Bind the Click event from the button to the setter service created in step 3
9. Bind the ServiceInvokeCompleted event from the setter service created in step 3 to the validator widget's "Evaluate" target
10. Set the expression of the validator widget to "location.reload()"
11. View the mashup, enter a value into the box, and hit the button; the page should reload and the box should now be selected with the same text as previously entered
Let me know your further questions on this
Hi Simon, this is the way ( low level tweaks )
Knowing that there's jQuery behind the scenes and looking on HTML generated by a textbox:
Add and Expression Widget, and set it with $("#root_Textbox-4-bounding-box").find("input").focus() and you just need to trigger it, where Textbox-4 it's the TextBox Id that you will find as the first property on the TextBox on the Mashup.