(RDMLX) Any way to force a focus refresh?
Re: (RDMLX) Any way to force a focus refresh?
Your called objects should not be extending LRNG_FORM - they should be extending PRIM_OBJT. Otherwise you have multiple instances of LRNG_FORM
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RDMLX) Any way to force a focus refresh?
Passing the main form reference around is a useful technique.
Need to be careful with the called methods being in a different Role(*EXTENDS #LRNG_FORM) VL object.
They really should be clustered into a Role(*EXTENDS #PRIM_OBJT) object - otherwise there are going to be two or more class #LRNG_FORM objects floating around - which has instantiation performance implications - and possibility of confusion of #Com_Owner -v- #FormView references.
Not necessairly #PRIM_OBJT - as long as is it something other than #LRNG_FORM or any descendant of it.
Need to be careful with the called methods being in a different Role(*EXTENDS #LRNG_FORM) VL object.
They really should be clustered into a Role(*EXTENDS #PRIM_OBJT) object - otherwise there are going to be two or more class #LRNG_FORM objects floating around - which has instantiation performance implications - and possibility of confusion of #Com_Owner -v- #FormView references.
Not necessairly #PRIM_OBJT - as long as is it something other than #LRNG_FORM or any descendant of it.
Re: (RDMLX) Any way to force a focus refresh?
Changing to prim_objt on ttier 2 and tier 3 here still has same effect of no focus.
Any solution or just another enhancement request?
Any solution or just another enhancement request?
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RDMLX) Any way to force a focus refresh?
We don't know yet.
Will post a response when we have figured out what the issue is.
Will post a response when we have figured out what the issue is.
Re: (RDMLX) Any way to force a focus refresh?
There is a plan to add a new property to the dropdown for RV16. This new property will force the dropdown to display expanded, even if it currently has focus.
The existing Hasfocus will continue to work as it always has done. (What it does is reasonable - it is just not what you want it to do)
You can wait for the new property in RV16, or you could use IsNewForm := true, or there is a workaround.
Earlier I suggested that the workaround was to set the dropdown to null.
i.e.
* Set to null
#Com_Owner.Set_Null Property('MYDROPDOWN')
*then load the dropdown items and display the dropdown
#Com_Owner.LoadDropdown uName('MYDROPDOWN')
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name('MYDROPDOWN') HasFocus(True)
This works for most scenarios.
The reason this did not work for your scenario is because your dropdown is displayed inside a Table cell.
Table cells cannot be individually set to null. What you have to do is set the table row to null, and recreate it.
So if you change your code to delete and recreate the Table row (and the dropdown in it) you will find that Hasfocus(True) will cause the dropdown to display as expanded.
* delete the Table row
#Com_Owner.Set_Null Property('TableTest.Row%2')
* recreate the table row
#TableRow := 'TableTest.Row%2'
#Com_Owner.Set_Label Name(#TableRow + '.Title') Text('DropDown 1:')
#Com_Owner.Set_Dropdown Name(#TableRow + '.Value') Disabled(False)
* Load the drop down
#Com_Owner.LoadLevel2 uName((#TableRow + '.Value'))
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name((#TableRow + '.Value')) HasFocus(True)
The existing Hasfocus will continue to work as it always has done. (What it does is reasonable - it is just not what you want it to do)
You can wait for the new property in RV16, or you could use IsNewForm := true, or there is a workaround.
Earlier I suggested that the workaround was to set the dropdown to null.
i.e.
* Set to null
#Com_Owner.Set_Null Property('MYDROPDOWN')
*then load the dropdown items and display the dropdown
#Com_Owner.LoadDropdown uName('MYDROPDOWN')
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name('MYDROPDOWN') HasFocus(True)
This works for most scenarios.
The reason this did not work for your scenario is because your dropdown is displayed inside a Table cell.
Table cells cannot be individually set to null. What you have to do is set the table row to null, and recreate it.
So if you change your code to delete and recreate the Table row (and the dropdown in it) you will find that Hasfocus(True) will cause the dropdown to display as expanded.
* delete the Table row
#Com_Owner.Set_Null Property('TableTest.Row%2')
* recreate the table row
#TableRow := 'TableTest.Row%2'
#Com_Owner.Set_Label Name(#TableRow + '.Title') Text('DropDown 1:')
#Com_Owner.Set_Dropdown Name(#TableRow + '.Value') Disabled(False)
* Load the drop down
#Com_Owner.LoadLevel2 uName((#TableRow + '.Value'))
#Com_Owner.Set_Dropdown Onvaluechange(LEVEL2CHANGED) Value(*blanks) Name((#TableRow + '.Value')) HasFocus(True)
Re: (RDMLX) Any way to force a focus refresh?
Thanks. I will wait for R16. Is there an eta on this?
-
MarkDuignan
- Posts: 346
- Joined: Wed Apr 18, 2012 10:33 am
Re: (RDMLX) Any way to force a focus refresh?
Next 2 to 3 weeks if all goes well.
Re: (RDMLX) Any way to force a focus refresh?
How do I do this now in V16?
I have client updated but assume that I need new server piece. What is the new property to force the expansion called? I did not see it in the documentation.
I have client updated but assume that I need new server piece. What is the new property to force the expansion called? I did not see it in the documentation.
Re: (RDMLX) Any way to force a focus refresh?
The new property is in the documentation for a dropdown - it is called PickerOpen
http://www.longrangemobile.com/docs/lan ... opdown.htm
http://www.longrangemobile.com/docs/lan ... opdown.htm
Re: (RDMLX) Any way to force a focus refresh?
Thanks Mark I installed and it works now!