on 11-06-2009 1:15 PM
Hello,
in Adobe LiveCycle Designer --> ABAP
Is it possible to hide / unhide a page if a condition is passed in the context ?
Thank you
Thierry
Edited by: Thierry on Nov 6, 2009 2:27 PM
Did you set your form to be dynamicin zour ABAP coding? To hide a page it needs to be dynamic. set DYNAMIC = 'X'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Runesh,
In your abap code, when you use the function to call your form (gerated function), put the parameter dynamic = 'X' in /1bcdwb/docparams
Ex :
CALL FUNCTION 'FP_FUCNTION_MODULE_NAME'
EXPORTING
i_name= 'your form'
IMPORTING
e_funcname = wv_fname.
wv_docparams-dynamic = 'X'
CALL FUNCTION wv_fname
EXPORTING
/1bcdwb/docparams = wv_docparams
...
regards,
Thierry
You can hide the master page depending on any condition you have. But there is one clean rule. If your master page doesn't want to get printed then content area of that master page should not contain any data. It means even if you hide all the data in the content area, your whole master page ( including its instances i.e overflown pages) will be hidden.
For that you have to create a text field in your layout and drag and drop it in the content area of the master page which you want to hide. The text field acts like a flag whether or not to hide the master page. If 'X' then hide. Else do not hide. The value of the flag field will be decided while coding in the interface itself based on your condition. Then wrap the data of the content area including your flag field in a sub form. Do not forget to hide the flag field after wrapping it in the sub form because you don't want to show this on the page if that page is displayed by any chance.
Finally click on the whole wrapped sub form. Write below Form calc script in events Initialization, Form Ready and Layout Ready.
Here the HIDEPAGE_FLAG is nothing but your flag field.
if ( $.HIDEPAGE_FLAG == "X" ) then
$.presence = "hidden"
endif
This code hides your whole sub form . It means there will be no data shown in the content area and the Adobe framework doesn't print that specific master page(and all its instances). 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to check the following:
- the main subform has object - content set to "flowed"
- you have not changed the pagination, there is "following previous" option used
- there are no margins that would interfere (tab layout)
- you set the presence (visibility) to "hidden"), not "invisible"
that should be enough.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use the script editor. Open under Windows - Script editor, or using Ctrl, Shift, F5.
In the scipt editor you need to place the code (as a friend wrote earlier), choose the proper language (javascript or formcalc), choose the event to run the code and it will work for you.
You dont need to upgrade but i can recommend doing this immediately. Every version of the Adobe product is more stable and works faster. Check SAP notes about the LCD 8.0, that is suffiscient.
Hope this helps, O.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi thierry,
You will be able to do this with Javascript / formcalc and based on a condition from the context.
In the script area of a template page, you can add this script :
if ($.record. == ) then
{
$.presence = "hidden";
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thierry,
Its possible to hide a page, the script would not be active for Master Page(Page) however you can alwayes write script on Body page(or Design view for designer 8.0). The body page itself is a subform and you can use the event form:ready.
write your script as suggested above.
Thanks and regards,
Priyanka
User | Count |
---|---|
74 | |
9 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.