[JBoss Seam] - Re: SeamSelectItems - 1.1.1beta4
by MikeDougherty
Yeah, OK. That makes sense, and I do agree, it is more elegant. I thought maybe there was a performance or functional reason why you were recommending it.
I missed the JAR file description in the document, sorry about that.
I'm still having a bit of trouble with this converter.
| public class SubjectSelectConverter extends org.jboss.seam.selectitems.jsf.SelectItemsConverter {
|
| @Override
| protected Object convertToObject(FacesContext arg0, UIComponent arg1, String arg2)
| throws ConverterException {
| log.debug("convertToObject(#0, #1, #2)", arg0, arg1, arg2);
| return new Subject(arg2, arg2);
| }
|
| @Override
| protected String convertToString(FacesContext arg0, UIComponent arg1, Object arg2)
| throws ConverterException {
| log.debug("convertToString(#0, #1, #2)", arg0, arg1, arg2);
| return arg2.toString();
| }
| }
|
Gives me:
| Converter must implement SelectItemsConverter: mil.fits.survey.SubjectFactoryBean$SubjectSelectConverter@102c93e
|
I even tried putting the selectitems-ui.jar in the EAR path to make sure the classloader could see the SelectItemsConverter when it instantiated SubjectSelectConverter. But no such luck. Doesn't make a lot of sense to me.
On a similar subject, I saw someplace that I could define a converter for a specific class globally. According to your post I guess that would be in faces-config.xml. But I didn't bookmark that page, and now cannot seem to find it again. It's sort of off topic, but do you know how I can associate a Converter with a JavaBean globally? It looked something like below, but I can't be absolutely sure.
| <converter>
| <bean-class>com.foo.app.Subject</bean-class>
| <converter-class>com.foo.app.SubjectConverter</converter-class>
| </converter>
|
Thanks again for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001066#4001066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001066
19 years, 3 months
[JBoss Portal] - Re: LayoutStrategy HttpSession and PortletSession with APPLI
by klj62
I have further refined this and have concluded that it is a JBoss bug, but haven't narrowed it down to JBoss Portal (2.2.1SP3) or the AS (4.0.4GA).
I added a session attribute listener and printed the session ID when attributes were added from both the portlet and from the strategy class. The session IDs in all three places (portlet class, strategy class, and listener class) were the same. But the original problem is that the attributes added in the portlet in APPLICATION_SCOPE cannot be found by the strategy class. Printing the object and tracing a little in Eclipse showed that the StandardSessionFacade object behind the session retrieved was different, but contained the same session ID.
The attributes attached to each session object are mutually exclusive, which is a little confusing since they have the same session ID, and are supposed to be accessible.
Does anyone know if this bug is fixed in JBoss Portal 2.4? Can this be fixed easily in the 2.2.1SP3 code?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001055#4001055
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001055
19 years, 3 months