Re: WOBrowser selectedValues

2013-10-03 Thread Chuck Hill
Check the ERXPatcher source.


On 2013-10-03 6:02 PM, "Johnny Miller" wrote:

Hi Chuck,

I think WOBrowser is broken.  I set my component type to ERXWOBrowser and it 
now works.  Shouldn't that override be automatic?

Thanks,

Johnny Miller
Kahalawai Media Co.

On Oct 3, 2013, at 2:57 PM, Chuck Hill 
mailto:ch...@global-village.net>> wrote:

Have you tried selections instead of selectedValues?


On 2013-10-03 4:14 PM, "Johnny Miller" wrote:

Hi,

I'm having trouble with WOBrowser.  I'm passing in a list of strings and 
setting the value to the string.  And the WOBrowser is part of a form that uses 
a direct action.

The problem is that I pass in an NSArray to the selectedValues binding but I 
don't see that the string in the array get selected in WOBrowser.  Is there a 
known problem with this component?

Thanks in advance,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website<http://www.kahalawai.com> | e-mail<mailto:%20jlmil...@kahalawai.com>
[http://www.kahalawai.com/email.gif]



--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services

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 44th in 25th annual PROFIT 500 ranking of 
Canada’s Fastest-Growing Companies by PROFIT Magazine!


--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services

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 44th in 25th annual PROFIT 500 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: WOBrowser selectedValues

2013-10-03 Thread Johnny Miller
Hi Chuck,

I think WOBrowser is broken.  I set my component type to ERXWOBrowser and it 
now works.  Shouldn't that override be automatic?

Thanks,

Johnny Miller
Kahalawai Media Co.

> On Oct 3, 2013, at 2:57 PM, Chuck Hill  wrote:
> 
> Have you tried selections instead of selectedValues?
> 
> 
> On 2013-10-03 4:14 PM, "Johnny Miller" wrote:
> 
> Hi,
> 
> I'm having trouble with WOBrowser.  I'm passing in a list of strings and 
> setting the value to the string.  And the WOBrowser is part of a form that 
> uses a direct action.
> 
> The problem is that I pass in an NSArray to the selectedValues binding but I 
> don't see that the string in the array get selected in WOBrowser.  Is there a 
> known problem with this component?
> 
> Thanks in advance,
> 
> Aloha,
> Mr. Johnny Miller
> Web Development Manager
> Kahalawai Media Company
> Lahaina, HI 96761
> tel: (808) 661-7962 | mobile: (808) 283-0791
> website | e-mail  
> 
> 
> -- 
> Chuck Hill 
> Executive Managing Partner, VP Development and Technical Services
> 
> 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 44th in 25th annual PROFIT 500 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: WOBrowser selectedValues

2013-10-03 Thread Chuck Hill
Have you tried selections instead of selectedValues?


On 2013-10-03 4:14 PM, "Johnny Miller" wrote:

Hi,

I'm having trouble with WOBrowser.  I'm passing in a list of strings and 
setting the value to the string.  And the WOBrowser is part of a form that uses 
a direct action.

The problem is that I pass in an NSArray to the selectedValues binding but I 
don't see that the string in the array get selected in WOBrowser.  Is there a 
known problem with this component?

Thanks in advance,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website<http://www.kahalawai.com> | e-mail<mailto:%20jlmil...@kahalawai.com>
[http://www.kahalawai.com/email.gif]



--
Chuck Hill
Executive Managing Partner, VP Development and Technical Services

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 44th in 25th annual PROFIT 500 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

WOBrowser selectedValues

2013-10-03 Thread Johnny Miller
Hi,

I'm having trouble with WOBrowser.  I'm passing in a list of strings and 
setting the value to the string.  And the WOBrowser is part of a form that uses 
a direct action.

The problem is that I pass in an NSArray to the selectedValues binding but I 
don't see that the string in the array get selected in WOBrowser.  Is there a 
known problem with this component?

Thanks in advance,

Aloha,
Mr. Johnny Miller
Web Development Manager
Kahalawai Media Company
Lahaina, HI 96761
tel: (808) 661-7962 | mobile: (808) 283-0791
website | e-mail

 ___
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: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-27 Thread David Avendasora
Hmm…

The problem is that I'm getting the exception in the takeValues phase, so 
changing it from updating the binding from invokeAction to appendToResponce has 
no impact as they both happen after the error is already being thrown.

This is really seeming like a bug in WOInputList#listClassInContext(WOContext) 
in that it returns an NSArray by default if the binding is null or otherwise 
not an instanceof NSArray or List.

I believe it should return an NSMutableArray instead.

Dave

On Jan 26, 2012, at 7:00 AM, David Avendasora wrote:

> Hi Michael,
> 
> Yes, you are exactly right, except that we are setting the contents of the 
> list binding (by assigning a new value to the ivar it's bound to) in 
> invokeAction.
> 
>public MyComponent showChoicesForSelection(){
>   if (selectedCategory() != null){
>   assignedChoices = selectedCategory().relatedChoices();
>   }
>   return thisPage();
>}
> 
> selectedCategory() returns the value of the selections binding from a 
> different WOBrowser component, and relatedChoices() is simply a toMany 
> relationship.
> 
> While initializing the ivar to NSArray.emptyArray() avoids the exception 
> being thrown, I'm seeing that it is still broken code in the sense that we 
> are changing the contents of the list binding at an unexpected time.
> 
> Dave
> 
> On Jan 25, 2012, at 11:07 PM, Michael Hast wrote:
> 
>> Hi David:
>> 
>> Even thought the exception says something about "addAll is not a supported 
>> operation in com.webobjects.foundation.NSArray" that is not what causes this 
>> issue. We experienced a similar issue. The problem for us was that we were 
>> using dependent WOBrowser components (that's what it sounds like you are 
>> doing) and bind the list binding of the dependent WOBrowser to a method that 
>> has a conditional base upon what was selected in the first WOBrowser, e.g.
>> 
>> categoryWOBrowser : WOBrowser {
>>   ...
>>   selection = selectedCategory;
>>   ...
>> }
>> 
>> dependentWOBrowser : WOBrowser {
>>   list = dependentList;
>>   ...
>> }
>> 
>> public NSArray dependentList() {
>> if (selectedCategory == "ABC") return category1Array;
>> else if (selectedCategory == "DEF") return category2Array
>> ...
>> }
>> 
>> If you change the selectedCategory and submit the form (via Ajax or form 
>> submit) then in takeValuesFromRequest the dependentWOBrowser list binding 
>> gets evaluated and the method returns a different list. But the list should 
>> really not change until appendToResponse.
>> 
>> In our case, we set dependentList in appendToResponse, so dependentList 
>> becomes a setter/getter.
>> 
>> Michael.
>> 
>> On 1/25/2012 4:27 AM, Farrukh Ijaz wrote:
>>> Hi David,
>>> 
>>> From the exception it looks like you're trying to call addAll method on
>>> NSArray which is not mutable. Since NSArray is an instance of List
>>> interface therefore the check at line 532 returns true and therefore
>>> addAll get's called at link 533 and that's actually raising exception.
>>> 
>>> Fix: Make sure listClassInContext(context) method is returning mutable
>>> object most likely NSMutableArray.
>>> 
>>> Farrukh
>>> 
>>> On 2012-01-25, at 1:21 PM, David Avendasora wrote:
>>> 
>>>> Hey all,
>>>> 
>>>> I'm in over my head again. But at least the "good" news is that I
>>>> think I'm finally inching my way toward the deep end of the pool...
>>>> 
>>>> We're suddenly running into the WOBrowser
>>>> "java.lang.UnsupportedOperationException: addAll is not a supported
>>>> operation in com.webobjects.foundation.NSArray" problem as others have
>>>> run into.
>>> 
>>>> We have a WOComponent that has three WOBrowsers on it. One selects one
>>>> or more "Categories" from all possibilities. The other two manage what
>>>> related objects are related to the selected Categories. One with
>>>> Available Objects, and one with Assigned Objects. Basically, with 3
>>>> WOBrowsers we are managing a Many-to-Many relationship.
>>>> 
>>>> Now, we can easily avoid the error by just making sure that the
>>>> "selections" bindings of the WOBrowsers are not null. Initializing
>>>> them with NSArray.emptyArray() works just fine.
>>>> 
>>>> There are two odd things:
>&g

Re: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread David Avendasora
Hi Michael,

Yes, you are exactly right, except that we are setting the contents of the list 
binding (by assigning a new value to the ivar it's bound to) in invokeAction.

public MyComponent showChoicesForSelection(){
if (selectedCategory() != null){
assignedChoices = selectedCategory().relatedChoices();
}
return thisPage();
}

selectedCategory() returns the value of the selections binding from a different 
WOBrowser component, and relatedChoices() is simply a toMany relationship.

While initializing the ivar to NSArray.emptyArray() avoids the exception being 
thrown, I'm seeing that it is still broken code in the sense that we are 
changing the contents of the list binding at an unexpected time.

Dave

On Jan 25, 2012, at 11:07 PM, Michael Hast wrote:

> Hi David:
> 
> Even thought the exception says something about "addAll is not a supported 
> operation in com.webobjects.foundation.NSArray" that is not what causes this 
> issue. We experienced a similar issue. The problem for us was that we were 
> using dependent WOBrowser components (that's what it sounds like you are 
> doing) and bind the list binding of the dependent WOBrowser to a method that 
> has a conditional base upon what was selected in the first WOBrowser, e.g.
> 
> categoryWOBrowser : WOBrowser {
>...
>selection = selectedCategory;
>...
> }
> 
> dependentWOBrowser : WOBrowser {
>list = dependentList;
>...
> }
> 
> public NSArray dependentList() {
>  if (selectedCategory == "ABC") return category1Array;
>  else if (selectedCategory == "DEF") return category2Array
>  ...
> }
> 
> If you change the selectedCategory and submit the form (via Ajax or form 
> submit) then in takeValuesFromRequest the dependentWOBrowser list binding 
> gets evaluated and the method returns a different list. But the list should 
> really not change until appendToResponse.
> 
> In our case, we set dependentList in appendToResponse, so dependentList 
> becomes a setter/getter.
> 
> Michael.
> 
> On 1/25/2012 4:27 AM, Farrukh Ijaz wrote:
>> Hi David,
>> 
>> From the exception it looks like you're trying to call addAll method on
>> NSArray which is not mutable. Since NSArray is an instance of List
>> interface therefore the check at line 532 returns true and therefore
>> addAll get's called at link 533 and that's actually raising exception.
>> 
>> Fix: Make sure listClassInContext(context) method is returning mutable
>> object most likely NSMutableArray.
>> 
>> Farrukh
>> 
>> On 2012-01-25, at 1:21 PM, David Avendasora wrote:
>> 
>>> Hey all,
>>> 
>>> I'm in over my head again. But at least the "good" news is that I
>>> think I'm finally inching my way toward the deep end of the pool...
>>> 
>>> We're suddenly running into the WOBrowser
>>> "java.lang.UnsupportedOperationException: addAll is not a supported
>>> operation in com.webobjects.foundation.NSArray" problem as others have
>>> run into.
>> 
>>> We have a WOComponent that has three WOBrowsers on it. One selects one
>>> or more "Categories" from all possibilities. The other two manage what
>>> related objects are related to the selected Categories. One with
>>> Available Objects, and one with Assigned Objects. Basically, with 3
>>> WOBrowsers we are managing a Many-to-Many relationship.
>>> 
>>> Now, we can easily avoid the error by just making sure that the
>>> "selections" bindings of the WOBrowsers are not null. Initializing
>>> them with NSArray.emptyArray() works just fine.
>>> 
>>> There are two odd things:
>>> 1) We just started running into this problem and this code has been
>>> running unchanged for years, and Wonder's last change was 16+ months ago
>>> 2) There are three WOBrowsers on the Page (2 in one component, 1 in a
>>> parent component) and only ONE of the WOBrowsers is causing this error.
>>> 
>>> I believe there is a bug in WO's or WOnder's handling of WOBrowser,
>>> but maybe (probably) I'm just not fully understanding the implications
>>> of multiple WOBrowsers in one Page and the Request-Response loop.
>>> 
>>> 526if(_selections!=null&&_selections.isValueSettable()) {
>>> 526 try {
>>> 527 ClassresultClass=listClassInContext(context);
>>> 528 Object result = resultClass.newInstance();
>>> 529 if(resultinstanceofNSMutableArray) {
>>> 530 ((NSMutableArray)result).addO

Re: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread David Avendasora
Yes, that "works around" the problem, but I'm still trying to understand why 
WOBrowser (and possibly other WOInputList-based components) can't handle the 
contents of the list binding changing during takeValuesFromRequest.

I find it interesting that instead of fixing this problem or at least keeping 
an exception from happening, The Apple developers chose to simply swallow the 
exception and pretend nothing happened.

Dave

On Jan 26, 2012, at 12:41 AM, Ramsey Gurley wrote:

> I blame myself personally.  I overrode that method to prevent swallowed 
> exceptions but overlooked an obvious use case.  It should probably be
> 
> if(result instanceof NSMutableArray) {
>   ((NSMutableArray)result).addObjects(selections.toArray());
> } else if(result instanceof NSArray) {
>   result = new NSArray(selections);
> } else if(result instanceof List) {
>   ((List)result).addAll(selections);
> }
> 
> Same for radiobuttonlist and checkboxlist
> 
> Ramsey
> 
> On Jan 25, 2012, at 4:27 AM, Farrukh Ijaz wrote:
> 
>> Hi David,
>> 
>> From the exception it looks like you're trying to call addAll method on 
>> NSArray which is not mutable. Since NSArray is an instance of List interface 
>> therefore the check at line 532 returns true and therefore addAll get's 
>> called at link 533 and that's actually raising exception.
>> 
>> Fix: Make sure listClassInContext(context) method is returning mutable 
>> object most likely NSMutableArray.
>> 
>> Farrukh
>> 
>> On 2012-01-25, at 1:21 PM, David Avendasora wrote:
>> 
>>> Hey all,
>>> 
>>> I'm in over my head again. But at least the "good" news is that I think I'm 
>>> finally inching my way toward the deep end of the pool...
>>> 
>>> We're suddenly running into the WOBrowser  ": addAll is not a supported 
>>> operation in com.webobjects.foundation.NSArray" problem as others have run 
>>> into.
>>> 
>>> We have a WOComponent that has three WOBrowsers on it. One selects one or 
>>> more "Categories" from all possibilities. The other two manage what related 
>>> objects are related to the selected Categories. One with Available Objects, 
>>> and one with Assigned Objects. Basically, with 3 WOBrowsers we are managing 
>>> a Many-to-Many relationship.
>>> 
>>> Now, we can easily avoid the error by just making sure that the 
>>> "selections" bindings of the WOBrowsers are not null. Initializing them 
>>> with NSArray.emptyArray() works just fine.
>>> 
>>> There are two odd things:
>>> 1) We just started running into this problem and this code has been running 
>>> unchanged for years, and Wonder's last change was 16+ months ago
>>> 2) There are three WOBrowsers on the Page (2 in one component, 1 in a 
>>> parent component) and only ONE of the WOBrowsers is causing this error.
>>> 
>>> I believe there is a bug in WO's or WOnder's handling of WOBrowser, but 
>>> maybe (probably) I'm just not fully understanding the implications of 
>>> multiple WOBrowsers in one Page and the Request-Response loop. 
>>> 
>>> 526if(_selections != null && _selections.isValueSettable()) {
>>> 526try {
>>> 527Class resultClass = listClassInContext(context);
>>> 528Object result = resultClass.newInstance();
>>> 529if(result instanceof NSMutableArray) {
>>> 530
>>> ((NSMutableArray)result).addObjects(selections.toArray());
>>> 531} else { 
>>> 532if(result instanceof List) {
>>> 533((List)result).addAll(selections);
>>> 534}
>>> 535}
>>> 536_selections.setValue(result, context.component());
>>> 537} catch(Exception exception) {
>>> 
>>> If I add the following two lines:
>>> 
>>> 531 +  } else if (result instanceof NSArray) {
>>> 532 +  result = new NSArray(selections.toArray());
>>> 
>>> Or surround lines 529 - 535 with the following if clause:
>>> 
>>> 529 +  if (selections != null && !selections.isEmpty()) {
>>> ...
>>> 537 +}
>>> 
>>> Then everything works just fine, even if the selections bindings end up 
>>> null.
>>> 
>>> That's all very special, but it just covers up the real problem by 
>>>

Re: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread Ramsey Gurley
I blame myself personally.  I overrode that method to prevent swallowed 
exceptions but overlooked an obvious use case.  It should probably be

if(result instanceof NSMutableArray) {
((NSMutableArray)result).addObjects(selections.toArray());
} else if(result instanceof NSArray) {
result = new NSArray(selections);
} else if(result instanceof List) {
((List)result).addAll(selections);
}

Same for radiobuttonlist and checkboxlist

Ramsey

On Jan 25, 2012, at 4:27 AM, Farrukh Ijaz wrote:

> Hi David,
> 
> From the exception it looks like you're trying to call addAll method on 
> NSArray which is not mutable. Since NSArray is an instance of List interface 
> therefore the check at line 532 returns true and therefore addAll get's 
> called at link 533 and that's actually raising exception.
> 
> Fix: Make sure listClassInContext(context) method is returning mutable object 
> most likely NSMutableArray.
> 
> Farrukh
> 
> On 2012-01-25, at 1:21 PM, David Avendasora wrote:
> 
>> Hey all,
>> 
>> I'm in over my head again. But at least the "good" news is that I think I'm 
>> finally inching my way toward the deep end of the pool...
>> 
>> We're suddenly running into the WOBrowser  
>> "java.lang.UnsupportedOperationException: addAll is not a supported 
>> operation in com.webobjects.foundation.NSArray" problem as others have run 
>> into.
>> 
>> We have a WOComponent that has three WOBrowsers on it. One selects one or 
>> more "Categories" from all possibilities. The other two manage what related 
>> objects are related to the selected Categories. One with Available Objects, 
>> and one with Assigned Objects. Basically, with 3 WOBrowsers we are managing 
>> a Many-to-Many relationship.
>> 
>> Now, we can easily avoid the error by just making sure that the "selections" 
>> bindings of the WOBrowsers are not null. Initializing them with 
>> NSArray.emptyArray() works just fine.
>> 
>> There are two odd things:
>> 1) We just started running into this problem and this code has been running 
>> unchanged for years, and Wonder's last change was 16+ months ago
>> 2) There are three WOBrowsers on the Page (2 in one component, 1 in a parent 
>> component) and only ONE of the WOBrowsers is causing this error.
>> 
>> I believe there is a bug in WO's or WOnder's handling of WOBrowser, but 
>> maybe (probably) I'm just not fully understanding the implications of 
>> multiple WOBrowsers in one Page and the Request-Response loop. 
>> 
>> 526if(_selections != null && _selections.isValueSettable()) {
>> 526try {
>> 527Class resultClass = listClassInContext(context);
>> 528Object result = resultClass.newInstance();
>> 529if(result instanceof NSMutableArray) {
>> 530((NSMutableArray)result).addObjects(selections.toArray());
>> 531} else { 
>> 532if(result instanceof List) {
>> 533((List)result).addAll(selections);
>> 534}
>> 535}
>> 536_selections.setValue(result, context.component());
>> 537} catch(Exception exception) {
>> 
>> If I add the following two lines:
>> 
>> 531 +  } else if (result instanceof NSArray) {
>> 532 +  result = new NSArray(selections.toArray());
>> 
>> Or surround lines 529 - 535 with the following if clause:
>> 
>> 529 +  if (selections != null && !selections.isEmpty()) {
>> ...
>> 537 +}
>> 
>> Then everything works just fine, even if the selections bindings end up null.
>> 
>> That's all very special, but it just covers up the real problem by 
>> intercepting the bad data before it can cause an error. They don't fix what 
>> is causing the bad data in the first place.
>> 
>> It appears that for some reason line 527's call to 
>> EOAssociation#listClassInContext(context) for just ONE of the three 
>> WOBrowsers returns an instance of NSArray instead of an NSMutableArray.  The 
>> one that gets an NSArray Class is the third WOBrowser on the page, but 
>> possibly more significantly it's the second with a null "selections" 
>> binding. 
>> 
>> What I don't get is why would EOAssociation#listClassInContext(context) 
>> return different Class objects (NSMutableArray for the first, NSArray for 
>> the second) even when both WOBrowser "selections" bindings are null?
>>

Re: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread Michael Hast

Hi David:

Even thought the exception says something about "addAll is not a 
supported operation in com.webobjects.foundation.NSArray" that is not 
what causes this issue. We experienced a similar issue. The problem for 
us was that we were using dependent WOBrowser components (that's what it 
sounds like you are doing) and bind the list binding of the dependent 
WOBrowser to a method that has a conditional base upon what was selected 
in the first WOBrowser, e.g.


categoryWOBrowser : WOBrowser {
...
selection = selectedCategory;
...
}

dependentWOBrowser : WOBrowser {
list = dependentList;
...
}

public NSArray dependentList() {
  if (selectedCategory == "ABC") return category1Array;
  else if (selectedCategory == "DEF") return category2Array
  ...
}

If you change the selectedCategory and submit the form (via Ajax or form 
submit) then in takeValuesFromRequest the dependentWOBrowser list 
binding gets evaluated and the method returns a different list. But the 
list should really not change until appendToResponse.


In our case, we set dependentList in appendToResponse, so dependentList 
becomes a setter/getter.


Michael.

On 1/25/2012 4:27 AM, Farrukh Ijaz wrote:

Hi David,

 From the exception it looks like you're trying to call addAll method on
NSArray which is not mutable. Since NSArray is an instance of List
interface therefore the check at line 532 returns true and therefore
addAll get's called at link 533 and that's actually raising exception.

Fix: Make sure listClassInContext(context) method is returning mutable
object most likely NSMutableArray.

Farrukh

On 2012-01-25, at 1:21 PM, David Avendasora wrote:


Hey all,

I'm in over my head again. But at least the "good" news is that I
think I'm finally inching my way toward the deep end of the pool...

We're suddenly running into the WOBrowser
"java.lang.UnsupportedOperationException: addAll is not a supported
operation in com.webobjects.foundation.NSArray" problem as others have
run into.



We have a WOComponent that has three WOBrowsers on it. One selects one
or more "Categories" from all possibilities. The other two manage what
related objects are related to the selected Categories. One with
Available Objects, and one with Assigned Objects. Basically, with 3
WOBrowsers we are managing a Many-to-Many relationship.

Now, we can easily avoid the error by just making sure that the
"selections" bindings of the WOBrowsers are not null. Initializing
them with NSArray.emptyArray() works just fine.

There are two odd things:
1) We just started running into this problem and this code has been
running unchanged for years, and Wonder's last change was 16+ months ago
2) There are three WOBrowsers on the Page (2 in one component, 1 in a
parent component) and only ONE of the WOBrowsers is causing this error.

I believe there is a bug in WO's or WOnder's handling of WOBrowser,
but maybe (probably) I'm just not fully understanding the implications
of multiple WOBrowsers in one Page and the Request-Response loop.

526if(_selections!=null&&_selections.isValueSettable()) {
526 try {
527 ClassresultClass=listClassInContext(context);
528 Object result = resultClass.newInstance();
529 if(resultinstanceofNSMutableArray) {
530 ((NSMutableArray)result).addObjects(selections.toArray());
531 } else {
532 if(result instanceof List) {
533 ((List)result).addAll(selections);
534 }
535 }
536 _selections.setValue(result,context.component());
537 } catch(Exception exception) {

If I add the following two lines:

531 + } else if (result instanceof NSArray) {
532 + result = new NSArray(selections.toArray());

Or surround lines 529 - 535 with the following if clause:

529 + if(selections !=null&&!selections.isEmpty()) {
...
537 +}

Then everything works just fine, even if the selections bindings end
up null.

That's all very special, but it just covers up the real problem by
intercepting the bad data before it can cause an error. They don't fix
what is causing the bad data in the first place.

It appears that for some reason line 527's call to
EOAssociation#listClassInContext(context)for just ONE of the three
WOBrowsers returns an instance of NSArray instead of an
NSMutableArray. The one that gets an NSArray Class is the third
WOBrowser on the page, but possibly more significantly it'sthe second
with a null "selections" binding.

What I don't get is why would
EOAssociation#listClassInContext(context)return different Class
objects (NSMutableArray for the first, NSArray for the second) even
when both WOBrowser "selections" bindings are null?

Does anybody have any ideas?

(Clarification for Chuck: I mean ideas that don't directly or
indirectly involve bourbon and/or hookers)

Dave

___
Do not post admin requests to the list

Re: ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread Farrukh Ijaz
Hi David,

>From the exception it looks like you're trying to call addAll method on 
>NSArray which is not mutable. Since NSArray is an instance of List interface 
>therefore the check at line 532 returns true and therefore addAll get's called 
>at link 533 and that's actually raising exception.

Fix: Make sure listClassInContext(context) method is returning mutable object 
most likely NSMutableArray.

Farrukh

On 2012-01-25, at 1:21 PM, David Avendasora wrote:

> Hey all,
> 
> I'm in over my head again. But at least the "good" news is that I think I'm 
> finally inching my way toward the deep end of the pool...
> 
> We're suddenly running into the WOBrowser  
> "java.lang.UnsupportedOperationException: addAll is not a supported operation 
> in com.webobjects.foundation.NSArray" problem as others have run into.
> 
> We have a WOComponent that has three WOBrowsers on it. One selects one or 
> more "Categories" from all possibilities. The other two manage what related 
> objects are related to the selected Categories. One with Available Objects, 
> and one with Assigned Objects. Basically, with 3 WOBrowsers we are managing a 
> Many-to-Many relationship.
> 
> Now, we can easily avoid the error by just making sure that the "selections" 
> bindings of the WOBrowsers are not null. Initializing them with 
> NSArray.emptyArray() works just fine.
> 
> There are two odd things:
> 1) We just started running into this problem and this code has been running 
> unchanged for years, and Wonder's last change was 16+ months ago
> 2) There are three WOBrowsers on the Page (2 in one component, 1 in a parent 
> component) and only ONE of the WOBrowsers is causing this error.
> 
> I believe there is a bug in WO's or WOnder's handling of WOBrowser, but maybe 
> (probably) I'm just not fully understanding the implications of multiple 
> WOBrowsers in one Page and the Request-Response loop. 
> 
> 526if(_selections != null && _selections.isValueSettable()) {
> 526try {
> 527Class resultClass = listClassInContext(context);
> 528Object result = resultClass.newInstance();
> 529if(result instanceof NSMutableArray) {
> 530((NSMutableArray)result).addObjects(selections.toArray());
> 531} else { 
> 532if(result instanceof List) {
> 533((List)result).addAll(selections);
> 534}
> 535}
> 536_selections.setValue(result, context.component());
> 537} catch(Exception exception) {
> 
> If I add the following two lines:
> 
> 531 +  } else if (result instanceof NSArray) {
> 532 +  result = new NSArray(selections.toArray());
> 
> Or surround lines 529 - 535 with the following if clause:
> 
> 529 +  if (selections != null && !selections.isEmpty()) {
> ...
> 537 +}
> 
> Then everything works just fine, even if the selections bindings end up null.
> 
> That's all very special, but it just covers up the real problem by 
> intercepting the bad data before it can cause an error. They don't fix what 
> is causing the bad data in the first place.
> 
> It appears that for some reason line 527's call to 
> EOAssociation#listClassInContext(context) for just ONE of the three 
> WOBrowsers returns an instance of NSArray instead of an NSMutableArray.  The 
> one that gets an NSArray Class is the third WOBrowser on the page, but 
> possibly more significantly it's the second with a null "selections" binding. 
> 
> What I don't get is why would EOAssociation#listClassInContext(context) 
> return different Class objects (NSMutableArray for the first, NSArray for the 
> second) even when both WOBrowser "selections" bindings are null?
> 
> Does anybody have any ideas?
> 
> (Clarification for Chuck: I mean ideas that don't directly or indirectly 
> involve bourbon and/or hookers)
> 
> Dave
> 
> ___
> 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/farrukh.ijaz%40fuegodigitalmedia.com
> 
> This email sent to farrukh.i...@fuegodigitalmedia.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


ERXPatcher / WOBrowser / NSArray.addAll()

2012-01-25 Thread David Avendasora
Hey all,

I'm in over my head again. But at least the "good" news is that I think I'm 
finally inching my way toward the deep end of the pool...

We're suddenly running into the WOBrowser  
"java.lang.UnsupportedOperationException: addAll is not a supported operation 
in com.webobjects.foundation.NSArray" problem as others have run into.

We have a WOComponent that has three WOBrowsers on it. One selects one or more 
"Categories" from all possibilities. The other two manage what related objects 
are related to the selected Categories. One with Available Objects, and one 
with Assigned Objects. Basically, with 3 WOBrowsers we are managing a 
Many-to-Many relationship.

Now, we can easily avoid the error by just making sure that the "selections" 
bindings of the WOBrowsers are not null. Initializing them with 
NSArray.emptyArray() works just fine.

There are two odd things:
1) We just started running into this problem and this code has been running 
unchanged for years, and Wonder's last change was 16+ months ago
2) There are three WOBrowsers on the Page (2 in one component, 1 in a parent 
component) and only ONE of the WOBrowsers is causing this error.

I believe there is a bug in WO's or WOnder's handling of WOBrowser, but maybe 
(probably) I'm just not fully understanding the implications of multiple 
WOBrowsers in one Page and the Request-Response loop. 

526if(_selections != null && _selections.isValueSettable()) {
526try {
527Class resultClass = listClassInContext(context);
528Object result = resultClass.newInstance();
529if(result instanceof NSMutableArray) {
530((NSMutableArray)result).addObjects(selections.toArray());
531} else { 
532if(result instanceof List) {
533((List)result).addAll(selections);
534}
535}
536_selections.setValue(result, context.component());
537} catch(Exception exception) {

If I add the following two lines:

531 +  } else if (result instanceof NSArray) {
532 +  result = new NSArray(selections.toArray());

Or surround lines 529 - 535 with the following if clause:

529 +  if (selections != null && !selections.isEmpty()) {
...
537 +}

Then everything works just fine, even if the selections bindings end up null.

That's all very special, but it just covers up the real problem by intercepting 
the bad data before it can cause an error. They don't fix what is causing the 
bad data in the first place.

It appears that for some reason line 527's call to 
EOAssociation#listClassInContext(context) for just ONE of the three WOBrowsers 
returns an instance of NSArray instead of an NSMutableArray.  The one that gets 
an NSArray Class is the third WOBrowser on the page, but possibly more 
significantly it's the second with a null "selections" binding. 

What I don't get is why would EOAssociation#listClassInContext(context) return 
different Class objects (NSMutableArray for the first, NSArray for the second) 
even when both WOBrowser "selections" bindings are null?

Does anybody have any ideas?

(Clarification for Chuck: I mean ideas that don't directly or indirectly 
involve bourbon and/or hookers)

Dave

 ___
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: WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-06 Thread pavan.jayam

Hi,

I have initialized all 'lists' and 'selections' of all WOBrowsers 
(1,2,3,4) at the time of page loading.


If i use WOBrowser1 and WOBrowser 2, i am able to select/move  single or 
multiple states from WOBrowser1 to WOBrowser2, and i can move back 
single/multiple states to WOBrowser1.


But when i enabled another set of WOBrowsers with districts for selected 
states i am not able to select/move Districts or States from one 
WOBrowser to anothe WOBrowser.


Following is the code snippet:


--WOD Code:

Browser1: WOBrowser {
   displayString = availableState.name;
   item = availableState;
   list = availableStates;
   selections = selectedAvailableStates;
   size = 15;
   multiple = true;
   escapeHTML = false;
}

Browser2: WOBrowser {
   displayString = selectedState.name;
   item = selectedState;
   list = selectedStates;
   selections = selectedSelectedStates;
   size = 15;
   multiple = true;
   escapeHTML = false;
}

Browser3: WOBrowser {
   displayString = availableDistrict.name;
   item = availableDistrict;
   list = availableDistricts;
   selections = selectedAvailableDistricts;
   size = 15;
   multiple = true;
   escapeHTML = false;
}

Browser4: WOBrowser {
   displayString = selectedDistrict.name;
   item = selectedDistrict;
   list = selectedDistricts;
   selections = selectedSelectedDistricts;
   size = 15;
   multiple = true;
   escapeHTML = false;
}

--Java Code--

// Initializing the variables
public State availableState;
   public NSMutableArray availableStates = new NSMutableArray();
   public NSMutableArray selectedAvailableStates = new NSMutableArray();
  
   public State selectedState;

   public NSMutableArray selectedStates = new NSMutableArray();
   public NSMutableArray selectedSelectedStates = new NSMutableArray();
  
   public District availableDistrict;

   public NSMutableArray availableDistricts = new NSMutableArray();
   public NSMutableArray selectedAvailableDistricts = new NSMutableArray();
  
   public District selectedDistrict;

   public NSMutableArray selectedDistricts = new NSMutableArray();
   public NSMutableArray selectedSelectedDistricts = new NSMutableArray();
  
  
   For single/multiple items move from one WOBrowser to another WOBrowser
  
   selectedStates.addObjectsFromArray(selectedAvailableStates);

   availableStates.removeObjectsInArray(selectedAvailableStates);


--Pavan.

Klaus Berkling wrote:


Hi.

What happens when you set all your arrays for the WOBrowser to an 
empty array and not null?  

I had a similar exception and set the 'list' and 'selections' arrays 
to new NSArray(); when I initialized the component class. You would 
have to do it for all your WOBrowsers.


On Sep 5, 2011, at 12:58 AM, pavan.jayam wrote:


Hi List,

I am using WOBrowser to select multiple objects.

For ex: WOBrowser 1 contains state objects, if any of the state 
selected(moved to WOBrowser2 ) i am displaying Districts for that 
state in the WOBrowser 3.  To move state object from WOBrowser1 to 
WOBrowser2 i am using WOImageButton.


First time i am able to select/move a single or multiple states from 
WOBrowser1 to WOBrowser2, but after displaying districts in 
WOBrowser3 , i tried to select/move a single district or if i tried 
to select/move another state from WOBrowser1 to WOBrowser2,  it 
throws the following exception:


java.lang.UnsupportedOperationException: addAll is not a supported 
operation in com.webobjects.foundation.NSArray


If i am not displaying district WOBrowsers on selecting the state 
then i am able to select/move single or multiple states from 
WOBrowser1 to WOBrowser2 and viceversa.


Exception : java.lang.UnsupportedOperationException: addAll is not a 
supported operation in com.webobjects.foundation.NSArray
[2011-9-5 3:18:43 EDT]  
java.lang.UnsupportedOperationException: addAll is not a supported 
operation in com.webobjects.foundation.NSArray

at com.webobjects.foundation.NSArray.addAll(NSArray.java:917)
at 
er.extensions.foundation.ERXPatcher$DynamicElementsPatches$Browser.setSelectionListInContext(ERXPatcher.java:533)
at 
com.webobjects.appserver._private.WOBrowser._fastTakeValuesFromRequest(WOBrowser.java:123)
at 
com.webobjects.appserver._private.WOBrowser.takeValuesFromRequest(WOBrowser.java:138)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
at 
com.webobjects.appserver._private.WOConditional.takeValuesFromRequest(WOConditional.java:79)
at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:

Re: WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-06 Thread Michael Hast

Hi:

We had this same error. And by the sounds of it, you have a similar 
setup. WOBrowser 1 is a what I call dependent list. Select a row in the 
list, some Ajax gets executed and some other elements on the page 
change. Our WOBrowser 1 was a Fiscal Year selector. This is a timing 
issue. You would need to cache the list (NSArray) for WOBrowser 1 once 
per RR-loop. We overrode appendToResponse and initialized the cached 
value of the list there.


The problem for us was that we bound the list binding directly to an EO. 
That means that during the RR-loop the list binding changed, from one 
array to another.


I hope that helps.

Michael.

On 9/5/2011 12:58 AM, pavan.jayam wrote:

Hi List,

I am using WOBrowser to select multiple objects.

For ex: WOBrowser 1 contains state objects, if any of the state
selected(moved to WOBrowser2 ) i am displaying Districts for that state
in the WOBrowser 3. To move state object from WOBrowser1 to WOBrowser2 i
am using WOImageButton.

First time i am able to select/move a single or multiple states from
WOBrowser1 to WOBrowser2, but after displaying districts in WOBrowser3 ,
i tried to select/move a single district or if i tried to select/move
another state from WOBrowser1 to WOBrowser2, it throws the following
exception:

java.lang.UnsupportedOperationException: addAll is not a supported
operation in com.webobjects.foundation.NSArray

If i am not displaying district WOBrowsers on selecting the state then i
am able to select/move single or multiple states from WOBrowser1 to
WOBrowser2 and viceversa.

Exception : java.lang.UnsupportedOperationException: addAll is not a
supported operation in com.webobjects.foundation.NSArray
[2011-9-5 3:18:43 EDT] 
java.lang.UnsupportedOperationException: addAll is not a supported
operation in com.webobjects.foundation.NSArray
at com.webobjects.foundation.NSArray.addAll(NSArray.java:917)
at
er.extensions.foundation.ERXPatcher$DynamicElementsPatches$Browser.setSelectionListInContext(ERXPatcher.java:533)
at
com.webobjects.appserver._private.WOBrowser._fastTakeValuesFromRequest(WOBrowser.java:123)
at
com.webobjects.appserver._private.WOBrowser.takeValuesFromRequest(WOBrowser.java:138)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
at
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
at
com.webobjects.appserver._private.WOConditional.takeValuesFromRequest(WOConditional.java:79)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
at
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
at
er.extensions.components._private.ERXWOForm.takeValuesFromRequest(ERXWOForm.java:311)
at
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
at
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
at
com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:1051)
at
er.extensions.components.ERXComponent.takeValuesFromRequest(ERXComponent.java:93)
at
com.webobjects.appserver.WOSession.takeValuesFromRequest(WOSession.java:1331)
at
er.extensions.appserver.ERXSession.takeValuesFromRequest(ERXSession.java:541)
at
com.webobjects.appserver.WOApplication.takeValuesFromRequest(WOApplication.java:1724)
at
er.extensions.appserver.ajax.ERXAjaxApplication.takeValuesFromRequest(ERXAjaxApplication.java:78)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:199)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
at
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
at
com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
at
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
at
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
at
er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
at
er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
at
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
at
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
at java.lang.Thread.run(Thread.java:619)

Please suggest how to use more than 2 WOBrowsers in the same page.

Regards,
JPK.




  ___
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/mhast%40desertsky.com

This email sent to mh

Re: WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-05 Thread David Avendasora

On Sep 6, 2011, at 4:05 AM, Johann Werner wrote:

> That error suggests that you want to add objects to an NSArray. An NSArray is 
> immutable thus the error 'not supported'. You should use NSMutableArrays.

You could fill and NSArray with the number of 
times I've made this mistake. The oddities of an immutable class extending a 
mutable one...

Actually, make that an NSMutableArray because I 
know I'll make it again. Probably tomorrow.

Dave

PS. Okay! Fine, Chuck! I'll probably make this mistake yet today.

Grumble.




 ___
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 arch...@mail-archive.com


Re: WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-05 Thread Johann Werner

Am 05.09.2011 um 09:58 schrieb pavan.jayam:

> Hi List,
> 
> I am using WOBrowser to select multiple objects. 
> 
> For ex: WOBrowser 1 contains state objects, if any of the state 
> selected(moved to WOBrowser2 ) i am displaying Districts for that state in 
> the WOBrowser 3.  To move state object from WOBrowser1 to WOBrowser2 i am 
> using WOImageButton.
> 
> First time i am able to select/move a single or multiple states from 
> WOBrowser1 to WOBrowser2, but after displaying districts in WOBrowser3 , i 
> tried to select/move a single district or if i tried to select/move another 
> state from WOBrowser1 to WOBrowser2,  it throws the following exception:
> 
> java.lang.UnsupportedOperationException: addAll is not a supported operation 
> in com.webobjects.foundation.NSArray
> 
> If i am not displaying district WOBrowsers on selecting the state then i am 
> able to select/move single or multiple states from WOBrowser1 to WOBrowser2 
> and viceversa.
> 
> Exception : java.lang.UnsupportedOperationException: addAll is not a 
> supported operation in com.webobjects.foundation.NSArray
> [2011-9-5 3:18:43 EDT]  
> java.lang.UnsupportedOperationException: addAll is not a supported operation 
> in com.webobjects.foundation.NSArray

That error suggests that you want to add objects to an NSArray. An NSArray is 
immutable thus the error 'not supported'. You should use NSMutableArrays.

jw


> at com.webobjects.foundation.NSArray.addAll(NSArray.java:917)
> at 
> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$Browser.setSelectionListInContext(ERXPatcher.java:533)
> at 
> com.webobjects.appserver._private.WOBrowser._fastTakeValuesFromRequest(WOBrowser.java:123)
> at 
> com.webobjects.appserver._private.WOBrowser.takeValuesFromRequest(WOBrowser.java:138)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> com.webobjects.appserver._private.WOConditional.takeValuesFromRequest(WOConditional.java:79)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> er.extensions.components._private.ERXWOForm.takeValuesFromRequest(ERXWOForm.java:311)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:1051)
> at 
> er.extensions.components.ERXComponent.takeValuesFromRequest(ERXComponent.java:93)
> at 
> com.webobjects.appserver.WOSession.takeValuesFromRequest(WOSession.java:1331)
> at 
> er.extensions.appserver.ERXSession.takeValuesFromRequest(ERXSession.java:541)
> at 
> com.webobjects.appserver.WOApplication.takeValuesFromRequest(WOApplication.java:1724)
> at 
> er.extensions.appserver.ajax.ERXAjaxApplication.takeValuesFromRequest(ERXAjaxApplication.java:78)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:199)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
> at 
> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> at 
> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
> at 
> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
> at 
> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
> at 
> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
> at java.lang.Thread.run(Thread.java:619)
> 
> Please suggest how to use more than 2 WOBrowsers in the same page.
> 
> Regards,
> JPK.
> 
> 
> ___
> D

Re: WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-05 Thread Klaus Berkling

Hi.

What happens when you set all your arrays for the WOBrowser to an empty array 
and not null?  

I had a similar exception and set the 'list' and 'selections' arrays to new 
NSArray(); when I initialized the component class. You would have to do it for 
all your WOBrowsers.

On Sep 5, 2011, at 12:58 AM, pavan.jayam wrote:

> Hi List,
> 
> I am using WOBrowser to select multiple objects. 
> 
> For ex: WOBrowser 1 contains state objects, if any of the state 
> selected(moved to WOBrowser2 ) i am displaying Districts for that state in 
> the WOBrowser 3.  To move state object from WOBrowser1 to WOBrowser2 i am 
> using WOImageButton.
> 
> First time i am able to select/move a single or multiple states from 
> WOBrowser1 to WOBrowser2, but after displaying districts in WOBrowser3 , i 
> tried to select/move a single district or if i tried to select/move another 
> state from WOBrowser1 to WOBrowser2,  it throws the following exception:
> 
> java.lang.UnsupportedOperationException: addAll is not a supported operation 
> in com.webobjects.foundation.NSArray
> 
> If i am not displaying district WOBrowsers on selecting the state then i am 
> able to select/move single or multiple states from WOBrowser1 to WOBrowser2 
> and viceversa.
> 
> Exception : java.lang.UnsupportedOperationException: addAll is not a 
> supported operation in com.webobjects.foundation.NSArray
> [2011-9-5 3:18:43 EDT]  
> java.lang.UnsupportedOperationException: addAll is not a supported operation 
> in com.webobjects.foundation.NSArray
> at com.webobjects.foundation.NSArray.addAll(NSArray.java:917)
> at 
> er.extensions.foundation.ERXPatcher$DynamicElementsPatches$Browser.setSelectionListInContext(ERXPatcher.java:533)
> at 
> com.webobjects.appserver._private.WOBrowser._fastTakeValuesFromRequest(WOBrowser.java:123)
> at 
> com.webobjects.appserver._private.WOBrowser.takeValuesFromRequest(WOBrowser.java:138)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> com.webobjects.appserver._private.WOConditional.takeValuesFromRequest(WOConditional.java:79)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> er.extensions.components._private.ERXWOForm.takeValuesFromRequest(ERXWOForm.java:311)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
> at 
> com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
> at 
> com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:1051)
> at 
> er.extensions.components.ERXComponent.takeValuesFromRequest(ERXComponent.java:93)
> at 
> com.webobjects.appserver.WOSession.takeValuesFromRequest(WOSession.java:1331)
> at 
> er.extensions.appserver.ERXSession.takeValuesFromRequest(ERXSession.java:541)
> at 
> com.webobjects.appserver.WOApplication.takeValuesFromRequest(WOApplication.java:1724)
> at 
> er.extensions.appserver.ajax.ERXAjaxApplication.takeValuesFromRequest(ERXAjaxApplication.java:78)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:199)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
> at 
> com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
> at 
> com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
> at 
> er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
> at 
> er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
> at 
> com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
> at 
> com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)
> at java.lang.Thread.run(Thread.java:619)
> 
> Please suggest how to use more than 2 WOBrowsers in the

