Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

h:command_hyperlink navigation not working

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a jsp set up to display a list of items from a backend DB, using a dataGrid. One of the columns is an update link for each row.
Here is part of the listing code:

TransactionListing.jsp:

<hx:datagrid id="transactionListing" valueRef="txnMappingAction.mappings"
var="mappings" pagesize="15" rowClasses="oddRow,evenRow">
<hx:panel_cell label=" ">
<h:command_hyperlink id="updateLink" action="#{txnMappingAction.updateMappingAction}">
<h:output_text value="Update"></h:output_text>
</h:command_hyperlink>
</hx:panel_cell>
<hx:panel_cell id="panelCell4" label="Type Code">
<h:output_text id="text3" valueRef="mappings.typeCode"></h:output_text>
</hx:panel_cell>
.
.
.
</hx:datagrid>


Now #{txnMappingAction.updateMappingAction} returns "TransactionMapping.update_detail_success".

This is part of my faces-config file concerning navigation:
<navigation-rule>
<from-tree-id>/TransactionListing.jsp</from-tree-id>
<navigation-case>
<from-action-ref>txnMappingAction.updateMappingAction</from-action-ref> <from-outcome>TransactionMapping.update_detail_success</from-outcome>
<to-tree-id>/faces/updateTransactionMapping.jsp</to-tree-id>
</navigation-case>
.
.
.
<navigation-case>
<from-outcome>new_txn_mapping</from-outcome>
<to-tree-id>/newTransactionMapping.jsp</to-tree-id>
</navigation-case>
</navigation-rule>


Now, whenever I click on the "update" command_hyperLink, it just returns me back to TransactionListing.jsp, and not /faces/updateTransactionMapping.jsp.

I have tried leaving out the "/faces/" part, it still doesnt work.
I have also tried hardcoding the action name in the hyperlink, did not work.

txnMappingAction is a managed bean defined in the faces-config as below:
<managed-bean>
<managed-bean-name>txnMappingAction</managed-bean-name>
<managed-bean-class>com.jpmorgan.adjustments.action.TransactionMappingAction</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<!--<managed-property>
<property-name>txnMappingBean</property-name>
<value>#{txnMappingBean}</value>
</managed-property>
<managed-property>
<property-name>txnMappingListBean</property-name>
<value>#{txnMappingListBean}</value>
</managed-property>-->
</managed-bean>



Any clue whats going on? How do I get it to

P.S. when i uncomment the managed-property parts of the bean, I get this error upon server startup:

[8/29/06 10:01:17:589 EDT] 3e0ca7b7 Digester E org.apache.commons.digester.Digester TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java(Compiled Code))
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1302)
at com.sun.faces.config.ConfigParser.parseConfig(ConfigParser.java:140)
at com.sun.faces.config.ConfigListener.contextInitialized(ConfigListener.java:178)
at com.ibm.ws.webcontainer.srt.WebGroup.notifyServletContextCreated(WebGroup.java:1698)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:279)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
Caused by: javax.faces.FacesException: Can't instrospect class: 'com.jpmorgan.adjustments.action.TransactionMappingAction'.
at com.sun.faces.config.ConfigManagedBean.getPropertyType(ConfigManagedBean.java:180)
at com.sun.faces.config.ConfigManagedBean.addProperty(ConfigManagedBean.java:76)
... 45 more
.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:260)
at org.apache.commons.digester.Digester.endElement(Digester.java(Compiled Code))
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1302)
at com.sun.faces.config.ConfigParser.parseConfig(ConfigParser.java:140)
at com.sun.faces.config.ConfigListener.contextInitialized(ConfigListener.java:178)
at com.ibm.ws.webcontainer.srt.WebGroup.notifyServletContextCreated(WebGroup.java:1698)
at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:279)
at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:387)
at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:209)
at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:987)
at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:418)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:787)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:575)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:271)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:249)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:125)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
Caused by: javax.faces.FacesException: Can't instrospect class: 'com.jpmorgan.adjustments.action.TransactionMappingAction'.
at com.sun.faces.config.ConfigManagedBean.getPropertyType(ConfigManagedBean.java:180)
at com.sun.faces.config.ConfigManagedBean.addProperty(ConfigManagedBean.java:76)
... 45 more



Thats some IBM/WSAD bullcrap possibly, or my faces-config defines the properties incorrectly.

Any idea?

-Ayan
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

before looking at the exception, what components are you using? I don't know what the hx namespace stands for, but h namespace should usually be from core taglib. And if so your tags should be "h:commandLink" instead of "h:command_hyperlink" and "h:outputText" instaed of "h:output_text".

See for example here: http://myfaces.apache.org/impl/tlddoc/index.html

Regards,
Thorsten
 
Ayan Afridi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually I am using WSAD 5.1 Integration edition (our app servers are all websphere) and as such I have to use what is provided there. so everything is a bit different. hx refers to
<%@taglib uri="http://www.ibm.com/jsf/html_extended"; prefix="hx"%>.
 
Thorsten Duhn
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

that quick I only found a PDF* about IBMs "html_extended", but there also, are tags as you use them? I cannot find "hx:datagrid" and especially no "hx:panel_cell" (strange underscore notation). What documentation do you use?

* http://www.redbooks.ibm.com/redbooks/pdfs/sg246361.pdf

Regards,
Thorsten
[ August 29, 2006: Message edited by: Thorsten Duhn ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic