Re: Validation .. I found a good page

2013-02-11 Thread James Cicenia
Should probably just be named Validation. All the EOF stuff threw me off for 
a while.

http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Validation .. I found a good page

2013-02-11 Thread Johnny Miller
Hi,

I was wondering if anyone has an example of how to do the following:

Using this method...

public void validationFailedWithException(Throwable exception, Object value, 
String keyPath) {
  super.validationFailedWithException(exception, value, keyPath);
  session().addError(exception.getMessage());
}
 
I would like to put exception.getMessage in a mutable dictionary with keypath 
as the key.  Easy enough.  Then I'd like to print out the error messages on the 
page.  Easy enough.  Then I'd like to add a css class name to the input(s) that 
failed validation (without using D2w)??  I imagine that's where keypath would 
come in handy but I'm not sure how to connect the key path to the input?  

Thanks in advance,

Johnny


On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:

 Should probably just be named Validation. All the EOF stuff threw me off 
 for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Validation .. I found a good page

2013-02-11 Thread James Cicenia
That's a good question. Thinking out loud

Maybe set the session.addError and pass it a keyPath and value and then in the 
appendToResponse do some magic?

or brute force a bunch of class methods to check for the existence of the 
keypath?

James

On Feb 11, 2013, at 2:14 PM, Johnny Miller jlmil...@kahalawai.com wrote:

 Hi,
 
 I was wondering if anyone has an example of how to do the following:
 
 Using this method...
 
 public void validationFailedWithException(Throwable exception, Object value, 
 String keyPath) {
   super.validationFailedWithException(exception, value, keyPath);
   session().addError(exception.getMessage());
 }
  
 I would like to put exception.getMessage in a mutable dictionary with keypath 
 as the key.  Easy enough.  Then I'd like to print out the error messages on 
 the page.  Easy enough.  Then I'd like to add a css class name to the 
 input(s) that failed validation (without using D2w)??  I imagine that's where 
 keypath would come in handy but I'm not sure how to connect the key path to 
 the input?  
 
 Thanks in advance,
 
 Johnny
 
 
 On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:
 
 Should probably just be named Validation. All the EOF stuff threw me off 
 for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/james%40jimijon.com
 
 This email sent to ja...@jimijon.com


James Cicenia
Founder / CEO
Direct: (773) 398-4649
Mail: ja...@jimijon.com
 

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Validation .. I found a good page

2013-02-11 Thread Chuck Hill
I wouldn't.  Use the keypath that is.  It might be used by more than one 
component on a page (e.g. in a repetition).

If you can assign an HTML id to each, that is best.  Otherwise, 
context().elementID will suffice.


On 2013-02-11, at 12:14 PM, Johnny Miller wrote:

 Hi,
 
 I was wondering if anyone has an example of how to do the following:
 
 Using this method...
 
 public void validationFailedWithException(Throwable exception, Object value, 
 String keyPath) {
   super.validationFailedWithException(exception, value, keyPath);
   session().addError(exception.getMessage());
 }
  
 I would like to put exception.getMessage in a mutable dictionary with keypath 
 as the key.  Easy enough.  Then I'd like to print out the error messages on 
 the page.  Easy enough.  Then I'd like to add a css class name to the 
 input(s) that failed validation (without using D2w)??  I imagine that's where 
 keypath would come in handy but I'm not sure how to connect the key path to 
 the input?  
 
 Thanks in advance,
 
 Johnny
 
 
 On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:
 
 Should probably just be named Validation. All the EOF stuff threw me off 
 for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!









 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Validation .. I found a good page

2013-02-11 Thread Johnny Miller
Hi Chuck,

I think I understand what you are saying.  But just to be clear... when 
validationFailedWithException gets called if I could use context().elementID() 
to get the input that failed?

If so I could then use JavaScript to find the the inputs whose name value is in 
the array I collect and a css class.

Would you happen to have a better suggestion (for adding a class name to an 
input that failed validation)?

Thanks again,

Johnny

On Feb 11, 2013, at 1:11 PM, Chuck Hill ch...@global-village.net wrote:

 I wouldn't.  Use the keypath that is.  It might be used by more than one 
 component on a page (e.g. in a repetition).
 
 If you can assign an HTML id to each, that is best.  Otherwise, 
 context().elementID will suffice.
 
 
 On 2013-02-11, at 12:14 PM, Johnny Miller wrote:
 
 Hi,
 
 I was wondering if anyone has an example of how to do the following:
 
 Using this method...
 
 public void validationFailedWithException(Throwable exception, Object value, 
 String keyPath) {
  super.validationFailedWithException(exception, value, keyPath);
  session().addError(exception.getMessage());
 }
 
 I would like to put exception.getMessage in a mutable dictionary with 
 keypath as the key.  Easy enough.  Then I'd like to print out the error 
 messages on the page.  Easy enough.  Then I'd like to add a css class name 
 to the input(s) that failed validation (without using D2w)??  I imagine 
 that's where keypath would come in handy but I'm not sure how to connect the 
 key path to the input?  
 
 Thanks in advance,
 
 Johnny
 
 
 On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:
 
 Should probably just be named Validation. All the EOF stuff threw me off 
 for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
 Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Validation .. I found a good page

2013-02-11 Thread Chuck Hill
If I was doing this, I would want my own inputs that could record their 
validation errors, show their own validation messages, and set their own CSS 
styles as needed.  My validation presentation at WOWODC 2009 and outlines this. 
 And not, it is not done yet.  :-)

