voyent
refresh problem with nested datatables  XML
Forum Index -> Components Go to Page: 1, 2 Next 
Author Message
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Hi,

Have you tried ICEfaces 1.6 DR#4? What exactly in the inner dataTable should be updating and what would trigger that update?

Philip

.
ibanhoe

Joined: 12/Apr/2007 00:00:00
Messages: 71
Offline


Hi, i posted a message into another thread, but a i dont kwon if you saw it


I was searching into the forum about my problem, but i didnt found a solution

i have two nested datatables, the outter datatable, runs fine, but the inner datatable does not refresh, only until i press the F5 into the browser.

this is my code
Code:
 <ice:dataTable value="#{grupo.usuariosActuales}"
                             var="usuario" border="0" cellpadding="5"
                             width='400' 
                             columnClasses="triangleColumn,cartNameColumn"
                             id="usuarios" rows="5"
                             rendered="#{grupo.expanded}">
 
                             <ice:column>
                                 <ice:panelGroup
                                     styleClass="#{usuario.indentStyleClass}">
                                     <!-- Render the expand/contract if there is an image -->
                                     <ice:commandLink
                                         actionListener="#{usuario.toggleSubGroupAction}">
                                         <ice:graphicImage
                                             value="#{usuario.expandContractImage}"
                                             style="border: 0px solid;" />
                                     </ice:commandLink>
                                 </ice:panelGroup>
                             </ice:column>
 
                             <ice:column>
                                 <ice:panelGroup 
                                     styleClass="#{usuario.rowStyleClass}"
                                     style="width: 400px;">
                                     <ice:graphicImage
                                         value="#{usuario.icon}"
                                         style="border: 0px solid;" />
                                     <ice:commandLink
                                         value="#{usuario.nameNodo}"
                                         actionListener="#{usuario.toggleSubGroupAction}" />
                                     <br />
 
                                     <ice:panelGrid columns="2"
                                         rendered="#{usuario.expanded}">
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Salientes Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.OCSAllowing}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Salientes NO Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.OCSBarring}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Entrantes Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.ICSAllowing}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Entrantes NO Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.ICSBarring}' />
                                     </ice:panelGrid>
                                     <br />
                                         <!-- Tabla de lineas -->
 
                                         [color=red]<h:dataTable 
                                             value="#{usuario.lineas}"
                                             var="linea" border="0"
                                             cellpadding="5" width='100'
                                             id="lineas"
                                             rendered="#{usuario.expanded}">
 
                                             <ice:column>
                                                 <ice:graphicImage
                                                     value="#{linea.icon}"
                                                     style="border: 0px solid;" />
                                             </ice:column>
 
                                             <ice:column>
                                                 <ice:outputLabel
                                                     value="#{linea.numero}" />
                                             </ice:column>
                                         </h:dataTable>[/color]
                                    
                                     <br />
                                     <ice:panelGroup
                                         rendered="#{usuario.expanded}"
                                         style="text-align:right;">
                                         <ice:outputLabel
                                             styleClass="normalAzul"
                                             value="Para cambiar la cofiguracion individual de permisos, desvios de llamadas, y grupo al que pertenece" />
                                         <ice:outputLabel
                                             value="#{usuario.nameNodo}" />
                                         <ice:commandButton
                                             value="Configurar Usuario"
                                             styleClass="typesubmit2" />
                                     </ice:panelGroup>
                                 </ice:panelGroup>
 
                             </ice:column>
 
                         </ice:dataTable>


all in this code is refreshed, only the inner datatable does not work

i review my code, and i debug my app, and i think all runs fine

is this a jsf bug?, i changed the tag <ice:datatable> by <h:datatable> and i got the same result



ibanhoe

Joined: 12/Apr/2007 00:00:00
Messages: 71
Offline


i send you a document with 3 images, these images explains my problem


I modify my code, and i dont use datatable inner anymore, i prepare the html code into my backing bean, and now de "inner table" is refreshed, i dont like this solution but a i dont find another way.


I'll try with the ICEfaces 1.6 DR#4 release


Thank you very much
 Filename Pantalla original.doc [Disk] Download
 Description
 Filesize 598 Kbytes
 Downloaded:  530 time(s)

