Re: Problem with Struts in VAJ 3.5.3 WTE

2001-06-21 Thread Andrew Steady

Well hello Steve! Fancy meeting you here!
Guess we should take this offline 

Andy S




[EMAIL PROTECTED] on 21/06/2001 12:50:39

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  Problem with Struts in VAJ 3.5.3 WTE




Hello
I'm trying to get the IBM employeelist struts demo working under the
WebSphere Test Environment
of VisualAge 3.5.3.
The tutorial on the VA Developer Domain states that the employeelist webapp
should come with an
index.html file but there is only an index.jsp.
Calling this .jsp gives the following error:
javax.servlet.jsp.JspException: Missing message for key index.title
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.jsp.JspException(java.lang.String)
int org.apache.struts.taglib.bean.MessageTag.doStartTag()
blah blah
Does anybody recognise this problem and has anyone got the demo working
under the WTE in 3.5.3?
I appreciate any help offered.
Thanks
Steve










RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Andrew Steady

Hi,

I'm working on the documentation now and feel it would only be fair to
contribute some of these diagrams back to the struts community. It will
probably take me a couple of days to get it sorted though. I hate
documentation, grg.

Cheers,

Andy S

p.s. I think it has more to do with my style of writing than your lack of
smartness - did I mention that I hate documentation?




[EMAIL PROTECTED] on 12/06/2001 11:09:16

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  RE: Handling Multipart forms (sort of Wizard)




This sounds like a very elegant though sophisticated design. Any way you
could post some diagrams or something? I don't know, GIF's of object models
etc. Or is there a URL you could direct us to?
Just curious because I wasn't smart enough to understand everything from
your description.
- Darryl
-Original Message-
From: Andrew Steady [mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 11:34
To: [EMAIL PROTECTED]
Cc: Ben Radford
Subject: RE: Handling Multipart forms (sort of Wizard)

Hi,
Our solution, using struts, is a mutli-page and multi-channel solution.
It works on the principle of page numbers and has only one action per
wizard regardless of the number of pages involved.
There is a base class form which has a validate method that can validate
any form in a generic method, validating only the fields on the current
page, and after completion  of the wizard does a "finalValidate" check to
make sure nothing remained unvalidated (this is necassary due to the
dynamic way in which the page by page validation is executed). In our
system we have a data dictionary most fields represent a field in the data
dictionary - this link to the data dictionary which performs the validation
for that particular type of field e.g. a PostCode validator. The data
dictionary also returns the possible values for fields which are of a
select variety - the labels are then looked up based on the current
language, the field type and the value. If a field is not representing a
data dictionary member a localValidator must be written in the form object
name e.g. validatePostCode. CrossFieldValidations are executed in a similar
manner and we have added functionality to ensure crossFieldValidations are
run at the correct time (one of the tough bits!).
The base class Form (which extends ActionForm) is then subclassed, one per
wizard, the member field objects are defined in the initialise method, the
fields have objects which have attributes and methods as necassary to
complete the functionality. The getters and setters in the wizard form
fetch the correct field from the collection and set/get the value to return
to the struts tag libraries/other code.
Each form is then sublassed once per channel (Wap, HTML and iDTV - all of
which we have working). The subclass specifies to the field objects which
page each field is on for that particular channel, this enables the
validation to work correctly and also means business validation errors from
the EJB container after wizard completion and submission can be directed to
the correct page for display. The sublassed channel specific form can add
extra fields and specify which page they lie on (or set a field to be
internal). An example of this is that the base class of a transaction may
contain a single date field. On the Web channel this is actually 3 fields
(day, month, year) on the Wap channel this is just a selection of
today/tomorrow etc. As each page is submitted a method on the channel
specific sublass called mapData is called - in the Web channel this maps
the 3 fields into the 1 date field, on the Wap channel it maps todays date
or tomorrows date into the base class single date field. The validation is
then run and any errors are displayed by including the error tag to the
base class date field (although a mapError method could be called to map it
to the year field in the web channel etc.). When a form is prepopulated
from stored records before the user begins to complete it a mapInitialData
method is called - in the web channel this would pre-populate the
day/month/year fields based upon the date value in the base class - the
reverse of mapData. We have many more obscure mappings as well as simple
date ones.
There is an ActionMapping per channel for each transaction and as well as
having keys for when the Action has completed such as success, home, error
also have entries, one per page of the wizard like this . Using this we have
host of methods on the form (although these might be better located on an
ActionMapping sublass) which are all used in a completely generic and
centralised way (in the ActionClass we created by extending the Action
class) page flow is controlled using methods such as getCurrentPage,
getNextPage, isLastPage, getNextPageActionForward, etc etc.
The benefits of this design are that no matter what channel is running, you
can be sure tha

RE: Handling Multipart forms (sort of Wizard)

2001-06-12 Thread Andrew Steady
spond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  RE: Handling Multipart forms (sort of Wizard)







Hi Michael,
Thanks for the options you specified for handling this.
After going thru the suggested options, I think the 2nd option is better.
This is because, since it is a wizrd, so there is back and next buttons to
correct the data in different JSPs before saving.
If we need to handle this using child-mother beans then we need to keep
child
beans also in the session scope.
This is because each child bean is associated with one form so to get the
entered data after forwarding 2-3 pages , if we again want to come back to
the
1'st page, data should be preserved.
Although, we can do it by copying mother bean properties back in the child
bean..

What say?
- Sandeep





"Michael Mok" <[EMAIL PROTECTED]> on 06/12/2001 03:48:01 PM
Please respond to [EMAIL PROTECTED]; Please respond to
  [EMAIL PROTECTED]
To:   "'suhas'" <[EMAIL PROTECTED]>
cc:   [EMAIL PROTECTED] (bcc: Sandeep Yawale/LTITLPUN)
Subject:  RE: Handling Multipart forms (sort of Wizard)


Hi Suhas
Good question. I missed out some steps for the second option.
You will need to create three form actions to process each of the form
beans. The "mother" bean is stored in the session and is accessed and
updated in each action. Hence at the end of the logical process, the
"mother" bean has all the values for your 3 forms.
Hope it makes sense.
Regards
Michael Mok
www.webappcabaret.com/normad

-Original Message-
From: suhas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 June 2001 16:13
To: [EMAIL PROTECTED]
Subject: Re: Handling Multipart forms (sort of Wizard)

In the below 2nd option  - what is the need of the "mother" bean when u
already have separate beans for each jsp
Suhas
- Original Message -
From: Michael Mok <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 12, 2001 8:51 AM
Subject: RE: Handling Multipart forms (sort of Wizard)

> Sandeep
>
> Let me try. See if the solution proposed makes sense as the techniques
were
> discussed before.
>
> 1) Include a "PageNumber" attribute into your Form bean. In your JSP,
store
> the PageNumber as a hidden attribute. In your form.validate() method,
> determine which page is passed then validate the appropriate fields. For
> this to work, you will need maintain your form bean in the session object
> (ie set the scope in your struts-config.xml file).
>
> 2) Create three form beans (ie one for each JSP) and create a "mother"
bean
> that has all the attributes of the three form beans. In this case, each
form
> beans can perform its validate method() and the form action class can
copy
> each form properties to the "mother" bean using PropertyUtil.copyProperty
> method. Note you will need to store the "mother" bean into the session
> object.
>
> Regards
>
> Michael Mok
> www.webappcabaret.com/normad
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 12 June 2001 15:32
> To: [EMAIL PROTECTED]
> Subject: Handling Multipart forms (sort of Wizard)
>
>
>
>
>
> Hello All,
>
> I am using mulipart forms for adding an employee information.
> In this I have 3 forms namely, emplEducation, emplExperience, emplGeneral
in
> separate JSPs.
> In this case, I am using only one form bean for all these JSPs and only
one
> action class.
>
> My problem is how to validate the Form bean after each page submission:
>
--
--
> 
>
> I know the validation can be done in the form bean using validate()
method
> or in
> the action class
>
> But, if user filled emplEducation form and press "Next", to go to
> emplExperience,
> how do I validate only those form bean fields related to emplEducation
and
> not
> the others till they are entered by user??
> Is there any straight forward strategy for handling this??
>
> - Sandeep
>
>
>
>
>
>
>
>
>
















