-
1. Re: ScopeType.PAGE: Lost by AJAX?
bernix.bernix.ning.gmail.com Sep 23, 2008 10:18 AM (in response to luxspes)Our project uses lots of POJO Seam components with PAGE scope, and we can use the ajax(richfaces ajax4j), works fine.
Could you provide you code(backing bean, xhtml)?
-
2. Re: ScopeType.PAGE: Lost by AJAX?
luxspes Sep 23, 2008 5:52 PM (in response to luxspes)Thanks, but, it was my mistake, I am using SpringJdbc for this project (its a legacy database with stored procedures and other crazy stuff so integration with JPA/Hibernate was not an option):
Map<String, Object> subactivity= jdbcTemplate.queryForMap(...
it turns out that the map returned is a ListOrderedMap.decorate(new CaseInsensitiveMap()); and therefore its key/values can be linked to JSF like this:
#{activityEditor.subactivity['description']}
or like this (I was using the former)
#{activityEditor.subactivity['DESCRIPTION']}
But I didnt know that, so, when I asked for a rerender after calling an action with a commmandLink, I was returning a plain old HashMap:
Map<String, Object> transfomedSubactivity = new HashMap<String, Object>(); transfomedSubactivity.putAll(subactivity) return transfomedSubactivity;
and that changed all the keys to uppercase, therefore this didn't work anymore:
#{activityEditor.subactivity['description']}
and I wrongly believed it was because of ScopeType.PAGE, but it was because HashMap is case sensitive.
Regards,