ibanhoe

Joined: 12/Apr/2007 00:00:00
Messages: 71
Offline


do i have change something else that the new jars??


I got this exception when i change the new jars:

2007-05-17 18:29:45 [ExecuteThread: '14' for queue: 'weblogic.kernel.Default'] ERROR org.apache.commons.digester.Digester mrn09122 - Begin event threw exception
java.lang.ClassNotFoundException: com.icesoft.faces.component.ext.taglib.FormTag
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:199)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:224)
at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:41)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:204)
at org.apache.commons.digester.Rule.begin(Rule.java:152)
at org.apache.commons.digester.Digester.startElement(Digester.java:1361)
at weblogic.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
at weblogic.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBinder.java:877)
at weblogic.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:569)
at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:759)
at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1477)
at weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:329)
at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:525)
at weblogic.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:581)
at weblogic.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1175)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)
at org.apache.commons.digester.Digester.parse(Digester.java:1685)
at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:122)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:482)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:150)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)



i was finding into the jars and i didnt found this class:

com.icesoft.faces.component.ext.taglib.FormTag


thank you very much

ibanhoe

Joined: 12/Apr/2007 00:00:00
Messages: 71
Offline


Hi all

I fix my problem about the class cast exception, i changed my tld file.... sorry


But now, i have another problem with the new ice version.

When i get in into my page, the first time, any component works, simply the components (buttons, links) does not work

in the second time, into the same session, all components works fine

what can cause this?





about my refresh datatable problem, it is continue....


i send you my code:

this is the jsp:

Code:
 <ice:panelGrid columns="1">
                         <ice:dataTable value="#{grupo.usuariosActuales}"
                             var="usuario" border="0" cellpadding="5"
                             width='400'
                             columnClasses="triangleColumn,cartNameColumn"
                             id="usuarios" rows="5"
                             rendered="#{grupo.expanded}">
 
                             <ice:column>
                                 <ice:panelGroup
                                     styleClass="#{usuario.indentStyleClass}">
                                     <!-- Render the expand/contract if there is an image -->
                                     <ice:commandLink
                                         actionListener="#{usuario.toggleSubGroupAction}">
                                         <ice:graphicImage
                                             value="#{usuario.expandContractImage}"
                                             style="border: 0px solid;" />
                                     </ice:commandLink>
                                 </ice:panelGroup>
                             </ice:column>
 
                             <ice:column>
                                 <ice:panelGroup
                                     styleClass="#{usuario.rowStyleClass}"
                                     style="width: 400px;">
                                     <ice:graphicImage
                                         value="#{usuario.icon}"
                                         style="border: 0px solid;" />
                                     <ice:commandLink
                                         value="#{usuario.nameNodo}"
                                         actionListener="#{usuario.toggleSubGroupAction}" />
                                     <br />
 
                                     <ice:panelGrid columns="2"
                                         rendered="#{usuario.expanded}">
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Salientes Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.OCSAllowing}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Salientes NO Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.OCSBarring}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Entrantes Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.ICSAllowing}' />
                                         <ice:outputLabel
                                             styleClass="10px"
                                             value='Lista Entrantes NO Permitidas :' />
                                         <ice:outputLabel styleClass="H2"
                                             value='#{usuario.ICSBarring}' />
                                     </ice:panelGrid>
                                     <br />
                                     <!-- Tabla de lineas -->
 
                                     <ice:outputText escape="false"
                                         value="#{usuario.tablaLineas}" rendered="#{usuario.expanded}"/>
 
                                         <ice:dataTable
                                         value="#{usuario.lineas}"
                                         var="linea" border="0"
                                         cellpadding="5" width='100'
                                         id="lineas"
                                         rendered="#{usuario.expanded}">
 
                                         <ice:column>
                                             <ice:graphicImage
                                                 value="#{linea.icon}"
                                                 style="border: 0px solid;" />
                                         </ice:column>
 
                                         <ice:column>
                                             <ice:outputLabel
                                                 value="#{linea.numero}" />
                                         </ice:column>
                                     </ice:dataTable>
  
                                     <br />
                                     <ice:panelGroup
                                         rendered="#{usuario.expanded}"
                                         style="text-align:right;">
                                         <ice:outputLabel
                                             styleClass="normalAzul"
                                             value="Para cambiar la cofiguracion individual de permisos, desvios de llamadas, y grupo al que pertenece" />
                                         <ice:outputLabel
                                             value="#{usuario.nameNodo}" />
                                         <ice:commandButton
                                             id="detalleUsuario"
                                             value="Configurar Usuario"
                                             styleClass="typesubmit2"
                                             actionListener="#{general.seleccionaPagina}" />
                                     </ice:panelGroup>
                                 </ice:panelGroup>
 
                             </ice:column>
 
                         </ice:dataTable>
 


