Hello Team, question regarding the cursor position in the LOV component. We have a default value (%) which we put into the search field. In the code it would be something like that: api_lov.setSearchField('AIRP', 'airp_lov1.code', '%'); After that we perform the query execution: api_datasource.executeQuery('airp_lov1'); And then we show the LOV: The cursor position is set to be after the percent sign (%) (can't upload file because of insufficient carma). https://yadi.sk/i/tti8WAUbpUG5m The issue is that in the most cases people search by the first symbol and they need to perform an additional step to move the cursor before the percent sign. Is there any way to place the cursor at the start of the input? Thanks and best regards, Anatoly |
I don't think there is a api to set the cursor position (Formspider Team correct me if I'm wrong) but it should be possible to do with a little bit of javascript. I have a working demo of this and if there is enough interest I can put a tar file somewhere, but I'll put instructions below Create a new application with the following xml in the mainPanel
create a .js file and paste the following code into it
I've put mine in the "js" subdirectory and called it cursorTest.js next edit the main.jsp page and add the following line just after it adds the fs-all.js file
Next in the formspiderIDE create a new external method with the following settings:-
Leave everything else blank, hit OK For the demo I've created a simple "init" procedure that is called when the app starts and the code is below
When you now run the application the cursor should be positioned at the start of the field. hope this helps Simon thanks for the reply. though your code works only in IE - it gave a right direction for the further investigation
(29 Feb '16, 09:59)
viktorK
definately works on the version of firefox included in the Oracle Developer VM, but I have to be honest I didn't check it in any other browsers.... glad it helped though
(29 Feb '16, 10:27)
apacheuk
|