Re: removing request parameters before action forward

2001-05-24 Thread Andrew Steady

I have a similar question which perhaps could be asked at the same time.

I have a JSP that submits to an Action with a certain set of parameters,
the ActionClass then forwards to another ".do" if succesful, when this
".do" is called the corresponding form bean is created and populated with
request data. However the data in the request object was never meant for
that form bean it was only for the form bean belonging to the original
".do". A side affect is that if the 2nd bean has any matching data names to
the first it will get populated with data. I understand you could make sure
that all the names were different but that rather detracts from the
atomicity of the two ".do" actions.

Am I looking through something obvious? Anyone solved this before?

Andy S







[EMAIL PROTECTED] on 18/04/2001 12:47:01

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  removing request parameters before action forward




Hello to all,
I don't know how to remove request parameters just before leaving a
perform(...) method.
1) Is this a bad practice or wrong design?
2) if not, how can I do this?
What I'am trying to do:
A jsp page displays some items. If one clicks an item, the same page shows
again with an incremented item count.
The -tag includes the item id as an url parameter. The
perform
method of the action class looks for this url parameter, increments the
corresponding item count in the action form and forwards back to the jsp
page.
Everything works fine, but the url parameter (the complete url) is also
forwarded to the jsp page. Sometimes this doesn't matter (or even should be
like that), but in this case, pushing the reload button increments the item
count again.
Could anyone give me a hint or even a solution?
Thank You
Stefan
PS: I feel this was asked before, but I could not locate similar questions
in the archive. Sorry.
--
Stefan Seidel










RE: Can an Action forward to another Action?

2001-05-21 Thread Andrew Steady

I've been doing this and it works fine except for one thing, and maybe
someone can help.

When you go to the next action, the request object is still in scope and
has not been cleaned. Therefore any data from the request that happens to
have a setter in the 2nd form bean gets auto-filled into the form belonging
to the 2nd action as well as the first.

Any ideas of how to clear the request object or tell struts not to
autopopulate after an action forward?

Andy S




[EMAIL PROTECTED] on 17/05/2001 23:20:36

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  RE: Can an Action forward to another Action?




I don't think its a new feature we do this, just specifiy
path="something.do" in the forward for your action.
Niall
> -Original Message-
> From: Seth Ladd [mailto:[EMAIL PROTECTED]]
> Sent: 17 May 2001 22:07
> To: [EMAIL PROTECTED]
> Subject: Can an Action forward to another Action?
>
>
> Hello,
>
> I thought I saw this functionality added into Struts recently, and went
to
> search the mailing list archives, but couldn't find it.  I'm not sure if
I
> made this up or not. :)
>
> Can an Action forward right to another action?  If not, is there
> a good way
> to accomplish this?
>
> Thanks for your hints and tips,
> Seth
>
>










Re: What commercial software uses Struts?

2001-05-18 Thread Andrew Steady

the new version of broadvision comes "shipped with struts". Which I find
highly amusing as its version 0.5 and they only use the template tags.

BV, what a joke (as usual)




[EMAIL PROTECTED] on 18/05/2001 15:02:18

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  Re: What commercial software uses Struts?




what is the URL ?
I want to test it.

Bill Pfeiffer schrieb:
> SilverStream 3.7 ships with its flagship example application SilverBooks
> written using jsp/struts.
>
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, May 17, 2001 4:45 PM
> Subject: What commercial software uses Struts?
>
> > I'd like to know what commercial software vendors are using Struts
> > internally in their products.  Anyone know?
> >
> > Thanks,
> > Craig
> >
> >










Re: AW: Getting hold of the session

2001-05-14 Thread Andrew Steady

thanks, I've added an initialise method to my form now which I call from
the action class, the method checks if it has already run or not and then
populates the drop down box fields.