i have a outputText with value = "#{usuario.tablaLineas}" , this tableLineas attribute is filled with the same list that i filled my inner datatable (id="lineas")

this is my code where i fill my "lineas" list


Class= UsuarioBean
Code:
 public void obtieneNodosHijos() {
 //		if (lineas != null && lineas.size() > 0)
 //			return;
 
 		LogWAG.logWag().debug("Hace consulta de lineas");
 		List nodos = null;
 		try {
 			nodos = dao.obtieneNodos(getDn());
 		} catch (RemoteException e) {
 			e.printStackTrace();
 		}
 
 		if (nodos != null) {
 			nodos.remove(0);
 			parseToNodeBean(nodos);
 		} else {
 			LogWAG.logWag().debug("el nodo no tiene lineas");
 		}
 
 	}
 
 private void parseToNodeBean(List nodos) {
 		// (usuarios)
 		this.lineas = new ArrayList();
 		for (int i = 0, maxi = nodos.size(); i < maxi; i++) {
 			Nodo n = (Nodo) nodos.get(i);
 
 			Linea l = new Linea();
 			l.setNumero(n.getNameNodo());
 
 			String tipoLinea = n.getDn().substring(0, n.getDn().indexOf("="));
 			l.setTipolinea(tipoLinea);
 
 			if (tipoLinea.equals(Linea.VPN_NUMERO))
 				l.setIcon(Linea.ICON_NUMERO);
 			else if (tipoLinea.equals(Linea.VPN_PABX))
 				l.setIcon(Linea.ICON_PABX);
 			else if (tipoLinea.equals(Linea.VPN_RANGO))
 				l.setIcon(Linea.ICON_RANGO);
 			else if (tipoLinea.equals(Linea.VPN_UNNUMERO))
 				l.setIcon(Linea.ICON_UNNUMERO);
 
 			lineas.add(l);
 		}
 		
 		preparaTablaLineas();
 	}
 	
 	private void preparaTablaLineas()
 	{
 		tablaLineas = "<center><table>";
 		
 		for(int i=0, maxi=lineas.size(); i<maxi; i++)
 		{
 			Linea l = (Linea)lineas.get(i);
 			tablaLineas += "<tr>";
 			
 			tablaLineas += "<td>";			
 			tablaLineas += "<img src='"+l.getIcon()+"'/>";
 			tablaLineas += "</td>";
 			
 			tablaLineas += "<td>";			
 			tablaLineas += l.getNumero();
 			tablaLineas += "</td>";
 			
 			tablaLineas += "</tr>";
 		}
 		
 		tablaLineas += "</table></center>";
 	}
 


an this is my code where i call this methods

Code:
 UsuarioBean ub = null;
 					for (int i = 0, maxi = usuarios.size(); i < maxi; i++) {
 						ub = (UsuarioBean) usuarios.get(i);
 						if (ub.getDn().equals(dnUsuario))
 							break;
 						else
 							ub = null;
 					}
 					if (ub != null) {
 						LogWAG.logWag().debug("Usuario->" + ub.getNameNodo());
 						LogWAG.logWag().debug("tiene estas lineas->"+ub.getLineas());
 						ub.obtieneNodosHijos();
 						LogWAG.logWag().debug("quedo con estas lineas->"+ub.getLineas());
 						ub.obtienePerfilMarcacion();
 						ub.setExpanded(true);
 						ub.setExpandContractImage(CONTRACT_IMAGE);
 						
 						gb.setFiltroUsuario(ub.getNameNodo());
 						gb.buscar(evt1);						
 						
 						gb.setFiltroUsuario("");
 					}
 					this.filtroGrupo="";
 
