PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WB22 tab->page->same tab back again.
WB22 tab->page->same tab back again.
Iniciado por guest, 05,sep. 2017 12:46 - 16 respuestas
Publicado el 05,septiembre 2017 - 12:46
Hi all,

I'm struggling with the following. I have a page with a tab control and several tabs. Some tabs are calling a form where I can change information. When I validate the form I'm turning back to the previous page.

What I want is putting the focus back on the tab that called the form. Is this possible ?
I can achieve this by using Changetarget(Newbrowser), but I don't want to open a new browser page.

Thanks for any hints.

Best regards,

Aad
Publicado el 05,septiembre 2017 - 17:34
Hi,

This is because your form redisplays the page, and therefore jumps back to the initial first tab. You have to make sure that you do not redisplay the page. Work with popup's and Ajax. Don't use PageDisplay or PageDisplayDialog because it will download the page again.

In you buttons, make sure AJAX is enabled.

As an alternative you could store the current tab in a hidden field that will come back from the server if the page is reloaded. And set the active Tab back to the tab before you called the form.

But I would go for the AJAX stuff !!

Danny
Publicado el 05,septiembre 2017 - 20:09
Hi Aad,

If it's not awp then you can use PagedisplayDialog for the form and you will retun to the previous page exactly as it was.
If it's awp the easiest way would be to call the return page with the tab# as a parameter.


Kind regards,
Piet
Publicado el 06,septiembre 2017 - 02:22
Hi,

Quote
Aad

What I want is putting the focus back on the tab that called the form. Is this possible ?

Is the form a form on the tab? If not what do you mean by "The tab that called the form"

If it is a form on tab 2 and you want to save what is entered and stay on tab number 2. Then use ajax in the button that saves the tab. And you should stay on the tab2

Regards
Allard
Publicado el 06,septiembre 2017 - 11:22
Thanks guys,

@Danny. Not working for me. I use Ajax where I can.
@Piet. PageDisplayDialog returns OK, but shows the opening page dimmed. (messy)
@Allard. The tab calls a new page with the form.

Problem with this is, there is a table on the tab that calls the form in a new browserpage, so the user has two browserpages open. I want to prevent that.

Best regards,

Aad
Publicado el 06,septiembre 2017 - 19:37
Hi Aad,

PageDisplayDialog does what it implies, it shows the page like a dialog on top of the calling page and dims the calling page, but after PageCloseDialog you're back without the dimming. If you don't like the dimming you control it by using ddwrate.
I find it quite useful, especially in a table-form situation. You can even access controls on the calling page, since it stays open.

Kind regards,
Piet
Publicado el 07,septiembre 2017 - 14:50
Hi aad,

Ok Get what you mean.

You can use a plane in WB22. In the tab where the table is place a cell first.
-In the cell place the table
- Activate Planes for the cell
- In the second plane add the form.

Ok
-Now In the table ad a link to the form. So when something is clicked the form is opened
-When form is filled out in the save button go back to the plane of the table
( Before that do a tabledispay. So focus will be on the table again and the table will have up to date information)

Regards
Allard
Publicado el 07,septiembre 2017 - 15:30
Thanks Piet and Allard,

@Piet. PageDisplayDialog does exactly what I want, but the DDW-stuff doens't work for me. It messes up my focus screen. I played with values between 1 and 100, but the ugly gray screen overrules everything. It would be nice if there was an option to make the calling screen invisible. Works OK though.

@Allard. Nice option what you propose. Only thing is that I cannot check the planes in my cells. For some reason I can not use planes in my cells. Is there a "mainswitch" somewhere ?

Best regards,

Aad
Publicado el 08,septiembre 2017 - 09:05
Hi Aad,

I don't get what you mean by "It messes up my focus screen".
The page with the form has focus and just shows as it is, the calling page dimmed to emulate modal windows.
I'm guessing you don't want to show the calling page underneath at all.
That's easy, just use a non transparent background cell for the form that covers the calling page completely.

Regards,
Piet
Publicado el 08,septiembre 2017 - 11:35
Thanks Piet,

Cell and PageDDWRate(1) works fine for me.


Best regards,

Aad
Publicado el 08,septiembre 2017 - 14:46
Hello,

Why don't you use a popup this is a bit cleaner than working with a cell !

Danny
Publicado el 08,septiembre 2017 - 14:56
Hi Danny,

Clearly I am very new to WB, so I am not familiar with all the possiblities and what to use best in different situations. I don't now popup, so I will look into that. In the meantime, thanks voor your contribution.

Best regards,

Aad
Publicado el 09,septiembre 2017 - 22:29
HI Aad,

Indeed what Dany says is true. It looks nicer and is what lots of sites use. Popup window is easily added. ( A control popup )

The planes==> You have to place a check on the fact that the cell can use Planes ( In the description of the control .

Regards
Allard

PS

But I would go for the popup. ( There are examples on that as well
Publicado el 10,septiembre 2017 - 10:41
Hi Allard,

Like I mentioned earlier, when I put a cell on the screen, I cannot check planes. This option stays grayed. So I wondered if there's a general check on project level, like there is with some other features. I looked for it but couldn't find anything.

Best regards,

Aad
Publicado el 12,septiembre 2017 - 13:11
Hi,

Hmm Discription ... Gui.... enable the management of planes .

For me it is all there.

I all my project sthis hust works? Is it an converted project form ealier versions ? Maybe the problem laies there ? Did you add a new cell ?

Sorry do not know whay . Maybe sent pcsoft a mail , it should work!

regards

Allard
Publicado el 12,septiembre 2017 - 15:41
Hi,

you need to be in html5 for the page/project

BEst regards
Publicado el 12,septiembre 2017 - 16:22
Thanks Fabrice, just like the HTML upload control.

Best regards,

Aad