This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Param passing in link, prepopulation and javascript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Param passing in link, prepopulation and javascript" Watch "Param passing in link, prepopulation and javascript" New topic

Param passing in link, prepopulation and javascript

Bianca Deloso

Joined: Sep 23, 2003
Posts: 15
I actually have three problems with the project I am doing. First is with the <link> tag, second is with pre-population problem and third is how to call a javasript first before anything else happens.
I'm trying to pass a value from a link when a user clicks on a submit button (an image button). It's suppose to pass a value from a listbox (the one selected by the user) which was pre-populated by options taken from a database.
My problem is, how do I reference the value in my action bean? I wanted to use the ParamId and ParamName in the <html:link> tag. Here's my JSP code:

Next is, I managed to pre-populate a drop down box already, but whenever I refresh or do something on that same page, the values get repeated in the listbox (re-populated) again and again. What can I do to fix this (the page is technically the 'first page' - I forward an index page to this so that it performs the actions I need)?
3rd, when a user submits the form, I forward it to an action to pre-populate the next page. But, I have a date list box that is populated by a javascript (because it only gets the dates of every saturday of a selected month - and changed when the month selected is changed). So this means that when I load the page, my day listbox 'default' is not the one in the database, instead it is the first option. Is there a way to get this fixed?
[ October 04, 2003: Message edited by: Gregg Bolinger ]
[ October 05, 2003: Message edited by: Bianca Deloso ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

Wow! This has nothing to do with JDBC. I am moving this to the STRUTS forum. Also, I edited your post to remove "Urgent" from the subject line. Putting the word urgent in your subject is likely to get it ignored.

GenRocket - Experts at Building Test Data
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Param passing in link, prepopulation and javascript
It's not a secret anymore!