cancel
Showing results for 
Search instead for 
Did you mean: 

how to hide Interactive form in Web dynpro screen

Former Member
0 Kudos

Hi all,

I am working on an application where a user will enter the vendor number and based on that vendor the information of the vendor such as his name, address should get filled in the interactive form that we have created. I am able to get the vendor information at the back end and I have created a print button and hitting on that print button will actually fill the form. But now my problem is when I run the application the form is already displayed on the web dynpro screen (without any vlaues) and when I hit print button the form gets filled with correct values but I don;t want form to be pre displayed until and unless user hits print button. Can you please tell me how can I do this.

Thanks,

Rajat

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Unless I'm missing some aspect of what you are describing as requirements, wouldn't you just use the Visible property of the InteractiveForm element to control if the form is displayed or not?

Former Member
0 Kudos

Hi Thomas,

I have already tried doing that and now when I execute/run my application I don;t see the PDF but now if I hit the button even then the PDF is not visible... I want the PDF form to be visible once user hit the print button.

Thanks.

Rajat

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

>

> Hi Thomas,

>

> I have already tried doing that and now when I execute/run my application I don;t see the PDF but now if I hit the button even then the PDF is not visible... I want the PDF form to be visible once user hit the print button.

>

> Thanks.

> Rajat

Are you changing the value of the context attribute bound to the visible property of the InteractiveForm? Are you saying you are telling the interactiveForm to be visible and it isn't doing so?

Former Member
0 Kudos

Hi Thomas,

Thanks for quick reply.

Let me explain you what I want... I am very new to webdynpro so my questions may sound very basic or may be weird.

I have an application where the user will enter the vendor number on the web dynpro screen and then will hit the button PRINT and when he hits print button the PDF form should be displayed on the web dynpro screen. So far when I run my application the vendor number (input field) is there and a print button is also there but beneath there is the whole interactive form is showing up (a balnk) and when I enter the vendor number and hit print the same form will get filled up with the required data.

What I want is when I execute my application and on the web dynpro screen only the vendor number field and the print button should be visible and not the PDF form, the PDF form should only be displayed once user hit print button. I tried to change the value of the property from visible to none and what it did was the PDF form was not visible on the web dynpro screen on both the occassion i.e. when I execute the the web dynpro applkication and after when user hits print button.

Thanks,

Rajat

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

You need to change the value of the visibility property obviously. It isn't just going to know when to change. Therefore bind a context attribute to the visibile property of the interactiveForm. You can then control the visibility of the form by changing the value in the bound context attribute.

Former Member
0 Kudos

Hi Thomas,

Can you please explain this in little detail, I am sorry for asking this again.

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Instead of just choosing a value at runtime for the visible property of the InteractiveForm UI element, press the little yellow button on the right side of the property value input. This will bring up the binding wizard. Choose a context attribute that you want to bind this property to.

This is how you can dynamically change the value of any property of any UI element at runtime. You bind to a context attribute. Then you change the value of the context attribute and the UI element will reflect that change.

So when someone presses your button to load the invoice, you also need to change the value in the attribute you bound to the visibile property. This will cuase the interactiveForm to appear.

Former Member
0 Kudos

Hallo,

define a attribute say for example : iaf_visibility of type WDUI_VISIBILITY.

bind the visbility property of Intractive form.

create a method to set this attribute. example : set_ctx_iaf_visibility. you could have the import parameter iv_visibility of type WDUI_VISIBILITY.

complete this method such a way that the iv_visibility is set to the attribute. (Use the Webdynpro code generator and change the statements to supply the value from iv_visibility).

call this method with appropriate value (visibile or None )from your view .

For example you can call from DoInit method of the view

iv_visibility = CL_WD_INTERACTIVE_FORM=>E_VISIBLE-NONE.

when you press the button you can make the button visible by using the

iv_visibility=CL_WD_INTERACTIVE_FORM=>E_VISIBLE-VISIBLE.

Answers (0)