Comment on Tutorial - DispatchAction in Struts By Grenfel



Comment Added by : Alistair

Comment Added at : 2012-01-14 10:59:52

Comment on Tutorial : DispatchAction in Struts By Grenfel
Following question to this topic:
- when in a dispatch action I am unable to pass a field parameter and it's value within the URL.
-projectID works, teamID does not work
- teamID is entered by the user in the input field

I was trying to get the value via javascript, but I read that the action is evaluated before the javascript.



Here my code:
<input type="text" name="tsid" id="tsid" maxlength="100" />
<li>
<a href="<@s.url action='deleteTeam' value='deleteTeam.jspa'>
<@s.param name="projectID" value="${projectID?c}"/>
<@s.param name="teamID" value="javascript: document.getElementById('tsid').value"/>
</@s.url>">
<@s.text name="delete Team" /></a>
</li>


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. if the number is for exemple 00025478 it return a
View Tutorial          By: ahmed at 2015-02-11 12:02:45

2. Nice example. I think this is more idiomatic tho'.
View Tutorial          By: John Morrison at 2010-03-28 14:55:07

3. Very Nice and Perfectly Understandable.....
View Tutorial          By: rex at 2015-04-16 12:27:03

4. Hello,

I was able to rectify port/

View Tutorial          By: Harsh at 2011-10-09 16:54:06

5. like
View Tutorial          By: po!X!on at 2011-05-05 01:30:51

6. You should show how to implement a custom sorting
View Tutorial          By: AngleWyrm at 2012-12-13 19:35:30

7. Hi sir,
please send some sample code for sp

View Tutorial          By: hindu at 2013-03-21 06:00:09

8. Very good description. I was quite confused before
View Tutorial          By: Donna at 2011-07-31 03:46:05

9. In the above program, the instance variables like
View Tutorial          By: Abhikumar.M at 2012-08-02 17:25:55

10. Nice for java examples, it is easy to understand j
View Tutorial          By: Nirmaladevi.T at 2009-06-19 04:42:51