WOBrowser Error java.lang.UnsupportedOperationException: addAll is not a supported operation in com.webobjects.foundation.NSArray

2011-09-05 Thread pavan.jayam

Hi List,

I am using WOBrowser to select multiple objects.

For ex: WOBrowser 1 contains state objects, if any of the state 
selected(moved to WOBrowser2 ) i am displaying Districts for that state 
in the WOBrowser 3.  To move state object from WOBrowser1 to WOBrowser2 
i am using WOImageButton.


First time i am able to select/move a single or multiple states from 
WOBrowser1 to WOBrowser2, but after displaying districts in WOBrowser3 , 
i tried to select/move a single district or if i tried to select/move 
another state from WOBrowser1 to WOBrowser2,  it throws the following 
exception:


java.lang.UnsupportedOperationException: addAll is not a supported 
operation in com.webobjects.foundation.NSArray


If i am not displaying district WOBrowsers on selecting the state then i 
am able to select/move single or multiple states from WOBrowser1 to 
WOBrowser2 and viceversa.


Exception : java.lang.UnsupportedOperationException: addAll is not a 
supported operation in com.webobjects.foundation.NSArray
[2011-9-5 3:18:43 EDT]  
java.lang.UnsupportedOperationException: addAll is not a supported 
operation in com.webobjects.foundation.NSArray

   at com.webobjects.foundation.NSArray.addAll(NSArray.java:917)
   at 
er.extensions.foundation.ERXPatcher$DynamicElementsPatches$Browser.setSelectionListInContext(ERXPatcher.java:533)
   at 
com.webobjects.appserver._private.WOBrowser._fastTakeValuesFromRequest(WOBrowser.java:123)
   at 
com.webobjects.appserver._private.WOBrowser.takeValuesFromRequest(WOBrowser.java:138)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
   at 
com.webobjects.appserver._private.WOConditional.takeValuesFromRequest(WOConditional.java:79)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
   at 
er.extensions.components._private.ERXWOForm.takeValuesFromRequest(ERXWOForm.java:311)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeChildrenValuesFromRequest(WODynamicGroup.java:84)
   at 
com.webobjects.appserver._private.WODynamicGroup.takeValuesFromRequest(WODynamicGroup.java:93)
   at 
com.webobjects.appserver.WOComponent.takeValuesFromRequest(WOComponent.java:1051)
   at 
er.extensions.components.ERXComponent.takeValuesFromRequest(ERXComponent.java:93)
   at 
com.webobjects.appserver.WOSession.takeValuesFromRequest(WOSession.java:1331)
   at 
er.extensions.appserver.ERXSession.takeValuesFromRequest(ERXSession.java:541)
   at 
com.webobjects.appserver.WOApplication.takeValuesFromRequest(WOApplication.java:1724)
   at 
