Re: more popup fun

2005-11-29 Thread Chuck Hill


On Nov 29, 2005, at 11:29 AM, Lachlan Deck wrote:


Hi there,

On 29/11/2005, at 7:29 AM, Jeremy Matthews wrote:

For some reason, my popup (list populated by a db fetch) now  
querys AND displays correctly, but selecting the value in the  
popup still produces null when submitting the object for  
insertion. The text fields are fine, so the method is probably  
sound. I'm assuming my wopopup bindings are somehow incorrect.  
Here are the current bindings:


displayString:testTypeEnumerator.testType
item: testTypeEnumerator
list:   testList
noSelectionString: "Select A Test..."
selection:  newTestsEntry.testType


No, selection needs to be bound to the object selected _not_ the  
display string.


I suspect that Jeremy's choice of names is at least half of his  
problem.  :-)


testTypeEnumerator.testType is a String but newTestsEntry /  
newEntry's testType (depending on who you believe) is a relationship  
to type Test (or is that Tests?), which is the object in testList.  I  
think.  So newTestsEntry.testType.testType is a String, the string  
the is displayed in the popup.


Whew!

Chuck




displayString: is showing correct attribute
item: not sure why I need the enumerator, but its there
list: working, since the attributes are displayed correctly from  
the db fetch

noSelectionString: not really important, but there
selection: not sure if this is working...this is the important  
binding that takes the selected value, no?


Entity is caled "Tests"
attributes are: testType, testScore, testGrade, testName
new entry is called "newEntry"


So you should have:
YourPopup: WOPopUpButton {
displayString = testTypeEnumerator.testType;
item = testTypeEnumerator;
list = testList;
noSelectionString = "Select A Test...";
/* the all important... */
selection = newEntry;
}

with regards,
--

Lachlan Deck


 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/chill% 
40global-village.net


This email sent to [EMAIL PROTECTED]


--
Coming in 2006 - an introduction to web applications using WebObjects  
and Xcode http://www.global-village.net/wointro


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/products/practical_webobjects





___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: more popup fun

2005-11-29 Thread Lachlan Deck

Hi there,

On 29/11/2005, at 7:29 AM, Jeremy Matthews wrote:

For some reason, my popup (list populated by a db fetch) now querys  
AND displays correctly, but selecting the value in the popup still  
produces null when submitting the object for insertion. The text  
fields are fine, so the method is probably sound. I'm assuming my  
wopopup bindings are somehow incorrect. Here are the current bindings:


displayString:testTypeEnumerator.testType
item: testTypeEnumerator
list:   testList
noSelectionString: "Select A Test..."
selection:  newTestsEntry.testType


No, selection needs to be bound to the object selected _not_ the  
display string.



displayString: is showing correct attribute
item: not sure why I need the enumerator, but its there
list: working, since the attributes are displayed correctly from  
the db fetch

noSelectionString: not really important, but there
selection: not sure if this is working...this is the important  
binding that takes the selected value, no?


Entity is caled "Tests"
attributes are: testType, testScore, testGrade, testName
new entry is called "newEntry"


So you should have:
YourPopup: WOPopUpButton {
displayString = testTypeEnumerator.testType;
item = testTypeEnumerator;
list = testList;
noSelectionString = "Select A Test...";
/* the all important... */
selection = newEntry;
}

with regards,
--

Lachlan Deck




smime.p7s
Description: S/MIME cryptographic signature
 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: more popup fun

2005-11-28 Thread David LeBer

On 28-Nov-05, at 3:29 PM, Jeremy Matthews wrote:

For some reason, my popup (list populated by a db fetch) now querys  
AND displays correctly, but selecting the value in the popup still  
produces null when submitting the object for insertion. The text  
fields are fine, so the method is probably sound. I'm assuming my  
wopopup bindings are somehow incorrect. Here are the current bindings:


displayString:testTypeEnumerator.testType
item: testTypeEnumerator
list:   testList
noSelectionString: "Select A Test..."
selection:  newTestsEntry.testType

displayString: is showing correct attribute
item: not sure why I need the enumerator, but its there
list: working, since the attributes are displayed correctly from  
the db fetch

noSelectionString: not really important, but there
selection: not sure if this is working...this is the important  
binding that takes the selected value, no?


Entity is caled "Tests"
attributes are: testType, testScore, testGrade, testName
new entry is called "newEntry"


Your selection is bound to newTestsEntry.testType is that correct?

You say your  new entry is called "newEntry".

This confuses me.

What type is testTypeEnumerator, and what type is the testType  
attribute of the Test entity?


--
;david

--
David LeBer
Codeferous Software
'co-defer-ous' adj. producing or containing code
site:   http://www.codeferous.com
blog: http://david.codeferous.com






smime.p7s
Description: S/MIME cryptographic signature
 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Re: more popup fun

2005-11-28 Thread Chuck Hill


On Nov 28, 2005, at 12:29 PM, Jeremy Matthews wrote:

For some reason, my popup (list populated by a db fetch) now querys  
AND displays correctly, but selecting the value in the popup still  
produces null when submitting the object for insertion. The text  
fields are fine, so the method is probably sound. I'm assuming my  
wopopup bindings are somehow incorrect. Here are the current bindings:


displayString:testTypeEnumerator.testType
item: testTypeEnumerator
list:   testList
noSelectionString: "Select A Test..."
selection:  newTestsEntry.testType

displayString: is showing correct attribute
item: not sure why I need the enumerator, but its there
list: working, since the attributes are displayed correctly from  
the db fetch

noSelectionString: not really important, but there
selection: not sure if this is working...this is the important  
binding that takes the selected value, no?


Entity is caled "Tests"
attributes are: testType, testScore, testGrade, testName
new entry is called "newEntry"



IIRC, newTestsEntry has been created but not yet inserted into an  
EOEditingContext when this happens.  That might be why it is null.


It could also be failing validation.  Try overriding
public void validationFailedWithException(Throwable t,
  Object value,
  String keyPath)

On the page and see if it logs anything.

Chuck


--
Coming in 2006 - an introduction to web applications using WebObjects  
and Xcode http://www.global-village.net/wointro


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/products/practical_webobjects





___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


more popup fun

2005-11-28 Thread Jeremy Matthews
For some reason, my popup (list populated by a db fetch) now querys AND 
displays correctly, but selecting the value in the popup still produces null 
when submitting the object for insertion. The text fields are fine, so the 
method is probably sound. I'm assuming my wopopup bindings are somehow 
incorrect. Here are the current bindings:

displayString:testTypeEnumerator.testType
item: testTypeEnumerator
list:   testList
noSelectionString: "Select A Test..."
selection:  newTestsEntry.testType

displayString: is showing correct attribute
item: not sure why I need the enumerator, but its there
list: working, since the attributes are displayed correctly from the db fetch
noSelectionString: not really important, but there
selection: not sure if this is working...this is the important binding that 
takes the selected value, no?

Entity is caled "Tests"
attributes are: testType, testScore, testGrade, testName
new entry is called "newEntry"

Thanks,
jeremy
 ___
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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com