• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Hyperlinked datatable

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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">
<h:outputText 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']}" />
<h:outputText 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic