Dear Ted,

Thanks for your answer.

1. 
I am using the <html:cancel  construction and referenced the parameter named
"method". 
As I don't have the source here at home, I have to improvise:

<html:cancel name="method">
   <bean:message key="system.button.cancel">
</html:cancel>

It is the code as mentioned in your book Struts in Action.

I use the reverse lookup of the resources as displayed in the
LookupDisplayAction.
And I have set the parameter in the action mapping to "method".
I don't use JavaScript as I don't want the client-side validation yet. 

What do you mean with the magic value to work. Do you mean the bCancel=true
thing?
Does it need the other Javascript stuff to set something to another value,
so that
Struts Validator at the server side won't validate in cancel of the
cancel-button?

2. 
A clear answer! We have some work to do. Thanks.

Kind regards,

Robert Lamping







-----Original Message-----
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 8:55 PM
To: Struts Users Mailing List
Subject: Re: Master Detail: Problem committing Master while link to
Detail


Robert Lamping wrote:
> 1. 
> The cancel-button still validates. The isCancelled() method does not seem
to
> work. I call it in the method executeAction of this screen.
> How can I pre-empt the validation?

Are you using the html tag to create the cancel button. The button needs 
to be set to a magic value to work, which the tags spits out for you.

> 2.
> When I modify information in the master part adn I what to a
detail-screen,
> then I want the master part to be commited first, before I go to this
> detailscreen. 
> The links to these items are set up using the format:
> href="./orderitem.do?id=num   where num is the actual unique code in the
> database of this item..
> Of course leaving the page using href, will not commit the master part. My
> question is: How can I make it happen? (commit the master first and then
go
> the detail).

I try very hard to avoid this page design myself, for the reason stated. 
Typically, I will show the master and child in a view format, and then 
let them edit the master or a child. Whenever possible, I avoid putting 
any link tags on the same screen as an edit dialog, since it encourages 
people to link off without submitting their change. :(

If you must display the form this way, the only recourse is to change 
the links so that they also submit the form, either through JavaScript 
or by making the links buttons. The Action can then save any changes to 
the form, and then forward on to the other detail page.

HTH, Ted.



-- 
Ted Husted,
   Junit in Action  - <http://www.manning.com/massol/>,
   Struts in Action - <http://husted.com/struts/book.html>,
   JSP Site Design  - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.



---------------------------------------------------------------------
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]

Reply via email to