Revision history [back]

click to hide/show revision 1
initial version

answered 2011-09-01 03:20:20 +0800

Macadoshis gravatar image Macadoshis flag of France

http://about.me/saad.benb...

I'm sorry, your code worked, even from a javascript file.

I didn't pay enough attention on the xmlns:a="client/attribute" and a:myAttribute="hello" details.

Thanks again for your support jumperchen, you the man ! :D

PS : By the way, is there a way to make an attribute accessible both client and server side, sharing both namespaces ? Because as I can now access my attribute client side, myAttribute is no more assigned server side. The following code which used to get mapped with zul automatically is no more :

private String myAttribute;

public String getMyAttribute() {
  return this.myAttribute;
}

public void setMyAttribute(String att) {
  this.myAttribute = att;
}

And I think editing the code into this may become a bit dirty and redundant :

//private String myAttribute;

public String getMyAttribute() {
  final Window me = (Window) this;
  return me.getWidgetAttribute("myAttribute");
}

public void setMyAttribute(String att) {
  final Window me = (Window) this;
  me.setWidgetAttribute("myAttribute", att);
}

Thanks again.

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