myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Vásquez ...@3eyegroup.com>
Subject RE: Appending dynamic table as column to datatable...
Date Thu, 09 Nov 2006 01:36:10 GMT
I have another question, why doesn´t panelGrid have a value attribute?  I
think that it would be ideal for these kinds of situations where you want to
map many panelgrids to different instances of HTmlPanelGrid, and probably
embed them inside another container.

 

Regards,

JV

 

 

 

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 08 de noviembre de 2006 20:09
Para: 'MyFaces Discussion'
Asunto: RE: Appending dynamic table as column to datatable...

 

PLEASE SOMEBODY HELP, I am really blocked out with this, can at least
somebody give me a hand explaining how is the rendering process for
datatables?

 

Thanks,

JV

 

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 08 de noviembre de 2006 19:05
Para: 'MyFaces Discussion'
Asunto: RE: Appending dynamic table as column to datatable...

 

I have been also trying with a column that has a panelGrid associated which
has a binding to the columnValue but all my rows get the same value for that
column binding.  

 

 

My whole dataTable (I admit it is quite overwhelming!!!) appears below.  The
part that I am mentioning that has the binding is:

                        <h:panelGroup
rendered="#{columnHeader.internalTable}">

                                         <h:panelGrid
binding="#{searchResultsBean.columnValue}" />

                        </h:panelGroup>

 

Men, this is driving me crazy, ain´t there a way to embed a code generated
table inside another table?

 

 

Regards,

JV

 

 

 

*****************************************************************XHTML
FRAGMENT FOR
DATATABLE************************************************************

 

 

                  <t:dataTable id="resultsData"

                         headerClass="searchResultHeaders"

                         rowClasses="searchResult1,searchResult2"

                         var="row"

                         value="#{searchResultsBean.rowData}"


                         sortColumn="#{searchResultsBean.sort}"

 
sortAscending="#{searchResultsBean.ascending}" preserveSort="true"

                                    rows="5"

                         width="100%"

                         cellspacing="0"

                         cellpadding="0"

                         border="0">

                <t:columns id="columns"
value="#{searchResultsBean.columnHeaders}" var="columnHeader">

                    

                    <f:facet name="header">

                                   <h:panelGroup>

                                         <t:commandSortHeader
columnName="#{columnHeader.label}"

                                               arrow="false"
styleClass="searchResultHeaders" rendered="#{columnHeader.clickable}">

                                               <f:facet name="ascending">

                                                     <t:graphicImage
value="/pages/images/arrows_orderby_asc.gif"

                                                           rendered="true"
border="0" />

                                               </f:facet>

                                               <f:facet name="descending">

                                                     <t:graphicImage
value="/pages/images/arrows_orderby_desc.gif"

                                                           rendered="true"
border="0" />

                                               </f:facet>

                                               <h:outputText
value="#{columnHeader.label}"/>

                                         </t:commandSortHeader>

                                         <h:outputText
value="#{columnHeader.label}" rendered="#{!columnHeader.clickable}" />

                                   </h:panelGroup>

                             </f:facet>

                                                          

                    <h:panelGroup rendered="#{columnHeader.outputText}">

                                         <h:outputText
value="#{searchResultsBean.columnValue}" />

                        </h:panelGroup>

                        <h:panelGroup
rendered="#{columnHeader.internalTable}">

                                         <h:panelGrid
binding="#{searchResultsBean.columnValue}" />

                        </h:panelGroup>

                        <h:panelGroup rendered="#{columnHeader.imageLink}">

                                   <h:commandLink>

                                         <t:graphicImage
value="#{searchResultsBean.columnValue.icon}" style="border:0px" />

                                         <f:param name="eid"
value="#{searchResultsBean.columnValue.eid}" />

                                         <f:param name="actionStr"
value="#{searchResultsBean.columnValue.actionStr}" />

                                   </h:commandLink>

                        </h:panelGroup>

                             <!-- Renders columns with popup actions -->

                             <h:panelGroup
rendered="#{columnHeader.popupMenu}">

                                   <t:jscookMenu layout="hbr"
theme="ThemeOffice"
org.apache.myfaces.STYLE_LOCATION="/pages/css/jscookmenu" 

 
org.apache.myfaces.JAVASCRIPT_LOCATION="/pages/js">

                                         <t:navigationMenuItem
value="#{searchResultsBean.columnValue}" />

                                   </t:jscookMenu>

                             </h:panelGroup>                          

                        <h:panelGroup rendered="#{columnHeader.textLink}">

                                   <h:commandLink >

                                         <h:outputText
value="#{searchResultsBean.columnValue.outputText}" />

                                         <f:param name="eid"
value="#{searchResultsBean.columnValue.eid}" />

                                         <f:param name="actionStr"
value="#{searchResultsBean.columnValue.actionStr}" />

                                   </h:commandLink>

                        </h:panelGroup>

                </t:columns>

            </t:dataTable>

</td>

 

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 08 de noviembre de 2006 16:41
Para: 'MyFaces Discussion'
Asunto: RE: Appending dynamic table as column to datatable...

 

Hi again,

 

I can simplify a little bit my question:  “Has anybody generated a datatable
dynamically”, when I say dynamically I refer to building the whole table
from java code in the following manner:

 

                        Application app =
FacesUtils.getFacesContext().getApplication();

                        HtmlDataTable myDataTable = (HtmlDataTable)
app.createComponent(HtmlDataTable.COMPONENT_TYPE);

…..

 

And associating it to a page:

 

                        <h:panelGroup
rendered="#{columnHeader.internalTable}">

                                         <h:dataTable rows="1"
value="#{searchResultsBean.columnValue.data}" >

……..                                     

</h:dataTable>

                        </h:panelGroup>

 

 

Regards,

JV

  _____  

De: Jorge Vásquez [mailto:jv@3eyegroup.com] 
Enviado el: miércoles, 08 de noviembre de 2006 15:48
Para: 'MyFaces Discussion'
Asunto: Appending dynamic table as column to datatable...

 

Hi to all,

I have a special requirement for a data table where one column can
correspond to a series of consecutive html elements that may vary for each
row (It can be thought in html terms as embedding a table for a td).  I have
decided to use a panelgrid for this special requirement but I cannot use the
binding attribute since I get an error during rendering, neither can I use
some value attribute which isn´t supported by panelgrids, etc.  Has anybody
had a similar requirement?  If so, how did you proceeded using JSF?

 

Regards and thanks,

JV

 

 


Mime
View raw message