0

Getting parameters

asked 2008-12-01 18:21:23 +0800

YamilBracho gravatar image YamilBracho
1722 2

Hi. I have a java class where I put some values in the desktop, say:


desktop.setAttribute("textoAyuda", calculoConcepto.getTextoAyuda());

And I want to show this value in a zul page that is is opened in a BorderLayout using setSrc. My zul code is :

<window>
<div align="center">
<window title="Ayuda " border="normal" width ="500px" height="500px" >
<label id="lblDetalle" width ="400px" height="400px"/>
<zscript>
System.out.println(desktop.getAttribute("textoAyuda"));
lblDetalle.value = desktop.getAttribute("textoAyuda");
</zscript>
</window>

</div>

</window>

But" textoAyuda" is null when I print out in the console...

TIA

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2008-12-03 02:15:25 +0800

PeterKuo gravatar image PeterKuo
481 2

Because your code is not complete, I can't see error in your post.
But I tried the following code, it doesn't have problem.

<window id="win_1">
<zscript>
	desktop.setAttribute("var_1","value_1");
	System.out.println("inside win_1");
	System.out.println(desktop.getAttribute("var_1"));
	win_1.setTitle(desktop.getAttribute("var_1"));
</zscript>
<include src="inc.zul"/>
</window>

and inc.zul

<window id="win_incl">
in inc.zul
<zscript>
	System.out.println("inside incl");
	System.out.println(desktop.getAttribute("var_1"));
</zscript>
</window>

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-12-01 18:21:23 +0800

Seen: 226 times

Last updated: Dec 03 '08

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