0

How to: call a .zul file from java code to a borderlayout area !

asked 2008-11-13 22:32:28 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2008-11-13 22:34:40 +0800

Hi all,

i'm back again. arrrrgggghhhhhh,

2 hours of searching for an answer. Sorry this is an absolute beginers question.
I'm very persistent in googeling, searching and reading but don't find the answer.
I'm not know under wich term i must search.

These question must standing by the Q&A!

index.java
----------------


	/**
	 * call the Customer Page 'customer.zul' and put it
	 * in the borderlayout area CENTER.
	 * @throws InterruptedException
	 */
	public void showCustomerPage() throws InterruptedException {
		// get an instance of the borderlayout defined in the zul-file
		Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain");
		// get an instance of the searched CENTER layout area
		Center center = bl.getCenter();
                // clear the CENTER area. Call the zul-file and put it in the layout area
--> this is shit, i know    center.getFirstChild().appendChild( Executions.sendRedirect("/pages/kunde.zul")  );



Thanks for all help
Stephan

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2008-11-13 23:29:58 +0800

madruga0315 gravatar image madruga0315 flag of Brazil
937 2 12

Hey there

look for createComponents in Executions class

problably is something link this

Executions.createComponents("/pages/kunde.zul", center, null)
the null is the args that the component might use...

Madruga

link publish delete flag offensive edit

answered 2008-11-14 12:47:20 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

@madruga0315,

many many many thanks.

This is exactly what i have searched.

After i completed my code with the correct Executions.crea... syntax i became a errorMessage while double dataBinding a indexPage.
So i have a look at the zul-file and see that there is a page-id in the header written by the eclipse plugin by creating a new zul-file. After deleting this pasage it now works correct.

	/**
	 * call the Customer Page 'kunde.zul' and put it in the borderlayout area
	 * CENTER. 
	 * @throws InterruptedException
	 */
	public void showCustomerPage() throws InterruptedException {
		try {
			// get an instance of the borderlayout defined in the zul-file
			Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain");
			// get an instance of the searched CENTER layout area
			Center center = bl.getCenter();
			// clear the center child comps
			center.getChildren().clear();
			// call the zul-file and put it in the center layout area
			Executions.createComponents("WEB-INF/pages/kunde.zul", center, null);
		} catch (Exception e) {
			Messagebox.show(e.toString());
		}
	}

Stephan

link publish delete flag offensive edit

answered 2009-09-11 05:18:19 +0800

edwinalvarenga gravatar image edwinalvarenga
24 1

Hi again terrytornado

Apparently it's the same mistake in my application I am not sure what it is like solving the problem of double databinding

regards

link publish delete flag offensive edit

answered 2009-09-11 18:06:49 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

I'm not working with databinding. But have a look the error and search your zul-files for double id's.

regards
Stephan

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: 2008-11-13 22:32:28 +0800

Seen: 286 times

Last updated: Sep 11 '09

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