• Post Reply Bookmark Topic Watch Topic
  • New Topic

html:link paramProperty Problem  RSS feed

 
Fletcher Munson
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having issues with my html:link tag. I've tried this two ways.
1) This gets me to my proper dispatch action with the bean:
<html:link forward="editMyInfo"
paramId="<%=BeanNames.MY_BEAN_ID%>"
paramName="myBean">Edit</html:link>

2)This also gets me to my proper dispatch action without the bean, and without the id:
<html:link forward="editMyInfo"
paramId="<%=BeanNames.MY_BEAN_ID%>"
paramName="myBean"
paramProperty="id">Edit</html:link>

My forward tag in struts config is:
<forward name="editMyInfo" path="/secure/editMyInfo.do?dispatch=edit"/>

I do notice the following -

For example 1 the generated html is:
<a href="/mywebsite/research/secure/editMyInfo.do?dispatch=edit&myBean=com.mywebsite.struts.research.primate.gorilla.MyBean%401563e06">Edit</a>

For example 2 the generated html is:
<a href="/mywebsite/research/secure/editMyInfo.do?dispatch=edit">Edit</a>

What I want is to get to my dispatch action (edit) with just the id stored in the bean, and not the whole bean. Can anyone tell what I'm doing wrong?
 
Fletcher Munson
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After beating my head against the wall I discoverd that in one my test case where I declared bean1, bean2, and bean3 I was setting bean1 3 times. Let's hear if for copy and paste mistakes. WooooHooooo!!
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!