Seam IceFaces question
sherkan777 Jan 4, 2007 6:04 AMHi Gavin,
can U answer for my questions abous Seam IceFaces?
First.
I have Seam app and sometimes when I clicking on action links got error "User session expired", but session not expireds. First I thougth this is my code problem but I made simple app, like this.
Main Page
<s:link value="ONE" action="#{homeAction.testOne}"/>
<s:link value="TWO" action="#{homeAction.testTwo}"/>
<br/>
<ice:form>
<ice:panelGrid styleClass="contentLayoutGridStyle" columns="1" border="0">
<ice:panelTabSet tabPlacement="top" styleClass="componentPanelTabSetLayout">
<ice:panelTab label="Panel A">AAA</ice:panelTab>
<ice:panelTab label="Panel B">BBB</ice:panelTab>
<ice:panelTab label="Panel C">CCC</ice:panelTab>
<ice:panelTab label="Panel D">DDD</ice:panelTab>
</ice:panelTabSet>
</ice:panelGrid>
</ice:form>
and stateful bean,
@Stateful
@Name("homeAction")
@Scope(ScopeType.SESSION)
public class HomeAction implements HomeConsole {
public HomeAction() {}
@PersistenceContext
private EntityManager em;
@SuppressWarnings("unchecked")
public String testOne() {
System.out.println("TestONE");
try {
Query questionsListQuery = em.createQuery("FROM Category c");
List<Category> questionsListSize = questionsListQuery.getResultList();
System.out.println("Query Size:" + questionsListSize.size());
}
catch(EJBException e) { e.printStackTrace(); }
return "/home.xhtml";
}
public String testTwo() {
System.out.println("TestTWO");
return "/home.xhtml";
}
@Destroy @Remove
public void destroy() { System.out.println("homeAction - destroy"); }
}
when I clicking link like testOne,testTwo,...etc. sometimes maybe after 5-15 click-times and GO TO SWITCH TAB this error is thrown again!
this is happen to when have those links and ice:dataTable connected to dataPaginator and try to switch page in paginator.
Question is why? There's no source error. (I think)
TEST II
When I removed try {} block from testOne() and leaved ony system.out... (thought "user eror.." is thrown, by db) problem is not resoled.
Test III
I added those source code to your's booking-example (seam-icefaces app), to main page,
error is still thrown.
Can U tell me what I do wrong, and how to resolve it?
In some post here on forum U said that seam/Icefaces apps need SeamVariableResolver to work clear.
Can U tel me why, and why those SeamVariableResolver isnt' in Seam-Booking faces-config.xml?
Regards!
P.S. Can anyone check those simple example by clicking few times link and switch tab, or maybe this is only my problem.