Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 23/Jan/2007 08:40:05
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
Hi,
I think I've found a bug using datatable and popup together...
look at this:
Code:
<ice:form>
<ice:dataTable id="pessoas" value="#{sortdb.list}" var="person"
columnClasses="tableCol">
<ice:column>
<ice:rowSelector value="#{person.select}" multiple="false"
selectionListener="#{sortdb.rowSelection}" />
<f:facet name="header">
<ice:outputText value="Nome" />
</f:facet>
<ice:outputText value="#{person.nome}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Idade" />
</f:facet>
<ice:outputText value="#{person.idade}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Email" />
</f:facet>
<ice:outputText value="#{person.email}" />
</ice:column>
</ice:dataTable>
<ice:dataTable id="selectList" value="#{sortdb.selectedl}"
var="select" columnClasses="tableCol">
<ice:column>
<f:facet name="header">
<ice:outputText value="Nome" />
</f:facet>
<ice:outputText value="#{select.nome}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Idade" />
</f:facet>
<ice:outputText value="#{select.idade}" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="Email" />
</f:facet>
<ice:outputText value="#{select.email}" />
</ice:column>
</ice:dataTable>
<ice:panelPopup id="popup" visible="true" rendered="true"
style="z-index:1001; width: 300px;">
<f:facet name="header">
<ice:panelGrid width="100%" cellpadding="0" cellspacing="0"
columns="2" style="text-align: center;">
<ice:outputText style="color: #FFFFFF;" value="Entrada de dados" />
</ice:panelGrid>
</f:facet>
<f:facet name="body">
<ice:panelGrid width="100%" cellpadding="0" cellspacing="0"
columns="1">
<ice:dataTable id="edit" value="#{sortdb.selectedl}" var="items">
<ice:column>
<f:facet name="header">
<ice:outputText value="Name" />
</f:facet>
<ice:inputText value="#{items.nome }" />
</ice:column>
<ice:column>
<f:facet name="header">
<ice:outputText value="idade" />
</f:facet>
<ice:inputText value="#{items.idade }" />
</ice:column>
</ice:dataTable>
</ice:panelGrid>
</f:facet>
</ice:panelPopup>
</ice:form>
So, when I click in a row the popup updates, but when I click and another row, the value of the previous row, pass to this one... Confusing isn't it?
this only happen, using a DataTable with a Popup...
anyone have any idea of what could it be? In the beggining I thought that was a Seam issue, and try it with IceFaces alone... but the problem continues...
I will attach my backing beans... and the .jspx page...
Thanks!
Filename |
PagesAndBeans.rar |
Download
|
Description |
sortabledb.jspx SortDataTable.java PersonOb.java |
Filesize |
2 Kbytes
|
Downloaded: |
311 time(s) |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 24/Jan/2007 06:16:48
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
Did someone found any solution? or even got the same thing as me?
Thanks!
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 25/Jan/2007 03:53:37
|
ratondeau
Joined: 19/Jan/2007 00:00:00
Messages: 19
Offline
|
Mhh i see only the tables. No entries appear, can you post your managed-bean properties in faces-config.xml?
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 25/Jan/2007 05:59:17
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
Sorry... I think I've sended the wrong SortDataTable.java, now I'm sending the right one... I tested now and It's working, but the bug in the dataTable continues...
Code:
<managed-bean>
<managed-bean-name>sortdb</managed-bean-name>
<managed-bean-class>
test.SortDataTable
</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
Filename |
pagesBean.rar |
Download
|
Description |
Pages and Beans |
Filesize |
2 Kbytes
|
Downloaded: |
293 time(s) |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 25/Jan/2007 07:31:51
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
I've found a way =D and now It's fixed...
just had to refresh the FacesState!
this is my solution:
Code:
PersistentFacesState state = PersistentFacesState.getInstance();
try {
state.render();
} catch (RenderingException e) {
e.printStackTrace();
}
Thanks!
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 25/Jan/2007 07:34:11
|
ratondeau
Joined: 19/Jan/2007 00:00:00
Messages: 19
Offline
|
now it works.
same behavior as described , don't know exactly why this happens cause I'm quite new to jsf and icefaces but i suppose the popup inputtext values overwrite the list somehow...
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 26/Jan/2007 07:42:38
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
I'm having a behavior where the "state.render()" doesn't act as expected...
got this StackTrace below when calling state.render()
and I've read something about calling render directly is dangerous, and IceFaces has more secure methods to use like RenderManager(I tried RenderManger but I had no luck...)
I try to follow the TimeZone demo to make ajax push, but I couldn't...
So, Does someone have another solution for this DataTable bug?
Code:
05:49:49,479 ERROR [TxPolicy] IllegalStateException while setting transaction for rollback only
java.lang.IllegalStateException: Transaction has terminated TransactionImpl:XidImpl[FormatId=257, GlobalId=exit/30, BranchQual=, localId=30]
at org.jboss.tm.TransactionImpl.lock(TransactionImpl.java:834)
at org.jboss.tm.TransactionImpl.setRollbackOnly(TransactionImpl.java:669)
at org.jboss.aspects.tx.TxPolicy.setRollbackOnly(TxPolicy.java:212)
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 26/Jan/2007 10:24:50
|
philip.breau

