aspose file tools*
The moose likes JSF and the fly likes Hyperlinked datatable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Hyperlinked datatable" Watch "Hyperlinked datatable" New topic
Author

Hyperlinked datatable

Mani Bas
Greenhorn

Joined: Jul 28, 2009
Posts: 1
Hi,

i'm building a page which has a table with 5 columns.
for example, imagine i have 1 to 5 items and i click the item number 2.
i want to see the page with the details of the item 2.
I used the following code to create a hyperlinked column and called the bean's load() method to save the param values.
<h:column binding="#{LoadRejectedTransactions.column2}" id="column2">
<f:facet name="header">
<hutputText id="outputText5" value="RT_Error_Code"/>
</f:facet>
<h:commandLink action="#{rejectedTransactionHandler.load}" id="linkAction1" immediate="true">
<f:param name="RTErrorCode" value="#{currentRow['RT_Error_Code']}" />
<hutputText binding="#{LoadRejectedTransactions.outputText1}" id="outputText1" value="#{currentRow['RT_Error_Code']}"/>
</h:commandLink>
</h:column>

Next I enter the faces-config.xml file as follows:
<navigation-rule>
<from-view-id>/LoadRejectedTransactions.jsp</from-view-id>
<navigation-case>
<from-action>#{rejectedTransactionHandler.load}</from-action>
<from-outcome>load</from-outcome>
<to-view-id>/CorrectRejectedTransaction.jsp</to-view-id>
<redirect/>
</navigation-case>
</navigation-rule>
<managed-bean>
<managed-bean-name>rejectedTransactionHandler</managed-bean-name>
<managed-bean-class>ibadirectdeliveryoptimizedproject.RejectedTransactionHandler</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>RTTransId</property-name>
<value>#{param.RTTransId}</value>
</managed-property>
<managed-property>
<property-name>RTTransDate</property-name>
<value>#{param.RTTransDate}</value>
</managed-property>
<managed-property>
<property-name>RTErrorCode</property-name>
<value>#{param.RTErrorCode}</value>
</managed-property>
<managed-property>
<property-name>RTStoreNumber</property-name>
<value>#{param.RTStoreNumber}</value>
</managed-property>
<managed-property>
<property-name>RTStoreAccount</property-name>
<value>#{param.RTStoreAccount}</value>
</managed-property>
<managed-property>
<property-name>RTProductId</property-name>
<value>#{param.RTProductId}</value>
</managed-property>
<managed-property>
<property-name>RTLiquorLicenceNumber</property-name>
<value>#{param.RTLiquorLicenceNumber}</value>
</managed-property>
<managed-property>
<property-name>BatchId</property-name>
<value>#{param.BatchId}</value>
</managed-property>
<managed-property>
<property-name>SupplierId</property-name>
<value>#{param.SupplierId}</value>
</managed-property>
</managed-bean>

The problem is my details page called CorrectRejectionsTransaction.jsp does not get called and I get the following error:

Exception Details: java.lang.ClassCastException
java.lang.Long cannot be cast to java.lang.String

Possible Source of Error:
Class Name: com.sun.rave.web.ui.appbase.renderer.CommandLinkRenderer
File Name: CommandLinkRenderer.java
Method Name: encodeBegin
Line Number: 236

Please advise How to redirect the passed parameter from the hyperlinked column to a details page with all the values passed from the previous page.


Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hyperlinked datatable