0

menu button and actions

asked 2010-02-05 03:49:45 +0000

kar gravatar image kar
66 2

Hi all,
I have a problem with the buttons in the navigation bar.

My application is very similar to the one of the index.zul ... with navigation buttons on the left side.
My problem is related to the button and how to reload the page.

Some pages have got links inside that open other page inside the center component...
Now ... if I press the navigation menu button (the same) I would love to reload the page ... but this do not happen ... I have to load a different page and get back on the other to reopen the page...

What shall I do to correct this behavior?
Thanks in advance
Kar

delete flag offensive retag edit

17 Replies

Sort by ยป oldest newest

answered 2010-02-26 04:58:33 +0000

jumperchen gravatar image jumperchen
3884 2 8
http://jumperchen.blogspo... ZK Team

You can use Executions.sendRedirect() to reload the page.

link publish delete flag offensive edit

answered 2010-03-24 10:48:42 +0000

alexricci gravatar image alexricci
51

Hi Jumperchen,
the problem that Executions.sendRedirect() has is that I cannot specify the target div of the page that I want to update with my content.
The code used by kar is like the following:

Executions.createComponents(myLink, centerDiv, sessionScope);

where myLink is the url to load, centerDiv is a page specific div to load the content into, and sessionScope is the Map to get some parameter from.
Now, Executions.createComponents doesn't refresh probably because component is already created, and must only be reloaded...so i'd like to know if there's any API to realize a similar requirement.

Thanx.

Ale

link publish delete flag offensive edit

answered 2010-03-24 23:12:01 +0000

jumperchen gravatar image jumperchen
3884 2 8
http://jumperchen.blogspo... ZK Team

You can invoke the comp.invalidate() to refresh its content.

link publish delete flag offensive edit

answered 2010-03-26 06:29:06 +0000

alexricci gravatar image alexricci
51

Hi jumperchen,
I've got a menu that load the specific component and calls the Executions.createComponents(myLink, centerDiv, sessionScope);
So I've tried to invalidate my centerDiv, even before or after Executions.createComponents, but nothing happens... which component do u mean to be invalidated?

Thanx.

Ale

link publish delete flag offensive edit

answered 2010-03-27 10:35:24 +0000

terrytornado gravatar image terrytornado flag of Germany
9363 3 6 16
http://www.oxitec.de/

centerDiv.GetChildrens().clear();
Executions.createComponents(myLink, centerDiv, sessionScope);

link publish delete flag offensive edit

answered 2010-03-28 04:03:51 +0000

alexricci gravatar image alexricci
51

I already had a centerDiv.getChildrens().clear();...nothing changes...

Ale

link publish delete flag offensive edit

answered 2010-03-30 04:24:30 +0000

jumperchen gravatar image jumperchen
3884 2 8
http://jumperchen.blogspo... ZK Team

...nothing changes... or it is the same result, so you assume it is nothing changed.

link publish delete flag offensive edit

answered 2010-03-31 08:12:41 +0000

alexricci gravatar image alexricci
51

What I mean is that no component is reloaded...no viewWillAppear is recalled as I expect...

link publish delete flag offensive edit

answered 2010-03-31 16:19:51 +0000

terrytornado gravatar image terrytornado flag of Germany
9363 3 6 16
http://www.oxitec.de/

That's AJAX. Why it should load components new, if nothing have change?

For testing make changes in the components that should be loaded newly.

link publish delete flag offensive edit

answered 2010-04-01 05:37:15 +0000

alexricci gravatar image alexricci
51

You're right Terry, probably I didn't explain very well.
My problem is that my app has a collection of menu items, on the left side of the layout, and a center content that should be filled every time i click on a specific button, with its corresponding ZUL component. So my problem is that one:

- I can fill correctly the center content with my ZUL component A clicking on its relative button, calling Execute.createComponent,
- I click on a second time that button, and another component B is loaded in the center content
- I click the second time on my first button -> my component A is not shown anymore.

So I cannot reload a component after another component has been loaded.

Ale

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-02-05 03:49:45 +0000

Seen: 719 times

Last updated: Apr 08 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More