Joined: 08/May/2006 00:00:00
Messages: 2989
Offline
|
Hi,
I've logged a bug for this. Thanks for bringing it to our attention.
It's not recommended to use PersistentFacesState.render() directly. You should probably use the AJAX Push api for this instead. Make your bean implement Renderable, set the renderManager property in the faces-config.xml and then call renderManager.requestRender() instead of PersistentFacesState.render(). The timezone has an example of using this api.
Thanks,
Philip
|
. |
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 30/Jan/2007 11:01:39
|
wilson.almeida
Joined: 22/Dec/2006 00:00:00
Messages: 2
Offline
|
Hello,
I believe that it's work fine, see timezone7 tutorial.
But using with the Seam, the renderManager object is not setted in bean.
For details, I posted in Seam forum:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=100284
Thanks
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 31/Jan/2007 07:49:36
|
wilson.almeida
Joined: 22/Dec/2006 00:00:00
Messages: 2
Offline
|
RenderManager is setting in bean by components.xml in Seam.
But, when rendermanager invokes the render method the of PersistentFacesState, the object lifecycle of the class is org.apache.myfaces.lifecycle.LifecycleImpl and not it's com.sun.faces.lifecycle.LifecycleImpl.
That cause the following error:
Code:
11:30:00,430 ERROR [PhaseListenerManager] Exception in PhaseListener RENDER_RESPONSE(6) beforePhase.
java.lang.IllegalStateException: No active application scope
at org.jboss.seam.core.Init.instance(Init.java:75)
at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsBeforePhase(TransactionalSeamPhaseListener.jav
a:22)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:45)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:180)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
11:30:00,430 ERROR [D2DFaceletViewHandler] Problem in renderResponse: No Factories configured for this Application. This happ
ens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessa
ry for a basic faces application and that all the necessary libs are included. Also check the logging output of your web appl
ication and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not
support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
java.lang.IllegalStateException: No Factories configured for this Application. This happens if the faces-initialization does
not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and
that all the necessary libs are included. Also check the logging output of your web application and your container for any ex
ceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not
support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:90)
at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:742)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:509)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:576)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:583)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:273)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:180)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
11:30:01,682 INFO [STDOUT] Erro no manter
11:30:01,682 ERROR [STDERR] com.icesoft.faces.webapp.xmlhttp.TransientRenderingException: transient render failure for viewNu
mber 1001
11:30:01,682 ERROR [STDERR] at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:194
)
11:30:01,682 ERROR [STDERR] at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:89)
11:30:01,682 ERROR [STDERR] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoo
lExecutor.java:650)
11:30:01,702 ERROR [STDERR] at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
cutor.java:675)
11:30:01,702 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
11:30:01,702 ERROR [STDERR] Caused by: java.lang.NullPointerException
11:30:01,702 ERROR [STDERR] at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:3
93)
11:30:01,712 ERROR [STDERR] at com.icesoft.faces.context.DOMResponseWriter.writeDOM(DOMResponseWriter.java:313)
11:30:01,712 ERROR [STDERR] at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:161)
11:30:01,712 ERROR [STDERR] at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
11:30:01,712 ERROR [STDERR] at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:180
)
11:30:01,712 ERROR [STDERR] ... 4 more
Someone have any solution?
Sorry my bad english! :P
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 08/Mar/2007 15:47:34
|
rmayhew

Joined: 11/Apr/2006 00:00:00
Messages: 100
Offline
|
Hi there,
I'm having trouble replicating this bug. Are you selecting from one list and then populating another in a popup?
Thanks
Rob
|
Rob Mayhew
http://snappy.sensemaker.net
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 08/Mar/2007 16:15:04
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
I'm goin' to explain,
I have a dataTable with rowSelector, when I select something on this dataTable, a panelPopup appear, with the details of the selected row.
when I try to click on another row, the value of the previous selected row is passed to this one, and if I click on another, It'll be copied for that row too.
just ask me, if you still couldn't reproduce this, I can make a exemplo for you, or maybe you can download the file that I've attached in the head of this topic.
Thanks!
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 27/Mar/2007 11:40:49
|
rmayhew

Joined: 11/Apr/2006 00:00:00
Messages: 100
Offline
|
Sorry for the delay, I've been out of the office for the past few weeks.
I have an example, but I can not reproduce the problem. Please see the attached sample.
Filename |
ice-1218.zip |
Download
|
Description |
Sample with row select |
Filesize |
74 Kbytes
|
Downloaded: |
373 time(s) |
|
Rob Mayhew
http://snappy.sensemaker.net
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 27/Mar/2007 14:26:46
|
Andreh
Joined: 11/Dec/2006 00:00:00
Messages: 33
Offline
|
Hi rmayhew,
on the popup, just change:
Code:
<ice:panelGroup>
<ice:outputText value="#{row.value}"/>
</ice:panelGroup>
to:
Code:
<ice:panelGroup>
<ice:inputText value="#{row.value}"/>
</ice:panelGroup>
It seems that the problem doesn't occur with the outputText, but if you change it to inputText, you'll see that the inputText on the popup gets frozen, and that bugs the dataTable's values too...
Thanks!
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 27/Mar/2007 17:22:46
|
rmayhew

Joined: 11/Apr/2006 00:00:00
Messages: 100
Offline
|
The problem is in the scope of the form. Each time you click a row in the table the form is submitted. This is setting the value of the clicked row to the value of the last clicked row.
The quickest fix is to place the popup panel in its own form. Or you could make the popup modal (Stopping someone from clicking on another row)
Try to keep your form size as small as possible. And divide the display into multiple forms when possible.
Rob
Filename |
ice-1218.fix.zip |
Download
|
Description |
|
Filesize |
9691 Kbytes
|
Downloaded: |
325 time(s) |
|
Rob Mayhew
http://snappy.sensemaker.net
|
|
 |
|