Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

columns width problem in PanelGrid which is in <h:dataTable>

843844May 5 2007 — edited May 5 2007
Hi,
I want to change the column width in <h:panelGrid>. For that iam using columnClasses but not getting the
result.Finally Iam using the spacer image to change the width but helpless. Please see my code once if u can and
suggest me please.


view page
<f:verbatim>
                                    <table align="center" border="0" width="100%" background="./images/background.jpg">
                                <tr><td align="center"> </f:verbatim> <h:panelGrid width="580">
                                                   
                                                    <h:outputText value="Total Search Results " />
                                                    
                                    <h:dataTable cellpadding="0" cellspacing="1" bgcolor="blue" id="eventsTable" rows="8" 
                                                  value="#{ResultsBean.results}"
                                                  var="te" rowClasses="list-row-odd,list-row-even" 
                                                  headerClass="table-header"
                                                  width="100%" binding="#{ResultsBean.data}">
                                        
                    <h:column rendered="true">
                                                <h:panelGrid cellpadding="0" columns="3" bgcolor="#FFFFFF" columnClasses="column3,column3,column3" >
                                                <h:panelGroup>
                                            <h:commandLink 
                                                immediate="true" style="border:0px;">
                                                
                                                
                                                <h:graphicImage style="width:100px;" url="upload/#{te.photo}" />                                      
                                                <f:verbatim><br></f:verbatim>
                                                <f:verbatim><br></f:verbatim>
                                                
                                                <h:outputText styleClass="newfont" value="#{te.userid}"/>
                                                  
                                            </h:commandLink>
                                            <f:verbatim><img scr="images/spacer.gif" width="100" height="1"></f:verbatim>
                                            </h:panelGroup>                          
                                            <h:panelGroup>                                    
                                                
                                                <h:outputText styleClass="newfont" value="Name: #{te.fname} #{te.lname}"/>
                                                <f:verbatim><br></f:verbatim>
                                                <h:outputText styleClass="newfont" value="Headline: #{te.headline}" />
                                                <f:verbatim><br></f:verbatim>
                                                <h:outputText styleClass="newfont" value="Gender: #{te.gender}" />
                                                <f:verbatim><br></f:verbatim>
                                                <h:outputText styleClass="newfont" value="Age: #{te.age}" />
                                                <f:verbatim><br></f:verbatim>
                                                <h:outputText styleClass="newfont" rendered="#{te.hideCity}" value="Location: #{te.city}" />
                                                <f:verbatim><br></f:verbatim>
                                                <h:outputText styleClass="newfont" value="Last Updated: #{te.profileUpdated}" />
                                                <f:verbatim><br></f:verbatim>
                                                <f:verbatim><img scr="images/spacer.gif" width="300" height="1"></f:verbatim>
                                            </h:panelGroup>
                                            <h:panelGroup>
                                            
                                            <h:commandLink action="viewprofile">
                                                <h:outputText styleClass="newfont" value="View Profile" />
                                            </h:commandLink>
                                            <f:verbatim><br></f:verbatim>
                                            <h:commandLink action="">
                                                <h:outputText styleClass="newfont" value="Send Message" />
                                            </h:commandLink>
                                            <f:verbatim><br></f:verbatim>
                                            <h:commandLink action="">
                                                <h:outputText styleClass="newfont" value="Forward to Friend" />
                                                
                                            </h:commandLink>
                                            <f:verbatim><br><img scr="images/spacer.gif" width="120" height="1"></f:verbatim>
                                            </h:panelGroup>
                                             </h:panelGrid>
                                        </h:column>
                                    </h:dataTable>
                                    
                                    <!-- Custom Scroller Component -->
                
                                    <t:scroller navFacetOrientation="NORTH" for="eventsTable" actionListener="#{ResultsBean.processScrollEvent}" >
                                        
                                        <f:facet name="next">
                                            <h:panelGroup>
                                                <h:outputText value="Next"/>
                                                <h:graphicImage url="/images/arrow-right.gif" />
                                            </h:panelGroup>
                                        </f:facet>
                                        
                                        <f:facet name="previous">
                                            <h:panelGroup>
                                                <h:graphicImage url="/images/arrow-left.gif" />
                                                <h:outputText value="Previous"/>
                                            </h:panelGroup>
                                        </f:facet>
                                        
                                </t:scroller> </h:panelGrid>
                            <f:verbatim>       </td>
                        </tr>
                    </table></f:verbatim>
style.css page
.column3 {
  width :150px ;
}
many thanks,

vijaycanaan
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 2 2007
Added on May 5 2007
0 comments
206 views