er.extensions.appserver.ajax.ERXAjaxApplication.takeValuesFromRequest(ERXAjaxApplication.java:78)
   at 
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedPage(WOComponentRequestHandler.java:199)
   at 
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedSession(WOComponentRequestHandler.java:298)
   at 
com.webobjects.appserver._private.WOComponentRequestHandler._dispatchWithPreparedApplication(WOComponentRequestHandler.java:332)
   at 
com.webobjects.appserver._private.WOComponentRequestHandler._handleRequest(WOComponentRequestHandler.java:369)
   at 
com.webobjects.appserver._private.WOComponentRequestHandler.handleRequest(WOComponentRequestHandler.java:442)
   at 
com.webobjects.appserver.WOApplication.dispatchRequest(WOApplication.java:1687)
   at 
er.extensions.appserver.ERXApplication.dispatchRequestImmediately(ERXApplication.java:1984)
   at 
er.extensions.appserver.ERXApplication.dispatchRequest(ERXApplication.java:1949)
   at 
com.webobjects.appserver._private.WOWorkerThread.runOnce(WOWorkerThread.java:144)
   at 
com.webobjects.appserver._private.WOWorkerThread.run(WOWorkerThread.java:226)

   at java.lang.Thread.run(Thread.java:619)

Please suggest how to use more than 2 WOBrowsers in the same page.

Regards,
JPK.


 ___
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 arch...@mail-archive.com


Re: SOLVED Re: Flattened many-to-many with WOBrowser

2011-02-05 Thread Ray Kiddy

On Feb 5, 2011, at 3:08 PM, James Cicenia wrote:

> I think the relationship was wrong... I regenerated it and then it worked.
> 
> thanks

I have had this problem. I griped about it in a thread within the last year or 
so. I had the propagate primary key set weirdly and the WOLips tools did not 
respond to my off-kilter suggestions.

I find that once I make sure the intermediate relationships are not class 
properties and set the propagate primary key to both joins and set the deletion 
policy correctly, things always end up working. I think Mike told me to just do 
the setup in the normal way and get over myself with my weird setup.

The validation warnings from the tools are not very smart about many-to-many 
relationships, or so it seems to me.

- ray

> 
> On Feb 5, 2011, at 4:42 PM, James Cicenia wrote:
> 
>> Yes.
>> 
>> The list is using localInstanceOfObjects
>> 
>> James
>> 
>> On Feb 5, 2011, at 4:36 PM, Paul D Yu wrote:
>> 
>>> Are they in the same editingContext?
>>> 
>>> Paul
>>> On Feb 5, 2011, at 5:27 PM, James Cicenia wrote:
>>> 
>>>> Here is the error:
>>>> 
>>>> A valid global ID could not be obtained for entity named 
>>>> PortfolioProjectPortfolioProject, relationship named childProjects, 
>>>> primary key dictionary {childProjectRowId = 69063; }
>>>> 
>>>> 
>>>> The project with that row id (69063) does exist and would be the correct 
>>>> one.
>>>> 
>>>> WOBrowser:
>>>> childProjects: WOBrowser {
>>>>displayString = aChildProject.title;
>>>>item = aChildProject;
>>>>list = possibleChildProjects;
>>>>selections = theNewProjectItem.childProjects;
>>>>multiple = true;
>>>> }
>>>> 
>>>> theNewProjectItem.childProjects is the "flattened relationship".
>>>> 
>>>> What am I missing here?
>>>> Thanks
>>>> James Cicenia
>>>> 
>>>> 
>>>> ___
>>>> 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/pyu%40mac.com
>>>> 
>>>> This email sent to p...@mac.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:
> http://lists.apple.com/mailman/options/webobjects-dev/ray%40ganymede.org
> 
> This email sent to r...@ganymede.org

 ___
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 arch...@mail-archive.com

Re: Flattened many-to-many with WOBrowser

2011-02-05 Thread David Avendasora
Hi James,

When you flatten a Many to Many, I believe that EOF expects that it is a 
compound PK, and that is what it is trying to find. I appears that you have an 
independent PK for that join table. Either remove the flattening, or use a 
compound PK.

I really dislike compound PKs, but sometimes, you just have to let EOF do it's 
thing.

Dave

On Feb 5, 2011, at 5:27 PM, James Cicenia wrote:

> Here is the error:
> 
> A valid global ID could not be obtained for entity named 
> PortfolioProjectPortfolioProject, relationship named childProjects, primary 
> key dictionary {childProjectRowId = 69063; }
> 
> 
> The project with that row id (69063) does exist and would be the correct one.
> 
> WOBrowser:
> childProjects: WOBrowser {
>   displayString = aChildProject.title;
>   item = aChildProject;
>   list = possibleChildProjects;
>   selections = theNewProjectItem.childProjects;
>   multiple = true;
> }
> 
> theNewProjectItem.childProjects is the "flattened relationship".
> 
> What am I missing here?
> Thanks
> James Cicenia
> 
> 
> ___
> 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/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

SOLVED Re: Flattened many-to-many with WOBrowser

2011-02-05 Thread James Cicenia
I think the relationship was wrong... I regenerated it and then it worked.

thanks

On Feb 5, 2011, at 4:42 PM, James Cicenia wrote:

> Yes.
> 
> The list is using localInstanceOfObjects
> 
> James
> 
> On Feb 5, 2011, at 4:36 PM, Paul D Yu wrote:
> 
>> Are they in the same editingContext?
>> 
>> Paul
>> On Feb 5, 2011, at 5:27 PM, James Cicenia wrote:
>> 
>>> Here is the error:
>>> 
>>> A valid global ID could not be obtained for entity named 
>>> PortfolioProjectPortfolioProject, relationship named childProjects, primary 
>>> key dictionary {childProjectRowId = 69063; }
>>> 
>>> 
>>> The project with that row id (69063) does exist and would be the correct 
>>> one.
>>> 
>>> WOBrowser:
>>> childProjects: WOBrowser {
>>> displayString = aChildProject.title;
>>> item = aChildProject;
>>> list = possibleChildProjects;
>>> selections = theNewProjectItem.childProjects;
>>> multiple = true;
>>> }
>>> 
>>> theNewProjectItem.childProjects is the "flattened relationship".
>>> 
>>> What am I missing here?
>>> Thanks
>>> James Cicenia
>>> 
>>> 
>>> ___
>>> 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/pyu%40mac.com
>>> 
>>> This email sent to p...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Flattened many-to-many with WOBrowser

2011-02-05 Thread James Cicenia
Yes.

The list is using localInstanceOfObjects

James

On Feb 5, 2011, at 4:36 PM, Paul D Yu wrote:

> Are they in the same editingContext?
> 
> Paul
> On Feb 5, 2011, at 5:27 PM, James Cicenia wrote:
> 
>> Here is the error:
>> 
>> A valid global ID could not be obtained for entity named 
>> PortfolioProjectPortfolioProject, relationship named childProjects, primary 
>> key dictionary {childProjectRowId = 69063; }
>> 
>> 
>> The project with that row id (69063) does exist and would be the correct one.
>> 
>> WOBrowser:
>> childProjects: WOBrowser {
>>  displayString = aChildProject.title;
>>  item = aChildProject;
>>  list = possibleChildProjects;
>>  selections = theNewProjectItem.childProjects;
>>  multiple = true;
>> }
>> 
>> theNewProjectItem.childProjects is the "flattened relationship".
>> 
>> What am I missing here?
>> Thanks
>> James Cicenia
>> 
>> 
>> ___
>> 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/pyu%40mac.com
>> 
>> This email sent to p...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Flattened many-to-many with WOBrowser

2011-02-05 Thread Paul D Yu
Are they in the same editingContext?

Paul
On Feb 5, 2011, at 5:27 PM, James Cicenia wrote:

> Here is the error:
> 
> A valid global ID could not be obtained for entity named 
> PortfolioProjectPortfolioProject, relationship named childProjects, primary 
> key dictionary {childProjectRowId = 69063; }
> 
> 
> The project with that row id (69063) does exist and would be the correct one.
> 
> WOBrowser:
> childProjects: WOBrowser {
>   displayString = aChildProject.title;
>   item = aChildProject;
>   list = possibleChildProjects;
>   selections = theNewProjectItem.childProjects;
>   multiple = true;
> }
> 
> theNewProjectItem.childProjects is the "flattened relationship".
> 
> What am I missing here?
> Thanks
> James Cicenia
> 
> 
> ___
> 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/pyu%40mac.com
> 
> This email sent to p...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Flattened many-to-many with WOBrowser

2011-02-05 Thread James Cicenia
Here is the error:

A valid global ID could not be obtained for entity named 
PortfolioProjectPortfolioProject, relationship named childProjects, primary key 
dictionary {childProjectRowId = 69063; }


The project with that row id (69063) does exist and would be the correct one.

WOBrowser:
childProjects: WOBrowser {
displayString = aChildProject.title;
item = aChildProject;
list = possibleChildProjects;
selections = theNewProjectItem.childProjects;
multiple = true;
}

theNewProjectItem.childProjects is the "flattened relationship".

What am I missing here?
Thanks
James Cicenia


 ___
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 arch...@mail-archive.com

RE: WOBrowser selections missing

2010-12-09 Thread Perry, Steven
Found the answer to this.   Apparently we don't want to have both displayString 
and value properties on our WOBrowser.
Removed value - works fine now - corrected version:

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = "width:270px";
}


From: webobjects-dev-bounces+steven.perry=c-e@lists.apple.com 
[mailto:webobjects-dev-bounces+steven.perry=c-e@lists.apple.com] On Behalf 
Of Perry, Steven
Sent: Wednesday, December 08, 2010 11:57 AM
To: webobjects-dev@lists.apple.com
Subject: RE: WOBrowser selections missing

Meant to mention - getting "_slowTakeValuesFromRequest() Value not in list" 
messages on the console when debugging.
Was not able to locate any info about that message.

From: webobjects-dev-bounces+steven.perry=c-e@lists.apple.com 
[mailto:webobjects-dev-bounces+steven.perry=c-e@lists.apple.com] On Behalf 
Of Perry, Steven
Sent: Wednesday, December 08, 2010 11:38 AM
To: webobjects-dev@lists.apple.com
Subject: WOBrowser selections missing

Having some WOBrowser weirdness, after upgrading from OS X 10.5 to 10.6 (Snow 
Leopard) and from WebObjects 5.3.x to 5.4.1.  This issue did not happen prior 
to the upgrade.  Problem is, the selected items from our WOBrowser are not 
being passed correctly to our Java code.

So I tried running this in Eclipse debug.  My WOBrowser has about 450 items in 
it.

* If I selected the first item in the list, selectedClientList contains 
the one item.  Cool.

* But if I selected any other item besides the first, 
selectedClientList is empty.

* And if I multi-select 3 or 4 items, sometimes selectedClientList is 
empty, and other times it will have just the first item I selected.

Any thoughts on what could be causing this?
Here's our WOBrowser.  "selectedClientList" is defined as public NSArray in the 
accompanying java class.

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = "width:270px";
value = currentClient.displayName;
}

Thanks!
 ___
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 arch...@mail-archive.com

RE: WOBrowser selections missing

2010-12-08 Thread Perry, Steven
Meant to mention - getting "_slowTakeValuesFromRequest() Value not in list" 
messages on the console when debugging.
Was not able to locate any info about that message.

From: webobjects-dev-bounces+steven.perry=c-e@lists.apple.com 
[mailto:webobjects-dev-bounces+steven.perry=c-e@lists.apple.com] On Behalf 
Of Perry, Steven
Sent: Wednesday, December 08, 2010 11:38 AM
To: webobjects-dev@lists.apple.com
Subject: WOBrowser selections missing

Having some WOBrowser weirdness, after upgrading from OS X 10.5 to 10.6 (Snow 
Leopard) and from WebObjects 5.3.x to 5.4.1.  This issue did not happen prior 
to the upgrade.  Problem is, the selected items from our WOBrowser are not 
being passed correctly to our Java code.

So I tried running this in Eclipse debug.  My WOBrowser has about 450 items in 
it.

* If I selected the first item in the list, selectedClientList contains 
the one item.  Cool.

* But if I selected any other item besides the first, 
selectedClientList is empty.

* And if I multi-select 3 or 4 items, sometimes selectedClientList is 
empty, and other times it will have just the first item I selected.

Any thoughts on what could be causing this?
Here's our WOBrowser.  "selectedClientList" is defined as public NSArray in the 
accompanying java class.

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = "width:270px";
value = currentClient.displayName;
}

Thanks!
 ___
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 arch...@mail-archive.com

WOBrowser selections missing

2010-12-08 Thread Perry, Steven
Having some WOBrowser weirdness, after upgrading from OS X 10.5 to 10.6 (Snow 
Leopard) and from WebObjects 5.3.x to 5.4.1.  This issue did not happen prior 
to the upgrade.  Problem is, the selected items from our WOBrowser are not 
being passed correctly to our Java code.

So I tried running this in Eclipse debug.  My WOBrowser has about 450 items in 
it.

* If I selected the first item in the list, selectedClientList contains 
the one item.  Cool.

* But if I selected any other item besides the first, 
selectedClientList is empty.

* And if I multi-select 3 or 4 items, sometimes selectedClientList is 
empty, and other times it will have just the first item I selected.

Any thoughts on what could be causing this?
Here's our WOBrowser.  "selectedClientList" is defined as public NSArray in the 
accompanying java class.

Browser3: WOBrowser {
displayString = currentClient.displayName;
item = currentClient;
list = clientList;
multiple = true;
selections = selectedClientList;
style = "width:270px";
value = currentClient.displayName;
}

Thanks!
 ___
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 arch...@mail-archive.com

Re: Ajaxy WOBrowser-based ToMany Editor

2010-11-12 Thread Hugi Thordarson
You're welcome :). Note that the URL was for a changeset so make sure you fetch 
the most recent version, I made a couple of improvements.

And here's your pony.

.,,.
 ,;;*,
.-'``;-');;.
   /'  .-.  /*;;
 .'\d\;;   .;;;,
/ o  `\;,__. ,;*;;;*;,
\__, _.__,'   \_.-') __)--.;*,
 `""`;;;\   /-')_) __)  `\' ';;