[EMAIL PROTECTED] on 10/05/2001 14:20:08

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  AW: Getting hold of the session




Hi Andrew,
why don?t you populate your beans before you call your jsp (where i asume
your getter methods are being called). i.e. let your ActionClass gather all
customer information, prepare your bean, drop it in the session and access
it in your jsp.
If you want to directly populate your ActionForm check the mailing list.
The
topic was discussed a few times.
Rainer
-Ursprungliche Nachricht-
Von: Andrew Steady [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 10. Mai 2001 11:40
An: [EMAIL PROTECTED]
Betreff: Getting hold of the session

Hi,
One of my getter methods (called by struts) needs to get hold of an object
in the Session so that it can populate the values of a drop down box based
upon a call to the "customer" object which is stored in the session.
Unfortunatley struts does not pass my method the request or the session
object and neither does it pass either of these to the form constructor so
I can't store a local reference to it in the form.
This problem must have been encountered and solved by others already, does
anyone have any suggestions?
Regards,
Andy S




[EMAIL PROTECTED] on 10/05/2001 09:57:55
Please respond to [EMAIL PROTECTED]
To:   [EMAIL PROTECTED]
cc:    (bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  Re: Transactional Tokens in the JSP?



Allen,
You can set the transactional token in your edit Action class with
saveToken(request). Then you can test the token in
the submit action.
I suggest you have a look at the classes EditRegistration and
SaveRegistration  in the example application.
Jean-Noel
- Original Message -
From: Allen Walker <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 10:37 AM
Subject: Transactional Tokens in the JSP?
> I would like to use the transaction token logic in the Action class.
> However I am not able to figure out how to place the Transactional Token
in
> the JSP so it can be validated against when isTokenValid() is called
within
> my Action class. I looked at the Struts source code to find:
>
>  protected boolean isTokenValid(HttpServletRequest request) {
>
>  // Retrieve the saved transaction token from our session
>  HttpSession session = request.getSession(false);
>  if (session == null)
>  return (false);
>  String saved = (String)
session.getAttribute(TRANSACTION_TOKEN_KEY);
>  if (saved == null)
>  return (false);
>
>  // Retrieve the transaction token included in this request
>  String token = (String)
request.getParameter(Constants.TOKEN_KEY);
>  if (token == null)
>  return (false);
>
>  // Do the values match?
>  return (saved.equals(token));
>
>  }
>
> The Contants class is org.apache.struts.taglib.html.Constants.
>
> Thanks for any help
> -allen-
>
>






The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.
PricewaterhouseCoopers Kinesis Ltd







The information transmitted is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon, this information by persons or entities other than the intended recipient is 
prohibited.   If you received this in error, please contact the sender and delete the 
material from any computer.

PricewaterhouseCoopers Kinesis Ltd



Getting hold of the session

2001-05-10 Thread Andrew Steady

Hi,

One of my getter methods (called by struts) needs to get hold of an object
in the Session so that it can populate the values of a drop down box based
upon a call to the "customer" object which is stored in the session.
Unfortunatley struts does not pass my method the request or the session
object and neither does it pass either of these to the form constructor so
I can't store a local reference to it in the form.

This problem must have been encountered and solved by others already, does
anyone have any suggestions?

Regards,

Andy S





[EMAIL PROTECTED] on 10/05/2001 09:57:55

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:    (bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  Re: Transactional Tokens in the JSP?




Allen,
You can set the transactional token in your edit Action class with
saveToken(request). Then you can test the token in
the submit action.
I suggest you have a look at the classes EditRegistration and
SaveRegistration  in the example application.
Jean-Noel
- Original Message -
From: Allen Walker <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 10, 2001 10:37 AM
Subject: Transactional Tokens in the JSP?

> I would like to use the transaction token logic in the Action class.
> However I am not able to figure out how to place the Transactional Token
in
> the JSP so it can be validated against when isTokenValid() is called
within
> my Action class. I looked at the Struts source code to find:
>
>  protected boolean isTokenValid(HttpServletRequest request) {
>
>  // Retrieve the saved transaction token from our session
>  HttpSession session = request.getSession(false);
>  if (session == null)
>  return (false);
>  String saved = (String)
session.getAttribute(TRANSACTION_TOKEN_KEY);
>  if (saved == null)
>  return (false);
>
>  // Retrieve the transaction token included in this request
>  String token = (String)
request.getParameter(Constants.TOKEN_KEY);
>  if (token == null)
>  return (false);
>
>  // Do the values match?
>  return (saved.equals(token));
>
>  }
>
> The Contants class is org.apache.struts.taglib.html.Constants.
>
> Thanks for any help
> -allen-
>
>







The information transmitted is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon, this information by persons or entities other than the intended recipient is 
prohibited.   If you received this in error, please contact the sender and delete the 
material from any computer.

PricewaterhouseCoopers Kinesis Ltd



RE: Session management with Struts

2001-05-10 Thread Andrew Steady

Hi,

I think you want to start looking at the 'tokens' functionality that comes
with struts. We did something similar in my last non-struts project and it
worked very well.

Andy S




[EMAIL PROTECTED] on 09/05/2001 22:44:26

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  RE: Session management with Struts




But that's exactly my problem. I have forms that may span multiple pages
and
the ActionForm needs to be available across multiple requests. Any
ideas
-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 1:53 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Session management with Struts

Keep the ActionForms in 'request' scope. Then each page will have its own
ActionForm. The problme occurs when you want to store these forms in
session
scope.
cheers,
Amar..
-Original Message-
From: TJM Todd McGregor [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 4:49 PM
To: [EMAIL PROTECTED]
Subject: Session management with Struts

I have a requirement that my application be able to allow multiple browser
windows, sharing the same HttpSession, to access two separate instances of
a
business process simultaneously. For example, if I have a form that allows
a
user to change their address information my application must allow them to
have two address forms open in separate browser windows using the same
HttpSession. To make a long story short, can Struts accommodate multiple
instances of an ActionForm in the same session? Any general comments on how
Struts does session management would also be welcome.
Thanks in advance for your response,
Todd McGregor







The information transmitted is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon, this information by persons or entities other than the intended recipient is 
prohibited.   If you received this in error, please contact the sender and delete the 
material from any computer.

PricewaterhouseCoopers Kinesis Ltd



Re: I'm back!

2001-05-09 Thread Andrew Steady

Hi Craig,

I work with Nic and have done a lot of work extending Struts in the areas
of generic validation, including crossfield and multi-page/channel form
support.

I'm not sure exactly how one "contributes" as I am new to this open source
game so point me in the right direction and I'll do my best.

Cheers,

Andy S





[EMAIL PROTECTED] on 09/05/2001 18:55:25

Please respond to [EMAIL PROTECTED]; Please respond to
  [EMAIL PROTECTED]

To:   [EMAIL PROTECTED], [EMAIL PROTECTED]
cc:    (bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  I'm back!




Hi guys, I haven't been participating lately in the mailing list because
I recently moved from the US back to Canada so I haven't had too much
spare time.  Any how, now that I am settled in I would like to start
work on the Struts Workflow TODO.  I was wondering if anyone other than
my self and Nic would be interested in participating?
Also, my webserver was down the other day.  The owner had to do some
maintenance.  It's back up, and actually instead of using the old us-eh
address to get to my struts tutorial you can get to it via:
http://www.computer-programmer.org/articles/struts/
Ted, can you update your web page to point to the new
computer-programmer address?
Thanks,








The information transmitted is intended only for the person or entity to which it is 
addressed and may contain confidential and/or privileged material.  Any review, 
retransmission, dissemination or other use of, or taking of any action in reliance 
upon, this information by persons or entities other than the intended recipient is 
prohibited.   If you received this in error, please contact the sender and delete the 
material from any computer.

PricewaterhouseCoopers Kinesis Ltd



adding an ActionError in the Action

2001-04-26 Thread Andrew Steady


Hi,



If I form validates itself OK but subsequently the Action needs to raise an
  input error to the user, in my case security failed, how is it
  possible to add an ActionError for the errors tag to pick up. The
  only way to give struts a collection of ActionErrors is by returing
  it from the ActionForm.validate() method.



I presume if I know the name of the ActionErrors bean which the error tag
  accesses I could manually create it in the Action and add it to the
  correct scope so that the errors tag could pick it up.



Has anybody encountered this problem before?



Cheers,



Andy S





Re: null or empty string

2001-04-19 Thread Andrew Steady

Thanks very much, I'll investigate this it might be just what I need.




[EMAIL PROTECTED] on 19/04/2001 12:22:29

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  Re: null or empty string




Andrew,
CheckBox values are retrieved using the getParameterValues method on the
the
HTTPServletRequest object which returns a string array.  Most other input
types simply use the getParameter method which work as you describe below.
Regards,
Paul

- Original Message -
From: "Andrew Steady" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 19, 2001 5:47 AM
Subject: null or empty string

>
> Hi,
>
>
>
> I have written a dynamic validation routine which is based upon only
>   validating the fields that have been submitted and then "mopping
up"
>   later. This only works because you can tell the difference
>
> between a field being submitted and left blank (value = "") and a field
not
>   being present in the request (value = null).
>
>
>
> This is true for input type="text" but is not true for input
>   type="checkbox", has anyone come accross this problem before? any
>   solutions ideas?
>
>
>
> Cheers,
>
>
>
> Andy S
>
>
>










Re: AW: null or empty string

2001-04-19 Thread Andrew Steady

This is the behaviour as I understood it and it leaves no way to tell if a
user has left a checkbox selection blank without knowing specifically that
you were exepecting it on that page, something my current design dosen't
enforce with other types of input (nice and dynamic).

I may be able to extend the Form tag to include some onSubmit csjavascript
that searches through fields and makes sure a blank string is submitted if
it has been left unchecked. We shall see.

Andy S





[EMAIL PROTECTED] on 19/04/2001 12:11:23

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: Andrew Steady/Swindon01/Domino01/Kinesis)
Subject:  AW: null or empty string




Hi Andrew,
The the normal behavior of an checkbox is, that it will submit the value of
the checkbox with the form if the user has selected the checkbox. If it is
not selected, the browser will not send the value of the checkbox to the
server. If you ask for the checkbox-parameter in the request and it is not
present, you know, that the user has not selected the checkbox.
cu Frank
> -Urspr?ngliche Nachricht-
> Von:Andrew Steady [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Donnerstag, 19. April 2001 12:47
> An: [EMAIL PROTECTED]
> Betreff: null or empty string
>
>
> Hi,
>
>
>
> I have written a dynamic validation routine which is based upon only
>   validating the fields that have been submitted and then "mopping
up"
>   later. This only works because you can tell the difference
>
> between a field being submitted and left blank (value = "") and a field
> not
>   being present in the request (value = null).
>
>
>
> This is true for input type="text" but is not true for input
>   type="checkbox", has anyone come accross this problem before? any
>   solutions ideas?
>
>
>
> Cheers,
>
>
>
> Andy S
>

Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
E-Mail nicht gestattet ist.Diese Nachricht  ist ausschliesslich fuer den
bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie nicht
der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, so
bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.

For legal and security reasons the information provided in this e-mail is
not legally binding. Upon request we would be pleased to provide you with a
legally binding confirmation in written form. Any form of unauthorised use,
publication, reproduction, copying or disclosure of the content of this
e-mail is not permitted. This message is exclusively for the person
addressed or their representative. If you are not the intended recipient of
this message and its contents, please notify the sender immediately.
---












null or empty string

2001-04-19 Thread Andrew Steady


Hi,



I have written a dynamic validation routine which is based upon only
  validating the fields that have been submitted and then "mopping up"
  later. This only works because you can tell the difference

between a field being submitted and left blank (value = "") and a field not
  being present in the request (value = null).



This is true for input type="text" but is not true for input
  type="checkbox", has anyone come accross this problem before? any
  solutions ideas?



Cheers,



Andy S