I have a screen which shall be used for editing and for displaying data. If the program is called in edit mode all textboxes are open. If the program is called in view mode all textboxes should be disabled. I know that i can do this by binding an disabled indicator to every input field. But i am looking for more simple solution. So i found in the Visual Designer the keyword "protect" on screen level. I tried to set this property. But there is no effect. I can edit all fields.
Where is my mistake?
Dieter
How to use protect
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
-
- Profound User
- Posts: 64
- Joined: Thu Aug 04, 2011 4:53 am
- First Name: Karl
- Last Name: Fritz
- Company Name: Logic IT Services
- Address 1: Fluhgasse 141
- City: Laufenburg
- Zip / Postal Code: 5080
- Country: Switzerland
- Location: Switzerland
- Contact:
Re: How to use protect
Hi Dieter,
The protect keyword is a DDS keyword, adapted by ProfoundUI. This keyword does not affect the record format in which it is specified. And it requires the overlay keyword too.
More informations about:
http://publib.boulder.ibm.com/infocente ... fptect.htm
Hope this helps.
Regards,
Karl
The protect keyword is a DDS keyword, adapted by ProfoundUI. This keyword does not affect the record format in which it is specified. And it requires the overlay keyword too.
More informations about:
http://publib.boulder.ibm.com/infocente ... fptect.htm
Hope this helps.
Regards,
Karl
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: How to use protect
I agree with Karl. To use the PROTECT feature in green-screen, you have to first display the screen, then write the screen containing PROTECT, and it'll protect the fields that are already on the display. This is a confusing feature, but... that's how it works, so we needed to do it the same way in Profound UI to preserve compatibility.
You might consider using JavaScript to protect your fields, instead. For example, you could use the getAllFields() API to get all of the fields, and then use applyProperty() or similar to disable the field.
You might consider using JavaScript to protect your fields, instead. For example, you could use the getAllFields() API to get all of the fields, and then use applyProperty() or similar to disable the field.
-
- New User
- Posts: 7
- Joined: Fri May 24, 2013 10:48 am
- First Name: Amar
- Last Name: Kumar
- Company Name: Alfa Insurance
- Phone: 6153122729
- State / Province: Tennessee
- Country: United States
- Contact:
Re: How to use protect
I have used an indicator bound to ReadOnly property of the individual textbox. The same field can be used for all the textboxes on the form. If that indicator is set on before displaying the screen, the fields values cannot be modified.
In the Edit mode, just turn off the Read only indicator.
In the Edit mode, just turn off the Read only indicator.
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: How to use protect
Thanks to all for the answers. So i think i will not use the protect keyword. The solution Akumar suggests is the "classic" solution which i have already implemented. I am looking for a more generic solution. So i will try the suggestion from Scott to use a Java API.
Dieter
Dieter
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: How to use protect
Actually, I was referring to a JavaScript API. (Java is a completely different/separate language from JavaScript.)
-
- Experienced User
- Posts: 122
- Joined: Tue May 22, 2012 6:45 am
- First Name: Dieter
- Last Name: Schröder
- Company Name: Ecclesia Holding GmbH
- State / Province: Outside Canada/USA
- Country: Germany
- Contact:
Re: How to use protect
Scott, you are right. I wanted to write "JavaScript API", not "Java API".
Thank you for the correction.
Dieter
Thank you for the correction.
Dieter
Who is online
Users browsing this forum: No registered users and 8 guests