How to initialise a model property

Forum to discuss the new web client version of Servoy.

How to initialise a model property

Postby ashutoslenka426 » Mon May 29, 2017 12:57 pm

Hi All ,

I am developing a textbox webcomponent . There is an input type spec property . now it is showing three values - "default , "text" , "password" . I want it to directly set to "text" when dropping the component . how can I do this ? . Please provide some suggestions .
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: How to initialise a model property

Postby Andrei Costescu » Mon May 29, 2017 1:14 pm

From Specification (.spec file) - Example section:

Code: Select all
"horizontalAlignment": { "type": "int", "tags": { "scope": "design" }, "values": [{ "LEFT": 2 }, { "CENTER": 0 }, { "RIGHT": 4 }], "default": -1 },
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: How to initialise a model property

Postby ashutoslenka426 » Mon May 29, 2017 1:29 pm

Yes I got that but how can "left" text be displayed on default dropping of webcomponent ? . There should be no default .
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm

Re: How to initialise a model property

Postby Andrei Costescu » Mon May 29, 2017 1:46 pm

What do you mean there should be no default but "left" should be displayed on default.
Do you mean something like:

Code: Select all
"horizontalAlignment": { "type": "int", "tags": { "scope": "design" }, "values": [{ "LEFT": 2 }, { "CENTER": 0 }, { "RIGHT": 4 }], "initialValue": 2 }
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: How to initialise a model property

Postby ashutoslenka426 » Mon May 29, 2017 2:17 pm

Thanks for your reply . it is working now.
AL
ashutoslenka426
 
Posts: 295
Joined: Thu Jan 26, 2012 3:38 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 11 guests