| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/11/2006 08:47:01
|
jerome
Joined: 14/11/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.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 28/11/2006 09:10:03
|
jerome
Joined: 14/11/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.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 07/12/2006 12:44:45
|
littlewing
Joined: 16/11/2006 00:00:00
Messages: 5
Offline
|
Hello,
I have this kind of problems
did you find any workaround about this ?
Alexandre
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 13/12/2006 22:23:12
|
gus315
Joined: 14/11/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.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/12/2006 04:38:00
|
curban
Joined: 12/12/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);
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 18/12/2006 04:28:05
|
jerome
Joined: 14/11/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.
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 19/12/2006 01:54:02
|
jerome
Joined: 14/11/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.
|
|
|
 |
|
|