Janne Mattila wrote:
OK, Cap't of the Eh Team!
Maybe you should go and add "Note: this is a clear, extensible, light,
fast, loosely coupled, solution compared to a messy, solution specific,
heavy, slow, tightly coupled version!" to the Wiki page? After all, you
have invented an elegant solution
Janne Mattila wrote:
You seem to like parsing HttpServletRequests manually, so why don't
you skip Struts altogether and parse all request parameters manually?
I bet it would be "clear, extensible, light, fast, loosely coupled
solution". Hell, who needs ActionForms after all? They make your
solu
Janne Mattila wrote:
OK, Cap't of the Eh Team!
Maybe you should go and add "Note: this is a clear, extensible, light,
fast, loosely coupled, solution compared to a messy, solution
specific, heavy, slow, tightly coupled version!" to the Wiki page?
After all, you have invented an elegant solution
I guess, to be more concilliatory, Janne, I could say that if you want
to use your solution, then you could just index item, e.g.
public Id getIndex(Integer id) {
return new Id(intValue());
}
Where the class Id is the following:
public class Id {
private int id;
public Id(Integer x) {
id =
th low cost and with great flexibility and
freedom!
From: Michael McGrady <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Accessing bean properties problem
Date: Fri, 13 Aug 2004
ate one additional helper
class (with a further developed version of the method you present) and
add parameter name encoding logic to each form that contains such
buttons.
From: Michael McGrady <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
From: Michael McGrady <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Accessing bean properties problem
Date: Fri, 13 Aug 2004 06:22:38 -0700
Janne Mattila wrote:
I am aware
present) and add parameter name encoding logic to
each form that contains such buttons.
From: Michael McGrady <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: Re: Accessing b
Janne Mattila wrote:
I am aware that I can use the approach you suggested (parse request
parameters manually), and have been doing that for ages before I
started learning Struts :) I was just expecting that Struts would
somehow help me with this task. I have been looking into indexed
properties
See http://wiki.apache.org/struts/StrutsCatalogMultipleImageTagsSimplified
Janne Mattila wrote:
I described what I wanted to achieve in my original posting. To
recap, I want to have a page with several delete buttons. Clicking on
one button would produce parameter
delete_23.x=56
to be sent => we
This is all "over-engineered", Janne. I used to do something similar,
however. As I menteioned before, I just use the following code to
determine which image was clicked:
String imageClicked = null;
Enumeration enum = request.getParameterNames();
String parameterName = null;
while(
I described what I wanted to achieve in my original posting. To recap, I
want to have a page with several delete buttons. Clicking on one button
would produce parameter
delete_23.x=56
to be sent => we parse that, and delete item with ID 23 from database.
Choosing a different delete -button woul
Oops, that was a typo. Should have read
"
/>
If browsers did pick up "value" parameter, this problem would not even
exist...
Some browsers do. What is your problem? Why are you adding "delete" in
here?
There is no "name" attribute with image. I assume you mean to use the
"property" attrib
> -Original Message-
> From: Janne Mattila [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 12, 2004 1:38 AM
> To: [EMAIL PROTECTED]
> Subject: Accessing bean properties problem
>
>
> Let's say I have a collection of Choice objects, each having
> at
At 06:58 AM 8/12/2004, you wrote:
Oops, that was a typo. Should have read
"
/>
If browsers did pick up "value" parameter, this problem would not even
exist...
Some browsers do. What is your problem? Why are you adding "delete" in
here?
There is no "name" attribute with image. I assume you
Oops, that was a typo. Should have read
" />
If browsers did pick up "value" parameter, this problem would not even
exist...
Do you realize, Janne, how few browsers will pick up the value of value?
At 01:37 AM 8/12/2004, you wrote:
" />
-
Do you realize, Janne, how few browsers will pick up the value of value?
At 01:37 AM 8/12/2004, you wrote:
" />
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Let's say I have a collection of Choice objects, each having attributes key
and name. I want to iterate the collection on JSP, display it's contents and
add a delete button for each choice. Delete button value should contain
"delete_" appended with each choice's key. Following works:
(1)
18 matches
Mail list logo