on 09-22-2008 12:28 PM
Dear Experts,
I am working on interactive forms. I have some queries which are as following:
- I am designing an adobe template with a subform to be diplayed when required else not. I tried the visibility option but it seems it has to be done using Scripts.
- In the scripts editor, I am using a script to make a particular sub form invisible:
xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="Hide"
-This is giving me error like:
accessor-unkown if I keep it at datasource and run it at the initialize.
-If I keep the code at the particular subform and run it at initialize, it gives me an error like:
Invalid enumerated value: hide
I am unable to understand where to keep my code or whether I need to do some modifications in the script?
-I am using FormCalc.
Also, Is it possible to have a attribute of type integer and call it in the script to check if it is 0, I need to display the subform else not.
I hope I am clear with my queries. Helpful answers will be appreciated.
Thanks in advance,
Regards,
Gaurav.
Hi Gaurav,
Use
xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="hidden"
Regards,
Reema
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Reema,
Thanks for your reply, but when I am using the following code:
xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="hidden"
It's giving me an error like:
Script failed: Accessor xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence is unknown.
I am writing this code at the node initialize and I tried writing it at the sub form also. Can you please suggest me why I am getting this error? Is that a code error or I am writing it at a wrong place?
Thanks in advance
Warm Regards,
Gaurav
Hi Gaurav,
One quick suggestion, whenever you are hiding a subform, make the form dynamic otherwise hiding of subform cannot be successful.
How to make the form dynamic.
Place the code in the domodifyview of where your Interactive Form UI Element was defined
public static void wdDoModifyView(IPrivateInitiatorView wdThis, IPrivateInitiatorView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("InitiatorForm");
* iForm1.setDynamicPDF(true);*
//@@end
}
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
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.