Passing dynamic parameters to javascript function inside href link

2007-09-10 Thread Anna Simbirtsev
Hello

I am trying to pass the value of i to a javascript but I can't seem to get
it to pass the value.

<% for (int i = 0;i < 5; i++) { %>


 value


<%}%>

What am I doing wrong?

Thank you


Re: pass parameters to action

2007-09-07 Thread Anna Simbirtsev
I have to use post for security reasons, and to be able to pass all of the
information in the hidden fields(too long, some fields are upto 500 char).

Thank you for your help.


On 9/7/07, Rod Bollinger <[EMAIL PROTECTED]> wrote:
>
> There is nothing wrong with Javascript in general - when used judiciously.
>
> The problem with Javascript (in this particular situation) is that if
> Javascript is disabled or unavailable for any reason, the user will not be
> able to submit the request - this is a major accessibility no-no.
>
> IIRC the OP was interested not because the the URL was too long but to
> hide
> the information being sent - potentially a security issue - hence the POST
> suggestion initially.
>
> -Rod
>
> -Original Message-
> From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 07, 2007 14:42
> To: Struts Users Mailing List
> Subject: RE: pass parameters to action
>
> > >
> > > Submit the form
> >
> > Oh, the humanity!
> >
> > Seriously, I hate seeing this kind of code. First of all, it
> > requires javascript.
>
> What's wrong with javascript?
>
> > Second, it merely converts a GET request into a POST request.
> > Who really cares whether the URL is long or not?
>
> OP did. That was the point of her original post.
>
> And it can be important if you're trying to control how your user steps
> through your application.
>
>
> --
> Tim Slattery
> [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Anna Simbirtsev
(416) 729-7331


Re: pass parameters to action

2007-09-07 Thread Anna Simbirtsev
How do I do it?

On 9/7/07, Rick Reumann <[EMAIL PROTECTED]> wrote:
>
> On 9/7/07, Anna Simbirtsev <[EMAIL PROTECTED]> wrote:
> >
> > Hello
> > I have a link   > paramName="map">Name and when a user clicks on it, it calls
> > action myAction and passes parameters using HashMap. Those parameters
> are
> > visible in the URL. Is there any way to pass parameters to the action
> > other
> > than through URL?
>
>
> If you wanted you could populate a form on the page, possibly with just
> hidden values and then have your link submit that form.
>
> --
> Rick
>



-- 
Anna Simbirtsev
(416) 729-7331


pass parameters to action

2007-09-07 Thread Anna Simbirtsev
Hello
I have a link  Name and when a user clicks on it, it calls
action myAction and passes parameters using HashMap. Those parameters are
visible in the URL. Is there any way to pass parameters to the action other
than through URL?

Thank you


Re: 2 jsp files using the same form

2007-08-29 Thread Anna Simbirtsev
This is how the submit button is defined:


varimage is defined as a tag in app.tld file:

varimage
/struts/taglib/varTag

accesskey
false
true


alt
false
true


altKey
false
true


In its definition, I can set the value.
But how do I retrieve the value in the form class?

public ActionErrors validate(ActionMapping mapping,HttpServletRequest
request)
 {

Those are the only parameters I receive in the validate function.

Thank you


On 8/28/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
>
> Anna Simbirtsev wrote:
> > Hello
> > I have 2 screens that use the same form. The form class has a validate
> > function. To distinguish which screen(jsp file) is using the form I do
> the
> > following in jsp files:
> >
> > <% session.setAttribute("page", "add") %>
> > <% session.setAttribute("page", "add_2") %>
> >
> > Then in the form class I grab that value and figure out what values to
> > validate.
> > Is it a good way to do it?
>
>
> You should distinguish between two forms by passing different
> values of submit buttons (in my opinion)
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Anna Simbirtsev
(416) 729-7331


2 jsp files using the same form

2007-08-28 Thread Anna Simbirtsev
Hello
I have 2 screens that use the same form. The form class has a validate
function. To distinguish which screen(jsp file) is using the form I do the
following in jsp files:

<% session.setAttribute("page", "add") %>
<% session.setAttribute("page", "add_2") %>

Then in the form class I grab that value and figure out what values to
validate.
Is it a good way to do it?


Specify a name for a validate function

2007-08-27 Thread Anna Simbirtsev
Hello


  

Does it call the validate function in the form class?
Can I specify the name of validate the function to call?

Thank you


Re: Passing variables in url

2007-08-27 Thread Anna Simbirtsev
I tried first assigning the value to a string and then sending it.
<% String value_ = duf1.getValue(); %>




Still does not work.

On 8/27/07, Oleg Mikheev <[EMAIL PROTECTED]> wrote:
>
> Anna Simbirtsev wrote:
> > 
> >  > width="80" height="20"border="0"/>
> >
> > value is a bean in struts, that has get/set functions.
>
>
> I think that value itself should be a String not a bean.
>
> From struts documents:
> paramName - The name of a JSP bean that is a String containing the
> value for the request parameter named by paramId
>
> They are calling it a JSP bean, which is not a JavaBean.
>
> Although this is just my guess.
>
> Oleg
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Passing variables in url

2007-08-27 Thread Anna Simbirtsev
Hello
I am trying to pass a variable in the url, but I can't seem to get the value
to be passed.




value is a bean in struts, that has get/set functions.

I tried using paramName="${value_}" and pass a string, but it did not work.

Thank you