Hi Paolo,

The default value of opaque property is determined by the look and feel.

ULCComponent's opaque property is set from the client-side widget's default
opaque property.

For example, in  Metal L&F:

For ULCLabel, default value of opaque is false.

For ULCButton, default value of opaque is true.

Now at the time of uploading the object in uploadStateUI, opaque property
will be uploaded only if its value is different from its default value on
the client.

So for ULCLabel, UIComponent.setOpaque() WILL NOT be called for the
server-side call of ULCLabel.setOpaque(false).

For ULCButton, UIComponent.setOpaque() WILL BE called for the server-side
call of ULCButton.setOpaque(false).

In short, ULC optimises on the request by not sending to client-side UI
widget those properties that have the same value on the server.

BTW, for which component are you setting opaque to false?

The default client-side value of opaque property for a ULCComponent can be
obtained by:

   ClientContext.getOpaque(getClientPropertyKey(getPropertyPrefix(),
"opaque"))

    Or

    ClientContext.getOpaque(getClientPropertyKey("Label", "opaque"))


I hope this helps.

Thanks and regards,

Janak


>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Paolo Scaffardi
>Sent: Friday, July 28, 2006 5:14 PM
>To: [email protected]
>Subject: [ULC-developer] Problem with setOpaque in ULC 6.1
>
>
>I'm trying to set the opaque property of a ULC component to false (to
>disable the painting of its background) but it seems the
>UIComponent.setOpaque() wont never be called.
>
>Is that a bug? I had to override the ULCComponent.setOpaque() and
>sending by myself the "opaque" state change to the client side instead
>of using current implementation.
>
>Is it right?
>
>Best regards,
>Paolo Scaffardi
>GFP Lab s.r.l.
>http://www.gfplab.com
>fax 178 2258454
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to