voyent
Messages posted by: Marioko  XML
Profile for Marioko -> Messages posted by Marioko [116] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7, 8 Next 
Author Message
this tutorial show you how make that: http://facestutorials.icefaces.org/tutorial/dynamic-includes-tutorial.html

basically you can use EL expression in the ui:include tag. For example you could have a managedBean with a property called fileContent, and then in the ui:include u can do this:

Code:
<ui:include src="#{myBean.fileContent}"/>


When you click a button you need change the value of fileContent, for example:
Code:
<ice:commandLink value="New Item" actionListener="#{myBean.goto}">
    <f:attribute name="page" value="newItem.jspx"/>
 </ice:commandLink>


Then in your managedBean the goto actionListener should be:
Code:
public void goto(ActionEvent evt){
      String page = evt.geComponent().getAttributes().get("page");
      if(page!=null){
            setFileContent(page),
      }
 }


ICEfaces automagically refresh the content page with the new page (newItem.jspx)

PD: Make sure that fileContent is NOT NULL when is insert it in the include..
Ok Solved!!!

the problem is that sometime the dialogContent property is null and ui:include explode with that.. i need use the c:if tag to make sure when use the include:

The code with the solution is this:

Code:
<ice:panelPopup visible="#{myBean.showDialog}" rendered="#{myBean.showDialog}" style="#{myBean.dialogSize}" draggable="true" autoCentre="true">        
          <f:facet name="header">            
              <ice:panelGrid columns="2" columnClasses="none,panelListButtons" width="100%">
                  <ice:outputText value="#{myBean.dialogTitle}"></ice:outputText>                
                  <ice:commandButton  title="Cerrar" image="images/icons/cancel.gif" 
                                      actionListener="#{myBean.closeDialog}"></ice:commandButton>                
              </ice:panelGrid>
          </f:facet>
          
          <f:facet name="body">            
              <ice:panelGroup>
                  <c:if test="#{myBean.dialogContent!=null}">                
                       <ui:include src="#{myBean.dialogContent}"></ui:include>        
                   </c:if>
              </ice:panelGroup>
          </f:facet>        
      </ice:panelPopup>  
 

any idea about why i cant use EL expressions in ui:include tag???
Again.. this time i found the real problem:

The exception is cause it when i use a EL in the src attribute in the ui:include tag... the code above throw the exception.. the next code works good:

Code:
<ice:panelPopup visible="#{myBean.showDialog}" rendered="#{myBean.showDialog}" style="#{myBean.dialogSize}" draggable="true" autoCentre="true">        
          <f:facet name="header">            
              <ice:panelGrid columns="2" columnClasses="none,panelListButtons" width="100%">
                  <ice:outputText value="#{myBean.dialogTitle}"></ice:outputText>                
                  <ice:commandButton  title="Cerrar" image="images/icons/cancel.gif" 
                                      actionListener="#{myBean.closeDialog}"></ice:commandButton>                
              </ice:panelGrid>
          </f:facet>
          
          <f:facet name="body">            
              <ice:panelGroup rendered="#{myBean.showDialog}">                
                  <ui:include src="edit.jspx"></ui:include>         
              </ice:panelGroup>
          </f:facet>       
      </ice:panelPopup>  


take a look in body facet the include tag..

Ok now the real question is ┬┐how can i fix that???

PD: Before it works now i dont know why...
i found what is causing the exception..

i am dinamic including a jspx page in a panelPopup, the rare thing is with .xhtml this problem never happen.

Here the code:

Code:
<ice:panelPopup visible="#{myBean.showDialog}" rendered="#{myBean.showDialog}" style="#{myBean.dialogSize}" draggable="true" autoCentre="true">        
         <f:facet name="header">            
             <ice:panelGrid columns="2" columnClasses="none,panelListButtons" width="100%">
                 <ice:outputText value="#{myBean.dialogTitle}"></ice:outputText>                
                 <ice:commandButton  title="Cerrar" image="images/icons/cancel.gif" 
                                     actionListener="#{myBean.closeDialog}"></ice:commandButton>                
             </ice:panelGrid>
         </f:facet>
         
         <f:facet name="body">            
             <ice:panelGroup rendered="#{myBean.showDialog}">                
                 <ui:include src="#{myBean.dialogContent}"></ui:include>         
             </ice:panelGroup>
         </f:facet>        
     </ice:panelPopup>  