philip.breau


Joined: 08/May/2006 00:00:00
Messages: 2989
Offline


Make sure that you're not nesting any form tags.

Philip

.
ibanhoe

Joined: 12/Apr/2007 00:00:00
Messages: 71
Offline


hi Philip

i reviewed my code and i have two forms in my page, 1 to page menu, and another to my principal page.

this is fixed, thank you


my other problem is continue, i think im going to fix it with my alternative solution, i dont know what is the problem


thank you for your time






dkohl

Joined: 02/Jun/2007 00:00:00
Messages: 13
Offline


Here the solution:

a) Create a new class for the surrounding UISeries (datatable, panelseries...). The field we've to reset is protected.
b) Create a "forceRefresh"-method with the following code:

Code:
 	public void forceRefresh() {
 		savedChildren.clear();
 	}
 


c) Create binding for this UISeries.
d) Call this method before the new page is rendered (e.g. when a button is pressed).

For me it works really fine and seems to be an elegant workaround for this problem.

Greetings

Daniel
FlyingElvi

Joined: 15/Dec/2006 00:00:00
Messages: 80
Offline


Thanks Daniel

Your solution works great, it took me a few hours before identifying the problem and I was happy when I saw your work around.

BTW I'm using Icefaces 1.7.1 and the problem still remains

Thanks

Max
connolly.st


Joined: 05/Jun/2008 00:00:00
Messages: 89
Offline


I just ran into this issue with 1.7.1 also.
Any JIRA tracker available for this?
Any sign of a fix on the horizon Philip?

-Sean
connolly.st


Joined: 05/Jun/2008 00:00:00
Messages: 89
Offline


*BUMP*

As our group becomes more familiar and comfortable with ICEfaces, the more we are using it to represent complex data. I am seeing that this often requires nested tables, up to 5 tables deep due to the complexity of the data.

Have people found this issue in 1.7.2?

Has the ICEfaces team acknowledged this issue?

-Sean
mkat

Joined: 16/Oct/2008 00:00:00
Messages: 96
Offline


dkohl wrote:
Here the solution:

a) Create a new class for the surrounding UISeries (datatable, panelseries...). The field we've to reset is protected.
b) Create a "forceRefresh"-method with the following code:

Code:
 	public void forceRefresh() {
 		savedChildren.clear();
 	}
 


c) Create binding for this UISeries.
d) Call this method before the new page is rendered (e.g. when a button is pressed).

 


Could someone explain this solution to me a little more? I still have this problem in 1.8 with a dataTable inside a panelSeries. From this I created a class called NestedPanelSeries and had it extend PanelSeries. Then I put that forceRefresh method in there. But, when I bound my PanelSeries to my NestedPanelSeries it gave me an error and said it could not convert a panelSeries to a NestedPanelSeries. I may not be following this correctly. Any suggestions? Thanks.

Code:
public class NestedPanelSeries extends PanelSeries {
 
     public void forceRefresh() {
  		savedChildren.clear();
  	}
 
 }
diloon

Joined: 17/Aug/2007 00:00:00
Messages: 6
Offline


In the get method of your binding, instanciate your class, it's called before the set. Then play with it.
This workaround is very helpful for me too and in 1.8 also, thank you Daniel.

Furthermore, I actually noticed that nested icefaces dataTable has the refresh problem but standard (h:dataTable) are ok. Unfortunately, if your app requires a dataPaginator, it seems that ice:dataTable is needed. I'm moving from 1.6.1 to 1.8 and come across this problem.
Regards,

Diloon

mkat

Joined: 16/Oct/2008 00:00:00
Messages: 96
Offline


Hi.
I just figured out that binding my panelSeries(the one with the nested dataTables inside) to a PanelSeries and just calling mypanelseries.getChildren.clear(); works for me. And my dataTables show the proper data.


Thanks.
esr2ahmdy

Joined: 17/Nov/2008 00:00:00
Messages: 11
Offline


i have the same problem .. i applied the same solution but i doesn't work for me, is there any suggestion ???
 
Forum Index -> Components Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team