voyent
Seam + Icefaces integration  XML
Forum Index -> JBoss Seam Integration
Author Message
jerome

Joined: 14/Nov/2006 00:00:00
Messages: 16
Offline


Hello,

I'm using Seam 1.1 and Icefaces 1.5.1 and I've noticed a few problems :
- Icefaces does not seem to support @RequestParameter. Each time I try to use this annotation, I get an exception in JBoss (sometimes it's a javax.faces.el.EvaluationException, sometimes "EJBNoSuchObjectException: Could not find Stateful bean" ...);
- Icefaces does not support the Seam Debug Page. I believe this is due to the component name (org.jboss.seam.debug.introspector) and Seam uses $ to indicate a qualified component name.

Are there workarounds for these 2 issues ?

Regards,
Jerome.
jerome

Joined: 14/Nov/2006 00:00:00
Messages: 16
Offline


I forgot to mention that the @RequestParameter annotation is not supported when using conversation-scoped (stateful) session beans.

Regards,
Jerome.
littlewing

Joined: 16/Nov/2006 00:00:00
Messages: 5
Offline


Hello,
I have this kind of problems
did you find any workaround about this ?

Alexandre
gus315

Joined: 14/Nov/2006 00:00:00
Messages: 158
Offline


Hi there,

I want to know whether the @RequestParameter exception has be fixed in Icefaces CVS. Thank you.
curban

Joined: 12/Dec/2006 00:00:00
Messages: 4
Offline


Actually there is a "workaround" for the @RequestParameter bug.

SEAM 1.1 expanded the EL with support for parameterized JSF method bindings (see Chapter 18 of the SEAM reference).

You can now build something like that:

Code:
<h:commandLink value="#{messages['view.text.scrollMinus']} " action="#{searchAddressAction.refreshList('prev)}" />


and have your bean method like
Code:
public String refreshList(String pageIndicator);

jerome

Joined: 14/Nov/2006 00:00:00
Messages: 16
Offline


Here is a workaround for the @RequestParameter bug:

1) Add this method to PersistentFacesServlet (taken from BlockingServlet) :

Code:
private Map convertParametersMap(Map parameters) {
         Map convertedParameters = new HashMap(parameters);
         Iterator iterator = convertedParameters.entrySet().iterator();
         while (iterator.hasNext()) {
             Map.Entry entry = (Map.Entry) iterator.next();
             String[] values = (String[]) entry.getValue();
             if (values.length > 1) {
                 // convert the String[] to a List
                 entry.setValue(Arrays.asList(values));
             } else if (values.length == 1) {
                 // convert the String[] to a String
                 entry.setValue(values[0]);
             }
         }
 
         return convertedParameters;
     }


2) In PersistentFacesServlet, replace :
Code:
copyRequestParameters(request.getParameterMap(),
                                   facesContext
                                           .getExternalContext().getRequestParameterMap());


by :

Code:
Map map = request.getParameterMap();
             
             copyRequestParameters( map, facesContext.getExternalContext().getRequestParameterMap() );
 
             if ( facesContext instanceof BridgeFacesContext ) {
             	BridgeFacesContext bridgeFacesContext = (BridgeFacesContext) facesContext;
             	BridgeExternalContext bridgeExternalContext = (BridgeExternalContext) bridgeFacesContext.getExternalContext();
             	
             	bridgeExternalContext.populateRequestParameters( convertParametersMap( map ) );
             }         	
 


I don't know if this patch is appropriate, but now, you should be able to use the @RequestParameter and Seam built-in debug page.

One issue remains: data tables inside debug.xhtml are not rendered. I am still investigating. Could someone at Icefaces help us ?

Regards,
Jerome.

jerome

Joined: 14/Nov/2006 00:00:00
Messages: 16
Offline


Regarding debug page rendering, I've found this :
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=97431

Regards,
Jerome.
 
Forum Index -> JBoss Seam Integration
Go to:   
Powered by JForum 2.1.7ice © JForum Team