Maybe is a 1.7rc1 bug?? mmm heeeeelllpp meeeee!! :D
Hi i am using Icefaces 1.7.0RC1 + Facelets + Tomcat 6.0.16

I was using all my web files with .xhtml extension and everything works nice, but now i am using Netbeans 6.1beta and i need code completion, then i rename all my files to .jspx extension and replace the DEFAULT_SUFIX context parm to .jspx but now i get that exception in some files, also i cant use EL expresions outside components attribute.

variableName is the name of some managed bean, i dont know why this happen..

Please i need help...
yep that question.. how can i show a tooltip panel when the user mouse over a row in a DataTable??

thanks
i have the same problem but only in IE
nop.. with previous context parm dont work.. the exception is alive..


BTW: i am using IE7
I have the same problem.. but i am using ICEfaces 1.7.0RC1, only happen in IE, i tested Safaris and Firefox and works fine.

When its bug will be fixed??

I going to test this setting:
Code:
 <context-param>
    <param-name>com.icesoft.faces.compressResources</param-name>
    <param-value>false</param-value>
  </context-param>
Hi, i have this tree

Code:
        <ice:tree id="insumosTree" hideRootNode="false" hideNavigation="false" 
                               value="#{linea.treeModel}" var="item" 
                               imageDir="css/royale/css-images/">
                         <ice:treeNode>                   
                             <f:facet name="icon">
                                 <ice:panelGroup style="display: inline">
                                     <ice:graphicImage value="#{item.userObject.icon}"/>
                                 </ice:panelGroup>
                             </f:facet>                        
                             <f:facet name="content">
                                 <ice:panelGroup style="display: inline">                          
                                     <ice:commandLink value="#{item.userObject.text}" actionListener="#{item.userObject.nodeClick}"/>                                    
                                 </ice:panelGroup>
                             </f:facet>                        
                         </ice:treeNode>                                    
                     </ice:tree> 


It works nice, but when i click a commandLink inside TreeNode, the actionlisteners is never called. I was searching over the forums but no answer..
There is something special/differents with actionsListener in TreeNodes??

I need your help..

thanks :D
yep i was thinking about that, find a way to load data once in other method, thanks..
ok i found the problem, i thing is panelTabSet problem or facelets, i made a little demo the reproduce the bug.

Please help me to find a workaround.. thankssss
Hi again..

Here my enviroment:

Icefaces: 1.7.0 Beta1
Facelets
Tomcat 6
JPA + Hibernate
Spring

I have a backingBean with a get method (called getResultList()) that return a List filled with a database query result, then i want to show results in a panelSeries or dataTable, and its show very nice. The problem is getResultList() is called many times (4 times, 15 times if i use <c:forEach), thats means many database shoots, and this could kill my server. This problem also happens in components with lists, like selectManyList, or selectManyMenu.

I was testing only JPA outside server and its work nice. One method call one database query.

Code:
   <ice:panelSeries value="#{sucursal.resultList}" var="suc">
         <ice:panelGrid columns="1" styleClass="panelList">
             <ice:outputLabel value="#{suc.codigo}"></ice:outputLabel>
             <ice:outputText value="#{suc.nombre}"></ice:outputText>
             <ice:outputText value="Tel:#{suc.otrosDatos.telefono}"></ice:outputText>
             <ice:outputText value="Ciudad: #{suc.otrosDatos.ciudad}, Direccion: #{suc.otrosDatos.direccion}"></ice:outputText>
             <ice:outputLink value="mailto:#{suc.otrosDatos.email}">#{suc.otrosDatos.email}</ice:outputLink>
         </ice:panelGrid>        
     </ice:panelSeries>


Is that a ICEfaces bug or something i missing???

Ok Solved.. again by me, without help.. :D but was my fault

I replace the jsf jars with are in ICEfaces demos :D


 
Profile for Marioko -> Messages posted by Marioko [116] Go to Page: Previous  1, 2, 3, 4, 5, 6, 7, 8 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team