;*;;;-') `)_)  |\ |  *;
|`---`O | | ;;*;;;
*;*;\| O  / ;*
   ;/|.---\  / ;*;
  ;;;*;/ \|'.   (`. ;;;*;;;
  ;'. ;   |  )   \ | ;;
  ,;*\/   |./   /` | ';;;*;
   ;;/|/   /   /__/   ';;;
   '*;;*/ |   /|  ;*;
```` ;'

- hugi


On 12.11.2010, at 13:40, David Avendasora wrote:

> You rock Hugi!
> 
> This is way more complete than I had come up with so far! Next on my list is 
> to D2Wify it for ERModernLook integration.
> 
> Oh, and if Maven hasn't finished with internet.jar, I'd like a Pony also.
> 
> Not for me, of course, but for David LeBer. He really wants one.
> 
> Dave
> 
> 
> On Nov 12, 2010, at 6:46 AM, Hugi Thordarson wrote:
> 
>> Hey David,
>> I made you this while waiting for Maven to download internet.jar.
>> 
>> https://bitbucket.org/hugi/uswebobjects/changeset/ae9d5e3c675e
>> 
>> The .html is just bare bones, though - you'll have to add your own css.
>> 
>> Enjoy,
>> - hugi
>> 
>> 
>> 
>> On 12.11.2010, at 11:18, David Avendasora wrote:
>> 
>>> Yeah, that's exactly what I'm working on implementing. I was just wondering 
>>> if anyone else had already done it in a nice CSS/Ajaxy way so I could get a 
>>> jump start.
>>> 
>>> I'm trying to put it together in such a way that it is generic enough that 
>>> it would work for anyone so it can be easily dropped in to any project.
>>> 
>>> Dave
>>> 
>>> On Nov 11, 2010, at 4:46 PM, James Cicenia wrote:
>>> 
 I did something like this because I found no ajax editor like it.
 
 Used AjaxSubmitButtons with 
updateContainerID =  "DialogContainer";
 2 WOBrowsers
 Wrapped the whole thing in an AjaxUpdateContainer
 
 - James
 
 
 On Nov 11, 2010, at 10:43 AM, David Avendasora wrote:
 
> Hi all,
> 
> I'm looking for an Ajax-based toMany relationship editor that uses two 
> WOBrowsers to add/remove objects from the relationship. Something that 
> will give me roughly:
> 
> 
> 
> I looked in Wonder and couldn't find anything.
> 
> I'm sure others have implemented this before. Before I go implementing 
> this, is anyone willing to share?
> 
> Thanks!
> 
> Dave ___
> 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/james%40jimijon.com
> 
> This email sent to 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:
 http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
 
 This email sent to webobje...@avendasora.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:
>>> http://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is
>>> 
>>> This email sent to h...@karlmenn.is
>> 
> 

 ___
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 arch...@mail-archive.com


Re: Ajaxy WOBrowser-based ToMany Editor

2010-11-12 Thread David Avendasora
You rock Hugi!

This is way more complete than I had come up with so far! Next on my list is to 
D2Wify it for ERModernLook integration.

Oh, and if Maven hasn't finished with internet.jar, I'd like a Pony also.

Not for me, of course, but for David LeBer. He really wants one.

Dave


On Nov 12, 2010, at 6:46 AM, Hugi Thordarson wrote:

> Hey David,
> I made you this while waiting for Maven to download internet.jar.
> 
> https://bitbucket.org/hugi/uswebobjects/changeset/ae9d5e3c675e
> 
> The .html is just bare bones, though - you'll have to add your own css.
> 
> Enjoy,
> - hugi
> 
> 
> 
> On 12.11.2010, at 11:18, David Avendasora wrote:
> 
>> Yeah, that's exactly what I'm working on implementing. I was just wondering 
>> if anyone else had already done it in a nice CSS/Ajaxy way so I could get a 
>> jump start.
>> 
>> I'm trying to put it together in such a way that it is generic enough that 
>> it would work for anyone so it can be easily dropped in to any project.
>> 
>> Dave
>> 
>> On Nov 11, 2010, at 4:46 PM, James Cicenia wrote:
>> 
>>> I did something like this because I found no ajax editor like it.
>>> 
>>> Used AjaxSubmitButtons with 
>>> updateContainerID =  "DialogContainer";
>>> 2 WOBrowsers
>>> Wrapped the whole thing in an AjaxUpdateContainer
>>> 
>>> - James
>>> 
>>> 
>>> On Nov 11, 2010, at 10:43 AM, David Avendasora wrote:
>>> 
 Hi all,
 
 I'm looking for an Ajax-based toMany relationship editor that uses two 
 WOBrowsers to add/remove objects from the relationship. Something that 
 will give me roughly:
 
 
 
 I looked in Wonder and couldn't find anything.
 
 I'm sure others have implemented this before. Before I go implementing 
 this, is anyone willing to share?
 
 Thanks!
 
 Dave ___
 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/james%40jimijon.com
 
 This email sent to 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:
>>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>>> 
>>> This email sent to webobje...@avendasora.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:
>> http://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is
>> 
>> This email sent to h...@karlmenn.is
> 

 ___
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 arch...@mail-archive.com

Re: Ajaxy WOBrowser-based ToMany Editor

2010-11-12 Thread Hugi Thordarson
Hey David,
I made you this while waiting for Maven to download internet.jar.

https://bitbucket.org/hugi/uswebobjects/changeset/ae9d5e3c675e

The .html is just bare bones, though - you'll have to add your own css.

Enjoy,
- hugi



On 12.11.2010, at 11:18, David Avendasora wrote:

> Yeah, that's exactly what I'm working on implementing. I was just wondering 
> if anyone else had already done it in a nice CSS/Ajaxy way so I could get a 
> jump start.
> 
> I'm trying to put it together in such a way that it is generic enough that it 
> would work for anyone so it can be easily dropped in to any project.
> 
> Dave
> 
> On Nov 11, 2010, at 4:46 PM, James Cicenia wrote:
> 
>> I did something like this because I found no ajax editor like it.
>> 
>> Used AjaxSubmitButtons with 
>>  updateContainerID =  "DialogContainer";
>> 2 WOBrowsers
>> Wrapped the whole thing in an AjaxUpdateContainer
>> 
>> - James
>> 
>> 
>> On Nov 11, 2010, at 10:43 AM, David Avendasora wrote:
>> 
>>> Hi all,
>>> 
>>> I'm looking for an Ajax-based toMany relationship editor that uses two 
>>> WOBrowsers to add/remove objects from the relationship. Something that will 
>>> give me roughly:
>>> 
>>> 
>>> 
>>> I looked in Wonder and couldn't find anything.
>>> 
>>> I'm sure others have implemented this before. Before I go implementing 
>>> this, is anyone willing to share?
>>> 
>>> Thanks!
>>> 
>>> Dave ___
>>> 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/james%40jimijon.com
>>> 
>>> This email sent to 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:
>> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
>> 
>> This email sent to webobje...@avendasora.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:
> http://lists.apple.com/mailman/options/webobjects-dev/hugi%40karlmenn.is
> 
> This email sent to h...@karlmenn.is

 ___
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 arch...@mail-archive.com

Re: Ajaxy WOBrowser-based ToMany Editor

2010-11-12 Thread David Avendasora
Yeah, that's exactly what I'm working on implementing. I was just wondering if 
anyone else had already done it in a nice CSS/Ajaxy way so I could get a jump 
start.

I'm trying to put it together in such a way that it is generic enough that it 
would work for anyone so it can be easily dropped in to any project.

Dave

On Nov 11, 2010, at 4:46 PM, James Cicenia wrote:

> I did something like this because I found no ajax editor like it.
> 
> Used AjaxSubmitButtons with 
>   updateContainerID =  "DialogContainer";
> 2 WOBrowsers
> Wrapped the whole thing in an AjaxUpdateContainer
> 
> - James
> 
> 
> On Nov 11, 2010, at 10:43 AM, David Avendasora wrote:
> 
>> Hi all,
>> 
>> I'm looking for an Ajax-based toMany relationship editor that uses two 
>> WOBrowsers to add/remove objects from the relationship. Something that will 
>> give me roughly:
>> 
>> 
>> 
>> I looked in Wonder and couldn't find anything.
>> 
>> I'm sure others have implemented this before. Before I go implementing this, 
>> is anyone willing to share?
>> 
>> Thanks!
>> 
>> Dave ___
>> 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/james%40jimijon.com
>> 
>> This email sent to 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:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Ajaxy WOBrowser-based ToMany Editor

2010-11-11 Thread James Cicenia
I did something like this because I found no ajax editor like it.

Used AjaxSubmitButtons with 
updateContainerID =  "DialogContainer";
2 WOBrowsers
Wrapped the whole thing in an AjaxUpdateContainer

- James


On Nov 11, 2010, at 10:43 AM, David Avendasora wrote:

> Hi all,
> 
> I'm looking for an Ajax-based toMany relationship editor that uses two 
> WOBrowsers to add/remove objects from the relationship. Something that will 
> give me roughly:
> 
> 
> 
> I looked in Wonder and couldn't find anything.
> 
> I'm sure others have implemented this before. Before I go implementing this, 
> is anyone willing to share?
> 
> Thanks!
> 
> Dave ___
> 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/james%40jimijon.com
> 
> This email sent to 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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: WOBrowser fails in Ajax.

2010-06-21 Thread Ricardo J. Parada
I'm pretty sure that's going to be it.  :-)



On Jun 21, 2010, at 6:25 PM, James Cicenia wrote:

> We'll seethat 's' sure looks suspicious but I am not yet convinced.
> 
> And, unfortunately, I can't test till my compatriots across the wire fix 
> their latest commit 
> 
> I will report back with my results. 
> 
> 
> 
> 
> - j-
> 
> On Jun 21, 2010, at 5:09 PM, Chuck Hill wrote:
> 
>> In dire situations like this, I sometimes resort to what I call "reading the 
>> documentation".  A radical approach, granted, and unmanly for certain, but 
>> sometimes successful.
>> 
>> selections
>> Array of objects that the user chose from list. For the college example, 
>> selections would hold college objects.
>> 
>> Notice the S on selections.  As in plural.  Does that work better?
>> 
>> 
>> Chuck
>> 
>> 
>> 
>> 
>> On Jun 21, 2010, at 2:18 PM, James Cicenia wrote:
>> 
>>> I have tried every combination and to no avail.
>>> 
>>> It just won't trigger the set method.
>>> 
>>> I am opening up a AjaxModalDialog, etc., and then trying
>>> every combination and setting to read and set a variable
>>> array, but it just won't set
>>> 
>>> It will call the get methods.
>>> 
>>> Latest version:
>>> 
>>> RiskProductsPopUp : WOBrowser{
>>> name = "RiskProductSelector";
>>> id = "RiskProductEditBrowser";
>>> multiple = true;
>>> size = 3;
>>> list = riskProductsList;
>>> class="MB_focusable MB_field width100";
>>> selection = selectedRiskProducts;
>>> }
>>> 
>>> 
>>> public void setSelectedRiskProducts(NSArray riskProductNames){
>>> System.out.println("Array: "+ riskProductNames);
>>> }
>>> 
>>> Thanks 
>>> James
>>> ___
>>> 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 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/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/rparada%40mac.com
> 
> This email sent to rpar...@mac.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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


Re: WOBrowser fails in Ajax.

2010-06-21 Thread James Cicenia
We'll seethat 's' sure looks suspicious but I am not yet convinced.

And, unfortunately, I can't test till my compatriots across the wire fix their 
latest commit 

I will report back with my results. 




- j-

On Jun 21, 2010, at 5:09 PM, Chuck Hill wrote:

> In dire situations like this, I sometimes resort to what I call "reading the 
> documentation".  A radical approach, granted, and unmanly for certain, but 
> sometimes successful.
> 
> selections
> Array of objects that the user chose from list. For the college example, 
> selections would hold college objects.
> 
> Notice the S on selections.  As in plural.  Does that work better?
> 
> 
> Chuck
> 
> 
> 
> 
> On Jun 21, 2010, at 2:18 PM, James Cicenia wrote:
> 
>> I have tried every combination and to no avail.
>> 
>> It just won't trigger the set method.
>> 
>> I am opening up a AjaxModalDialog, etc., and then trying
>> every combination and setting to read and set a variable
>> array, but it just won't set
>> 
>> It will call the get methods.
>> 
>> Latest version:
>> 
>> RiskProductsPopUp : WOBrowser{
>>  name = "RiskProductSelector";
>>  id = "RiskProductEditBrowser";
>>  multiple = true;
>>  size = 3;
>>  list = riskProductsList;
>>  class="MB_focusable MB_field width100";
>>  selection = selectedRiskProducts;
>> }
>> 
>> 
>>  public void setSelectedRiskProducts(NSArray riskProductNames){
>>  System.out.println("Array: "+ riskProductNames);
>>  }
>> 
>> Thanks 
>> James
>> ___
>> 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 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/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 arch...@mail-archive.com


Re: WOBrowser fails in Ajax.

2010-06-21 Thread Chuck Hill
In dire situations like this, I sometimes resort to what I call "reading the 
documentation".  A radical approach, granted, and unmanly for certain, but 
sometimes successful.

selections
Array of objects that the user chose from list. For the college example, 
selections would hold college objects.

Notice the S on selections.  As in plural.  Does that work better?


Chuck




On Jun 21, 2010, at 2:18 PM, James Cicenia wrote:

> I have tried every combination and to no avail.
> 
> It just won't trigger the set method.
> 
> I am opening up a AjaxModalDialog, etc., and then trying
> every combination and setting to read and set a variable
> array, but it just won't set
> 
> It will call the get methods.
> 
> Latest version:
> 
> RiskProductsPopUp : WOBrowser{
>   name = "RiskProductSelector";
>   id = "RiskProductEditBrowser";
>   multiple = true;
>   size = 3;
>   list = riskProductsList;
>   class="MB_focusable MB_field width100";
>   selection = selectedRiskProducts;
> }
> 
> 
>   public void setSelectedRiskProducts(NSArray riskProductNames){
>   System.out.println("Array: "+ riskProductNames);
>   }
> 
> Thanks 
> James
> ___
> 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 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/products/practical_webobjects









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 arch...@mail-archive.com

WOBrowser fails in Ajax.

2010-06-21 Thread James Cicenia
I have tried every combination and to no avail.

It just won't trigger the set method.

I am opening up a AjaxModalDialog, etc., and then trying
every combination and setting to read and set a variable
array, but it just won't set

It will call the get methods.

Latest version:

RiskProductsPopUp : WOBrowser{
  name = "RiskProductSelector";
  id = "RiskProductEditBrowser";
  multiple = true;
  size = 3;
  list = riskProductsList;
  class="MB_focusable MB_field width100";
  selection = selectedRiskProducts;
}


public void setSelectedRiskProducts(NSArray riskProductNames){
System.out.println("Array: "+ riskProductNames);
}

Thanks 
James ___
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 arch...@mail-archive.com

Re: Now odd WOBrowser behavior.

2010-06-08 Thread James Cicenia
nope.. the WOPopUps that are above and below it work great.

I even made a public selectedRiskProduct and that stays null too.

I am sure it has to do with the Ajax ...



On Jun 8, 2010, at 2:59 PM, Ramsey Gurley wrote:

> Usually, for me, that means I forgot to include it inside a Form element.
> 
> On Jun 8, 2010, at 3:53 PM, James Cicenia wrote:
> 
>> The getter works but this setter never gets called? I removed the name tag 
>> too;
>> 
>>  public void setSelectedRiskProducts(NSMutableArray products){
>>  String ids = "";
>>  for(int i = 0;i>  ..
>>  }
>>  riskProductsString = ids;
>>  }
>> 
>> 
>> RiskProductsPopUp : WOBrowser {
>>   multiple = true;   
>>   size = 3;
>>   list = riskProductsList;
>>   item = aRiskProduct;
>>   class="MB_focusable MB_field width100";
>>   selection = selectedRiskProducts;
>>   displayString = aRiskProduct.displayName;
>>   noSelectionString = "- risk product -";
>> }
>> 
>> thoughts?
>> ___
>> 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/ramsey%40xeotech.com
>> 
>> This email sent to ram...@xeotech.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Re: Now odd WOBrowser behavior.

2010-06-08 Thread Ramsey Gurley
Usually, for me, that means I forgot to include it inside a Form  
element.


On Jun 8, 2010, at 3:53 PM, James Cicenia wrote:

The getter works but this setter never gets called? I removed the  
name tag too;


public void setSelectedRiskProducts(NSMutableArray products){
String ids = "";
for(int i = 0;ihttp://lists.apple.com/mailman/options/webobjects-dev/ramsey%40xeotech.com

This email sent to ram...@xeotech.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:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

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

Now odd WOBrowser behavior.

2010-06-08 Thread James Cicenia
The getter works but this setter never gets called? I removed the name tag too;

public void setSelectedRiskProducts(NSMutableArray products){
String ids = "";
for(int i = 0;i ___
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 arch...@mail-archive.com

Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-14 Thread Alexander Spohr


Am 12.02.2008 um 14:14 schrieb Sennikov, Dimitri:


I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.


Are you sure, your model has a relationship?
It sounds, like you try to have an NSArray as a column, not as a  
relationship?



From Entity Modeler, the relationship is represented by departmentIDs
column with the following settings:


A COLUMN can not be a relationship.


Prototype - mutableArray
External Type - BLOB
Allows Null - is set
Data Type - Custom


What is that for?
Do you want to store the names of your departments in that?



Class - er.extensions.ERXMutableArray
Factory Method - fromBlob
Conversion Method - toBlob


Are you converting the blobs somewhere? What do they contain?


Here's my WOBrowser object:

DepartmentList : WOBrowser {
list = departmentDisplayGroup.displayedObjects;
item = department;
displayString = department.name;
selections = user.departments;


Is user.departments your blob? That will not work.


multiple = true;
size = 6;
}



A relationship is a join, not a column.
Your following sentence is not true:

I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.


If one user can have many departments and multiple users can have the  
same departments, you have a n-m, and nothing else.


You need a m-n table in your database (USER_DEPT) and connect User and  
Department with a 1-n to it.


atze



___
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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Mike Schrag
I ran into with PK's with FB -- granted it was, I believe, because of  
that bug in the plugin (that was my own fault to begin with) that was  
misconverting between Integer and Long PKs, making EOF think the PK  
had changed.  Other than I think you are right.  But I thought I'd  
toss it out there for the sake of science.


ms

On Feb 12, 2008, at 4:02 PM, Chuck Hill wrote:

You mean FK?  I have not seen many problems with PKs, but FKs as  
class properties is asking for trouble.  "Ask and ye shall  
receive." :-)


Chuck


On Feb 12, 2008, at 12:58 PM, Mike Schrag wrote:

Is your PK a class property?  Does it need to be?  I have seen  
problems before with PK as a class property that EOF tries to  
overwrite (this is not supposed to happen, but you decrease your  
odds by making it a non-class property).  On your relationship, are  
you setting propagates primary key and/or owns destination?  That  
can have an impact on how PK's are treated as well.


On Feb 12, 2008, at 3:51 PM, Chuck Hill wrote:


Maybe Anjo knows.  :-)

What are the delete rules?  I have seen this sort of thing before,  
but I can't recall what caused it.


Chuck


On Feb 12, 2008, at 12:35 PM, Sennikov, Dimitri wrote:


Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see  
much

change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String  
departmentName from

the WOBrowser.

I then fetch Department EO from the database using departmentName  
and

use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-Original Message-
From: Anjo Krank [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:

Using mutable classes as attributes is a very, very, very bad  
idea.

I know, I have tried it.  EOF expects attributes to be immutable.
Make it immutable and add cover methods to add and remove items.
Until you fix this, there is no point in looking at the "ID  
getting

set to null" problem.


Pay no heed to Chuck's ramblings. You should be OK as long as your
don't change the array directly. It would be best if you defined  
your

accessors an returning NSArray.

Cheers, Anjo



--

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/mschrag%40mdimension.com

This email sent to [EMAIL PROTECTED]






--

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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Chuck Hill
You mean FK?  I have not seen many problems with PKs, but FKs as  
class properties is asking for trouble.  "Ask and ye shall receive." :-)


Chuck


On Feb 12, 2008, at 12:58 PM, Mike Schrag wrote:

Is your PK a class property?  Does it need to be?  I have seen  
problems before with PK as a class property that EOF tries to  
overwrite (this is not supposed to happen, but you decrease your  
odds by making it a non-class property).  On your relationship, are  
you setting propagates primary key and/or owns destination?  That  
can have an impact on how PK's are treated as well.


On Feb 12, 2008, at 3:51 PM, Chuck Hill wrote:


Maybe Anjo knows.  :-)

What are the delete rules?  I have seen this sort of thing before,  
but I can't recall what caused it.


Chuck


On Feb 12, 2008, at 12:35 PM, Sennikov, Dimitri wrote:


Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see  
much

change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String  
departmentName from

the WOBrowser.

I then fetch Department EO from the database using departmentName  
and

use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-Original Message-
From: Anjo Krank [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:


Using mutable classes as attributes is a very, very, very bad idea.
I know, I have tried it.  EOF expects attributes to be immutable.
Make it immutable and add cover methods to add and remove items.
Until you fix this, there is no point in looking at the "ID getting
set to null" problem.


Pay no heed to Chuck's ramblings. You should be OK as long as your
don't change the array directly. It would be best if you defined  
your

accessors an returning NSArray.

Cheers, Anjo



--

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/mschrag% 
40mdimension.com


This email sent to [EMAIL PROTECTED]






--

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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Mike Schrag
Is your PK a class property?  Does it need to be?  I have seen  
problems before with PK as a class property that EOF tries to  
overwrite (this is not supposed to happen, but you decrease your odds  
by making it a non-class property).  On your relationship, are you  
setting propagates primary key and/or owns destination?  That can have  
an impact on how PK's are treated as well.


On Feb 12, 2008, at 3:51 PM, Chuck Hill wrote:


Maybe Anjo knows.  :-)

What are the delete rules?  I have seen this sort of thing before,  
but I can't recall what caused it.


Chuck


On Feb 12, 2008, at 12:35 PM, Sennikov, Dimitri wrote:


Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see much
change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String departmentName  
from

the WOBrowser.

I then fetch Department EO from the database using departmentName and
use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-Original Message-
From: Anjo Krank [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:


Using mutable classes as attributes is a very, very, very bad idea.
I know, I have tried it.  EOF expects attributes to be immutable.
Make it immutable and add cover methods to add and remove items.
Until you fix this, there is no point in looking at the "ID getting
set to null" problem.


Pay no heed to Chuck's ramblings. You should be OK as long as your
don't change the array directly. It would be best if you defined your
accessors an returning NSArray.

Cheers, Anjo



--

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/mschrag%40mdimension.com

This email sent to [EMAIL PROTECTED]



___
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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Chuck Hill

Maybe Anjo knows.  :-)

What are the delete rules?  I have seen this sort of thing before,  
but I can't recall what caused it.


Chuck


On Feb 12, 2008, at 12:35 PM, Sennikov, Dimitri wrote:


Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see much
change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String departmentName  
from

the WOBrowser.

I then fetch Department EO from the database using departmentName and
use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-Original Message-
From: Anjo Krank [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:


Using mutable classes as attributes is a very, very, very bad idea.
I know, I have tried it.  EOF expects attributes to be immutable.
Make it immutable and add cover methods to add and remove items.
Until you fix this, there is no point in looking at the "ID getting
set to null" problem.


Pay no heed to Chuck's ramblings. You should be OK as long as your
don't change the array directly. It would be best if you defined your
accessors an returning NSArray.

Cheers, Anjo



--

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 [EMAIL PROTECTED]


RE: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Sennikov, Dimitri
Thanks,

Due to lack of other options, I have tried switching to using No
Prototype and setting a custom Data Type to NSArray. I don't see much
change and it still ends up trying to NULLIFY the department IDs.

I have also tried now to no success passing a String departmentName from
the WOBrowser.

I then fetch Department EO from the database using departmentName and
use addObjectToBothSidesOfRelationshipWithKey(departmentEO,
"departments");

It still produces the SET ID = NULL erroneous sql statement.

Chuck, any suggestions now that it is immutable type?

Any input is appreciated.

Dmitri

-Original Message-
From: Anjo Krank [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 3:04 PM
To: Chuck Hill
Cc: Sennikov, Dimitri; WebObjects Dev Apple
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:

> Using mutable classes as attributes is a very, very, very bad idea.   
> I know, I have tried it.  EOF expects attributes to be immutable.   
> Make it immutable and add cover methods to add and remove items.   
> Until you fix this, there is no point in looking at the "ID getting  
> set to null" problem.

Pay no heed to Chuck's ramblings. You should be OK as long as your  
don't change the array directly. It would be best if you defined your  
accessors an returning NSArray.

Cheers, Anjo
 ___
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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Anjo Krank

Dimitri,

Am 12.02.2008 um 20:47 schrieb Chuck Hill:

Using mutable classes as attributes is a very, very, very bad idea.   
I know, I have tried it.  EOF expects attributes to be immutable.   
Make it immutable and add cover methods to add and remove items.   
Until you fix this, there is no point in looking at the "ID getting  
set to null" problem.


Pay no heed to Chuck's ramblings. You should be OK as long as your  
don't change the array directly. It would be best if you defined your  
accessors an returning NSArray.


Cheers, Anjo
___
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 [EMAIL PROTECTED]


Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Chuck Hill

Dimitri,


On Feb 12, 2008, at 5:14 AM, Sennikov, Dimitri wrote:


Brian,

I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.

And contrary to your statement, the EOF is only setting ID column to
NULL for the items that have been selected. If I don't select any  
items,

the saveChanges is completed successfully.


From Entity Modeler, the relationship is represented by departmentIDs

column with the following settings:

Prototype - mutableArray


=8-0  Noo!



External Type - BLOB
Allows Null - is set
Data Type - Custom

Class - er.extensions.ERXMutableArray
Factory Method - fromBlob
Conversion Method - toBlob

This is just in case, I'm not sure how helpful this information may be
in this case.


Using mutable classes as attributes is a very, very, very bad idea.   
I know, I have tried it.  EOF expects attributes to be immutable.   
Make it immutable and add cover methods to add and remove items.   
Until you fix this, there is no point in looking at the "ID getting  
set to null" problem.



Chuck



-Original Message-
From: Brian Lakeman [mailto:[EMAIL PROTECTED]
Sent: Monday, February 11, 2008 9:16 PM
To: Sennikov, Dimitri
Cc: webobjects-dev@lists.apple.com
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

It appears that EOF is attempt to set the ID column to null for the
items that are no longer part of the selection, and the Department
table doesn't allow the ID column to be null.

Is there a many-to-many relationship between User and Department?
Are there many users in the same department?

-Brian

On Feb 11, 2008, at 2:18 PM, Sennikov, Dimitri wrote:


Hi,

I have a 1-to-many relationship (User ->> Departments). With either
WOBrowser or WOCheckBoxList, whenever a department is selected, an
error
is produced when trying to save User where WebObjects is trying to
overwrite the selected department's ID (primary key), "UPDATE
WA_Departments SET id = NULL WHERE (id = ? AND description = ? AND
managerID is NULL AND name = ?)" withBindings: 1:2(id),
2:"Engineering"(description), 3:"Engineering"(name).

Has anybody got same error and is there a known workaround other than
creating custom WORepetition? I'm developing on Eclipse/WOLips on
Windows and would like to get this to work because I have many more
components to come that will require same kind of functionality, and
frankly WOBrowser is much easier than WORepetition with manual item
processing.

Here's my WOBrowser object:

DepartmentList : WOBrowser {
list = departmentDisplayGroup.displayedObjects;
item = department;
displayString = department.name;
selections = user.departments;
multiple = true;
size = 6;
}

Here's the error stack trace:

Application:  WebApp
Error:  com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:23000 -- error
code: 1048 -- msg: Column 'id' cannot be null
Reason:  EvaluateExpression failed:
: Next
exception:SQL
State:23000 -- error code: 1048 -- msg: Column 'id' cannot be null
Stack trace:  File Line# Method Package

- 
-



--


EODatabaseContext.java 4500
_exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess
EODatabaseContext.java 6212 performChanges com.webobjects.eoaccess
EOObjectStoreCoordinator.java 371 saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java 3176 saveChanges com.webobjects.eocontrol
EditUser.java 95 SaveUser dyn.webapp.components
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java NA invoke sun.reflect
DelegatingMethodAccessorImpl.java NA invoke sun.reflect
Method.java NA invoke java.lang.reflect
NSKeyValueCoding.java 636 methodValue com.webobjects.foundation
NSKeyValueCoding.java 1134 valueInObject com.webobjects.foundation
NSKeyValueCoding.java 1293 valueForKey com.webobjects.foundation
WOComponent.java 1686 valueForKey com.webobjects.appserver
NSKeyValueCoding.java 447 valueForKey com.webobjects.foundation
NSKeyValueCodingAdditions.java 212 valueForKeyPath
com.webobjects.foundation
WOComponent.java 1754 valueForKeyPath com.webobjects.appserver
EditUser.java 87 valueForKeyPath dyn.webapp.components
WOKeyValueAssociation.java 50 valueInComponent
com.webobjects.appserver._private
WOSubmitButton.java 70 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction  
com.webobjects.appserver._private

WOForm.java 134 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction  
com.webobjects.appserver._private

WOComponent.java

RE: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-12 Thread Sennikov, Dimitri
Brian,

I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.

And contrary to your statement, the EOF is only setting ID column to
NULL for the items that have been selected. If I don't select any items,
the saveChanges is completed successfully.

>From Entity Modeler, the relationship is represented by departmentIDs
column with the following settings:

Prototype - mutableArray
External Type - BLOB
Allows Null - is set
Data Type - Custom

Class - er.extensions.ERXMutableArray
Factory Method - fromBlob
Conversion Method - toBlob

This is just in case, I'm not sure how helpful this information may be
in this case.

Thanks!

Dmitri

-Original Message-
From: Brian Lakeman [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 9:16 PM
To: Sennikov, Dimitri
Cc: webobjects-dev@lists.apple.com
Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList

Dimitri,

It appears that EOF is attempt to set the ID column to null for the  
items that are no longer part of the selection, and the Department  
table doesn't allow the ID column to be null.

Is there a many-to-many relationship between User and Department?   
Are there many users in the same department?

-Brian

On Feb 11, 2008, at 2:18 PM, Sennikov, Dimitri wrote:

> Hi,
>
> I have a 1-to-many relationship (User ->> Departments). With either
> WOBrowser or WOCheckBoxList, whenever a department is selected, an  
> error
> is produced when trying to save User where WebObjects is trying to
> overwrite the selected department's ID (primary key), "UPDATE
> WA_Departments SET id = NULL WHERE (id = ? AND description = ? AND
> managerID is NULL AND name = ?)" withBindings: 1:2(id),
> 2:"Engineering"(description), 3:"Engineering"(name).
>
> Has anybody got same error and is there a known workaround other than
> creating custom WORepetition? I'm developing on Eclipse/WOLips on
> Windows and would like to get this to work because I have many more
> components to come that will require same kind of functionality, and
> frankly WOBrowser is much easier than WORepetition with manual item
> processing.
>
> Here's my WOBrowser object:
>
> DepartmentList : WOBrowser {
>   list = departmentDisplayGroup.displayedObjects;
>   item = department;
>   displayString = department.name;
>   selections = user.departments;
>   multiple = true;
>   size = 6;
> }
>
> Here's the error stack trace:
>
> Application:  WebApp
> Error:  com.webobjects.eoaccess.EOGeneralAdaptorException:
> EvaluateExpression failed: : Next exception:SQL State:23000 -- error
> code: 1048 -- msg: Column 'id' cannot be null
> Reason:  EvaluateExpression failed:
>  WA_Departments SET id = NULL WHERE (id = ? AND description = ? AND
> managerID is NULL AND name = ?)" withBindings: 1:2(id),
> 2:"Engineering"(description), 3:"Engineering"(name)>: Next  
> exception:SQL
> State:23000 -- error code: 1048 -- msg: Column 'id' cannot be null
> Stack trace:  File Line# Method Package
>
> --

> --
> 
>
> EODatabaseContext.java 4500
> _exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess
> EODatabaseContext.java 6212 performChanges com.webobjects.eoaccess
> EOObjectStoreCoordinator.java 371 saveChangesInEditingContext
> com.webobjects.eocontrol
> EOEditingContext.java 3176 saveChanges com.webobjects.eocontrol
> EditUser.java 95 SaveUser dyn.webapp.components
> NativeMethodAccessorImpl.java NA invoke0 sun.reflect
> NativeMethodAccessorImpl.java NA invoke sun.reflect
> DelegatingMethodAccessorImpl.java NA invoke sun.reflect
> Method.java NA invoke java.lang.reflect
> NSKeyValueCoding.java 636 methodValue com.webobjects.foundation
> NSKeyValueCoding.java 1134 valueInObject com.webobjects.foundation
> NSKeyValueCoding.java 1293 valueForKey com.webobjects.foundation
> WOComponent.java 1686 valueForKey com.webobjects.appserver
> NSKeyValueCoding.java 447 valueForKey com.webobjects.foundation
> NSKeyValueCodingAdditions.java 212 valueForKeyPath
> com.webobjects.foundation
> WOComponent.java 1754 valueForKeyPath com.webobjects.appserver
> EditUser.java 87 valueForKeyPath dyn.webapp.components
> WOKeyValueAssociation.java 50 valueInComponent
> com.webobjects.appserver._private
> WOSubmitButton.java 70 invokeAction com.webobjects.appserver._private
> WODynamicGroup.java 105 invokeChildrenAction
> com.webobjects.appserver._private
> WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private
> WOForm.java 134 invokeAction com.webobjects.appserver._priva

Re: Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-11 Thread Brian Lakeman

Dimitri,

It appears that EOF is attempt to set the ID column to null for the  
items that are no longer part of the selection, and the Department  
table doesn't allow the ID column to be null.


Is there a many-to-many relationship between User and Department?   
Are there many users in the same department?


-Brian

On Feb 11, 2008, at 2:18 PM, Sennikov, Dimitri wrote:


Hi,

I have a 1-to-many relationship (User ->> Departments). With either
WOBrowser or WOCheckBoxList, whenever a department is selected, an  
error

is produced when trying to save User where WebObjects is trying to
overwrite the selected department's ID (primary key), "UPDATE
WA_Departments SET id = NULL WHERE (id = ? AND description = ? AND
managerID is NULL AND name = ?)" withBindings: 1:2(id),
2:"Engineering"(description), 3:"Engineering"(name).

Has anybody got same error and is there a known workaround other than
creating custom WORepetition? I'm developing on Eclipse/WOLips on
Windows and would like to get this to work because I have many more
components to come that will require same kind of functionality, and
frankly WOBrowser is much easier than WORepetition with manual item
processing.

Here's my WOBrowser object:

DepartmentList : WOBrowser {
list = departmentDisplayGroup.displayedObjects;
item = department;
displayString = department.name;
selections = user.departments;
multiple = true;
size = 6;
}

Here's the error stack trace:

Application:  WebApp
Error:  com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:23000 -- error
code: 1048 -- msg: Column 'id' cannot be null
Reason:  EvaluateExpression failed:
2:"Engineering"(description), 3:"Engineering"(name)>: Next  
exception:SQL

State:23000 -- error code: 1048 -- msg: Column 'id' cannot be null
Stack trace:  File Line# Method Package

-- 
--



EODatabaseContext.java 4500
_exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess
EODatabaseContext.java 6212 performChanges com.webobjects.eoaccess
EOObjectStoreCoordinator.java 371 saveChangesInEditingContext
com.webobjects.eocontrol
EOEditingContext.java 3176 saveChanges com.webobjects.eocontrol
EditUser.java 95 SaveUser dyn.webapp.components
NativeMethodAccessorImpl.java NA invoke0 sun.reflect
NativeMethodAccessorImpl.java NA invoke sun.reflect
DelegatingMethodAccessorImpl.java NA invoke sun.reflect
Method.java NA invoke java.lang.reflect
NSKeyValueCoding.java 636 methodValue com.webobjects.foundation
NSKeyValueCoding.java 1134 valueInObject com.webobjects.foundation
NSKeyValueCoding.java 1293 valueForKey com.webobjects.foundation
WOComponent.java 1686 valueForKey com.webobjects.appserver
NSKeyValueCoding.java 447 valueForKey com.webobjects.foundation
NSKeyValueCodingAdditions.java 212 valueForKeyPath
com.webobjects.foundation
WOComponent.java 1754 valueForKeyPath com.webobjects.appserver
EditUser.java 87 valueForKeyPath dyn.webapp.components
WOKeyValueAssociation.java 50 valueInComponent
com.webobjects.appserver._private
WOSubmitButton.java 70 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private
WOForm.java 134 invokeAction com.webobjects.appserver._private
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private
WOComponent.java 1078 invokeAction com.webobjects.appserver
WOSession.java 1353 invokeAction com.webobjects.appserver
WOApplication.java 1736 invokeAction com.webobjects.appserver
WOComponentRequestHandler.java 206 _dispatchWithPreparedPage
com.webobjects.appserver._private
WOComponentRequestHandler.java 298 _dispatchWithPreparedSession
com.webobjects.appserver._private
WOComponentRequestHandler.java 332 _dispatchWithPreparedApplication
com.webobjects.appserver._private
WOComponentRequestHandler.java 369 _handleRequest
com.webobjects.appserver._private
WOComponentRequestHandler.java 442 handleRequest
com.webobjects.appserver._private
WOApplication.java 1678 dispatchRequest com.webobjects.appserver
WOWorkerThread.java 144 runOnce com.webobjects.appserver._private
WOWorkerThread.java 226 run com.webobjects.appserver._private
Thread.java NA run java.lang


 ___
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/brian% 
40lakeman.org


This email sent to [EMAIL PROTECTED]


___
Do not post admin requests to the list. They will be

Error on saveChanges with WOBrowser or WOCheckBoxList

2008-02-11 Thread Sennikov, Dimitri
Hi,

I have a 1-to-many relationship (User ->> Departments). With either
WOBrowser or WOCheckBoxList, whenever a department is selected, an error
is produced when trying to save User where WebObjects is trying to
overwrite the selected department's ID (primary key), "UPDATE
WA_Departments SET id = NULL WHERE (id = ? AND description = ? AND
managerID is NULL AND name = ?)" withBindings: 1:2(id),
2:"Engineering"(description), 3:"Engineering"(name).

Has anybody got same error and is there a known workaround other than
creating custom WORepetition? I'm developing on Eclipse/WOLips on
Windows and would like to get this to work because I have many more
components to come that will require same kind of functionality, and
frankly WOBrowser is much easier than WORepetition with manual item
processing.

Here's my WOBrowser object:

DepartmentList : WOBrowser {
list = departmentDisplayGroup.displayedObjects;
item = department;
displayString = department.name;
selections = user.departments;
multiple = true;
size = 6;
}

Here's the error stack trace:

Application:  WebApp  
Error:  com.webobjects.eoaccess.EOGeneralAdaptorException:
EvaluateExpression failed: : Next exception:SQL State:23000 -- error
code: 1048 -- msg: Column 'id' cannot be null  
Reason:  EvaluateExpression failed:
: Next exception:SQL
State:23000 -- error code: 1048 -- msg: Column 'id' cannot be null  
Stack trace:  File Line# Method Package 



 
EODatabaseContext.java 4500
_exceptionWithDatabaseContextInformationAdded com.webobjects.eoaccess 
EODatabaseContext.java 6212 performChanges com.webobjects.eoaccess 
EOObjectStoreCoordinator.java 371 saveChangesInEditingContext
com.webobjects.eocontrol 
EOEditingContext.java 3176 saveChanges com.webobjects.eocontrol 
EditUser.java 95 SaveUser dyn.webapp.components 
NativeMethodAccessorImpl.java NA invoke0 sun.reflect 
NativeMethodAccessorImpl.java NA invoke sun.reflect 
DelegatingMethodAccessorImpl.java NA invoke sun.reflect 
Method.java NA invoke java.lang.reflect 
NSKeyValueCoding.java 636 methodValue com.webobjects.foundation 
NSKeyValueCoding.java 1134 valueInObject com.webobjects.foundation 
NSKeyValueCoding.java 1293 valueForKey com.webobjects.foundation 
WOComponent.java 1686 valueForKey com.webobjects.appserver 
NSKeyValueCoding.java 447 valueForKey com.webobjects.foundation 
NSKeyValueCodingAdditions.java 212 valueForKeyPath
com.webobjects.foundation 
WOComponent.java 1754 valueForKeyPath com.webobjects.appserver 
EditUser.java 87 valueForKeyPath dyn.webapp.components 
WOKeyValueAssociation.java 50 valueInComponent
com.webobjects.appserver._private 
WOSubmitButton.java 70 invokeAction com.webobjects.appserver._private 
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private 
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private 
WOForm.java 134 invokeAction com.webobjects.appserver._private 
WODynamicGroup.java 105 invokeChildrenAction
com.webobjects.appserver._private 
WODynamicGroup.java 115 invokeAction com.webobjects.appserver._private 
WOComponent.java 1078 invokeAction com.webobjects.appserver 
WOSession.java 1353 invokeAction com.webobjects.appserver 
WOApplication.java 1736 invokeAction com.webobjects.appserver 
WOComponentRequestHandler.java 206 _dispatchWithPreparedPage
com.webobjects.appserver._private 
WOComponentRequestHandler.java 298 _dispatchWithPreparedSession
com.webobjects.appserver._private 
WOComponentRequestHandler.java 332 _dispatchWithPreparedApplication
com.webobjects.appserver._private 
WOComponentRequestHandler.java 369 _handleRequest
com.webobjects.appserver._private 
WOComponentRequestHandler.java 442 handleRequest
com.webobjects.appserver._private 
WOApplication.java 1678 dispatchRequest com.webobjects.appserver 
WOWorkerThread.java 144 runOnce com.webobjects.appserver._private 
WOWorkerThread.java 226 run com.webobjects.appserver._private 
Thread.java NA run java.lang 


 ___
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 [EMAIL PROTECTED]


Re: WOBrowser

2006-09-10 Thread Mark Morris

Hello Mike,

This is just the way the select works in the browser.  To deselect  
the last item, you have to command-click (on a Mac) or control-click  
(on WIndows).


It shouldn't be hard to add a button that deselects all, using  
javascript, if you want to give the users another alternative.


Regards,
Mark

On Sep 10, 2006, at 1:00 PM, Michael Warner wrote:

I am using WOBrowser on a page.  In cases where the number elements  
in a list equals or exceeds the 'size' of the list,
is it possible for a user to deselect all elements in the list?   
The behavior I am getting is that at least one of the elements remains

selected and saved.

The specific behavior  I want is  for the user to be able to  
deselect ALL of the elements in the list  thus removing all

related objects.  Is it possible to accomplish this using WOBrowser?


If the 'size' binding is greater than the number of elements in the  
list, I am able to click below the list but inside WOBrowser and  
get the desired

behavior.

 I have tried various combinations of bindings to no avail.

Is there a better general purpose solution, or hack?  I am   
specifically using WOBrowser because
my client did not accept the particular UI described by Malcolm  
Crawford in his excellent article on StepWise concerning a re- 
useable relationship inspector.


Thanks,

Mike Warner



___
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


WOBrowser

2006-09-10 Thread Michael Warner
I am using WOBrowser on a page.  In cases where the number elements  
in a list equals or exceeds the 'size' of the list,
is it possible for a user to deselect all elements in the list?  The  
behavior I am getting is that at least one of the elements remains

selected and saved.

The specific behavior  I want is  for the user to be able to deselect  
ALL of the elements in the list  thus removing all

related objects.  Is it possible to accomplish this using WOBrowser?


If the 'size' binding is greater than the number of elements in the  
list, I am able to click below the list but inside WOBrowser and get  
the desired

behavior.

 I have tried various combinations of bindings to no avail.

Is there a better general purpose solution, or hack?  I am   
specifically using WOBrowser because
my client did not accept the particular UI described by Malcolm  
Crawford in his excellent article on StepWise concerning a re-useable  
relationship inspector.


Thanks,

Mike Warner

___
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