on 12-09-2005 5:35 AM
Simple question but i can't seem to figure out how to do it. I have an interactive form that have editable fields. How do I toggle fields to make some of them read-only through the code. Please provide cold sample. thanks a lot.
mick,
How did u make ur form an interactive one????
PLs help..
Thanks,
Sunny
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi mick,
i think, based on ur certain conditions; u want to make some fields read only, .
For this, implement the following code in the wdDoModifyView() method of that view:
if ( ) <b>///ur condition</b>
IWDInputField a = (IWDInputField)view.getElement("<b> FieldName </b>");
a.setEnabled ( false ) <b>;///// this will make the field unable.</b>
u can make them able or unable just by changing the boolean value inside <u><b>setEnabled( )</b></u> try this.hope it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mick,
Instead of doing the read only property in the code,when u bind ur context to the input field set the cont.att type read only to true for the fields that u don want to edit.
Hope this helps u,
Regards,
Nagarajan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<b>Nagarajan Kumarappan:</b>
I know how to do that but that's setting the value at design time. Mine has to be done at runtime(when the page loads) because there are a lot of condidtions determining which fields should be and should not be readonly. therefore I have to do in the code. Any by saying code I mean Java not java script or formcal.
<b>kushagra mittal:</b>
are you talking about regular webdynpro input fields? I am asking for that. I am talking about input fields inside my adobe interactive form embedded on the webdynpro page.
I think what needs to be done is to disable context attributes like Nagarajan Kumarappan suggested but do that through Java which I don't see any tutorials show that.
still looking for help.
Please check the tutorials in Web Dynpro.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on online interactive pdf form - 29.htm
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.