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!

Adding scroll bar in the rich:dataTable

843844May 13 2009 — edited Mar 19 2010
Hi every body ,

I am new in JSF , currently am working in a project & it is using JSF 1.1, richfaces 3.1.6,tomahawk 1.1.7.
I have using one rich:dataTable in my xhtml file .

My questions are :
1) How can I add scroll bar on that table .
2) I want to short the table by clinking on the column header .How is it possible ?

Here is the code
                     <rich:dataTable id="userTable"  
		       		value="#{adminBacking.userModel}" 
		       		var="item">
		       		
		       		<h:column >
		       			<f:facet name="header">
		       				<h:outputText value="Event ID" />
		       			</f:facet>
		       			<h:outputText value="#{item.event_id}" />     				
		       		</h:column>
		       		
		       		<h:column >
		       			<f:facet name="header">
		       				<h:outputText value="Event Name" />
		       			</f:facet>
		       			<h:outputText value="#{item.event_name}" />     				
		       		</h:column>
		       		
		       		<h:column >
		       			<f:facet name="header">
		       				<h:outputText value="First Name" />
		       			</f:facet>
		       			<h:outputText value="#{item.fname}" />     				
		       		</h:column>
		       		
		       		<h:column >
		       			<f:facet name="header">
		       				<h:outputText value="Last Name" />
		       			</f:facet>
		       			<h:outputText value="#{item.lname}" />     				
		       		</h:column>
		       		
		       		<h:column >
		       			<f:facet name="header">
		       				<h:outputText value="Email" />
		       			</f:facet>
		       			<h:outputText value="#{item.email}" />     				
		       		</h:column>      		
		       		<h:column>
		       			<f:facet name="header">
		       				<h:outputText value="Delete User" />
		       			</f:facet>
		       			<t:commandLink action="#{adminBacking.deleteApplication}" immediate="true"
			         		onclick="if (!confirm('Are you sure you want to DELETE this user ?')) return false" >
			        		<h:graphicImage value="/images/trashcan.jpg" style="border:none" width="20" height="20" alt="delete"/>
			       		</t:commandLink>     				
		       		</h:column>	
		       		<h:column>
		       			<f:facet name="header">
		       				<h:outputText value="Select Row" />
		       			</f:facet>
		       			<t:commandLink action="#{adminBacking.updateuserApplication}" value="Select"/>		        		     				     			
		       		</h:column>
		       	</rich:dataTable>
Thnaks & regards ,
sb
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 16 2010
Added on May 13 2009
3 comments
1,799 views