Posted in: SPARK UI Toolkit Controls
Radek SulcFebruary 20, 2017 at 3:37 am #3772
is there any way how to set programatically visibility of a control to “Same as parent”?
Thanks, RadekAndrzej MichalecFebruary 20, 2017 at 4:32 am #3775
Radek, since for “none” value is “NONE” then for “same as parent” value is … “DEFAULT” 🙂
-andy.Tomáš NavrátilFebruary 22, 2017 at 4:44 am #3790
I have a suggestion regarding this problem. Spark UI toolkit contains additional CV methods like show(), hide(), setVisible(), setEditable() etc. As far as I know, none of these methods can set visibility state to “same as parent”. It would be nice to have complete set of methods for visibilty handling in the toolkit.
TomasSPARK SupportFebruary 22, 2017 at 3:55 pm #3806
Lets say I have a Table control placed inside of a Panel both set to “Same as parent”. In that case I can access both with:
tbl = page.ui.get(“Table1”);
pnl = page.ui.get(“Panel1”);
if I check the context options, it will return “DEFAULT”;
If I then set the Table visibility to false and back with
and check the context options again, I will now see that return is “EDITABLE”. Although this is no longer same as parent, if I use
the entire Panel is hidden including the table.
After setting the Panel visible again, I can call tbl.setEnabled(false) to switch the table to read only. Once I begin to change the visibility and and disabled/enabled values, there is no need to set the control back to “Same as parent” since the control is already loaded and no longer needs a Default based on the parent’s condition.
But if you really want to, you can use the context options to set the value back to “DEFAULT” with:
Stephen P.Radek SulcFebruary 28, 2017 at 4:54 am #3879
Hi there, I was of course looking for some way using SPARK UI API. So if I understand it well there is no such way at least now and workaround is needed – using direct call of Coach View framework API.
Are you going to enrich the SPARK UI API to support setting visibility to DEFAULT?
RadekRadek SulcFebruary 28, 2017 at 4:56 am #3880
And I really want to. That’s why I am asking the question 🙂SPARK SupportMarch 3, 2017 at 11:21 am #3925
Let me discuss this with the Development Team.
Stephen P.Radek SulcMarch 6, 2017 at 12:13 am #3938
the same situation is for DEFAULT and also for REQUIRED which is very often dynamically set/chenged. It would definitely make sense to have one consistent API which is in accordance with OOTB visibility – Default/Same as parent, Required, Editable, Read only, None, Hidden.
Thanks a lot,
RadekSPARK SupportMarch 10, 2017 at 8:26 am #3968
I have added a User Story to our Enhancement Request backlog per your request.
You must be logged in to reply to this topic.