solutionModel missing .putClientProperty() ?

Questions, tips and tricks and techniques for scripting in Servoy

solutionModel missing .putClientProperty() ?

Postby Harjo » Wed May 05, 2010 11:44 pm

Hi,

I can't find the function: .putClientProperty() on a button or label.
I would like to set these .putClientProperty() trough the solutionModel.

I'm I missing something? or is it simple not there?
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby pbakker » Thu May 06, 2010 9:24 am

putClientProperty() is a runtime thing. You cannot set ClientProperties at designTime, can you?

Therefor, you cannot set ClientProperties through the SolutionModel either.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby Harjo » Thu May 06, 2010 1:00 pm

Oke, than my question is, can this made into designtime property? :-)
So we can use it in the solutionModel? That would be sooo powerfull..
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby jcompagner » Thu May 06, 2010 1:03 pm

make a feature request case.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8884
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: solutionModel missing .putClientProperty() ?

Postby pbakker » Thu May 06, 2010 3:01 pm

That would be sooo powerfull..


Curious to know what it allows you to do that you can't already do now...

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby Harjo » Thu May 06, 2010 3:32 pm

For instance, if we want to set ALL or our buttons to: elements.myButton.putClientProperty('JButton.buttonType','textured') (special apple button)

we have to create some kind of global onload, than go to all our forms, and put that onLoad on it.
it would be SO much simpler if we could do this at login, with the solutionModel, than we could set such setting, without having to change ANYTHING to our excistings solution(s)
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby mboegem » Thu May 06, 2010 3:47 pm

Harjo wrote:it would be SO much simpler

above all: much faster!
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1817
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: solutionModel missing .putClientProperty() ?

Postby Harjo » Thu May 06, 2010 4:28 pm

mboegem wrote:above all: much faster!


Indeed! +1 :D
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby pbakker » Thu May 06, 2010 4:36 pm

You shouldn't do this on element level, but on global level, using application.setUIProperty('JButton.buttonType','textured');

Or is there a specific reason why you want to do this on element level?

Secondly, if you still want to do such stuff on form level, use inheritance and do it in the onLoad event of the super form.

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby Harjo » Thu May 06, 2010 4:59 pm

Paul, did you tried that?
that is not working, look here: http://forum.servoy.com/viewtopic.php?f ... 767#p66088
Maybe you know a way how to make this work, than indeed we don't need it in the solutionModel....
Harjo Kompagnie
byKom B.V.
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: solutionModel missing .putClientProperty() ?

Postby jcompagner » Thu May 06, 2010 5:48 pm

apple doesnt seem to first look into the client properties and then fallback to the default UIManager properties.
If they did that then you wouldnt need to set it on all elements yes.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8884
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Methods

Who is online

Users browsing this forum: No registered users and 4 guests

cron