Chuck


On 2013-02-11, at 3:27 PM, Johnny Miller wrote:

 Hi Chuck,
 
 I think I understand what you are saying.  But just to be clear... when 
 validationFailedWithException gets called if I could use 
 context().elementID() to get the input that failed?
 
 If so I could then use JavaScript to find the the inputs whose name value is 
 in the array I collect and a css class.
 
 Would you happen to have a better suggestion (for adding a class name to an 
 input that failed validation)?
 
 Thanks again,
 
 Johnny
 
 On Feb 11, 2013, at 1:11 PM, Chuck Hill ch...@global-village.net wrote:
 
 I wouldn't.  Use the keypath that is.  It might be used by more than one 
 component on a page (e.g. in a repetition).
 
 If you can assign an HTML id to each, that is best.  Otherwise, 
 context().elementID will suffice.
 
 
 On 2013-02-11, at 12:14 PM, Johnny Miller wrote:
 
 Hi,
 
 I was wondering if anyone has an example of how to do the following:
 
 Using this method...
 
 public void validationFailedWithException(Throwable exception, Object 
 value, String keyPath) {
 super.validationFailedWithException(exception, value, keyPath);
 session().addError(exception.getMessage());
 }
 
 I would like to put exception.getMessage in a mutable dictionary with 
 keypath as the key.  Easy enough.  Then I'd like to print out the error 
 messages on the page.  Easy enough.  Then I'd like to add a css class name 
 to the input(s) that failed validation (without using D2w)??  I imagine 
 that's where keypath would come in handy but I'm not sure how to connect 
 the key path to the input?  
 
 Thanks in advance,
 
 Johnny
 
 
 On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:
 
 Should probably just be named Validation. All the EOF stuff threw me off 
 for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest 
 Growing Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 
 

-- 
Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall 
knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/gvc/practical_webobjects

Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
Companies in B.C! 
Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!









 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Validation .. I found a good page

2013-02-11 Thread Johnny Miller
Got it.  I'll re-watch the video.  I'm thinking that it would be cool to use a 
data attribute.  Then you could add more information about the error to the 
input i.e. if you want to add a hover field above the input that contained the 
error message.

On Feb 11, 2013, at 2:18 PM, Chuck Hill ch...@global-village.net wrote:

 If I was doing this, I would want my own inputs that could record their 
 validation errors, show their own validation messages, and set their own CSS 
 styles as needed.  My validation presentation at WOWODC 2009 and outlines 
 this.  And not, it is not done yet.  :-)
 
 Chuck
 
 
 On 2013-02-11, at 3:27 PM, Johnny Miller wrote:
 
 Hi Chuck,
 
 I think I understand what you are saying.  But just to be clear... when 
 validationFailedWithException gets called if I could use 
 context().elementID() to get the input that failed?
 
 If so I could then use JavaScript to find the the inputs whose name value is 
 in the array I collect and a css class.
 
 Would you happen to have a better suggestion (for adding a class name to an 
 input that failed validation)?
 
 Thanks again,
 
 Johnny
 
 On Feb 11, 2013, at 1:11 PM, Chuck Hill ch...@global-village.net wrote:
 
 I wouldn't.  Use the keypath that is.  It might be used by more than one 
 component on a page (e.g. in a repetition).
 
 If you can assign an HTML id to each, that is best.  Otherwise, 
 context().elementID will suffice.
 
 
 On 2013-02-11, at 12:14 PM, Johnny Miller wrote:
 
 Hi,
 
 I was wondering if anyone has an example of how to do the following:
 
 Using this method...
 
 public void validationFailedWithException(Throwable exception, Object 
 value, String keyPath) {
 super.validationFailedWithException(exception, value, keyPath);
 session().addError(exception.getMessage());
 }
 
 I would like to put exception.getMessage in a mutable dictionary with 
 keypath as the key.  Easy enough.  Then I'd like to print out the error 
 messages on the page.  Easy enough.  Then I'd like to add a css class name 
 to the input(s) that failed validation (without using D2w)??  I imagine 
 that's where keypath would come in handy but I'm not sure how to connect 
 the key path to the input?  
 
 Thanks in advance,
 
 Johnny
 
 
 On Feb 11, 2013, at 8:21 AM, James Cicenia ja...@jimijon.com wrote:
 
 Should probably just be named Validation. All the EOF stuff threw me 
 off for a while.
 
 http://wiki.wocommunity.org/display/documentation/EOF-Using+EOF-Validation
 
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/jlmiller%40kahalawai.com
 
 This email sent to jlmil...@kahalawai.com
 
 ___
 Do not post admin requests to the list. They will be ignored.
 Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
 Help/Unsubscribe/Update your Subscription:
 https://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
 
 This email sent to ch...@global-village.net
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest 
 Growing Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 
 
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Practical WebObjects - for developers who want to increase their overall 
 knowledge of WebObjects or who are trying to solve specific problems.
 http://www.global-village.net/gvc/practical_webobjects
 
 Global Village Consulting ranks 13th in 2012 in BIV's Top 100 Fastest Growing 
 Companies in B.C! 
 Global Village Consulting ranks 76th in 24th annual PROFIT 200 ranking of 
 Canada’s Fastest-Growing Companies by PROFIT Magazine!
 
 
 
 
 
 
 
 


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com