cancel
Showing results for 
Search instead for 
Did you mean: 

How to "destroy" a View?

Former Member
0 Kudos

Hello,

I have two views A And B.

I have a "Submit" button in View A that displays View B.

I also have a "Clear" button in View A, I would like that this button will "destroy" View B completley. How do i do that?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Why do you want to do that?

Armin

Former Member
0 Kudos

Hey Armin,

Because at this specific application the user has very long delay between one "Submit" to another so I though why leaving the results view "alive" all this time, better create and destroy it each time the user asks for a query.

Former Member
0 Kudos

Go to "Properties" tab of view B. Change Lifecspan policy from "framework_controlled" (default) to "when_visible". Your view will stay alive only for time when user sees it and destroyd afterwards.

VS

Former Member
0 Kudos

10X Valery!

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Roy,

1. You can place a "Done" button on the result view and onAction you can display an emptyview.

2.Try using "timedTrigger" UIElement !!

Regards, Anilkumar

Former Member
0 Kudos

Hi Roy,

Are you displaying the both the views at the same time ?

What you can do is you can make the ViewB default as "false" and you can display viewB when the user press "Submit" button.

I feel destroying the view at runtime is not a good idea and i don't think its possible.

Regards, Anilkumar

Message was edited by: Anilkumar Vippagunta

Former Member
0 Kudos

Well, that's what I am doing now, but after viewB is being displayed the user "leaves" it for a long time, so I assume all the UI's, Context, variables ect. are still at the memory and I would like to prevent this until the next "Submit"... But if you say it is not a good idea than I won't do it...