If I store an actual integer in the map it works fine but I thought JSF was responsible for converting attribute values to the appropriate data type. Does this only work when using the taglib?

 

-----Original Message-----
From: Duncan Krebs [mailto:[EMAIL PROTECTED]
Sent: Friday, July 29, 2005 2:54 PM
To: [email protected]
Subject: ClassCast Exception in UIPanel encodeEnd

 

Hi,

I’m instantiating and configuring a UIPanel in code using the two lines below.

 

(UIPanel)context.getApplication().createComponent(UIPanel.COMPONENT_TYPE);

panel.getAttributes().put("columns", "2" );

 

However in the encodeEnd method of HtmlGridRenderer I’m getting a Classcast exception when trying to get the value of columns attribute. Below is the line that is causing the exception.

 

Integer i = (Integer)component.getAttributes().get(JSFAttr.COLUMNS_ATTR);

 

Does anyone see what is wrong? Should I be creating an HtmlPanelGrid instead? Thanks!

 

 

Reply via email to