Re: Re: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-08 Thread naneon . raymond

Hi Ted,


I am lost. I make the Change we discussed but I have a little difficult to 
realize it.


Html : 



wo name = tableRow
tr
  tdwo name = pole //td
  tdwo name = nompre //td
  tdwo name = implication //td
  tdwo name = cout //td
/tr
  /wo


My WOD
I bound index to my repetition



tableRow : WORepetition {
index = dgIndex;//Index I must use to return the String of each row
list = session.personneDg.displayedObjects;
item = session.personRepetition;
}



implication : AjaxInPlaceEditor {
value = theEditor.tempUtil;
action = saveOnChange;
}




My java class :
...

private NSMutableDictionary txImplication = new NSMutableDictionary();
private Integer dgIndex;

public ForAjaxEditor Editor = new ForAjaxEditor();

...

public WOActionResults ajoutPerson() {
...


//For each object added I do -1 to have my row in the table
Editor.setIndex(session.getPersonneDg().allObjects().count()-1);
//I set default information to Implication for each row 
Editor.setTempUtil(taux%);
//Here I use NSDictionnary, it's perfect. I have the key(row) and the String 
which corresponds
txImplication.put(Editor.getIndex(), Editor.getTempUtil());




...
}


In Debug mode I added 4 person in my table and txImplication contains :



{0 = taux%; 1 = taux%; 2 = taux%; 3 = taux%; }




In this method I am complety lost



public String theEditor(){
 if(txImplication.containsKey(dgIndex){
 //Exception here because dgIndex is null. dgIndex is not set in the repetition;
  return txImplication.get(dgIndex);
  }
 return no value for the row in the dictionnary;
}


Thanks for your help


Ray



Message du : 08/08/2011
De : Cheong Hee (Gmail)  chn...@gmail.com
A : naneon.raym...@neuf.fr, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: Using AjaxInPlaceEditor in WORepetition


    
Hi Ray 
  
Any success with indexed mutablearray? How  does the code look like if it 
works. 
  
Your person model sounds like  a many-to-many table, excepts it could not be  
flattened.   

I agree with you. My problem is not on save data but on manipulating
txImplication in the loop before saved them. I tought about
mutablearray(index,txImplication) with ted last night I'm working on it to see  
  how it look like in a loop.   
index go to match to index in the loop and txImplication is an objectthat 
take value for each index I want to edit.   

   It's done but the  relationship a little complicated. project have 
relation with personnal and  personnal have relation with individu. 
personal and project have relation  person which contains(project_id, 
personal_id and  txImplication)   
But in the model, person comesto individu entity. 
 
Cheers 
  
Cheong  Hee 
 ___
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: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-08 Thread naneon . raymond
Hi Chuck,
 
 here in attached three pics.
 pic0 is a little table personnel which contains relationship key Project and 
 personneUlr as iID and tempsutil I call txImplication in my code.
 


In EOF terms we would call that a Many to Many (M2M) join table. With an extra 
attribute that makes things more complex, but still manageable.


 pic1 is pprec I call it project entity
 




EOPprec should have a to many relationship to EOPersonnel, 


==I agree with you but PowerAMC did another thing


I an not sure what to call this. assigned people?
==Yes assigned people. I created my table and relation from PowerAMC. It's 
this software which create the sql code I used to generate my database.


The eoPersonnelUlr relationship looks wrong. Or it is poorly named. Is this 
owner or manager?

 
==manager

 pic2 is personneUlr I call it person Entity


EOPersonnelUlr should also have a to many relationship to EOPersonnel, I an not 
sure what to call this. projects?



== yes projects



Then you create a new EOPersonnel, attach it to EOPprec and EOPersonnelUlr 
(addObjectToBothSidesOfRelationshipWithKey). This object is then what gets 
edited in your grid, not session.getTxImplication().

Before editing the new EOPersonnel in grid. I must his data. Before saving his 
data I must have them. So I create variables to have data I would like to save 
in EOPersonnel



I hope you understand me


Ray





 ___
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: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-05 Thread naneon . raymond

Hi Hee 
 
Yes I thought about this code aPerson.project().txImplementation() and it's 
greatwhen I saved in data base but When I want to manipulate(modify each 
row in theloop) txImplication  before saved? 
If the txImplication is not in  the loop, I supposed you should be able to 
modifiy each row, and also keep the  value of txImplication either in your 
session.txImplementation or as an  attribute in the page java itself.  Before 
calling ec saveChanges, set  the txImplication to your  
aPerson.project().setTxImplication(session.txImplication()).   Then  ec 
saveChanges to save all objects for persons and project.   No? 
 
I agree with you. My problem is not on save data but on manipulating 
txImplication in the loop before saved them. I tought about 
mutablearray(index,txImplication) with ted last night I'm working on it to see 
how it look like in a loop.
index go to match to index in the loop and txImplication is an object that take 
value for each index I want to edit. 
  

I can not change the model because I exploit a database which I canmodify. 
I only create my table project to do relationship between alltables.

 
 
 
Since you chan create project  table, and you may need to set up its 
many-to-many relationship join  table.  It is common that a person can have 
many projects and a project can  have many persons.  You will need to know how 
to set up both relationships  and get direct access with just e.g. 
person.projects() and  project.persons().
It's done but the relationship a little complicated. project have relation with 
personnal and personnal have relation with individu. personal and project have 
relation person which contains(project_id, personal_id and txImplication)
But in the model, person comes to individu entity. 
  
Cheers 
  
Ray 
 ___
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: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-01 Thread naneon . raymond

Hi Hee 
  
Hope I get it right and may be this is what  you need.  To manupulate the 
string for each iterative object in an  array, you could set the index of 
WORepetition to an integer.  
Then before  display the string, check the objectAtIndex of the array and 
decide if the the  string is to alter accordingly for that object.  
== If the string I have declared is the same for all objects and if I want to 
give information about object at index+1. 
The string I put in object at index will take value of string of object at 
index +1. So if I check the string of object at index and I see it's modify 
because object at index+1 
give it another information of string. I can't hold this string for the object 
at index because there is one variable which loop.
example :
java class :



String critical
NSArrayMovie Movies;
Movie movieRepetition;


...


public void saveInPlaceEditor () {


...


}


Html :
...
table...
tr
thname/th
thcriticals/th
/tr
webobject name=repeat
tr
tdwebobject name=movieView//td
tdwebobject name=criticalEditor//td
/tr
/webobject
/table
... 
 
WOD :


repeat : WORepetition {
list = Movies;
index = movieRepetition;
}


movieView : WOString {
value = movieRepetition.title;
}


criticalEditor : AjaxInPlaceEditor {
value = critical;
action = saveInPlaceEditor; 
...
}

 
Cheers 
  
Ray 
 
- Original Message -
From:naneon.raym...@neuf.fr
To: Theodore Petrosky ; WebObjects webobjects-dev   
Sent: Monday, August 01, 2011 2:48AM   
Subject: Re: Re: Re: UsingAjaxInPlaceEditor in WORepetition   

Hi Ted,   

   
 if you have a list (an array) to create the objects in therepetition, then 
each object will have an attribute (string) to use for thebinding of the in 
place editor.   
== I have an array to create the objects in repetition but eachobject 
don't have an attribute string. I created independent
variable which give an information about theses objects in the loop (that
mean each object have the same variable for the editor and it's my
problem).   

   
There is another way to use the InPlaceEditor in the loop without usingthe 
same variable for each object?   




Messagedu : 31/07/2011
De : Theodore Petrosky  tedp...@yahoo.com
A :WebObjects webobjects-dev webobjects-dev@lists.apple.com,
naneon.raym...@neuf.fr
Copie à : 
Sujet : Re: Re: UsingAjaxInPlaceEditor in WORepetition



I am lost.
 if you have a list (an array) to create the objects in therepetition, then 
each object will have an attribute (string) to use for thebinding of the in 
place editor. Ted --- On Sat, 7/30/11,naneon.raym...@neuf.fr wrote: From:   
 naneon.raym...@neuf.fr Subject: Re: Re: UsingAjaxInPlaceEditor in 
WORepetition To: Theodore Petrosky ,WebObjects webobjects-dev Date: 
Saturday,July 30, 2011, 3:52 PM Hi Ted, Thanks for your quick reply but in 
my case theeditor is not bound to the item.variable. The variable is not an 
item but asimple String. Let me explain, in the repetition I have 
item.variable and foreach item.variable, I have an information to give.So 
the table have 2 columns,one for item.variable and the second is a variable 
string for the editor. Sowhen for the first item.variable I give an 
information, this informationis apply for all item.variable because there 
is one variable bound to theeditor which loop for each item.variable. So I 
want to know if there isanother to do it or how to fix it. Ray
 Message du : 30/07/2011 De :
Theodore Petrosky  A : webobjects-dev@lists.apple.comCopie à : 
naneon.raym...@neuf.fr Sujet : Re: Using AjaxInPlaceEditor inWORepetition 
It sounds like it is giving you exactly what you are asking for.a 
WORepetition with the same piece of data on every line. I have a table with
a repetition and the editor is bound the the item.variable of the line with no  
  problem. a string ImageEditInPlace : AjaxInPlaceEditor { value =
theGridItem.image; submitOnBlur = true; okButton = false; cancelLink = false;   
 action = saveAfterLeavingInPlaceEditor; size = 15; clickToEditText
=HeadLine; editClass=editInPlaceClass; } Ted 
--   Message: 8  Date: Sat, 30 Jul2011 
18:58:20 +0200 (CEST)  From: naneon.raym...@neuf.fr  Subject:Using 
AjaxInPlaceEditor in WORepetition  To: WebObjects webobjects-dev 
Message-ID: 18747875.180751312045100987.JavaMail.www@wsfrf1217  
Content-Type:text/plain; charset=utf-8   Hi,I have a little
problem with AjaxInPlaceEditor in a  WORepetition. The Problem is the
variable I declared for  AjaxInPlaceEditor.  In the WORepetition Ihave 
the same variable in each line  of the repetition and when I choosein 
example line 2 and  edit it and put an information,  the sameinformation 
is repeat on all other line.So How can I fix it?   

Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-01 Thread naneon . raymond

Hi Hee
 
I made a mistake in my example. In repetition, it's not index but item (WOD)
example :
java class :



String critical
NSArrayMovie Movies;
Movie movieRepetition;


...


public void saveInPlaceEditor () {


...


}


Html :
...
table...
tr
thname/th
thcriticals/th
/tr
webobject name=repeat
tr
tdwebobject name=movieView//td
tdwebobject name=criticalEditor//td
/tr
/webobject
/table
...
 
WOD :


repeat : WORepetition {
list = Movies;
item = movieRepetition;
}


movieView : WOString {
value = movieRepetition.title;
}


criticalEditor : AjaxInPlaceEditor {
value = critical;
action = saveInPlaceEditor; 
...
}


 
Ooops, you need to change ui.index to movieIndex.

and may be an item in the WORepetition:

repeat : WORepetition {
item = Movie;
list = Movies;
index = movieIndex;
 }


== What about AjaxInPlaceEditor? You don't use it in your example code? In my 
app,
I would like to give hand to people to write a critical for the movie they 
chose in my table of movies and it's the utility of 
ajaxInPlaceEditor.


Ray


- Original Message - 
From: Cheong Hee (Gmail) 
To: ; WebObjects webobjects-dev

Sent: Monday, August 01, 2011 4:38 PM
Subject: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition


 Hi Ray

 Using your info, may be these are the changes you need:

 Declare this integer in java file:
 int movieIndex;


 in wod:

 repeat : WORepetition {
list = Movies;
index = movieIndex;
 }


 movieView : WOString {
value = movieViewToShow;
 }


 In the java file, declare something like this:

 public String movieViewToShow(){
String movieTitleChanged=null;
Movie movieToCheck = (Movie)Movies.objectAtIndex(ui.index);
if ((movieToCheck !=null)  (...do your validation ...))
movieTitleChanged=movieToCheck.title() + Add more info .. ;
return (movieTitleChanged!=null) ? movieTitleChanged : movieToCheck
 .title();
 }

 I am not familiar with AjaxInPlaceEditor yet, however don't think it will
 affect the above code.

 Cheers

 Cheong Hee

 - Original Message - 
 From: naneon.raym...@neuf.fr
 To: Cheong Hee (Gmail) ; WebObjects webobjects-dev
 Sent: Monday, August 01, 2011 4:19 PM
 Subject: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition


 Hi Hee

 Hope I get it right and may be this is what you need.  To manupulate the
 string for each iterative object in an array, you could set the index of
 WORepetition to an integer.
 Then before display the string, check the objectAtIndex of the array and
 decide if the the string is to alter accordingly for that object.
 == If the string I have declared is the same for all objects and if I
 want to give information about object at index+1.
 The string I put in object at index will take value of string of object
 at index +1. So if I check the string of object at index and I see
 it's modify because object at index+1
 give it another information of string. I can't hold this string for the
 object at index because there is one variable which loop.
 example :
 java class :


 
 String critical
 NSArray Movies;
 Movie movieRepetition;


 ...


 public void saveInPlaceEditor () {


 ...


 }


 Html :
 ...
 
 
 name
 
 
 
 
 
 
 
 
 
 ...

 WOD :


 repeat : WORepetition {
 list = Movies;
 index = movieRepetition;
 }


 movieView : WOString {
 value = movieRepetition.title;
 }


 criticalEditor : AjaxInPlaceEditor {
 value = critical;
 action = saveInPlaceEditor;
 ...
 }


 Cheers

 Ray

 - Original Message - 
 From: naneon.raym...@neuf.fr
 To: Theodore Petrosky ; WebObjects webobjects-dev
 Sent: Monday, August 01, 2011 2:48 AM
 Subject: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition


 Hi Ted,


 if you have a list (an array) to create the objects in the repetition,
 then each object will have an attribute (string) to use for the binding of
 the in place editor.
 == I have an array to create the objects in repetition but each object
 don't have an attribute string. I created independent
 variable which give an information about theses objects in the loop (that
 mean each object have the same variable for the editor and it's my
 problem).


 There is another way to use the InPlaceEditor in the loop without using
 the same variable for each object?


 

 Message du : 31/07/2011
 De : Theodore Petrosky  
 A : WebObjects webobjects-dev ,
 naneon.raym...@neuf.fr
 Copie à :
 Sujet : Re: Re: Using AjaxInPlaceEditor in WORepetition



 I am lost.
 if you have a list (an array) to create the objects in the repetition,
 then each object will have an attribute (string) to use for the binding of
 the in place editor. Ted --- On Sat, 7/30/11, naneon.raym...@neuf.fr
 wrote: From: naneon.raym...@neuf.fr Subject: Re: Re: Using
 AjaxInPlaceEditor in WORepetition To: Theodore Petrosky , WebObjects
 webobjects-dev Date: Saturday, July 30, 2011, 3:52 PM Hi Ted, Thanks for
 your quick reply but in my case the editor is not 

Re: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition

2011-08-01 Thread naneon . raymond
Hi Hee
  
No prob. Then you may just need to add an  index counter to track down the 
object that you are interested to  alter its string value, as mentioned.
==I don't understand very well. Do you have a code to clear all your words?
   ...
   movieTitleChanged=movieToCheck.title() + Add more info .. ; I don't 
want to add info to the title for each movie.
 ... 



 
  
Cheers 
  
Ray 
 
- Original Message -
From:naneon.raym...@neuf.fr
To: Cheong Hee (Gmail) ; WebObjects webobjects-dev   
Sent: Monday, August 01, 2011 6:01PM   
Subject: Re: Re: Re: Re: Re: UsingAjaxInPlaceEditor in WORepetition   

   
Hi Hee   

I made a mistake in my example. Inrepetition, it's not index but item (WOD) 
  
example :   
java class :   

   
   
String critical   
NSArrayMovie Movies;   
Movie movieRepetition;   

   
...   

   
public void saveInPlaceEditor (){   

   
...   

   
}   

   
Html :   
...   
table...   
tr   
thname/th   
thcriticals/th   
/tr   
webobjectname=repeat   
tr   
tdwebobjectname=movieView//td   
tdwebobjectname=criticalEditor//td   
/tr   
/webobject   
/table   
...   

WOD:   

   
repeat: WORepetition {   
list= Movies;   
item= movieRepetition;   
}   

   
movieView : WOString {   
value = movieRepetition.title;   
}   

   
criticalEditor : AjaxInPlaceEditor {   
value = critical;   
action = saveInPlaceEditor;
...   
}



Ooops,you need to change ui.index to movieIndex.

and may be an item inthe WORepetition:

repeat : WORepetition {
item = Movie;
list =Movies;
index = movieIndex;
}   

   
== What about AjaxInPlaceEditor? You don't use it in your examplecode? In 
my app,   
I would like to give hand to people to write a critical for the moviethey 
chose in my table of movies and it's the utility of
ajaxInPlaceEditor.   

   
Ray


- Original Message - 
From: Cheong Hee(Gmail) 
To: ; WebObjectswebobjects-dev

Sent: Monday, August01, 2011 4:38 PM
Subject: Re: Re: Re: Re: Using AjaxInPlaceEditor inWORepetition


 Hi Ray

 Using your info, may bethese are the changes you need:

 Declare this integer in javafile:
 int movieIndex;


 in wod:

repeat : WORepetition {
 list = Movies;
 index =movieIndex;
 }


 movieView : WOString {
value = movieViewToShow;
 }


 In the java file,declare something like this:

 public StringmovieViewToShow(){
 String movieTitleChanged=null;
 MoviemovieToCheck = (Movie)Movies.objectAtIndex(ui.index);
 if((movieToCheck !=null)  (...do your validation ...))
movieTitleChanged=movieToCheck.title() + Add more info .. ;
 return(movieTitleChanged!=null) ? movieTitleChanged : movieToCheck
.title();
 }

 I am not familiar with AjaxInPlaceEditoryet, however don't think it will
 affect the abovecode.

 Cheers

 Cheong Hee

 -Original Message - 
 From: naneon.raym...@neuf.fr
 To:Cheong Hee (Gmail) ; WebObjects webobjects-dev
 Sent: Monday, August01, 2011 4:19 PM
 Subject: Re: Re: Re: Re: Using AjaxInPlaceEditor inWORepetition


 Hi Hee

 Hope I get itright and may be this is what you need. To manupulate the
 string foreach iterative object in an array, you could set the index of
WORepetition to an integer.
 Then before display the string, check theobjectAtIndex of the array and
 decide if the the string is to alteraccordingly for that object.
 == If the string I have declared isthe same for all objects and if I
 want to give information aboutobject at index+1.
 The string I put in object at index will takevalue of string of object
 at index +1. So if I check the string ofobject at index and I see
 it's modify because object atindex+1
 give it another information of string. I can't hold thisstring for the
 object at index because there is one variable whichloop.
 example :
 java class :



 String critical
 NSArray Movies;
 MoviemovieRepetition;


 ...


 publicvoid saveInPlaceEditor () {


...


 }


 Html :
...
 
 
 name
 
 
 
 
 
 
 

 
 ...

 WOD:


 repeat : WORepetition {
 list =Movies;
 index = movieRepetition;
 }


movieView : WOString {
 value = movieRepetition.title;
}


 criticalEditor : AjaxInPlaceEditor {
 value =critical;
 action = saveInPlaceEditor;
 ...
}


 Cheers

 Ray

 -Original Message - 
 From: naneon.raym...@neuf.fr
 To:Theodore Petrosky ; WebObjects webobjects-dev
 Sent: Monday, August 01,2011 2:48 AM
 Subject: Re: Re: Re: Using AjaxInPlaceEditor inWORepetition


 Hi Ted,


 if youhave a list (an array) to create the objects in the repetition,
 theneach object will have an attribute (string) to use for the binding of
the in place editor.
 == I have an array to create the objects inrepetition but each object
 don't have an attribute string. I 

Re: Re: Re: Using AjaxInPlaceEditor in WORepetition

2011-07-31 Thread naneon . raymond
Hi Ted,


 if you have a list (an array) to create the objects in the repetition, then 
each object will have an attribute (string) to use for the binding of the in 
place editor.
== I have an array to create the objects in repetition but each object don't 
have an attribute string. I created independent 
variable which give an information about theses objects in the loop (that mean 
each object have the same variable for the editor and it's my problem).


There is another way to use the InPlaceEditor in the loop without using the 
same variable for each object?




Message du : 31/07/2011
De : Theodore Petrosky  tedp...@yahoo.com
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com, 
naneon.raym...@neuf.fr
Copie à : 
Sujet : Re: Re: Using AjaxInPlaceEditor in WORepetition


 
I am lost. 
 if you have a list (an array) to create the objects in the repetition, then 
each object will have an attribute (string) to use for the binding of the in 
place editor.  Ted   --- On Sat, 7/30/11, naneon.raym...@neuf.fr  wrote:  From: 
naneon.raym...@neuf.fr  Subject: Re: Re: Using AjaxInPlaceEditor in 
WORepetition To: Theodore Petrosky , WebObjects webobjects-dev  Date: 
Saturday, July 30, 2011, 3:52 PM  Hi Ted, Thanks for your quick reply but in my 
case the editor is not bound to the item.variable. The variable is not an item 
but a simple String. Let me explain, in the repetition I have item.variable and 
for each item.variable, I have an information to give.So the table have 2 
columns, one for item.variable and the second is a variable string for the 
editor. So when for the first item.variable I give an information, this 
information is apply for all item.variable because there is one variable bound 
to the editor which loop for each item.variable. So I want to know if there is 
another to do it or how to fix it. Ray  
  Message du : 30/07/2011 De : 
Theodore Petrosky   A : webobjects-dev@lists.apple.com Copie à : 
naneon.raym...@neuf.fr Sujet : Re: Using AjaxInPlaceEditor in WORepetition 
It sounds like it is giving you exactly what you are asking for. a WORepetition 
with the same piece of data on every line.  I have a table with a repetition 
and the editor is bound the the item.variable of the line with no problem.a 
string   ImageEditInPlace : AjaxInPlaceEditor { value = 
theGridItem.image;  submitOnBlur = true;okButton = false;   
cancelLink = false; action = saveAfterLeavingInPlaceEditor; size = 
15;clickToEditText =HeadLine;editClass=editInPlaceClass; }   Ted  
   --Message: 8  Date: Sat, 30 Jul 2011 
18:58:20 +0200 (CEST)  From: naneon.raym...@neuf.fr  Subject: Using 
AjaxInPlaceEditor in WORepetition  To: WebObjects webobjects-dev   
Message-ID:  18747875.180751312045100987.JavaMail.www@wsfrf1217  
Content-Type: text/plain; charset=utf-8Hi,   I have a little 
problem with AjaxInPlaceEditor in a  WORepetition. The Problem is the variable 
I declared for  AjaxInPlaceEditor.  In the WORepetition I have the same 
variable in each line  of the repetition and when I choose in example line 2 
and  edit it and put an information,   the same information is repeat on all 
other line.  So How can I fix it? How can I use an AjaxInPlaceEditor in 
 a WORepetition with one variable and isolate it when I edit  a line in the 
repetition and put an information?  Thanks for your help.


 ___
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


Using AjaxInPlaceEditor in WORepetition

2011-07-30 Thread naneon . raymond
Hi, 


I have a little problem with AjaxInPlaceEditor in a WORepetition. The Problem 
is the variable I declared for AjaxInPlaceEditor.
In the WORepetition I have the same variable in each line of the repetition and 
when I choose in example line 2 and edit it and put an information, 
the same information is repeat on all other line.


So How can I fix it? How can I use an AjaxInPlaceEditor in a WORepetition with 
one variable and isolate it when I edit a line in the repetition and put an 
information?


Thanks for your help.

 ___
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: Re: Using AjaxInPlaceEditor in WORepetition

2011-07-30 Thread naneon . raymond
Hi Ted,


Thanks for your quick reply but in my case the editor is not bound to the 
item.variable. The variable is not an item but a simple String.
Let me explain, in the repetition I have item.variable and for each 
item.variable, I have an information to give.
So the table have 2 columns, one for item.variable and the second is a variable 
string for the editor. So when for the first item.variable I give an 
information, 
this information is apply for all item.variable because there is one variable 
bound to the editor which loop for each item.variable.


So I want to know if there is another to do it or how to fix it.


Ray



Message du : 30/07/2011
De : Theodore Petrosky  tedp...@yahoo.com
A : webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Using AjaxInPlaceEditor in WORepetition


 
It sounds like it is giving you exactly what you are asking for. a WORepetition 
with the same piece of data on every line.

I have a table with a repetition and the editor is bound the the item.variable 
of the line with no problem.



a string
 




ImageEditInPlace : AjaxInPlaceEditor {
value = theGridItem.image;
submitOnBlur = true;
okButton = false;
cancelLink = false;
action = saveAfterLeavingInPlaceEditor;
size = 15;
clickToEditText =HeadLine;
editClass=editInPlaceClass;
}


Ted



 --
 
 Message: 8
 Date: Sat, 30 Jul 2011 18:58:20 +0200 (CEST)
 From: naneon.raym...@neuf.fr
 Subject: Using AjaxInPlaceEditor in WORepetition
 To: WebObjects webobjects-dev 
 Message-ID:
 18747875.180751312045100987.JavaMail.www@wsfrf1217
 Content-Type: text/plain; charset=utf-8
 
 Hi, 
 
 
 I have a little problem with AjaxInPlaceEditor in a
 WORepetition. The Problem is the variable I declared for
 AjaxInPlaceEditor.
 In the WORepetition I have the same variable in each line
 of the repetition and when I choose in example line 2 and
 edit it and put an information, 
 the same information is repeat on all other line.
 
 
 So How can I fix it? How can I use an AjaxInPlaceEditor in
 a WORepetition with one variable and isolate it when I edit
 a line in the repetition and put an information?
 
 
 Thanks for your help.



 ___
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


Dynamic table with editable content

2011-07-12 Thread naneon . raymond
Hi,


It's possible in WO to have an ERXTable or over table component with editable 
content?
What are the list of component we need to do that?


Thanks


Ray

 ___
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: Re: Dynamic table with editable content

2011-07-12 Thread naneon . raymond
WOForm wrapping ERXTable with cells containing form fields.

==Cells containing form fields : it means I can use textFields in each cells 
of ERXTable? Do you have an example please?
The ERXTable columns are sortable too?

On Jul 12, 2011, at 9:21 AM, naneon.raym...@neuf.fr wrote:

 Hi,
 
 It's possible in WO to have an ERXTable or over table component with editable 
 content?
 What are the list of component we need to do that?
 
 Thanks
 
 Ray
 
 ___
 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/kelleherk%40gmail.com
 
 This email sent to kelleh...@gmail.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: Re: Dynamic table with editable content

2011-07-12 Thread naneon . raymond

Message du : 12/07/2011
De : Kieran Kelleher  kelleh...@gmail.com
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Dynamic table with editable content


 
Ray,

At the end of the day, WOComponent response simply generates HTML. And when you 
submit a WOComponent generated form, the browser just sends a list of form 
fields and values back to the server. Tables and cells are just response 
presentation layout and are not relevant to form fields.

I don't have an example for you at hand, but why don't you just try it and 
figure it out. Just look at the HTML source that is generated to get your head 
around concepts. Even better, open FireBug in FIreFox and look at the request 
when you submit a form. Getting HTML fundamentals clear in the brain is 
critical to understanding WOComponents and taking away some of the unknown 
mysteries.
I just want to know how it's look like. How ERXTable use WOFORM fields 
like rows and columns.
example : 


in html : wo name=ERXTableWrap
wo:form
 === How to set columns with header and rows with 
components WOString and WOTextFields?
/wo
 /wo

Regards, Kieran

PS. 
Keep discussion on the list . there are much smarter guys on there, such as 
Chuck and his Canadian army  I am omitting David Avendasora from the 
'smarter guys' qualifier of course.



;-)



On Jul 12, 2011, at 9:47 AM,  wrote:

 WOForm wrapping ERXTable with cells containing form fields.
 ==Cells containing form fields : it means I can use textFields in each cells 
 of ERXTable? Do you have an example please?
 The ERXTable columns are sortable too?
 
 On Jul 12, 2011, at 9:21 AM, naneon.raym...@neuf.fr wrote:
 
  Hi,
  
  It's possible in WO to have an ERXTable or over table component with 
  editable content?
  What are the list of component we need to do that?
  
  Thanks
  
  Ray
  
  ___
  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/kelleherk%40gmail.com
  
  This email sent to kelleh...@gmail.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: Re: Dynamic table with editable content

2011-07-12 Thread naneon . raymond
Thanks a lot.


I go to try it and add some stuffs.


Ray




Message du : 12/07/2011
De : Kieran Kelleher  kelleh...@gmail.com
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Dynamic table with editable content


 
Rough example copied/contrived from an old component:


  
  





RegionTable: WOTable {
item = regionDictItem;
list = regionDictArray;
maxColumns = fieldsPerRow;
cellspacing = 0;
cellpadding = 0;
}

RegionName: WOTextField {
value = regionDictItem.regionName;
maxlength = 5;
size = 7;
}







On Jul 12, 2011, at 10:12 AM,   wrote:

 
 Message du : 12/07/2011
 De : Kieran Kelleher  
 A : naneon.raym...@neuf.fr
 Copie à : webobjects-dev@lists.apple.com
 Sujet : Re: Dynamic table with editable content
 
 
 
 Ray,
 
 At the end of the day, WOComponent response simply generates HTML. And when 
 you submit a WOComponent generated form, the browser just sends a list of 
 form fields and values back to the server. Tables and cells are just response 
 presentation layout and are not relevant to form fields.
 
 I don't have an example for you at hand, but why don't you just try it and 
 figure it out. Just look at the HTML source that is generated to get your 
 head around concepts. Even better, open FireBug in FIreFox and look at the 
 request when you submit a form. Getting HTML fundamentals clear in the brain 
 is critical to understanding WOComponents and taking away some of the unknown 
 mysteries.
 I just want to know how it's look like. How ERXTable use WOFORM fields 
 like rows and columns.
 example : 
 
 in html : 
   
    === How to set columns with header and rows with 
 components WOString and WOTextFields?
   
  
 
 Regards, Kieran
 
 PS. 
 Keep discussion on the list . there are much smarter guys on there, such 
 as Chuck and his Canadian army  I am omitting David Avendasora from the 
 'smarter guys' qualifier of course.
 
 
 
 ;-)
 
 
 
 On Jul 12, 2011, at 9:47 AM, wrote:
 
  WOForm wrapping ERXTable with cells containing form fields.
  ==Cells containing form fields : it means I can use textFields in each 
  cells of ERXTable? Do you have an example please?
  The ERXTable columns are sortable too?
  
  On Jul 12, 2011, at 9:21 AM, naneon.raym...@neuf.fr wrote:
  
   Hi,
   
   It's possible in WO to have an ERXTable or over table component with 
   editable content?
   What are the list of component we need to do that?
   
   Thanks
   
   Ray
   
   ___
   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/kelleherk%40gmail.com
   
   This email sent to kelleh...@gmail.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: Re: Webobjects-dev Digest, Vol 8, Issue 493

2011-07-12 Thread naneon . raymond
I have created tables with an AjaxInPlaceEditor in a few of the columns. 
Warning, they are expensive so you will have to batch your table.
=== Do you have a link of your example?

Ted

 Date: Tue, 12 Jul 2011 15:47:58 +0200 (CEST)
 From: naneon.raym...@neuf.fr
 Subject: Re: Re: Dynamic table with editable content
 To: WebObjects webobjects-dev 

 WOForm wrapping ERXTable with cells containing form
 fields.
 
 ==Cells containing form fields : it means I can use
 textFields in each cells of ERXTable? Do you have an example
 please?
 The ERXTable columns are sortable too?
 
 On Jul 12, 2011, at 9:21 AM, naneon.raym...@neuf.fr
 wrote:
 
  Hi,
  
  It's possible in WO to have an ERXTable or over table
 component with editable content?
  What are the list of component we need to do that?
  
  Thanks
  
  Ray
  
  ___



 ___
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: Re: Dynamic table with editable content

2011-07-12 Thread naneon . raymond
Hi Ted,


Thanks for your help




Message du : 12/07/2011
De : Theodore Petrosky  tedp...@yahoo.com
A : webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Dynamic table with editable content


 

 I have created tables with an AjaxInPlaceEditor in a few of
 the columns. Warning, they are expensive so you will have to
 batch your table.


 === Do you have a link of your example?













WOD

theInPlaceEditor : AjaxInPlaceEditor {
value = theItem.itemName;
submitOnBlur = true;
okButton = false;
cancelLink = false;
action = saveStatusChange;
size = 15;
clickToEditText =Status;
editClass=editInPlaceClass;
}

the action is an method that saves the editing context when you deselect the 
editor.

You really need to look over the AjaxExamples

Ted



 
 Ted
 
  Date: Tue, 12 Jul 2011 15:47:58 +0200 (CEST)
  From: naneon.raym...@neuf.fr
  Subject: Re: Re: Dynamic table with editable content
  To: WebObjects webobjects-dev 
 
  WOForm wrapping ERXTable with cells containing form
  fields.
  
  ==Cells containing form fields : it means I can
 use
  textFields in each cells of ERXTable? Do you have an
 example
  please?
  The ERXTable columns are sortable too?
  
  On Jul 12, 2011, at 9:21 AM, naneon.raym...@neuf.fr
  wrote:
  
   Hi,
   
   It's possible in WO to have an ERXTable or over table



a headlineStatuscolumn 1 ___
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: Re: Antw: Using StoredProcedure

2011-06-30 Thread naneon . raymond
Hi Andri,


Thanks for your advice. I go to follow it because i'm searching performance in 
fetching for my app. I fetch between 2000 and 49000 data.


Ray




Message du : 30/06/2011
De : Andri vonAllmen  andri.vonall...@cedes.com
A : naneon.raym...@neuf.fr
Copie à : 
Sujet : Re: Antw: Using StoredProcedure


 
Good morning Ray!

These temporary tables I've mentioned are database tables. They're
created slightly different than normal ones. Something like this (Oracle
DDL):

CREATE GLOBAL TEMPORARY TABLE SOME_TEMP_TABLE (  SOME_ATTRIBUTE
VARCHAR2(5) NOT NULL ) ON COMMIT PRESERVE ROWS -- OR DELETE ROWS
/

You can reverse engineer these tables like normal ones using the
EOModeler in order to create the corresponding enterprise object
classes.

Depending on your needs, you can configure these tables to store the
data for a single transaction only or the whole life-spawn of your db
session. You can even make global temporary tables, providing data for
more than a single db session.

Andri

  schrieb am Mittwoch, 29. Juni 2011 um
16:36 in
Nachricht 3795951.581211309358199770.JavaMail.www@wsfrf1212:
 Hi Andri,
 
 Thanks for your help,
 
 I want to know the temporary table, it's a class or it's a virtual
table 
 create automatically by EOFetchSpecification.
 a little example code of your tempory table is welcome.
 
 Ray
 
 
 
 
 Message du : 29/06/2011
 De : Andri vonAllmen  
 A : naneon.raym...@neuf.fr 
 Copie à : 
 Sujet : Antw: Using StoredProcedure
 
 
  
 'loha,
 
 I'm doing it this way: 
 
 The stored procedures I'm using do not return data, but they fill 
 (temporary) tables. If the procedure returns data, it's always an
array 
 filled with dictionaries and you'll have to cast the data. If using 
 (temporary) tables, you'll just have to execute the procedure and
you'll be 
 able to fetch the data as usual afterwards.
 
 Some code:
 --
   // some dictionary taking the parameters for executing the stored 
 procedure
   NSMutableDictionary dict = new NSMutableDictionary(); 
   // add some parameters (if there are any)
   dict.setObjectForKey(someObject, keyForSomeObject);
   // execute the stored procedure filling some (temporary) table
   EOUtilities.executeStoredProcedureNamed(editingContext(), 
 yourStoredProcName, dict);
   // fetch your data
   results = editingContext().objectsWithFetchSpecification(new 
 EOFetchSpecification(TemporaryTableFilledByStoredProcedure, null,
null)); 
 --
 
 Regards
 Andri
 
 PS: My e-mails don't get on the mailing list because of some
reason...just 
 don't care about that...
 
 
  schrieb am Mittwoch, 29. Juni 2011 um 13:32 in
 Nachricht 27064366.520171309347169380.JavaMail.www@wsfrf1212:
 Hi, 
 
 I want to know how to use a stored procedure in WO. I created a
configurable 
 
 stored procedure that returns more than 2000 data. My question is,
 data returned would be EOF or should I cast to an entity?  Could
these data 
 be stored in a WODisplayGroup? What should contain my method to
execute the 
 stored procedure? A few bits of code would be welcome.
 
 Thanks a lot
 
 
 --- Disclaimer:
- 
 This email and contents is for use only by the intended recipient. If
you are 
 not the individual or entity to whom it is addressed, you are hereby
formally 
 notified that any use, copying or distribution of this email and
attachments, 
 in whole or in part, is strictly prohibited. If you have received
this email 
 in error, please notify the sender and delete the message and
attachment(s) 
 from your system. Any views, opinions or information, expressed or
contained 
 in this email, are those of the sender and not necessarily reflect
those of 
 CEDES. To help protect our environment, please avoid printing out
this 
 information unnecessarily.


--- Disclaimer:
- This email and
contents is for use only by the intended recipient. If you are not the
individual or entity to whom it is addressed, you are hereby formally
notifi
ed that any use, copying or distribution of this email and
attachments, in whole or in part, is strictly prohibited. If you have
received this email in error, please notify the sender and delete the
message and attachment(s) from your system. Any views, opinions or
information, expressed or contained in this email, are those of the
sender and not necessarily reflect those of CEDES. To help protect our
environment, please avoid printing out this information unnecessarily.


 ___
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


Using StoredProcedure

2011-06-29 Thread naneon . raymond
Hi, 

I want to know how to use a stored procedure in WO. I created a configurable 
stored procedure that returns more than 2000 data. My question is,
data returned would be EOF or should I cast to an entity?  Could these data be 
stored in a WODisplayGroup? What should contain my method to execute the stored 
procedure? A few bits of code would be welcome.

Thanks a lot
 ___
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/naneon.raymond%40neuf.fr

This email sent to naneon.raym...@neuf.fr
 ___
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: Antw: Using StoredProcedure

2011-06-29 Thread naneon . raymond
Hi Andri,

Thanks for your help,

I want to know the temporary table, it's a class or it's a virtual table create 
automatically by EOFetchSpecification.
a little example code of your tempory table is welcome.

Ray




Message du : 29/06/2011
De : Andri vonAllmen  andri.vonall...@cedes.com
A : naneon.raym...@neuf.fr
Copie à : 
Sujet : Antw: Using StoredProcedure


 
'loha,

I'm doing it this way: 

The stored procedures I'm using do not return data, but they fill (temporary) 
tables. If the procedure returns data, it's always an array filled with 
dictionaries and you'll have to cast the data. If using (temporary) tables, 
you'll just have to execute the procedure and you'll be able to fetch the data 
as usual afterwards.

Some code:
--
  // some dictionary taking the parameters for executing the stored procedure
  NSMutableDictionary dict = new NSMutableDictionary(); 
  // add some parameters (if there are any)
  dict.setObjectForKey(someObject, keyForSomeObject);
  // execute the stored procedure filling some (temporary) table
  EOUtilities.executeStoredProcedureNamed(editingContext(), 
yourStoredProcName, dict);
  // fetch your data
  results = editingContext().objectsWithFetchSpecification(new 
EOFetchSpecification(TemporaryTableFilledByStoredProcedure, null, null)); 
--

Regards
Andri

PS: My e-mails don't get on the mailing list because of some reason...just 
don't care about that...


  schrieb am Mittwoch, 29. Juni 2011 um 13:32 in
Nachricht 27064366.520171309347169380.JavaMail.www@wsfrf1212:
 Hi, 
 
 I want to know how to use a stored procedure in WO. I created a configurable 
 stored procedure that returns more than 2000 data. My question is,
 data returned would be EOF or should I cast to an entity?  Could these data 
 be stored in a WODisplayGroup? What should contain my method to execute the 
 stored procedure? A few bits of code would be welcome.
 
 Thanks a lot


--- Disclaimer: - This 
email and contents is for use only by the intended recipient. If you are not 
the individual or entity to whom it is addressed, you are hereby formally 
notified that any use, copying or distribution of this email and attachments, 
in whole or in part, is strictly prohibited. If you have received this email in 
error, please notify the sender and delete the message and attachment(s) from 
your system. Any views, opinions or information, expressed or contained in this 
email, are those of the sender and not necessarily reflect those of CEDES. To 
help protect our environment, please avoid printing out this information 
unnecessarily.


 ___
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


WOPopUpButton - Refresh another WOPopUpButton onChange

2011-06-24 Thread naneon . raymond
Hi,


I have a little problem on my apps. When I want to search something, I do 
selection of parameters by WOPupUpButton.
But the problem is when I do the 1st search (1st fetch) there are no problem 
but when I want to do another search and I select another parameter in the 
WOPopUpButton which refresh the second one, the display page refresh all datas 
(do the fetch(1st search) I done before) and then update parameter of second 
WOPopUpButton. It makes my apps slow.


Here is exemple of codes :


in html :

webobject name = periode / Pop 1

webobject name = niveau / Pop 2, data depends to Pop1

webobject name = onChange / WOSubmitButton hidden by css which contain 
method to refresh pop 2 data 

in wod :

periode : WOPopUpButton { 
list = periodes; 
item = currentPeriode; 
displayString = currentPeriode.libelle; 
noSelectionString = Toutes; 
selection = selectedPeriode; 
size = 1; 
class = periode; 
onchange = javascript:this.form.elements['change'].click(); action 
which call method bind to onChange WOSubmitButton 
}



niveau : WOPopUpButton { 
list = niveaux; ===data depend to Pop 1 
item = currentNiveaux; 
displayString =currentNiveaux.libelle; 
noSelectionString = Tous; 
selection = selectedNiveaux; 
size = 1; 
class = niveau; 
}



onChange : WOSubmitButton { 
name = change; 
action = onChange; 
class = hide; 
value = ; 
}


in Java :

public WOActionResults onChange() { 
comboxNiveau(selectedPeriode); 
return null; 
}

protected NSArray comboxNiveau(EOVuePeriodeParam periode) {
if (periode == null) { 
niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() 
.defaultEditingContext(), 
niveauOrderings); 
} else {
  EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( 
pperiode=%@, new 
NSArray(periode.primaryKey())); 
niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() 
.defaultEditingContext(), qual, 
niveauOrderings);
}
}

...


I want to know if there another way to refresh my pop 2 data without using the 
javascript which is obliged to submit before refresh?


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: WOPopUpButton - Refresh another WOPopUpButton onChange

2011-06-24 Thread naneon . raymond
-- SORRY THERE SOMES ERRORS - 

 Hi,


I have a little problem on my apps. When I want to search something, I do 
selection of parameters by WOPupUpButton.
But the problem is when I do the 1st search (1st fetch) there are no problem 
but when I want to do another search and I select another parameter in the 
WOPopUpButton which refresh the second one, the display page refresh all datas 
(do the fetch(1st search) I done before) and then update parameter of second 
WOPopUpButton. It makes my apps slow.


Here is exemple of codes :


in html :

webobject name = periode / Pop 1

webobject name = niveau / Pop 2, data depends to Pop1


webobject name = onChanges / WOSubmitButton hidden by css which contain 
method to refresh pop 2 data 

in wod :

periode : WOPopUpButton { 
list = periodes; 
item = currentPeriode; 
displayString = currentPeriode.libelle; 
noSelectionString = Toutes; 
selection = selectedPeriode; 
size = 1; 
class = periode; 
onchange = javascript:this.form.elements['change'].click(); action 
which call method bind to onChange WOSubmitButton 
}



niveau : WOPopUpButton { 
list = niveaux; ===data depend to Pop 1 
item = currentNiveaux; 
displayString =currentNiveaux.libelle; 
noSelectionString = Tous; 
selection = selectedNiveaux; 
size = 1; 
class = niveau; 
}



onChanges : WOSubmitButton { 
name = change; 
action = onChang; 
class = hide; 
value = ; 
}



in Java :

public WOActionResults onChang() { 
comboxNiveau(selectedPeriode); 
return null; 
}

protected NSArray comboxNiveau(EOVuePeriodeParam periode) {
if (periode == null) { 
niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() 
.defaultEditingContext(), 
niveauOrderings); 
} else {
  EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( 
pperiode=%@, new 
NSArray(periode.primaryKey())); 
niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() 
.defaultEditingContext(), qual, 
niveauOrderings);
}
}

...


I want to know if there another way to refresh my pop 2 data without using the 
javascript which is obliged to submit before refresh?


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: Re: WOPopUpButton - Refresh another WOPopUpButton onChange

2011-06-24 Thread naneon . raymond
I used ajaxUpateContainer and an AjaxObserveField, but don't work because 
ajaxUpdateContainer can't refresh pop 2 data.
the relationShip beetwen periode and niveau id periode_id. periode don't 
contains niveau so impossible to connect observeField to call upDateContainer 
to refresh niveau list (list = niveaux not list = periode.niveaux )


Ray



Message du : 24/06/2011
De : Paul D Yu  p...@mac.com
A : naneon.raym...@neuf.fr naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange


 
You can use ajaxUpateContainer and an AjaxObserveField?


Paul

Sent from my iPad

On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote:



-- SORRY THERE SOMES ERRORS - 

 Hi,


I have a little problem on my apps. When I want to search something, I do 
selection of parameters by WOPupUpButton.
But the problem is when I do the 1st search (1st fetch) there are no problem 
but when I want to do another search and I select another parameter in the 
WOPopUpButton which refresh the second one, the display page refresh all datas 
(do the fetch(1st search) I done before) and then update parameter of second 
WOPopUpButton. It makes my apps slow.


Here is exemple of codes :


in html :

webobject name = periode / Pop 1

webobject name = niveau / Pop 2, data depends to Pop1


webobject name = onChanges / WOSubmitButton hidden by css which contain 
method to refresh pop 2 data 

in wod :

periode : WOPopUpButton { 
list = periodes; 
item = currentPeriode; 
displayString = currentPeriode.libelle; 
noSelectionString = Toutes; 
selection = selectedPeriode; 
size = 1; 
class = periode; 
onchange = javascript:this.form.elements['change'].click(); action 
which call method bind to onChange WOSubmitButton 
}



niveau : WOPopUpButton { 
list = niveaux; ===data depend to Pop 1 
item = currentNiveaux; 
displayString =currentNiveaux.libelle; 
noSelectionString = Tous; 
selection = selectedNiveaux; 
size = 1; 
class = niveau; 
}



onChanges : WOSubmitButton { 
name = change; 
action = onChang; 
class = hide; 
value = ; 
}



in Java :

public WOActionResults onChang() { 
comboxNiveau(selectedPeriode); 
return null; 
}

protected NSArray comboxNiveau(EOVuePeriodeParam periode) {
if (periode == null) { 
niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session() 
.defaultEditingContext(), 
niveauOrderings); 
} else {
  EOQualifier qual = EOQualifier.qualifierWithQualifierFormat( 
pperiode=%@, new 
NSArray(periode.primaryKey())); 
niveaux = EOVueNivAdm.fetchEOVueNivAdms(session() 
.defaultEditingContext(), qual, 
niveauOrderings);
}
}

...


I want to know if there another way to refresh my pop 2 data without using the 
javascript which is obliged to submit before refresh?


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/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: Re: Webobjects-dev Digest, Vol 8, Issue 428

2011-06-24 Thread naneon . raymond
Hi,


I know this example and it work because the first pop 1 contains data of the 
pop 2. In my case, the pop 1 don't contains pop 2 data. so ajaxUpdateContainer 
don't work. to refresh the pop 2 data, it call a method which fetch pop 2 with 
pop 1 selected data primaryKey.

Ray




Message du : 24/06/2011
De : Theodore Petrosky  tedp...@yahoo.com
A : webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Webobjects-dev Digest, Vol 8, Issue 428


 
Have you looked at the Project Wonder Ajax examples. I use the 
AjaxObserverField and AjaxUpdateContainer methods and they work great for any 
number of WOPopUps that I want to be dependent on each other.  Ted  
http://services.wocommunity.org/apps/WebObjects/AjaxExample   
--Message: 3  Date: Fri, 24 Jun 2011 
11:46:22 +0200 (CEST)  From: naneon.raym...@neuf.fr  Subject: WOPopUpButton - 
Refresh another WOPopUpButton  onChange  To: WebObjects webobjects-dev   
Message-ID: Hi,  I have a little problem on my apps. When I want 
to search  something, I do selection of parameters by WOPupUpButton.  But the 
problem is when I do the 1st search (1st fetch)  there are no problem but when 
I want to do another search  and I select another parameter in the 
WOPopUpButton which  refresh the second one, the display page refresh all 
datas  (do the fetch(1st search) I done before) and then update  parameter of 
second WOPopUpButton. It makes my apps slow.  Here is exemple of codes : 
 in html : Pop 1 Pop 2, data depends to  Pop1 
WOSubmitButton hidden  by css which contain method to refresh pop 2 data 
in wod :periode : WOPopUpButton {   list = periodes;   item = 
currentPeriode;   displayString = currentPeriode.libelle;
noSelectionString = Toutes;   selection = selectedPeriode;   size = 
1;   class = periode;   onchange =  
javascript:this.form.elements['change'].click(); action  which call method 
bind to onChange WOSubmitButton   }niveau : WOPopUpButton {   
list = niveaux; ===data depend to  Pop 1   item = currentNiveaux;   
displayString =currentNiveaux.libelle;   noSelectionString = Tous;  
 selection = selectedNiveaux;   size = 1;   class = niveau;   } 
   onChange : WOSubmitButton {   name = change;   action = 
onChange;   class = hide;   value = ;   }  in Java :
public WOActionResults onChange() {comboxNiveau(selectedPeriode); 
  return null;   }protected NSArray 
comboxNiveau(EOVuePeriodeParam periode)  {  if (periode == null) {   
 niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session()
 .defaultEditingContext(), niveauOrderings);   } else {  
  EOQualifier  qual = EOQualifier.qualifierWithQualifierFormat(   
 pperiode=%@, new  NSArray(periode.primaryKey())); 
   niveaux = EOVueNivAdm.fetchEOVueNivAdms(session()
 .defaultEditingContext(), qual, niveauOrderings);  }  }...   
   I want to know if there another way to refresh my pop 2  data without 
using the javascript which is obliged to submit  before refresh?  
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


[RESOLVED]Re: Re: WOPopUpButton - Refresh another WOPopUpButton onChange

2011-06-24 Thread naneon . raymond
Thanks a lot,


You guys you rock.




Envoyé depuis SFR Mail. 10 Go de stockage - en savoir plus.




Message du : 24/06/2011
De : Pascal Robert  prob...@macti.ca
A : Paul D Yu p...@mac.com
Copie à : naneon.raym...@neuf.fr, webobjects-dev@lists.apple.com
Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange


 


Le 2011-06-24 à 07:44, Paul D Yu a écrit :

It should still work.


You would have an action on the AjaxObserveField that points to a method on the 
Java class.  The AOF would wrap popUp1.  The AUC wraps popUp2.


When the popUp1 changes, the action will trigger and call the server method.  
In the server method you would use the objectSelection to fetch the data for 
the popUp2.  Then when the AjaxUpdateContainer of popUp2 refreshes, the data 
fetched previously will be there.


I believe that's how it works.


And it's working fine. I have a project where I use 5 WOBrowser components that 
depends on each other and it's working well.


Paul



On Jun 24, 2011, at 7:32 AM, naneon.raym...@neuf.fr wrote:
I used ajaxUpateContainer and an AjaxObserveField, but don't work because 
ajaxUpdateContainer can't refresh pop 2 data.
the relationShip beetwen periode and niveau id periode_id. periode don't 
contains niveau so impossible to connect observeField to call upDateContainer 
to refresh niveau list (list = niveaux not list = periode.niveaux )


Ray



Message du : 24/06/2011
De : Paul D Yu  p...@mac.com
A : naneon.raym...@neuf.fr naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: WOPopUpButton - Refresh another WOPopUpButton onChange


 
You can use ajaxUpateContainer and an AjaxObserveField?


Paul

Sent from my iPad

On Jun 24, 2011, at 5:51 AM, naneon.raym...@neuf.fr wrote:



-- SORRY THERE SOMES ERRORS - 

 Hi,


I have a little problem on my apps. When I want to search something, I do 
selection of parameters by WOPupUpButton.
But the problem is when I do the 1st search (1st fetch) there are no problem 
but when I want to do another search and I select another parameter in the 
WOPopUpButton which refresh the second one, the display page refresh all datas 
(do the fetch(1st search) I done before) and then update parameter of second 
WOPopUpButton. It makes my apps slow.


Here is exemple of codes :


in html :

webobject name = periode / Pop 1

webobject name = niveau / Pop 2, data depends to Pop1



webobject name = onChanges / WOSubmitButton hidden by css which contain 
method to refresh pop 2 data 

in wod :

periode : WOPopUpButton {
list = periodes;
item = currentPeriode;
displayString = currentPeriode.libelle;
noSelectionString = Toutes;
selection = selectedPeriode;
size = 1;
class = periode;
onchange = javascript:this.form.elements['change'].click(); action 
which call method bind to onChange WOSubmitButton
}



niveau : WOPopUpButton {
list = niveaux; ===data depend to Pop 1
item = currentNiveaux;
displayString =currentNiveaux.libelle;
noSelectionString = Tous;
selection = selectedNiveaux;
size = 1;
class = niveau;
}



onChanges : WOSubmitButton {
name = change;
action = onChang;
class = hide;
value = ;
}




in Java :

public WOActionResults onChang() {
comboxNiveau(selectedPeriode);
return null;
}

protected NSArray comboxNiveau(EOVuePeriodeParam periode) {
if (periode == null) {
niveaux = EOVueNivAdm.fetchAllEOVueNivAdms(session()
.defaultEditingContext(), 
niveauOrderings);
} else {
  EOQualifier qual = EOQualifier.qualifierWithQualifierFormat(
pperiode=%@, new 
NSArray(periode.primaryKey()));
niveaux = EOVueNivAdm.fetchEOVueNivAdms(session()
.defaultEditingContext(), qual, 
niveauOrderings);
}
}

...


I want to know if there another way to refresh my pop 2 data without using the 
javascript which is obliged to submit before refresh?


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/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/probert%40macti.ca

This email sent to prob...@macti.ca


 ___
Do not post admin 

Re: Re: WOPopUpButton - Refresh another WOPopUpButton onChange

2011-06-24 Thread naneon . raymond
Hi Theo,


Gotcha.


Thanks a lot





Message du : 24/06/2011
De : Theodore Petrosky  tedp...@yahoo.com
A : webobjects-dev@lists.apple.com, naneon.raym...@neuf.fr
Copie à : 
Sujet : Re: WOPopUpButton - Refresh another  WOPopUpButton onChange


 
  WOD   AjaxOF1 : AjaxObserveField {observeFieldID = pu1; 
action = actionForpu1;  updateContainerID = uc2 }  AjaxOF2 : 
AjaxObserveField {   observeFieldID = pu2; action = actionForpu2; 
}  AjaxOF3 : AjaxObserveField {  observeFieldID = pu3; action = 
actionForpu3; }  You can put the updatecontainer to update in each 
AjaxObserveField with updateContainerID =  or in the action method you can 
(just don't do it in both places):  public void actionForpu1() { //do some 
stuff using select1 and get the new list for pu2 
AjaxUpdateContainer.updateContainerWithID(uc2, context()); }  I sometimes 
like to put the ajaxupdatecontainers in the java because I can more easily see 
which containers I am updating. But that is just me.  Ted --- On Fri, 6/24/11, 
webobjects-dev-requ...@lists.apple.com  wrote:Message: 1  Date: Fri, 24 
Jun 2011 13:36:30 +0200 (CEST)  From: naneon.raym...@neuf.fr  Subject: Re: 
Re: Webobjects-dev Digest, Vol 8, Issue 428  To: Theodore Petrosky , 
WebObjects webobjects-devMessage-ID:  
32188123.693711308915390559.JavaMail.www@wsfrf1223  Content-Type: 
text/plain; charset=utf-8Hi,  I know this example and it work 
because the first pop 1  contains data of the pop 2. In my case, the pop 1 
don't  contains pop 2 data. so ajaxUpdateContainer don't work. to  refresh 
the pop 2 data, it call a method which fetch pop 2  with pop 1 selected data 
primaryKey.Ray  
Message du : 24/06/2011  De : Theodore PetroskyA : 
webobjects-dev@lists.apple.com  Copie à : naneon.raym...@neuf.fr  Sujet : 
Re: Webobjects-dev Digest, Vol 8, Issue 428 Have you looked at the 
Project Wonder Ajax examples. I use  the AjaxObserverField and 
AjaxUpdateContainer methods and  they work great for any number of WOPopUps 
that I want to be  dependent on each other.  Ted  
http://services.wocommunity.org/apps/WebObjects/AjaxExample   
-- Message: 3  Date: Fri, 24 Jun 2011  
11:46:22 +0200 (CEST)  From: naneon.raym...@neuf.fr   Subject: WOPopUpButton 
- Refresh another WOPopUpButton   onChange  To: WebObjects webobjects-dev   
 Message-ID: Hi,   I have a little problem on my apps. When I 
want to  search  something, I do selection of parameters by  WOPupUpButton. 
 But the problem is when I do the 1st  search (1st fetch)  there are no 
problem but when I want  to do another search  and I select another parameter 
in  the WOPopUpButton which  refresh the second one, the  display page 
refresh all datas  (do the fetch(1st  search) I done before) and then update 
 parameter of  second WOPopUpButton. It makesmy apps slow.  Here 
is  exemple of codes :  in html :  Pop 1 Pop 2,  data 
depends to  Pop1  WOSubmitButton hidden  by css which contain method 
to  refresh pop 2 data in wod : periode : WOPopUpButton {   
 list = periodes;item = currentPeriode;displayString = 
currentPeriode.libelle; noSelectionString =  Toutes;   
selection =  selectedPeriode;   size =  1;   class =  periode; 
  onchange =   javascript:this.form.elements['change'].click();  
action  which call method bind to onChange  WOSubmitButton   } 
niveau : WOPopUpButton {list = niveaux; ===data depend to   Pop 1  
 item =  currentNiveaux;displayString  
=currentNiveaux.libelle;noSelectionString = Tous;
selection =  selectedNiveaux;   size =  1;   class =  niveau;  
 } onChange : WOSubmitButton {name = change;
action = onChange;class = hide   ;   value = ;} 
 in Java : public WOActionResults onChange() {  
comboxNiveau(selectedPeriode);return null;}
protected NSArray  comboxNiveau(EOVuePeriodeParam periode)  {   if 
(periode == null) { niveaux =  
EOVueNivAdm.fetchAllEOVueNivAdms(session()
.defaultEditingContext(), niveauOrderings);} else { 
EOQualifier  qual =  EOQualifier.qualifierWithQualifierFormat(  
pperiode=%@, new   NSArray(periode.primaryKey()));  
   niveaux =  EOVueNivAdm.fetchEOVueNivAdms(session()  
  .defaultEditingContext(), qual, niveauOrderings);   }  
}...   I want to know if there another  way to refresh my pop 2 
 data without using the  javascript which is obliged to submit  before 
refresh?   Thanks   -- next part --  
An HTML attachment was scrubbed...  URL: 

Using StoredProcedure

2011-06-24 Thread naneon . raymond
Hi, 

I want to know how to use a stored procedure in WO. I created a configurable 
stored procedure that returns more than 2000 data. My question is,
data returned would be EOF or should I cast to an entity?  Could these data be 
stored in a WODisplayGroup? What should contain my method to execute the stored 
procedure? A few bits of code would be welcome.

Thanks a lot
 ___
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: Re: Re: How to get each CheckBox value inside a WORepetition Bind to the same variable[SOLVED]

2011-06-20 Thread naneon . raymond
Hi Alex,


I solved my problem.


Thanks a lot




Message du : 17/06/2011
De : naneon.raym...@neuf.fr
A : Alexis Tual alexis.t...@gmail.com, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: How to get each CheckBox value inside a WORepetition Bind to 
the same variable


 Hi Alex,


It works but I have an Exception on submit when the app is setting the 
checkBoxes value. I get : Exception Message ! Index (i) out of bounds [0, i-1]

i is the number of checkBoxes checked.


When I check all, there are no Exception. So What am I doing wrong?


Thanks


Message du : 17/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: How to get each CheckBox value inside a WORepetition Bind to the 
same variable


 Your WORepetition should have
 
list = listIng
item = currentIngenieur




your WOCheckbox :


checked = ingChecked


your Java :


public boolean ingChecked()


public void setIngChecked(...)




Le 17 juin 2011 à 13:46, naneon.raym...@neuf.fr naneon.raym...@neuf.fr a 
écrit :
Hi Alex,


Thanks for your help, but when I use your example I have 
javaNullPointerException because the checkBox checked is bound to this method 
: 




public boolean isIngChecked() {
return listIng.containsObject(currentIngenieur.diplSpecAbr()); 
===JavaNullPointerException
}

and java don't like the returned value. When I return a boolean variable, it 
works but there another problem on setter method. WO don't the setter method so 
I have this exception : 



sig.utt.fr.Session 0xe956bd takeValueForKey(): attempt to assign value to 
unknown key: 'isIngChecked'.
This class does not have an instance variable of the name isIngChecked or 
_isIngChecked, nor a method of the name setIsIngChecked or _setIsIngChecked



public void setIngChecked(boolean isIngChecked) {
this.isIngChecked = isIngChecked;
boolean isAlreadySelected = isIngChecked();
if (!isAlreadySelected  isIngChecked)
listIng.addObject(currentIngenieur.diplSpecAbr());
else if (isAlreadySelected  !isIngChecked)
listIng.removeObject(currentIngenieur.diplSpecAbr());
}


My CheckBox : 



ingenieurCheck : WOCheckBox {
class = texte;
name = ingenieur;
checked = isIngChecked;
//value = currentIngenieur.diplSpecAbr;
//onclick = IngChecked(this.form);
}


Ray



Message du : 17/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : Alexis Tual alexis.t...@gmail.com
Copie à : naneon.raym...@neuf.fr, ma...@onpointsoftware.com, 
ch...@global-village.net, webobjects-dev@lists.apple.com
Sujet : Re: How to get each CheckBox value inside a WORepetition Bind to the 
same variable


 Erf sorry my bad, see below :



Le 17 juin 2011 à 10:32, Alexis Tual a écrit :

Hi,


you need an array to store the selected objects, here's un example to a 
selection of movies.
Bind the checkbox's selection to movieSelected :
You need to use the checked binding of WOCheckBox, not selection...







public boolean movieSelected() {
return selectedMovies.containsObject(currentMovie);
}


public boolean setMovieSelected(boolean checked) { 
boolean isAlreadySelected = movieSelected();

if (!isAlreadySelected  checked)
selectedMovies.addobject(currentMovie);
else if (isAlreadySelected  !checked)
selectedMovies.removeObject(currentMovie);

}


Cheers


Alex



Le 17 juin 2011 à 10:05, naneon.raym...@neuf.fr a écrit :



Hi,
[snip]

masterCheck : WOCheckBox { 
class = texte; 
  name = master;
*To Chuck === Why I can't give the same name of my checkboxes?*

  selection = selectedMaster; -Variable bind to check box value
  value = master.diplSpecAbr; ---CheckBox value
// onclick = MstChecked(this.form); JS function wo call a java method to 
get checkbox value


The only binding you need to get the checkbox value is the value binding. 
This is two-way, just like a WOString. When the page is displayed, it will try 
to evaluate diplSpecAbr or getDiplSpecAbr. When the form is submitted, it will 
call setDiplSpecAbr. (Or it will try to read and set the variable, if that's 
what it is vs. accessor methods.) 


You don't need the selection or onclick to get the values back. 
master.diplSpecAbr, for each item, will just be set to the value automatically 
when the form is submitted.
===When I don't put 'selection' in attribute of my checkBox in WOD I have this 
error  : if either selection or value is bound, then both must be bound. So 
it's important to have 'selection' attribute for a checkBox in WO.


=== If I don't have 'selection' which is bound to the value of my checkBox, 
How I get my selectedValue in the nextPage of my apps?


Re: Re: How to get each CheckBox value inside a WORepetition Bind to the same variable

2011-06-17 Thread naneon . raymond



Hi,
[snip]

masterCheck : WOCheckBox { 
class = texte; 
  name = master;
*To Chuck === Why I can't give the same name of my checkboxes?*

  selection = selectedMaster; -Variable bind to check box value
  value = master.diplSpecAbr; ---CheckBox value
// onclick = MstChecked(this.form); JS function wo call a java method to 
get checkbox value


The only binding you need to get the checkbox value is the value binding. 
This is two-way, just like a WOString. When the page is displayed, it will try 
to evaluate diplSpecAbr or getDiplSpecAbr. When the form is submitted, it will 
call setDiplSpecAbr. (Or it will try to read and set the variable, if that's 
what it is vs. accessor methods.) 


You don't need the selection or onclick to get the values back. 
master.diplSpecAbr, for each item, will just be set to the value automatically 
when the form is submitted.
===When I don't put 'selection' in attribute of my checkBox in WOD I have this 
error  : if either selection or value is bound, then both must be bound. So 
it's important to have 'selection' attribute for a checkBox in WO.


=== If I don't have 'selection' which is bound to the value of my checkBox, 
How I get my selectedValue in the nextPage of my apps?


For checkboxes, it's often useful to have accessor methods in the page's java 
that explicitly translates between the checkbox's boolean and the meaning in 
the object. You would have access to the master item from the repetition 
there, so implementation is straightforward.


===I have my accessor methods in the page's java. When I select the checkBox, 
it set the value the selection variable. and when I want to get this value, I 
call get of the selection variable. But in this case, we are in another 
context. Do you have an example for me?


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: Re: How to get each CheckBox value inside a WORepetition Bind to the same variable

2011-06-17 Thread naneon . raymond
Hi Alex,


Thanks for your help, but when I use your example I have 
javaNullPointerException because the checkBox checked is bound to this method 
: 




public boolean isIngChecked() { 
return listIng.containsObject(currentIngenieur.diplSpecAbr()); 
===JavaNullPointerException 
}

and java don't like the returned value. When I return a boolean variable, it 
works but there another problem on setter method. WO don't the setter method so 
I have this exception : 



sig.utt.fr.Session 0xe956bd takeValueForKey(): attempt to assign value to 
unknown key: 'isIngChecked'.
This class does not have an instance variable of the name isIngChecked or 
_isIngChecked, nor a method of the name setIsIngChecked or _setIsIngChecked



public void setIngChecked(boolean isIngChecked) { 
this.isIngChecked = isIngChecked; 
boolean isAlreadySelected = isIngChecked(); 
if (!isAlreadySelected  isIngChecked) 
listIng.addObject(currentIngenieur.diplSpecAbr()); 
else if (isAlreadySelected  !isIngChecked) 
listIng.removeObject(currentIngenieur.diplSpecAbr()); 
}


My CheckBox : 



ingenieurCheck : WOCheckBox { 
class = texte; 
name = ingenieur; 
checked = isIngChecked; 
//value = currentIngenieur.diplSpecAbr; 
//onclick = IngChecked(this.form); 
}


Ray



Message du : 17/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : Alexis Tual alexis.t...@gmail.com
Copie à : naneon.raym...@neuf.fr, ma...@onpointsoftware.com, 
ch...@global-village.net, webobjects-dev@lists.apple.com
Sujet : Re: How to get each CheckBox value inside a WORepetition Bind to the 
same variable


 Erf sorry my bad, see below :



Le 17 juin 2011 à 10:32, Alexis Tual a écrit :

Hi,


you need an array to store the selected objects, here's un example to a 
selection of movies.
Bind the checkbox's selection to movieSelected :
You need to use the checked binding of WOCheckBox, not selection...







public boolean movieSelected() {
return selectedMovies.containsObject(currentMovie);
}


public boolean setMovieSelected(boolean checked) { 
boolean isAlreadySelected = movieSelected();

if (!isAlreadySelected  checked)
selectedMovies.addobject(currentMovie);
else if (isAlreadySelected  !checked)
selectedMovies.removeObject(currentMovie);

}


Cheers


Alex



Le 17 juin 2011 à 10:05, naneon.raym...@neuf.fr a écrit :



Hi,
[snip]

masterCheck : WOCheckBox { 
class = texte; 
  name = master;
*To Chuck === Why I can't give the same name of my checkboxes?*

  selection = selectedMaster; -Variable bind to check box value
  value = master.diplSpecAbr; ---CheckBox value
// onclick = MstChecked(this.form); JS function wo call a java method to 
get checkbox value


The only binding you need to get the checkbox value is the value binding. 
This is two-way, just like a WOString. When the page is displayed, it will try 
to evaluate diplSpecAbr or getDiplSpecAbr. When the form is submitted, it will 
call setDiplSpecAbr. (Or it will try to read and set the variable, if that's 
what it is vs. accessor methods.) 


You don't need the selection or onclick to get the values back. 
master.diplSpecAbr, for each item, will just be set to the value automatically 
when the form is submitted.
===When I don't put 'selection' in attribute of my checkBox in WOD I have this 
error  : if either selection or value is bound, then both must be bound. So 
it's important to have 'selection' attribute for a checkBox in WO.


=== If I don't have 'selection' which is bound to the value of my checkBox, 
How I get my selectedValue in the nextPage of my apps?


For checkboxes, it's often useful to have accessor methods in the page's java 
that explicitly translates between the checkbox's boolean and the meaning in 
the object. You would have access to the master item from the repetition 
there, so implementation is straightforward.


===I have my accessor methods in the page's java. When I select the checkBox, 
it set the value the selection variable. and when I want to get this value, I 
call get of the selection variable. But in this case, we are in another 
context. Do you have an example for me?


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/alexis.tual%40gmail.com

This email sent to alexis.t...@gmail.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:

Re: Re: How to get each CheckBox value inside a WORepetition Bind to the same variable

2011-06-17 Thread naneon . raymond
Hi Alex,


It works but I have an Exception on submit when the app is setting the 
checkBoxes value. I get : Exception Message ! Index (i) out of bounds [0, i-1]

i is the number of checkBoxes checked.


When I check all, there are no Exception. So What am I doing wrong?


Thanks


Message du : 17/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: How to get each CheckBox value inside a WORepetition Bind to the 
same variable


 Your WORepetition should have
 
list = listIng
item = currentIngenieur




your WOCheckbox :


checked = ingChecked


your Java :


public boolean ingChecked()


public void setIngChecked(...)




Le 17 juin 2011 à 13:46, naneon.raym...@neuf.fr naneon.raym...@neuf.fr a 
écrit :
Hi Alex,


Thanks for your help, but when I use your example I have 
javaNullPointerException because the checkBox checked is bound to this method 
: 




public boolean isIngChecked() {
return listIng.containsObject(currentIngenieur.diplSpecAbr()); 
===JavaNullPointerException
}

and java don't like the returned value. When I return a boolean variable, it 
works but there another problem on setter method. WO don't the setter method so 
I have this exception : 



sig.utt.fr.Session 0xe956bd takeValueForKey(): attempt to assign value to 
unknown key: 'isIngChecked'.
This class does not have an instance variable of the name isIngChecked or 
_isIngChecked, nor a method of the name setIsIngChecked or _setIsIngChecked



public void setIngChecked(boolean isIngChecked) {
this.isIngChecked = isIngChecked;
boolean isAlreadySelected = isIngChecked();
if (!isAlreadySelected  isIngChecked)
listIng.addObject(currentIngenieur.diplSpecAbr());
else if (isAlreadySelected  !isIngChecked)
listIng.removeObject(currentIngenieur.diplSpecAbr());
}


My CheckBox : 



ingenieurCheck : WOCheckBox {
class = texte;
name = ingenieur;
checked = isIngChecked;
//value = currentIngenieur.diplSpecAbr;
//onclick = IngChecked(this.form);
}


Ray



Message du : 17/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : Alexis Tual alexis.t...@gmail.com
Copie à : naneon.raym...@neuf.fr, ma...@onpointsoftware.com, 
ch...@global-village.net, webobjects-dev@lists.apple.com
Sujet : Re: How to get each CheckBox value inside a WORepetition Bind to the 
same variable


 Erf sorry my bad, see below :



Le 17 juin 2011 à 10:32, Alexis Tual a écrit :

Hi,


you need an array to store the selected objects, here's un example to a 
selection of movies.
Bind the checkbox's selection to movieSelected :
You need to use the checked binding of WOCheckBox, not selection...







public boolean movieSelected() {
return selectedMovies.containsObject(currentMovie);
}


public boolean setMovieSelected(boolean checked) { 
boolean isAlreadySelected = movieSelected();

if (!isAlreadySelected  checked)
selectedMovies.addobject(currentMovie);
else if (isAlreadySelected  !checked)
selectedMovies.removeObject(currentMovie);

}


Cheers


Alex



Le 17 juin 2011 à 10:05, naneon.raym...@neuf.fr a écrit :



Hi,
[snip]

masterCheck : WOCheckBox { 
class = texte; 
  name = master;
*To Chuck === Why I can't give the same name of my checkboxes?*

  selection = selectedMaster; -Variable bind to check box value
  value = master.diplSpecAbr; ---CheckBox value
// onclick = MstChecked(this.form); JS function wo call a java method to 
get checkbox value


The only binding you need to get the checkbox value is the value binding. 
This is two-way, just like a WOString. When the page is displayed, it will try 
to evaluate diplSpecAbr or getDiplSpecAbr. When the form is submitted, it will 
call setDiplSpecAbr. (Or it will try to read and set the variable, if that's 
what it is vs. accessor methods.) 


You don't need the selection or onclick to get the values back. 
master.diplSpecAbr, for each item, will just be set to the value automatically 
when the form is submitted.
===When I don't put 'selection' in attribute of my checkBox in WOD I have this 
error  : if either selection or value is bound, then both must be bound. So 
it's important to have 'selection' attribute for a checkBox in WO.


=== If I don't have 'selection' which is bound to the value of my checkBox, 
How I get my selectedValue in the nextPage of my apps?


For checkboxes, it's often useful to have accessor methods in the page's java 
that explicitly translates between the checkbox's boolean and the meaning in 
the object. You would have access to the master item from the repetition 
there, so implementation is straightforward.


===I have my accessor methods in the page's java. When I select the 

How to get each CheckBox value inside a WORepetition Bind to the same variable

2011-06-16 Thread naneon . raymond


Hi,




I have a little problem with checkBoxes values. I have a checkBox which is in a 
WORepetition and bind to one String variable.
in html :
... 
webobject name = masterList--WORepetition
   nbsp;webobject name = masterCheck /--Check Box
webobject name = masterLib /br /-- WORepetition item label
/webobject
...




in wod :




...


masterList : WORepetition { 
  list = masters; 
  item = master; 
} 


masterLib : WOString { 
  value = master.descFr; 
} 




masterCheck : WOCheckBox { 
class = texte; 
  name = master; 
  selection = selectedMaster; -Variable bind to check box value
  value = master.diplSpecAbr; ---CheckBox value
  onclick = MstChecked(this.form); JS function wo call a java method to 
get checkbox value




..


in Browser :


...
br /
 nbsp;input onclick=MstChecked(this.form) class=texte type=checkbox 
value=CV MAST name=master /Convention Master (CV MAST)br / =bind to 
selectedMaster
 nbsp;input onclick=MstChecked(this.form) class=texte type=checkbox 
value=IM name=master /Ingénierie et management (IM)br / =bind to 
selectedMaster
nbsp;input onclick=MstChecked(this.form) class=texte type=checkbox 
value=MP name=master /Mécanique et Physique (MP)br / =bind to 
selectedMaster
nbsp;input onclick=MstChecked(this.form) class=texte type=checkbox 
value=STIC name=master /Sciences et Technologies de l'information et de la 
communication (STIC) =bind to selectedMaster
br /
...//All CheckBoxes value are bind to the same variable java side. I can't 
check all



So when I execute my apps WORepetition return some CheckBoxes which correspond 
of object's number listed. And theses CheckBoxes are Bind to the same variable.
In html when I check all checkBoxes there are no problem but java side I have 
very very big problem to work with the value of theses checkBoxes.


How can I turn my code to allow one variable to have one checkBox?


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: Re: JDK 1.4.2 under 10.6.7

2011-06-15 Thread naneon . raymond
If you want to use java 1.4, the first question is : Java 1.4 is already 
install under 1.6.7??
answer is NO. So install it and point on it to use it with your eclipse.

mkdir tmp cd tmp/ curl -o java.1.4.2-leopard.tar.gz 
http://www.cs.washington.edu/homes/isdal/snow_leopard_workaround/java.1.4.2-leopard.tar.gz
 tar -xvf java.1.4.2-leopard.tar.gz sudo mv 1.4.2 
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2-leopard cd 
/System/Library/Frameworks/JavaVM.framework/Versions/ sudo ln -s 1.4.2-leopard 
1.4.2 sudo ln -s 1.4.2 1.4 open /Applications/Utilities/Java Preferences.app

- If the 1.4 version of Java is in the list, to allow the system to use it,  
just select it and drag it above other versions and check the version in  the 
terminal: java-version

Chuss




Message du : 15/06/2011
De : John Huss  johnth...@gmail.com
A : Frédéric JECKER f.jec...@symaris.com
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: JDK 1.4.2 under 10.6.7


 I would ignore the new standard and just install them in the old location, but 
be aware that installing a new java version after that will break it, so be 
careful.

John

On Wed, Jun 15, 2011 at 7:02 AM, Frédéric JECKER f.jec...@symaris.com wrote:
 Moin list,
 

I need to setup my workspace in order to compile my app with an 1.4 vm.
So I downloaded JavaForMacOSX10.5Update4 from Apple's website and extracted the 
1.4.2 directory from the archive and copied it to the new standard java vm 
location (/System/Library/Java/JavaVirtualMachines).
 Under eclipse I create a new MacOSX VM pointing to the 1.4 vm.
The problem is that after selecting the 1.4 vm in the JRE System Libraries 
part of the eclipse window each jar file is pointing on the 1.6 vm.
 Any clue (I checked every single symbolic link without any success) ?


Thanks for your help



 
 ___
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


Add a WOComponent in AjaxGrid via a method

2011-06-14 Thread naneon . raymond
Hi All,


I would like to add a WOComponent to a ajaxGrid without necessarily going 
through a . plist file, but adds the component that goes well with the data it 
will reference via a method. The problem is that is WOComponent not show but 
instead it displays the class and subclass of the component. And when I put a 
reference component in my. plist file and the name of component will be given 
when adding to the data, WO gives me an exception because AjaxGrid does not 
find the component. In Indeed, this name does not match anything, I take it 
like a variable.


i.e :  in WOD 



addData : WOSubmitButton { 
 action = addDataToGrid; 
 value = Add; 
 updateContainerID = dataAjaxGridContainer; //Update the ajaxGrid 
}


in .plist file : 
..

{ 
  title = HETIC;   
  keyPath = col1; //Here is data   
 }, 
 { 
  title = % de financement; // Here is component referenced 
  keyPath = col2; //keyPath I choosed to add a component
  *component = variable // get an exception because the Grid want a component 
real name not an variable 
  }
..


in Java :


public WOActionResults addDataToGrid() {

AjaxGridPopFormInput formInput = new AjaxGridPopFormInput(ctxt);//a WOInput 
component

NSMutableArray dataDico = null;

...

posteDico0.takeValueForKey(data1, col1);
posteDico0.takeValueForKey(formInput, col2); //This is my component
posteDico = new NSMutableArray(posteDico0);
... 


Resulat : 


dataLabel  dataComponent


Hello  
projet.rec.utt.server.components.AjaxGridPopFormInput name: 
projet.rec.utt.server.components.AjaxGridPopFormInput subcomponents: null 




My Problem is How to display the component correctly?


Thanks for all











 ___
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: Re: Add a WOComponent in AjaxGrid via a method

2011-06-14 Thread naneon . raymond
Hi Chuck,


If I want to use WoSwitchComponent in my plist. I code it like that ?



in .plist file : 
..

{
  title = HETIC;  
  keyPath = col1; //Here is data  
 },
 {
  title = % de financement; // Here is component referenced
  component = WoSwitchComponentName

  }


In my java Method





public WOActionResults addDataToGrid() {
WoSwitchComponentName componentSw = new WoSwitchComponentName(ctxt);//






NSMutableArray dataDico = null;



   ...
   posteDico0.takeValueForKey(data1, col1);
   componentSw.WOComponentName = myOwnComponentName;



posteDico = new NSMutableArray(posteDico0);   ...


This code in my java addData method can work? 
Thanks



Message du : 14/06/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Add a WOComponent in AjaxGrid via a method


 Hi Raymond,


AjaxGrid does not support doing it like that.  You will need to make your own 
WOComponent to put in the cell.  There is no other option.  Inside that 
component, you can use a WOSwitchComponent and determine the actual component 
name at runtime based on the row.


WOSwitchComponent




Chuck





On Jun 14, 2011, at 5:43 AM, naneon.raym...@neuf.fr wrote:
Hi All,


I would like to add a WOComponent to a ajaxGrid without necessarily going 
through a . plist file, but adds the component that goes well with the data it 
will reference via a method. The problem is that is WOComponent not show but 
instead it displays the class and subclass of the component. And when I put a 
reference component in my. plist file and the name of component will be given 
when adding to the data, WO gives me an exception because AjaxGrid does not 
find the component. In Indeed, this name does not match anything, I take it 
like a variable.


i.e :  in WOD 



addData : WOSubmitButton {
 action = addDataToGrid;
 value = Add;
 updateContainerID = dataAjaxGridContainer; //Update the ajaxGrid
}


in .plist file : 
..

{
  title = HETIC;  
  keyPath = col1; //Here is data  
 },
 {
  title = % de financement; // Here is component referenced
  keyPath = col2; //keyPath I choosed to add a component
  *component = variable // get an exception because the Grid want a component 
real name not an variable
  }
..


in Java :


public WOActionResults addDataToGrid() {

AjaxGridPopFormInput formInput = new AjaxGridPopFormInput(ctxt);//a WOInput 
component

NSMutableArray dataDico = null;



...

posteDico0.takeValueForKey(data1, col1);
posteDico0.takeValueForKey(formInput, col2); //This is my component
posteDico = new NSMutableArray(posteDico0);
... 


Resulat : 


dataLabel  dataComponent


Hello  
projet.rec.utt.server.components.AjaxGridPopFormInput name: 
projet.rec.utt.server.components.AjaxGridPopFormInput subcomponents: null 




My Problem is How to display the component correctly?


Thanks for all











 ___
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

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/  

 ___
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


Duplicated data after fetching on a view

2011-06-09 Thread naneon . raymond
Hi All,


I create a view to get all data I want and do a fetch on WO to return specific 
data. So When I create my fetching code, the sqlExpression is good but return 
same data several times although it count different data.
I.e : 


Java fetch code:  NSMutableArrayEOQualifier qualFinal = new 
NSMutableArrayEOQualifier(); 
NSMutableArrayString qualFi = new NSMutableArrayString(); 
qualFi.add(110); 
qualFi.add(120); 
NSArray DiplOrderings = new NSArray(new Object[]{ 

EOSortOrdering.sortOrderingWithKey(DilplomeSpec.DIPL_SPEC_C_KEY,EOSortOrdering.CompareAscending),
 

EOSortOrdering.sortOrderingWithKey(DilplomeSpec.DIPLOME_C_KEY,EOSortOrdering.CompareAscending)});
 
EOQualifier qualING2 = 
EOQualifier.qualifierWithQualifierFormat( 
diplomeC = %@, new NSArrayString(ING2)); 
EOQualifier qualING2a = 
EOQualifier.qualifierWithQualifierFormat( 
diplSpecC  %@ AND diplSpecC  %@, new 
NSArrayString(qualFi)); 
qualFinal.add(qualING2); 
qualFinal.add(qualING2a); 
EOQualifier ingenieux = new EOAndQualifier(qualFinal); 
EOQualifier qualMST = EOQualifier.qualifierWithQualifierFormat( 
diplomeC = %@, new NSArrayString(MST)); 
//Liste des spécialité Ingénieur 

sessionFr.setIngenieurs(DilplomeSpec.fetchDilplomeSpecs(session().defaultEditingContext(),
 ingenieux, DiplOrderings)); 
for (int i=0; i sessionFr.getIngenieurs().count(); i++){ 
DilplomeSpec ing = 
sessionFr.getIngenieurs().objectAtIndex(i); 
NSLog.out.appendln(ing.descFr()); 
} 
//Liste des spécialités master 

sessionFr.setMasters(DilplomeSpec.fetchDilplomeSpecs(session().defaultEditingContext(),
 qualMST, DiplOrderings)); 
for (int i=0; i sessionFr.getMasters().count(); i++){ 
DilplomeSpec mst = 
sessionFr.getMasters().objectAtIndex(i); 
NSLog.out.appendln(mst.descFr()); 
}


Result in Log : 


2327 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT t0.DESC_EN, 
t0.DESC_FR, t0.DIPL_SPEC_C, t0.DIPLOME_C FROM GERRY.V_DIPSPEC_PRDDEF t0 WHERE 
(t0.DIPLOME_C = ? AND (t0.DIPL_SPEC_C  ? AND t0.DIPL_SPEC_C  ?)) ORDER BY 
t0.DIPL_SPEC_C ASC, t0.DIPLOME_C ASC withBindings: 1:ING2(diplomeC), 
2:110(diplSpecC), 3:120(diplSpecC) 
2460 [WorkerThread0] DEBUG NSLog  - 6 row(s) processed 
2461 [WorkerThread0] DEBUG NSLog  -  === Commit Internal Transaction 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT) 
2480 [WorkerThread0] DEBUG NSLog  -  === Begin Internal Transaction 
2480 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT t0.DESC_EN, 
t0.DESC_FR, t0.DIPL_SPEC_C, t0.DIPLOME_C FROM GERRY.V_DIPSPEC_PRDDEF t0 WHERE 
t0.DIPLOME_C = ? ORDER BY t0.DIPL_SPEC_C ASC, t0.DIPLOME_C ASC withBindings: 
1:MST(diplomeC) 
2485 [WorkerThread0] DEBUG NSLog  - 4 row(s) processed 
2486 [WorkerThread0] DEBUG NSLog  -  === Commit Internal Transaction 
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST) 
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST) 
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST) 
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST)


When I excecute this SQL Expression in SqlDeveloper I have this result :


Expression 1 : SELECT t0.DESC_EN, t0.DESC_FR, t0.DIPL_SPEC_C, t0.DIPLOME_C FROM 
GERRY.V_DIPSPEC_PRDDEF t0 WHERE (t0.DIPLOME_C = 'ING2' AND (t0.DIPL_SPEC_C  
'110' AND t0.DIPL_SPEC_C  '120')) ORDER BY t0.DIPL_SPEC_C ASC, t0.DIPLOME_C 
ASC;


Result : 

DESC_EN   
   DESC_FR   
DIPL_SPEC_CDIPLOME_C
1-Information Systems and telecommunications (SIT)Systmes d'Information 
et de TŽlŽcommunications (SIT) 121   ING2
2-Industrial Systems (SI) Systmes Industriels (SI) 122   ING2
3-Mechanical Systems (SM) Systmes MŽcaniques (SM)  123   ING2
4-Materials Science and Technology (MTE)  MatŽriaux : Technologie et 

[RESOLVED] Duplicated data after fetching on a view

2011-06-09 Thread naneon . raymond
Hi Alex,


Thanks a lot., you have right.
In fact, I defined the pk of the view on field which contain the same code for 
all data. 
So I redefined my pk on another field which have unique code for each data and 
it works.


So I go to write fetch spec to clear my fetching data.


Thanks


Message du : 09/06/2011
De : Alexis Tual  alexis.t...@gmail.com
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Duplicated data after fetching on a view


 Hi Naneon,


my guess is that your entities mapping your views have no primary key defined 
(i'm not sure it's even allowed)... or the primary key defined is not one (not 
unique)


Cheers


Alex



Le 9 juin 2011 à 11:00, naneon.raym...@neuf.fr a écrit :
Hi All,


I create a view to get all data I want and do a fetch on WO to return specific 
data. So When I create my fetching code, the sqlExpression is good but return 
same data several times although it count different data.
I.e : 


Java fetch code:  NSMutableArrayEOQualifier qualFinal = new 
NSMutableArrayEOQualifier();
NSMutableArrayString qualFi = new NSMutableArrayString();
qualFi.add(110);
qualFi.add(120);
NSArray DiplOrderings = new NSArray(new Object[]{

EOSortOrdering.sortOrderingWithKey(DilplomeSpec.DIPL_SPEC_C_KEY,EOSortOrdering.CompareAscending),

EOSortOrdering.sortOrderingWithKey(DilplomeSpec.DIPLOME_C_KEY,EOSortOrdering.CompareAscending)});
EOQualifier qualING2 = EOQualifier.qualifierWithQualifierFormat(
diplomeC = %@, new NSArrayString(ING2));
EOQualifier qualING2a = 
EOQualifier.qualifierWithQualifierFormat(
diplSpecC  %@ AND diplSpecC  %@, new 
NSArrayString(qualFi));
qualFinal.add(qualING2);
qualFinal.add(qualING2a);
EOQualifier ingenieux = new EOAndQualifier(qualFinal);
EOQualifier qualMST = EOQualifier.qualifierWithQualifierFormat(
diplomeC = %@, new NSArrayString(MST));
//Liste des spécialité Ingénieur

sessionFr.setIngenieurs(DilplomeSpec.fetchDilplomeSpecs(session().defaultEditingContext(),
 ingenieux, DiplOrderings));
for (int i=0; i sessionFr.getIngenieurs().count(); i++){
DilplomeSpec ing = 
sessionFr.getIngenieurs().objectAtIndex(i);
NSLog.out.appendln(ing.descFr());
}
//Liste des spécialités master

sessionFr.setMasters(DilplomeSpec.fetchDilplomeSpecs(session().defaultEditingContext(),
 qualMST, DiplOrderings));
for (int i=0; i sessionFr.getMasters().count(); i++){
DilplomeSpec mst = 
sessionFr.getMasters().objectAtIndex(i);
NSLog.out.appendln(mst.descFr());
}


Result in Log : 


2327 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT t0.DESC_EN, 
t0.DESC_FR, t0.DIPL_SPEC_C, t0.DIPLOME_C FROM GERRY.V_DIPSPEC_PRDDEF t0 WHERE 
(t0.DIPLOME_C = ? AND (t0.DIPL_SPEC_C  ? AND t0.DIPL_SPEC_C  ?)) ORDER BY 
t0.DIPL_SPEC_C ASC, t0.DIPLOME_C ASC withBindings: 1:ING2(diplomeC), 
2:110(diplSpecC), 3:120(diplSpecC)
2460 [WorkerThread0] DEBUG NSLog  - 6 row(s) processed
2461 [WorkerThread0] DEBUG NSLog  -  === Commit Internal Transaction
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] INFO NSLog  - Systèmes d'Information et de 
Télécommunications (SIT)
2480 [WorkerThread0] DEBUG NSLog  -  === Begin Internal Transaction
2480 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: SELECT t0.DESC_EN, 
t0.DESC_FR, t0.DIPL_SPEC_C, t0.DIPLOME_C FROM GERRY.V_DIPSPEC_PRDDEF t0 WHERE 
t0.DIPLOME_C = ? ORDER BY t0.DIPL_SPEC_C ASC, t0.DIPLOME_C ASC withBindings: 
1:MST(diplomeC)
2485 [WorkerThread0] DEBUG NSLog  - 4 row(s) processed
2486 [WorkerThread0] DEBUG NSLog  -  === Commit Internal Transaction
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST)
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST)
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST)
2486 [WorkerThread0] INFO NSLog  - Convention Master (CV MAST)


When I excecute this SQL Expression in SqlDeveloper I have this result :


Expression 1 : SELECT t0.DESC_EN, t0.DESC_FR, 

Re: Re: Using DataGrid in WO

2011-05-26 Thread naneon . raymond
Thanks Chuck,

I go to try to follow your advice.

Ray



Message du : 25/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com, prob...@macti.ca
Sujet : Re: Using DataGrid in WO


 Hi Raymond,


On May 25, 2011, at 3:10 AM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

Hi Chuck,

this is my html : 
wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid

wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson

/wo:AjaxModalDialogOpener

webobject name=personNavBar
webobject namepersonGrid

and this is my WOD

personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

NavBarPerson : AjaxGridNavPersonBar {
  containerID = NavBarPerson;
  displayGroup = personDg;
  configurationData = personDataConfig;
}

I don't use AjaxModalDialog but AjaxModalDialogOpener.

But... you do have an AjaxModalDialog that the AjaxModalDialogOpener is 
opening, right?  If you don't, you are not using the AjaxModalDialogOpener 
correctly.  If you do have an AjaxModalDialog (even if it is in a different 
component), then the closeUpdateContainerID goes in that WOD definition.



 Can I surround AjaxModalDialogOpener with AjaxModalDialog ?

No.  See how they are used in the AjaxExamples application in Wonder.   You 
also should not have a submit button inside the AjaxModalDialogOpener:


wo:AjaxModalDialogOpener id=refreshGrid

wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson

/wo:AjaxModalDialogOpener




 Where I insert AjaxModalDialog  in my code to refresh my grid? My 
AjaxModalDialogOpener is on the good side in html code?


The AjaxModalDialog was to edit the information shown in your grid.




Chuck




Message du : 25/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 In the plist that has your grid configuration, add a line like this:    
updateContainerID = resultsContainer;


Then in the WOD that defines the dialog:
MyDialog : AjaxModalDialog {
  closeUpdateContainerID = resultsContainer;




Chuck




On May 20, 2011, at 12:34 PM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

Hi Chuck,

Can you give me an example, I don't know how to introduce it in my code.


Thanks




Message du : 20/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 Use the closeUpdateContainerID binding on the AjaxModalDialog.


On May 20, 2011, at 6:07 AM, naneon.raym...@neuf.fr wrote:

Hi Chuck,

I try to follow your advice but I have some problems.

In HTML (my textfield and button using to add person in my Grid: )

wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid
wo:AjaxSubmitButton action=$addPerson value=add
/wo:AjaxModalDialogOpener
webobject name=personNavBar
webobject namepersonGrid

In WOD
...
personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

in java class
... variable declaration

public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}

private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, persnoFullname 1);

return (NSMutableArray) personDico.allValues();
}

My question is How to refresh my Grid to know if the person I added is present 
in the grid?

Thanks


Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 I have never added data directly in a grid.  You would need to create a new 
object in the display group that the grid is using and use AjaxInPlace fields 
to edit the data.  Instead, I use an AjaxModalDialogOpener in the grid and an 
AjaxModalDialog to add or edit one object.  When the modal dialog closed, it 
refreshes the grid.

Chuck



On May 19, 2011, at 10:31 AM, naneon.raym...@neuf.fr wrote:

Hi Chuck,

I want to fill my AjaxGrid by adding data using textField and submitButton.


How my addData() method can look like? I want to add person by company 
(PopUpButton with companies).
my configData file .plist is :


{
tableID = personGrid;  
    updateContainerID = ajaxGridContainer;
    sortable = true;
    canReorder = true;   
    batchSize = 4;
    cssClass = ajaxGridTab;    
    cssStyle = border: thin solid #00;;  
evenRowCSSClass = none;
oddRowCSSStyle = background:lightgrey;;
 

Re: Re: Using DataGrid in WO

2011-05-25 Thread naneon . raymond
Hi Chuck,

this is my html : 
wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid

wo:AjaxSubmitButton action=$addSelectedPerson value=addPerson

/wo:AjaxModalDialogOpener

webobject name=personNavBar
webobject namepersonGrid

and this is my WOD

personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

NavBarPerson : AjaxGridNavPersonBar {
  containerID = NavBarPerson;
  displayGroup = personDg;
  configurationData = personDataConfig;
}

I don't use AjaxModalDialog but AjaxModalDialogOpener. Can I surround 
AjaxModalDialogOpener with AjaxModalDialog ? Where I insert AjaxModalDialog  in 
my code to refresh my grid? My AjaxModalDialogOpener is on the good side in 
html code?

Thanks a lot



Message du : 25/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 In the plist that has your grid configuration, add a line like this:    
updateContainerID = resultsContainer;


Then in the WOD that defines the dialog:
MyDialog : AjaxModalDialog {
  closeUpdateContainerID = resultsContainer;




Chuck




On May 20, 2011, at 12:34 PM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

Hi Chuck,

Can you give me an example, I don't know how to introduce it in my code.


Thanks




Message du : 20/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 Use the closeUpdateContainerID binding on the AjaxModalDialog.


On May 20, 2011, at 6:07 AM, naneon.raym...@neuf.fr wrote:

Hi Chuck,

I try to follow your advice but I have some problems.

In HTML (my textfield and button using to add person in my Grid: )

wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid
wo:AjaxSubmitButton action=$addPerson value=add
/wo:AjaxModalDialogOpener
webobject name=personNavBar
webobject namepersonGrid

In WOD
...
personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

in java class
... variable declaration

public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}

private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, persnoFullname 1);

return (NSMutableArray) personDico.allValues();
}

My question is How to refresh my Grid to know if the person I added is present 
in the grid?

Thanks


Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 I have never added data directly in a grid.  You would need to create a new 
object in the display group that the grid is using and use AjaxInPlace fields 
to edit the data.  Instead, I use an AjaxModalDialogOpener in the grid and an 
AjaxModalDialog to add or edit one object.  When the modal dialog closed, it 
refreshes the grid.

Chuck



On May 19, 2011, at 10:31 AM, naneon.raym...@neuf.fr wrote:

Hi Chuck,

I want to fill my AjaxGrid by adding data using textField and submitButton.


How my addData() method can look like? I want to add person by company 
(PopUpButton with companies).
my configData file .plist is :


{
tableID = personGrid;  
    updateContainerID = ajaxGridContainer;
    sortable = true;
    canReorder = true;   
    batchSize = 4;
    cssClass = ajaxGridTab;    
    cssStyle = border: thin solid #00;;  
evenRowCSSClass = none;
oddRowCSSStyle = background:lightgrey;;
selectedRowCSSStyle = font-weight: bold;;   
selectedRowCSSClass = ajaxGridSelectedRow; 
rowIdentifier = number;
dragHeaderOnly = true;
    columns = (
{
title = Apple;
keyPath = personFullName 1;
    

},
{
title = Microsoft;
keyPath = personFullName 2;
},  
{
title = Rim;
keyPath = personFullName 3;
},
{
title = Google;
keyPath = personFullName 4;
}
);
 sortOrder = (
{
keyPath = personFullName 1;
direction = descending;
},
{
keyPath = personFullName 2;
 

Re: Re: Using DataGrid in WO

2011-05-20 Thread naneon . raymond
Hi Chuck,

I try to follow your advice but I have some problems.

In HTML (my textfield and button using to add person in my Grid: )

wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid
wo:AjaxSubmitButton action=$addPerson value=add
/wo:AjaxModalDialogOpener
webobject name=personNavBar
webobject namepersonGrid

In WOD
...
personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

in java class
... variable declaration

public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}

private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, persnoFullname 1);

return (NSMutableArray) personDico.allValues();
}

My question is How to refresh my Grid to know if the person I added is present 
in the grid?

Thanks


Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 I have never added data directly in a grid.  You would need to create a new 
object in the display group that the grid is using and use AjaxInPlace fields 
to edit the data.  Instead, I use an AjaxModalDialogOpener in the grid and an 
AjaxModalDialog to add or edit one object.  When the modal dialog closed, it 
refreshes the grid.

Chuck



On May 19, 2011, at 10:31 AM, naneon.raym...@neuf.fr wrote:

Hi Chuck,

I want to fill my AjaxGrid by adding data using textField and submitButton.


How my addData() method can look like? I want to add person by company 
(PopUpButton with companies).
my configData file .plist is :


{
tableID = personGrid;  
    updateContainerID = ajaxGridContainer;
    sortable = true;
    canReorder = true;   
    batchSize = 4;
    cssClass = ajaxGridTab;    
    cssStyle = border: thin solid #00;;  
evenRowCSSClass = none;
oddRowCSSStyle = background:lightgrey;;
selectedRowCSSStyle = font-weight: bold;;   
selectedRowCSSClass = ajaxGridSelectedRow; 
rowIdentifier = number;
dragHeaderOnly = true;
    columns = (
{
title = Apple;
keyPath = personFullName 1;
    

},
{
title = Microsoft;
keyPath = personFullName 2;
},  
{
title = Rim;
keyPath = personFullName 3;
},
{
title = Google;
keyPath = personFullName 4;
}
);
 sortOrder = (
{
keyPath = personFullName 1;
direction = descending;
},
{
keyPath = personFullName 2;
direction = ascending;
}
);


}



Thanks


Ray



Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 That is the default.  You could make an extension to get that information 
elsewhere.

Chuck



On May 19, 2011, at 1:14 AM, naneon.raym...@neuf.fr wrote:

Hi,

it's necessary to use a .plist file to configure the AjaxGrid configurationData?




Message du : 19/05/2011
De : Stefan Klein  stefan.kl...@buero-sde.de
A : webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Using DataGrid in WO


  You can find an online demo under 
http://wiki.objectstyle.org/confluence/display/WONDER/Example+Applications.
 Choose AjaxExample - Online demo.
 
 Using the link AjaxExample you will see the source code.
 
 Stefan
 
 Am 19.05.11 08:41, schrieb naneon.raym...@neuf.fr: Hi Chuck,
   
   Do you have an example how to use it?
   
   
   
   
   Message du : 18/05/2011
   De : Chuck Hill  ch...@global-village.net
   A : naneon.raym...@neuf.fr
   Copie à : webobjects-dev@lists.apple.com
   Sujet : Re: Using DataGrid in WO
   
   
   There is an AjaxGrid component in the Ajax framework in Wonder.    
That might give you what you want.   
   
   Chuck
   
   
   
On May 18, 2011, at 11:52 AM, naneon.raym...@neuf.fr
 wrote:
   
   Is it possible to use a DataGrid in 
a WebObjects project 

Re: Re: Using DataGrid in WO

2011-05-20 Thread naneon . raymond
Hi Chuck,


Can you give me an example, I don't know how to introduce it in my code.


Thanks




Message du : 20/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 Use the closeUpdateContainerID binding on the AjaxModalDialog.





On May 20, 2011, at 6:07 AM, naneon.raym...@neuf.fr wrote:
Hi Chuck,

I try to follow your advice but I have some problems.

In HTML (my textfield and button using to add person in my Grid: )

wo:tPopUpButton list=$personList item=$person value=$selectedPerson/
wo:AjaxModalDialogOpener id=refreshGrid
wo:AjaxSubmitButton action=$addPerson value=add
/wo:AjaxModalDialogOpener
webobject name=personNavBar
webobject namepersonGrid

In WOD
...
personGrid : AjaxGrid {
  configurationData = personDataConfig;
  displayGroup = personDg;
  afterUpdate = personNavBarUpdate();;
}

in java class
... variable declaration

public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}

private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, persnoFullname 1);

return (NSMutableArray) personDico.allValues();
}

My question is How to refresh my Grid to know if the person I added is present 
in the grid?

Thanks


Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 I have never added data directly in a grid.  You would need to create a new 
object in the display group that the grid is using and use AjaxInPlace fields 
to edit the data.  Instead, I use an AjaxModalDialogOpener in the grid and an 
AjaxModalDialog to add or edit one object.  When the modal dialog closed, it 
refreshes the grid.


Chuck





On May 19, 2011, at 10:31 AM, naneon.raym...@neuf.fr wrote:
Hi Chuck,


I want to fill my AjaxGrid by adding data using textField and submitButton.


How my addData() method can look like? I want to add person by company 
(PopUpButton with companies).
my configData file .plist is :



{
tableID = personGrid;  
updateContainerID = ajaxGridContainer;
sortable = true;
canReorder = true;   
batchSize = 4;
cssClass = ajaxGridTab;
cssStyle = border: thin solid #00;;  
evenRowCSSClass = none;
oddRowCSSStyle = background:lightgrey;;
selectedRowCSSStyle = font-weight: bold;;   
selectedRowCSSClass = ajaxGridSelectedRow; 
rowIdentifier = number;
dragHeaderOnly = true;
columns = (
{
title = Apple;
keyPath = personFullName 1;


},
{
title = Microsoft;
keyPath = personFullName 2;
},  
{
title = Rim;
keyPath = personFullName 3;
},
{
title = Google;
keyPath = personFullName 4;
}
);
 sortOrder = (
{
keyPath = personFullName 1;
direction = descending;
},
{
keyPath = personFullName 2;
direction = ascending;
}
);


}


Thanks


Ray



Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 That is the default.  You could make an extension to get that information 
elsewhere.


Chuck





On May 19, 2011, at 1:14 AM, naneon.raym...@neuf.fr wrote:
Hi,

it's necessary to use a .plist file to configure the AjaxGrid configurationData?




Message du : 19/05/2011
De : Stefan Klein  stefan.kl...@buero-sde.de
A : webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Using DataGrid in WO


  You can find an online demo under 
http://wiki.objectstyle.org/confluence/display/WONDER/Example+Applications.
 Choose AjaxExample - Online demo.
 
 Using the link AjaxExample you will see the source code.
 
 Stefan
 
 Am 19.05.11 08:41, schrieb naneon.raym...@neuf.fr: Hi Chuck,
   
   Do you have an example how to use it?
   
   
   
   
   Message du : 18/05/2011
   De : Chuck Hill  ch...@global-village.net
   A : naneon.raym...@neuf.fr
   Copie à : webobjects-dev@lists.apple.com

Re: Develop on 10.6 Deploying on 10.5

2011-05-19 Thread naneon . raymond
Hi,

Which version of java your project was compiled? I had this same problem by 
deploying a project compiled in 1.6 on a Server 1.5. I think it looks rather at 
the version of Java.
 build java version and java version on the deployment server.

Ray




Message du : 18/05/2011
De : Kevin Hinkson  h...@kevinhinkson.com
A : WebObjects-Dev Mailing List List webobjects-dev@lists.apple.com
Copie à : 
Sujet : Develop on 10.6  Deploying on 10.5


 Hi all,I have a problem that I have not been able to solve. I am currently 
developing on 10.6 (5.4.3) and attempting to deploy on 10.5 (5.4.3). Currently 
all my deployment machines are on 64-Bit Java 1.6 and I am hoping to keep it 
that way.


When I deploy the app on 10.5, running it manually on the command line launches 
it ok. Some errors do show up:


[2011-5-18 14:39:1 GMT-04:00] main The bundle AppName has malformed version 
number:
and I can see java 64 bit is being loaded


java.specification.version=1.6
java.vm.name=Java HotSpot(TM) 64-Bit Server VM


However, running it using WOMonitor (Apples) in combination with 
SpawnOfWotaskd.sh Logging addition 
(http://wiki.objectstyle.org/confluence/display/WO/Troubleshooting+wotaskd+and+JavaMonitor+on+OS+X)
 I get:


/Library/WebObjects/Extensions/xml-apis.jar
  /Library/WebObjects/Extensions/
java.lang.UnsupportedClassVersionError: Bad version number in .class file
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
        at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at com.webobjects._bootstrap.WOBootstrap.main(WOBootstrap.java:84)





I have tried
• adding -d64 to additional arguments, which is pointless since the correct 
java version is loading
• embedding system frameworks and not embedding them
• switching to 1.5 compatibility which raise another error in a Math library I 
was using


I'm really not certain how to remedy this. Does anyone have any pointers as to 
what the problem is exactly?


 ---
Kevin Hinkson
h...@kevinhinkson.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: Re: Using DataGrid in WO

2011-05-19 Thread naneon . raymond
Thanks Chuck, I go to try it.

Ray




Message du : 18/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 There is an AjaxGrid component in the Ajax framework in Wonder.  That might 
give you what you want.

Chuck



On May 18, 2011, at 11:52 AM, naneon.raym...@neuf.fr wrote:

Is it possible to use a DataGrid in a WebObjects project 
like Wonder or other? Is there a special framework to use it?

Thanks


Ray



 -- 
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/ 
 


 ___
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: Re: Using DataGrid in WO

2011-05-19 Thread naneon . raymond
Hi Chuck,

Do you have an example how to use it?




Message du : 18/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 There is an AjaxGrid component in the Ajax framework in Wonder.  That might 
give you what you want.

Chuck



On May 18, 2011, at 11:52 AM, naneon.raym...@neuf.fr wrote:

Is it possible to use a DataGrid in a WebObjects project 
like Wonder or other? Is there a special framework to use it?

Thanks


Ray



 -- 
Chuck Hill             Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/ 
 


 ___
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: Re: Using DataGrid in WO

2011-05-19 Thread naneon . raymond
Hi,

it's necessary to use a .plist file to configure the AjaxGrid configurationData?




Message du : 19/05/2011
De : Stefan Klein  stefan.kl...@buero-sde.de
A : webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Using DataGrid in WO


  You can find an online demo under 
http://wiki.objectstyle.org/confluence/display/WONDER/Example+Applications.
 Choose AjaxExample - Online demo.
 
 Using the link AjaxExample you will see the source code.
 
 Stefan
 
 Am 19.05.11 08:41, schrieb naneon.raym...@neuf.fr: Hi Chuck,
   
   Do you have an example how to use it?
   
   
   
   
   Message du : 18/05/2011
   De : Chuck Hill  ch...@global-village.net
   A : naneon.raym...@neuf.fr
   Copie à : webobjects-dev@lists.apple.com
   Sujet : Re: Using DataGrid in WO
   
   
   There is an AjaxGrid component in the Ajax framework in Wonder.    
That might give you what you want.   
   
   Chuck
   
   
   
On May 18, 2011, at 11:52 AM, naneon.raym...@neuf.fr
 wrote:
   
   Is it possible to use a DataGrid in 
a WebObjects project   like Wonder or other? Is there 
a special framework to use it? 
 
 Thanks
 
 
 Ray
 

 
  -- 
 Chuck Hill             Senior Consultant / VP Development
 
 Come to WOWODC this July for unparalleled WO learning 
opportunities and real peer to peer problem solving!  Network, 
socialize, and enjoy a great cosmopolitan city.  See you there!  
http://www.wocommunity.org/wowodc11/ 
 
   
   
 ___ 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/stefan.klein%40buero-sde.de
  This email sent to stefan.kl...@buero-sde.de 
  
 ___
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: Re: Using DataGrid in WO

2011-05-19 Thread naneon . raymond
Hi Chuck,


I want to fill my AjaxGrid by adding data using textField and submitButton.


How my addData() method can look like? I want to add person by company 
(PopUpButton with companies).
my configData file .plist is :



{ 
tableID = personGrid;   
updateContainerID = ajaxGridContainer; 
sortable = true; 
canReorder = true;
batchSize = 4; 
cssClass = ajaxGridTab; 
cssStyle = border: thin solid #00;;   
evenRowCSSClass = none; 
oddRowCSSStyle = background:lightgrey;; 
selectedRowCSSStyle = font-weight: bold;;
selectedRowCSSClass = ajaxGridSelectedRow;  
rowIdentifier = number; 
dragHeaderOnly = true; 
columns = ( 
{ 
title = Apple; 
keyPath = personFullName 1; 
 
}, 
{ 
title = Microsoft; 
keyPath = personFullName 2; 
},   
{ 
title = Rim; 
keyPath = personFullName 3; 
}, 
{ 
title = Google; 
keyPath = personFullName 4; 
} 
); 
 sortOrder = ( 
{ 
keyPath = personFullName 1; 
direction = descending; 
}, 
{ 
keyPath = personFullName 2; 
direction = ascending; 
} 
); 

 
}


Thanks


Ray



Message du : 19/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Using DataGrid in WO


 That is the default.  You could make an extension to get that information 
elsewhere.


Chuck





On May 19, 2011, at 1:14 AM, naneon.raym...@neuf.fr wrote:
Hi,

it's necessary to use a .plist file to configure the AjaxGrid configurationData?




Message du : 19/05/2011
De : Stefan Klein  stefan.kl...@buero-sde.de
A : webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Using DataGrid in WO


  You can find an online demo under 
http://wiki.objectstyle.org/confluence/display/WONDER/Example+Applications.
 Choose AjaxExample - Online demo.
 
 Using the link AjaxExample you will see the source code.
 
 Stefan
 
 Am 19.05.11 08:41, schrieb naneon.raym...@neuf.fr: Hi Chuck,
   
   Do you have an example how to use it?
   
   
   
   
   Message du : 18/05/2011
   De : Chuck Hill  ch...@global-village.net
   A : naneon.raym...@neuf.fr
   Copie à : webobjects-dev@lists.apple.com
   Sujet : Re: Using DataGrid in WO
   
   
   There is an AjaxGrid component in the Ajax framework in Wonder.
That might give you what you want.   

  
Chuck   

  

 
   
On May 18, 2011, at 11:52 AM, naneon.raym...@neuf.fr wrote: 
  
   Is it possible to use a DataGrid in 
a WebObjects project   like Wonder or other? Is there a special 
framework to use it? 

  
Thanks 

  
Ray
  
 
 -- 
 Chuck Hill Senior Consultant / VP Development
 
 Come to WOWODC this July for unparalleled WO learning 
opportunities and real peer to peer problem solving!  Network, 
socialize, and enjoy a great cosmopolitan city.  See you there!  
http://www.wocommunity.org/wowodc11/  
  
   
  ___ 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/stefan.klein%40buero-sde.de
  This email sent to stefan.kl...@buero-sde.de   


 -- 
Chuck Hill Senior Consultant / VP Development

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/  

 ___
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 

Using DataGrid in WO

2011-05-18 Thread naneon . raymond
Is it possible to use a DataGrid in a WebObjects project like Wonder or other? 
Is there a special framework to use it?


Thanks


Ray

 ___
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


[RESOLVED]Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-17 Thread naneon . raymond
Hi All,


I converted my project in wonder, and TB method work great.


Thanks a lot


Message du : 16/05/2011
De : Travis Britt  tbr...@phigment.org
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 On May 16, 2011, at 10:00 AM, naneon.raym...@neuf.fr wrote:
So what about this ? including a variable in a url :
in WOD 
picture : WOImage {
src = http://webserver/person/mini/${^person.id}.jpg;;
}

Quick and dirty, lots of assumptions, top of my head, might not compile, 
non-Wonder solution follows. But, really, use Wonder. Even its implementation 
of acquiring the pk has a lot of advantages over the old busted impl in 
EOUtilities.

picture : WOImage {
src = urlForImage;
}

Component's java class:

public String urlForImage() {
Object primaryKey = 
EOUtilities.primaryKeyForObject(person.editingContext(), 
person).valueForKey(id);
return http://webserver/person/mini/; + String.valueOf(primaryKey) + 
.jpg;
}

ERAttachment makes stuff like this really easy. It's in Wonder:

http://www.wocommunity.org/podcasts/WOWODC09E-PracticalWonder.mov

tb


 ___
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: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-16 Thread naneon . raymond


A good rule with EOF is: if you are qualifying on keys, then you are doing 
something wrong.  
What the Best practice ?


As a general rule, the primary key should NOT be exposed as a class property.  
You should be able to do what you need by modeling and using relationships in 
the EOModel.
How can I do to qualify with pk if it's not mentioned in the class 
property?


Ray
===

Message du : 13/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 


On May 13, 2011, at 1:39 AM, naneon.raym...@neuf.fr wrote:
Hi, 
 
My problem is solved thanks to your advice and examples. attached the code: 
 


EOQualifier qualMailType = 
EOQualifier.qualifierWithQualifierFormat(
indEmails.emailTypec=%@, argsEtu);
EOQualifier admQ = new 
EOKeyValueQualifier(etuInscrAdms.etuId, 
EOQualifier.QualifierOperatorNotEqual, NSKeyValueCoding.NullValue);

A good rule with EOF is: if you are qualifying on keys, then you are doing 
something wrong.  
What the Best practice ?


As a general rule, the primary key should NOT be exposed as a class property.  
You should be able to do what you need by modeling and using relationships in 
the EOModel.
How can I do to qualify with if pk is not mentioned in the class property?


Ray


Chuck




EOQualifier mailQ = new 
EOKeyValueQualifier(indEmails.indivId, EOQualifier.QualifierOperatorNotEqual, 
NSKeyValueCoding.NullValue);
EOQualifier civQ = new 
EOKeyValueQualifier(refCivilite.civilitec, 
EOQualifier.QualifierOperatorNotEqual,  NSKeyValueCoding.NullValue);
qualStudents.add(admQ);
qualStudents.add(mailQ);
qualStudents.add(civQ);
qualStudents.add(qualMailType);
EOQualifier etudiantQual = new EOAndQualifier(qualStudents); 
 Results: 
 select count(distinct t0.INDIV_ID)  FROM GERRY.INDIVIDU t0, GERRY.IND_EMAIL 
T2, GERRY.REF_CIVILITE T3, GERRY.ETU_INSCR_ADM T1 WHERE (T1.ETU_ID  is not NULL 
AND T2.INDIV_ID is not NULL AND T3.CIVILITE_$C is not NULL  AND 
T2.EMAIL_TYPE_$C = ?) AND t0.INDIV_ID = T2.INDIV_ID AND  t0.CIVILITE_$C = 
T3.CIVILITE_$C AND t0.INDIV_ID = T1.ETU_ID  withBindings: 1:UTT(emailTypec)
 
I forced the joints i.e : etuInscrAdms.etuId === T1.ETU_ID IS NOT NULL === 
t0.INDIV_ID = T1.ETU_ID. and  when I select any setting, my research takes me 
back all students  (about 10 miles) and the batch per 10 with DisplayGroup 
makes the  application very fast. 
 
I always stay in the corner because I know I need advice on WO 
 
Thank you




Message du : 12/05/2011
De : naneon.raym...@neuf.fr
A : Henrique Gomes li...@farol.pt, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 Hi,


I want just a filter t0.id = t1.etuId to restrict the results, that's all.


thanks



Message du : 12/05/2011
De : Henrique Gomes  li...@farol.pt
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 

Are you trying to restrict the results by filtering on a related table? Or just 
want to fetch data from more than one table?
Fetches in WO are always from ONE entity (table).  EOF uses joins to FILTER, 
not to add data to the result.
If your entity A has a toMany relation to entity B, A will have a method A.b() 
that returns an NSArray.
On initial fetch, the data for the B relation is not fetched, and EOF will 
fetch it from the db when the method is used, then caches the result.
To avoid lots of  one row accesses to the db, you can instruct a 
fetchSpecification to prefetch all the 'B's when fetching from A.

Henrique Gomes


On May 12, 2011, at 4:07 PM, naneon.raym...@neuf.fr wrote:

 Hi all, 
 
 I could fix my problem of *Distinct* with this line: 
 
 ds.fetchSpecification (). setUsesDistinct (true); 
 
 Then I added to my ERXBatchingDisplayGroup 
  fetchEtudiantViaUvDg.setDataSource (ds); 
 the fetch is done so with disctint.
 
 Now I try to do a qualifier which is a join between *individu* and 
 *etu_insc_adm*.
 
 I.e : SELECT * from individu t0, etu_insc_adm t1 WHERE t0.id = t1.etuId; 
 
 How to set this qualifier : t0.id = t2.etuId ??
 
 Thanks
 
 
 
 Message du : 12/05/2011
 De : naneon.raym...@neuf.fr
 A : Chuck Hill , WebObjects webobjects-dev 
 Copie à : 
 Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
 DATABASE with but have relationship
 
 
 Hi Chuck,
 
 I change my mind 

Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-16 Thread naneon . raymond
Hi Dave,

Thanks for examples. Now I know how to use pk and fk in qualifier without 
pointing it on my class property. So in my WO project if I want to display an 
entity key like that : 
Member Number N°
webobject name =number/
...


in WOD


num : WOString {
value = people.id;
}


If ID of the people is not mentioned in property class, How I display it?


Thakns



Message du : 16/05/2011
De : David Avendasora  webobje...@avendasora.com
A : naneon.raym...@neuf.fr
Copie à : 
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 Hi Ray



On May 16, 2011, at 4:50 AM, naneon.raym...@neuf.fr wrote:


A good rule with EOF is: if you are qualifying on keys, then you are doing 
something wrong.  
What the Best practice ?


Qualify on an Object. Let EOF figure out what that means to the database. Trust 
EOF to do the right thing when it comes to writing SQL. Your job is to write 
Object Oriented code. Stop thinking in SQL. This is a common stumbling point 
for people new to WebObjects and EOF.




As a general rule, the primary key should NOT be exposed as a class property.  
You should be able to do what you need by modeling and using relationships in 
the EOModel.
How can I do to qualify with pk if it's not mentioned in the class 
property?


You don't!


Don't exposed PKs or FKs by default. Qualify using an object.


So for example:


EOQualifier studentsInMySchool = new EOKeyValueQualifier(school, 
EOQualifier.QualifierOperatorNotEqual,   mySchool());


Or better yet (with Wonder): 
EOQualifier studentsInMySchool = Student.SCHOOL.eq(mySchool());


Dave




Ray
===

Message du : 13/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 


On May 13, 2011, at 1:39 AM, naneon.raym...@neuf.fr wrote:
Hi, 
 
My problem is solved thanks to your advice and examples. attached the code: 
 


EOQualifier qualMailType = 
EOQualifier.qualifierWithQualifierFormat(
indEmails.emailTypec=%@, argsEtu);
EOQualifier admQ = new 
EOKeyValueQualifier(etuInscrAdms.etuId, 
EOQualifier.QualifierOperatorNotEqual, NSKeyValueCoding.NullValue);

A good rule with EOF is: if you are qualifying on keys, then you are doing 
something wrong.  
What the Best practice ?


As a general rule, the primary key should NOT be exposed as a class property.  
You should be able to do what you need by modeling and using relationships in 
the EOModel.
How can I do to qualify with if pk is not mentioned in the class property?


Ray


Chuck




EOQualifier mailQ = new 
EOKeyValueQualifier(indEmails.indivId, EOQualifier.QualifierOperatorNotEqual, 
NSKeyValueCoding.NullValue);
EOQualifier civQ = new 
EOKeyValueQualifier(refCivilite.civilitec, 
EOQualifier.QualifierOperatorNotEqual,  NSKeyValueCoding.NullValue);
qualStudents.add(admQ);
qualStudents.add(mailQ);
qualStudents.add(civQ);
qualStudents.add(qualMailType);
EOQualifier etudiantQual = new EOAndQualifier(qualStudents); 
 Results: 
 select count(distinct t0.INDIV_ID)  FROM GERRY.INDIVIDU t0, GERRY.IND_EMAIL 
T2, GERRY.REF_CIVILITE T3, GERRY.ETU_INSCR_ADM T1 WHERE (T1.ETU_ID  is not NULL 
AND T2.INDIV_ID is not NULL AND T3.CIVILITE_$C is not NULL  AND 
T2.EMAIL_TYPE_$C = ?) AND t0.INDIV_ID = T2.INDIV_ID AND  t0.CIVILITE_$C = 
T3.CIVILITE_$C AND t0.INDIV_ID = T1.ETU_ID  withBindings: 1:UTT(emailTypec)
 
I forced the joints i.e : etuInscrAdms.etuId === T1.ETU_ID IS NOT NULL === 
t0.INDIV_ID = T1.ETU_ID. and  when I select any setting, my research takes me 
back all students  (about 10 miles) and the batch per 10 with DisplayGroup 
makes the  application very fast. 
 
I always stay in the corner because I know I need advice on WO 
 
Thank you




Message du : 12/05/2011
De : naneon.raym...@neuf.fr
A : Henrique Gomes li...@farol.pt, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 Hi,


I want just a filter t0.id = t1.etuId to restrict the results, that's all.


thanks



Message du : 12/05/2011
De : Henrique Gomes  li...@farol.pt
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 

Are you trying to restrict the results by filtering on a related table? Or just 
want to fetch data from more than one table?
Fetches in WO are always from 

Re: Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-13 Thread naneon . raymond
Hi, 
 
My problem is solved thanks to your advice and examples. attached the code: 
 

EOQualifier qualMailType = 
EOQualifier.qualifierWithQualifierFormat(
indEmails.emailTypec=%@, argsEtu);
EOQualifier admQ = new 
EOKeyValueQualifier(etuInscrAdms.etuId, 
EOQualifier.QualifierOperatorNotEqual, NSKeyValueCoding.NullValue);
EOQualifier mailQ = new 
EOKeyValueQualifier(indEmails.indivId, EOQualifier.QualifierOperatorNotEqual, 
NSKeyValueCoding.NullValue);
EOQualifier civQ = new 
EOKeyValueQualifier(refCivilite.civilitec, 
EOQualifier.QualifierOperatorNotEqual,  NSKeyValueCoding.NullValue);
qualStudents.add(admQ);
qualStudents.add(mailQ);
qualStudents.add(civQ);
qualStudents.add(qualMailType);
EOQualifier etudiantQual = new EOAndQualifier(qualStudents);
 
 Results: 
 select count(distinct t0.INDIV_ID)  FROM GERRY.INDIVIDU t0, GERRY.IND_EMAIL 
T2, GERRY.REF_CIVILITE T3, GERRY.ETU_INSCR_ADM T1 WHERE (T1.ETU_ID  is not NULL 
AND T2.INDIV_ID is not NULL AND T3.CIVILITE_$C is not NULL  AND 
T2.EMAIL_TYPE_$C = ?) AND t0.INDIV_ID = T2.INDIV_ID AND  t0.CIVILITE_$C = 
T3.CIVILITE_$C AND t0.INDIV_ID = T1.ETU_ID  withBindings: 1:UTT(emailTypec)
 
I forced the joints i.e : etuInscrAdms.etuId === T1.ETU_ID IS NOT NULL === 
t0.INDIV_ID = T1.ETU_ID. and  when I select any setting, my research takes me 
back all students  (about 10 miles) and the batch per 10 with DisplayGroup 
makes the  application very fast. 
 
I always stay in the corner because I know I need advice on WO 
 
Thank you




Message du : 12/05/2011
De : naneon.raym...@neuf.fr
A : Henrique Gomes li...@farol.pt, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 Hi,

I want just a filter t0.id = t1.etuId to restrict the results, that's all.


thanks



Message du : 12/05/2011
De : Henrique Gomes  li...@farol.pt
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 

Are you trying to restrict the results by filtering on a related table? Or just 
want to fetch data from more than one table?
Fetches in WO are always from ONE entity (table).  EOF uses joins to FILTER, 
not to add data to the result.
If your entity A has a toMany relation to entity B, A will have a method A.b() 
that returns an NSArray.
On initial fetch, the data for the B relation is not fetched, and EOF will 
fetch it from the db when the method is used, then caches the result.
To avoid lots of  one row accesses to the db, you can instruct a 
fetchSpecification to prefetch all the 'B's when fetching from A.

Henrique Gomes


On May 12, 2011, at 4:07 PM, naneon.raym...@neuf.fr wrote:

 Hi all, 
 
 I could fix my problem of *Distinct* with this line: 
 
 ds.fetchSpecification (). setUsesDistinct (true); 
 
 Then I added to my ERXBatchingDisplayGroup 
  fetchEtudiantViaUvDg.setDataSource (ds); 
 the fetch is done so with disctint.
 
 Now I try to do a qualifier which is a join between *individu* and 
 *etu_insc_adm*.
 
 I.e : SELECT * from individu t0, etu_insc_adm t1 WHERE t0.id = t1.etuId; 
 
 How to set this qualifier : t0.id = t2.etuId ??
 
 Thanks
 
 
 
 Message du : 12/05/2011
 De : naneon.raym...@neuf.fr
 A : Chuck Hill , WebObjects webobjects-dev 
 Copie à : 
 Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
 DATABASE with but have relationship
 
 
 Hi Chuck,
 
 I change my mind and go to try ERXBatchingDisplayGroup with a qualifier I 
 built (see below)
 
 I translate my fetch spec  qualifier: 
 
 nom like $nom 
 or prenom like $prenom 
 or indivId = $numero 
 or etuInscrAdms.diplomec like $etuInscrAdms.diplomec 
 or (etuInscrAdms.anUniv like $etuInscrAdms.anUniv and etuInscrAdms.prdUniv 
 like $etuInscrAdms.prdUniv) 
 or etuInscrAdms.niveauAdm = $etuInscrAdms.niveauAdm 
 or (etuInscrAdms.eoVueInsuvs.uvc = $etuInscrAdms.eoVueInsuvs.uvc 
 and etuInscrAdms.eoVueInsuvs.anUniv = $etuInscrAdms.eoVueInsuvs.anUniv 
 and etuInscrAdms.eoVueInsuvs.prdUniv = $etuInscrAdms.eoVueInsuvs.prdUniv)
 
 In this qualifier to use with my ERXBatchingDisplayGroup
 
 NSMutableArray qualFinal = new NSMutableArray();
 NSMutableArray args = new NSMutableArray();
 NSMutableArray argsUv = new NSMutableArray();
 NSMutableArray argsEtu = new NSMutableArray();
 
 args.addObject(anUniv);
 args.addObject(prdUniv);
 argsUvaddObject(uv);
 argsUv.addObject(anUniv);
 argsUv.addObject(prdUniv);
 argsEtu.add(03);
 argsEtu.add(UTT);
 
 EOQualifier qualNom = EOQualifier.qualifierWithQualifierFormat(nom like %@, 
 new 

Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-12 Thread naneon . raymond
Hi Chuck,


I change my mind and go to try ERXBatchingDisplayGroup with a qualifier I built 
(see below)


I translate my fetch spec  qualifier: 



nom like $nom 
or prenom like $prenom 
or indivId = $numero 
or etuInscrAdms.diplomec like $etuInscrAdms.diplomec 
or (etuInscrAdms.anUniv like $etuInscrAdms.anUniv and etuInscrAdms.prdUniv like 
$etuInscrAdms.prdUniv) 
or etuInscrAdms.niveauAdm = $etuInscrAdms.niveauAdm 
or (etuInscrAdms.eoVueInsuvs.uvc = $etuInscrAdms.eoVueInsuvs.uvc 
and etuInscrAdms.eoVueInsuvs.anUniv = $etuInscrAdms.eoVueInsuvs.anUniv 
and etuInscrAdms.eoVueInsuvs.prdUniv = $etuInscrAdms.eoVueInsuvs.prdUniv)


In this qualifier to use with my ERXBatchingDisplayGroup



NSMutableArray qualFinal = new NSMutableArray();
NSMutableArray args = new NSMutableArray();
NSMutableArray argsUv = new NSMutableArray();
NSMutableArray argsEtu = new NSMutableArray();


args.addObject(anUniv);
args.addObject(prdUniv);
argsUvaddObject(uv);
argsUv.addObject(anUniv);
argsUv.addObject(prdUniv);
argsEtu.add(03);
argsEtu.add(UTT);


EOQualifier qualNom = EOQualifier.qualifierWithQualifierFormat(nom like %@, 
new NSArray(nom+*));
EOQualifier qualPrenom = EOQualifier.qualifierWithQualifierFormat(prenom like 
%@, new NSArray(prenom+*));
EOQualifier qualNumero = EOQualifier.qualifierWithQualifierFormat(individ=%@, 
new NSArray(nombre));


EOQualifier qualPeriode = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.anUniv=%@ AND 
etuInscrAdms.prdUniv=%@, args);
EOQualifier qualDiplome = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplomec=%@,new 
NSArray(diplome));
EOQualifier qualNiveau = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
NSArray(niveau));
EOQualifier qualNiveau = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
NSArray(niveau));
EOQualifier qualUv = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.eoVueInsuvs.anUniv=%@ 
AND etuInscrAdms.eoVueInsuvs.prdUniv=%@ AND 
etuInscrAdms.eoVueInsuvs.uvc=%@,argsUv);


EOQualifier qualEtudiant = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplSpecc%@ AND 
indEmails.emailTypec=%@,argsEtu);


qualFinal.addObject(qualNom);
qualFinal.addObject(qualPrenom);
qualFinal.addObject(qualNumero);
qualFinal.addObject(qualPeriode);
qualFinal.addObject(qualDiplome);
qualFinal.addObject(qualNiveau);
qualFinal.addObject(qualUv);



**EOSort
NSArray dgSort = new NSArray(new Object[] 
{EOSortOrdering.sortOrderingWithKey(EOIndividu.NOM_KEY, 
EOSortOrdering.CompareAscending),

EOSortOrdering.sortOrderingWithKey(EOIndividu.PRENOM_KEY,EOSortOrdering.CompareAscending)
 });



fetchEtudiantViaUvDg.setQualifier(new EOOrQualifier(qualFinal));
fetchEtudiantViaUvDg.setSortOrderings(dgSort);
fetchEtudiantViaUvDg.fetch();


Here is result : 



45478 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: select count(*)  
FROM GERRY.INDIVIDU t0, GEST_UV.VUE_INSUV T2, GERRY.IND_EMAIL T3, 
GERRY.ETU_INSCR_ADM T1 WHERE ((T1.AN_UNIV = ? AND T1.PRD_UNIV = ?) OR 
T1.DIPLOME_$C = ? OR T1.NIVEAU_ADM = ? OR (T2.AN_UNIV = ? AND T2.PRD_UNIV = ? 
AND T2.UV_$C = ?) OR (T1.DIPL_SPEC_$C  ? AND T3.EMAIL_TYPE_$C = ?)) AND 
T1.AN_UNIV = T2.AN_UNIV AND T1.DIPLOME_$C = T2.DIPLOME_$C AND T1.ETU_ID = 
T2.ETU_ID AND T1.PRD_UNIV = T2.PRD_UNIV AND t0.INDIV_ID = T3.INDIV_ID AND 
t0.INDIV_ID = T1.CONSEILLER_ID withBindings: 1:2010(anUniv), 
2:1A(prdUniv), 3:ING2(diplomec), 4:4(niveauAdm), 5:2010(anUniv), 
6:1A(prdUniv), 7:11420(uvc), 8:03(diplSpecc), 9:UTT(emailTypec) 
47102 [WorkerThread0] DEBUG NSLog  - 1 row(s) processed //All students 

 
47132 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: select * from 
(select INDIV_ID, rownum eo_rownum from (SELECT t0.INDIV_ID FROM GERRY.INDIVIDU 
t0, GEST_UV.VUE_INSUV T2, GERRY.IND_EMAIL T3, GERRY.ETU_INSCR_ADM T1 WHERE 
((T1.AN_UNIV = ? AND T1.PRD_UNIV = ?) OR T1.DIPLOME_$C = ? OR T1.NIVEAU_ADM = ? 
OR (T2.AN_UNIV = ? AND T2.PRD_UNIV = ? AND T2.UV_$C = ?) OR (T1.DIPL_SPEC_$C  
? AND T3.EMAIL_TYPE_$C = ?)) AND T1.AN_UNIV = T2.AN_UNIV AND T1.DIPLOME_$C = 
T2.DIPLOME_$C AND T1.ETU_ID = T2.ETU_ID AND T1.PRD_UNIV = T2.PRD_UNIV AND 
t0.INDIV_ID = T3.INDIV_ID AND t0.INDIV_ID = T1.CONSEILLER_ID ORDER BY 
UPPER(t0.NOM) ASC, UPPER(t0.PRENOM) ASC)) where eo_rownum between 1 and 10 
withBindings: 1:2010(anUniv), 2:1A(prdUniv), 3:ING2(diplomec), 
4:4(niveauAdm), 5:2010(anUniv), 6:1A(prdUniv), 7:11420(uvc), 
8:03(diplSpecc), 9:UTT(emailTypec) 
50212 [WorkerThread0] DEBUG NSLog  - 10 row(s) processed //10 students per 
batch(don't use distinct)
My problem is this fetch don't use *disctinct* and I have several time the same 
student. The another problem is how to set qualifier to do natural join like :
A.id = B.id, when I don't have parameters  for my qualifier? 


i.e : SELECT * FROM GERRY.INDIVIDU t0, GEST_UV.REF_CIVILITE T2, GERRY.IND_EMAIL 
T3, 

Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-12 Thread naneon . raymond
Yep, the relation exist in my modeler.
The relation toOne and sometime toMany.




Message du : 12/05/2011
De : Henrique Gomes  li...@farol.pt
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 

On May 12, 2011, at 11:44 AM, naneon.raym...@neuf.fr wrote:

 The another problem is how to set qualifier to do natural join like :
 A.id = B.id, when I don't have parameters  for my qualifier? 

Is that relation modeled in Entity Modeler? The qualifier to use will depend if 
the relation is toOne or toMany.

Henrique Gomes

 ___
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/naneon.raymond%40neuf.fr

This email sent to naneon.raym...@neuf.fr


 ___
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: Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-12 Thread naneon . raymond
Hi all, 

I could fix my problem of *Distinct* with this line: 

ds.fetchSpecification (). setUsesDistinct (true); 

Then I added to my ERXBatchingDisplayGroup 
 fetchEtudiantViaUvDg.setDataSource (ds); 
the fetch is done so with disctint.

Now I try to do a qualifier which is a join between *individu* and 
*etu_insc_adm*.

I.e : SELECT * from individu t0, etu_insc_adm t1 WHERE t0.id = t1.etuId; 


How to set this qualifier : t0.id = t2.etuId ??


Thanks



Message du : 12/05/2011
De : naneon.raym...@neuf.fr
A : Chuck Hill ch...@global-village.net, WebObjects webobjects-dev 
webobjects-dev@lists.apple.com
Copie à : 
Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 Hi Chuck,


I change my mind and go to try ERXBatchingDisplayGroup with a qualifier I built 
(see below)


I translate my fetch spec  qualifier: 



nom like $nom 
or prenom like $prenom 
or indivId = $numero 
or etuInscrAdms.diplomec like $etuInscrAdms.diplomec 
or (etuInscrAdms.anUniv like $etuInscrAdms.anUniv and etuInscrAdms.prdUniv like 
$etuInscrAdms.prdUniv) 
or etuInscrAdms.niveauAdm = $etuInscrAdms.niveauAdm 
or (etuInscrAdms.eoVueInsuvs.uvc = $etuInscrAdms.eoVueInsuvs.uvc 
and etuInscrAdms.eoVueInsuvs.anUniv = $etuInscrAdms.eoVueInsuvs.anUniv 
and etuInscrAdms.eoVueInsuvs.prdUniv = $etuInscrAdms.eoVueInsuvs.prdUniv)


In this qualifier to use with my ERXBatchingDisplayGroup



NSMutableArray qualFinal = new NSMutableArray();
NSMutableArray args = new NSMutableArray();
NSMutableArray argsUv = new NSMutableArray();
NSMutableArray argsEtu = new NSMutableArray();


args.addObject(anUniv);
args.addObject(prdUniv);
argsUvaddObject(uv);
argsUv.addObject(anUniv);
argsUv.addObject(prdUniv);
argsEtu.add(03);
argsEtu.add(UTT);


EOQualifier qualNom = EOQualifier.qualifierWithQualifierFormat(nom like %@, 
new NSArray(nom+*));
EOQualifier qualPrenom = EOQualifier.qualifierWithQualifierFormat(prenom like 
%@, new NSArray(prenom+*));
EOQualifier qualNumero = EOQualifier.qualifierWithQualifierFormat(individ=%@, 
new NSArray(nombre));


EOQualifier qualPeriode = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.anUniv=%@ AND 
etuInscrAdms.prdUniv=%@, args);
EOQualifier qualDiplome = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplomec=%@,new 
NSArray(diplome));
EOQualifier qualNiveau = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
NSArray(niveau));
EOQualifier qualNiveau = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
NSArray(niveau));
EOQualifier qualUv = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.eoVueInsuvs.anUniv=%@ 
AND etuInscrAdms.eoVueInsuvs.prdUniv=%@ AND 
etuInscrAdms.eoVueInsuvs.uvc=%@,argsUv);


EOQualifier qualEtudiant = 
EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplSpecc%@ AND 
indEmails.emailTypec=%@,argsEtu);


qualFinal.addObject(qualNom);
qualFinal.addObject(qualPrenom);
qualFinal.addObject(qualNumero);
qualFinal.addObject(qualPeriode);
qualFinal.addObject(qualDiplome);
qualFinal.addObject(qualNiveau);
qualFinal.addObject(qualUv);



**EOSort
NSArray dgSort = new NSArray(new Object[] 
{EOSortOrdering.sortOrderingWithKey(EOIndividu.NOM_KEY, 
EOSortOrdering.CompareAscending),

EOSortOrdering.sortOrderingWithKey(EOIndividu.PRENOM_KEY,EOSortOrdering.CompareAscending)
 });



fetchEtudiantViaUvDg.setQualifier(new EOOrQualifier(qualFinal));
fetchEtudiantViaUvDg.setSortOrderings(dgSort);
fetchEtudiantViaUvDg.fetch();


Here is result : 



45478 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: select count(*)  
FROM GERRY.INDIVIDU t0, GEST_UV.VUE_INSUV T2, GERRY.IND_EMAIL T3, 
GERRY.ETU_INSCR_ADM T1 WHERE ((T1.AN_UNIV = ? AND T1.PRD_UNIV = ?) OR 
T1.DIPLOME_$C = ? OR T1.NIVEAU_ADM = ? OR (T2.AN_UNIV = ? AND T2.PRD_UNIV = ? 
AND T2.UV_$C = ?) OR (T1.DIPL_SPEC_$C  ? AND T3.EMAIL_TYPE_$C = ?)) AND 
T1.AN_UNIV = T2.AN_UNIV AND T1.DIPLOME_$C = T2.DIPLOME_$C AND T1.ETU_ID = 
T2.ETU_ID AND T1.PRD_UNIV = T2.PRD_UNIV AND t0.INDIV_ID = T3.INDIV_ID AND 
t0.INDIV_ID = T1.CONSEILLER_ID withBindings: 1:2010(anUniv), 
2:1A(prdUniv), 3:ING2(diplomec), 4:4(niveauAdm), 5:2010(anUniv), 
6:1A(prdUniv), 7:11420(uvc), 8:03(diplSpecc), 9:UTT(emailTypec) 
47102 [WorkerThread0] DEBUG NSLog  - 1 row(s) processed //All students 

 
47132 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: select * from 
(select INDIV_ID, rownum eo_rownum from (SELECT t0.INDIV_ID FROM GERRY.INDIVIDU 
t0, GEST_UV.VUE_INSUV T2, GERRY.IND_EMAIL T3, GERRY.ETU_INSCR_ADM T1 WHERE 
((T1.AN_UNIV = ? AND T1.PRD_UNIV = ?) OR T1.DIPLOME_$C = ? OR T1.NIVEAU_ADM = ? 
OR (T2.AN_UNIV = ? AND T2.PRD_UNIV = ? AND T2.UV_$C = ?) OR (T1.DIPL_SPEC_$C  
? AND T3.EMAIL_TYPE_$C = ?)) AND T1.AN_UNIV = T2.AN_UNIV AND T1.DIPLOME_$C = 
T2.DIPLOME_$C AND T1.ETU_ID 

Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-12 Thread naneon . raymond
Hi,


I want just a filter t0.id = t1.etuId to restrict the results, that's all.


thanks



Message du : 12/05/2011
De : Henrique Gomes  li...@farol.pt
A : WebObjects webobjects-dev webobjects-dev@lists.apple.com
Copie à : naneon.raym...@neuf.fr
Sujet : Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
DATABASE with but have relationship


 

Are you trying to restrict the results by filtering on a related table? Or just 
want to fetch data from more than one table?
Fetches in WO are always from ONE entity (table).  EOF uses joins to FILTER, 
not to add data to the result.
If your entity A has a toMany relation to entity B, A will have a method A.b() 
that returns an NSArray.
On initial fetch, the data for the B relation is not fetched, and EOF will 
fetch it from the db when the method is used, then caches the result.
To avoid lots of  one row accesses to the db, you can instruct a 
fetchSpecification to prefetch all the 'B's when fetching from A.

Henrique Gomes


On May 12, 2011, at 4:07 PM, naneon.raym...@neuf.fr wrote:

 Hi all, 
 
 I could fix my problem of *Distinct* with this line: 
 
 ds.fetchSpecification (). setUsesDistinct (true); 
 
 Then I added to my ERXBatchingDisplayGroup 
  fetchEtudiantViaUvDg.setDataSource (ds); 
 the fetch is done so with disctint.
 
 Now I try to do a qualifier which is a join between *individu* and 
 *etu_insc_adm*.
 
 I.e : SELECT * from individu t0, etu_insc_adm t1 WHERE t0.id = t1.etuId; 
 
 How to set this qualifier : t0.id = t2.etuId ??
 
 Thanks
 
 
 
 Message du : 12/05/2011
 De : naneon.raym...@neuf.fr
 A : Chuck Hill , WebObjects webobjects-dev 
 Copie à : 
 Sujet : Re: Re: Tr: Re: Re: Fetching on 2 EOMODELS using different schema in 
 DATABASE with but have relationship
 
 
 Hi Chuck,
 
 I change my mind and go to try ERXBatchingDisplayGroup with a qualifier I 
 built (see below)
 
 I translate my fetch spec  qualifier: 
 
 nom like $nom 
 or prenom like $prenom 
 or indivId = $numero 
 or etuInscrAdms.diplomec like $etuInscrAdms.diplomec 
 or (etuInscrAdms.anUniv like $etuInscrAdms.anUniv and etuInscrAdms.prdUniv 
 like $etuInscrAdms.prdUniv) 
 or etuInscrAdms.niveauAdm = $etuInscrAdms.niveauAdm 
 or (etuInscrAdms.eoVueInsuvs.uvc = $etuInscrAdms.eoVueInsuvs.uvc 
 and etuInscrAdms.eoVueInsuvs.anUniv = $etuInscrAdms.eoVueInsuvs.anUniv 
 and etuInscrAdms.eoVueInsuvs.prdUniv = $etuInscrAdms.eoVueInsuvs.prdUniv)
 
 In this qualifier to use with my ERXBatchingDisplayGroup
 
 NSMutableArray qualFinal = new NSMutableArray();
 NSMutableArray args = new NSMutableArray();
 NSMutableArray argsUv = new NSMutableArray();
 NSMutableArray argsEtu = new NSMutableArray();
 
 args.addObject(anUniv);
 args.addObject(prdUniv);
 argsUvaddObject(uv);
 argsUv.addObject(anUniv);
 argsUv.addObject(prdUniv);
 argsEtu.add(03);
 argsEtu.add(UTT);
 
 EOQualifier qualNom = EOQualifier.qualifierWithQualifierFormat(nom like %@, 
 new NSArray(nom+*));
 EOQualifier qualPrenom = EOQualifier.qualifierWithQualifierFormat(prenom 
 like %@, new NSArray(prenom+*));
 EOQualifier qualNumero = 
 EOQualifier.qualifierWithQualifierFormat(individ=%@, new NSArray(nombre));
 
 EOQualifier qualPeriode = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.anUniv=%@ AND 
 etuInscrAdms.prdUniv=%@, args);
 EOQualifier qualDiplome = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplomec=%@,new 
 NSArray(diplome));
 EOQualifier qualNiveau = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
 NSArray(niveau));
 EOQualifier qualNiveau = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.niveauAdm=%@,new 
 NSArray(niveau));
 EOQualifier qualUv = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.eoVueInsuvs.anUniv=%@ 
 AND etuInscrAdms.eoVueInsuvs.prdUniv=%@ AND 
 etuInscrAdms.eoVueInsuvs.uvc=%@,argsUv);
 
 EOQualifier qualEtudiant = 
 EOQualifier.qualifierWithQualifierFormat(etuInscrAdms.diplSpecc%@ AND 
 indEmails.emailTypec=%@,argsEtu);
 
 qualFinal.addObject(qualNom);
 qualFinal.addObject(qualPrenom);
 qualFinal.addObject(qualNumero);
 qualFinal.addObject(qualPeriode);
 qualFinal.addObject(qualDiplome);
 qualFinal.addObject(qualNiveau);
 qualFinal.addObject(qualUv);
 
 **EOSort
 NSArray dgSort = new NSArray(new Object[] 
 {EOSortOrdering.sortOrderingWithKey(EOIndividu.NOM_KEY, 
 EOSortOrdering.CompareAscending),
   
 EOSortOrdering.sortOrderingWithKey(EOIndividu.PRENOM_KEY,EOSortOrdering.CompareAscending)
  });
 
 fetchEtudiantViaUvDg.setQualifier(new EOOrQualifier(qualFinal));
 fetchEtudiantViaUvDg.setSortOrderings(dgSort);
 fetchEtudiantViaUvDg.fetch();
 
 Here is result : 
 
 45478 [WorkerThread0] DEBUG NSLog  -  evaluateExpression:  ? AND 
 T3.EMAIL_TYPE_$C = ?)) AND T1.AN_UNIV = T2.AN_UNIV AND T1.DIPLOME_$C = 
 T2.DIPLOME_$C AND T1.ETU_ID = T2.ETU_ID AND T1.PRD_UNIV = T2.PRD_UNIV AND 
 t0.INDIV_ID = T3.INDIV_ID AND t0.INDIV_ID = 

Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-11 Thread naneon . raymond
Thanks Chuck to your quick reaction,

So the Only solution is to use my StoredProcedure which return data. The 
storedProcedures is declared in my model A. So how to call it and cast data 
like student and bind it to WODisplayGroup for my batch view?

I have seven parameters with IN and one with OUT to return data.

Ray




Message du : 10/05/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Fetching on 2 EOMODELS using different schema in DATABASE with but 
have relationship


 I think this is something that EOF can't do: qualify across schemas (databases 
in EOF's view).

Chuck

On May 10, 2011, at 4:49 AM, naneon.raym...@neuf.fr wrote:

 Hi all,
 
 I have 2 models using different schema of a database. but these schemas have 
 table which have relationship. So in my model A, I use a fetch spec. on a 
 table which have the maximum relation with tables in model A and B.
 So when I excute my fech spec, WO don't see the schema of model A and show 
 exception ORA-00942 : table or view does not exist. This a the querry 
 generate by WO on fetching : 
 
 SELECT t0.ANC_UV_OUVERTE_ID, t0.CATEG_ID, t0.CRE_DATE, t0.DIPL_SPEC_$C, 
 t0.DIPLOME_$C, t0.MAJ_AUTEUR, t0.MAJ_DATE, t0.NLE_UV_OUVERTE_ID, 
 t0.UV_CREDITS_ECTS, t0.UV_OUV_ID FROM UV_OUVERTES t0, INDIVIDU T4, UV_OUV T1, 
 ETU_INSCR_ADM T3, DIPLOME T2 WHERE ((T1.AN_UNIV like ? ESCAPE '\' AND 
 T1.PRD_UNIV like ? ESCAPE '\') OR t0.DIPLOME_$C like ? ESCAPE '\' OR 
 T3.NIVEAU_ADM = ? OR T1.UV_OUV_ID = ?) AND T3.CONSEILLER_ID = T4.INDIV_ID AND 
 t0.UV_OUV_ID = T1.UV_OUV_ID AND T2.DIPLOME_$C = T3.DIPLOME_$C AND 
 t0.DIPLOME_$C = T2.DIPLOME_$C ORDER BY T4.NOM ASC, T4.PRENOM ASC 
 withBindings: 1:2005(anUniv), 2:1A(prdUniv), 3:ING2(diplomec), 
 4:1(niveauAdm), 5:131(uvOuvId)
 
 tables INDIVIDU, ETU_INSCR_ADM and DIPLOME are table of schema B but WO can't 
 translate it like that i.e : A.INDIVIDU or A.ETU_INSCR_ADM.
 
 Thanks for your help
 
 PS : I have a storedProcedure which return data and do the same request but I 
 don't know how to insert it in my code and binding it with WODisplayGroup for 
 batch view (previous, next) with 10 students per batch.
 ___
 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

Come to WOWODC this July for unparalleled WO learning opportunities and real 
peer to peer problem solving!  Network, socialize, and enjoy a great 
cosmopolitan city.  See you there!  http://www.wocommunity.org/wowodc11/


 ___
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: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-11 Thread naneon . raymond

Hi,


I follwed all your instructions and corrected my eomodel and my fetch spec. 
give this request.


33963 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression:
 SELECT DISTINCT t0.ANC_UV_OUVERTE_ID, t0.CATEG_ID, t0.CRE_DATE, 
t0.DIPL_SPEC_$C, t0.DIPLOME_$C, t0.MAJ_AUTEUR, t0.MAJ_DATE, 
t0.NLE_UV_OUVERTE_ID, t0.UV_CREDITS_ECTS, t0.UV_OUV_ID 
FROM GEST_UV.UV_OUVERTES t0, GEST_UV.UV_OUV T1, GERRY.ETU_INSCR_ADM T3, 
GERRY.DIPLOME T2 
WHERE ((T1.AN_UNIV like ? ESCAPE '\' AND T1.PRD_UNIV like ? ESCAPE '\') OR 
t0.DIPLOME_$C like ? ESCAPE '\' OR T3.NIVEAU_ADM = ? OR T1.UV_OUV_ID = ?) AND 
t0.UV_OUV_ID = T1.UV_OUV_ID AND T2.DIPLOME_$C = T3.DIPLOME_$C AND t0.DIPLOME_$C 
= T2.DIPLOME_$C ORDER BY t0.DIPLOME_$C ASC 
withBindings: 1:2005(anUniv), 2:1A(prdUniv), 3:ING2(diplomec), 
4:3(niveauAdm), 5:131(uvOuvId)


The problem is the time(very very very slow) it takes to return data and get 
outOfMemory exception. (see below)


2520004 [WorkerThread0] DEBUG NSLog  - 68758 row(s) processed
2520005 [WorkerThread0] DEBUG NSLog  -  === Commit Internal Transaction
2527790 [WorkerThread0] WARN NSLog  - WOWorkerThread id=0 socket=null 
Throwable occurred: java.lang.OutOfMemoryError: Java heap space
2527790 [WorkerThread0] WARN NSLog  - WOWorkerThread id=0 socket=null 
Workerthread exiting due to error, respawning with ID 1...
Exception in thread WorkerThread0 
com.webobjects.foundation.NSForwardException [java.lang.OutOfMemoryError] Java 
heap space:java.lang.OutOfMemoryError: Java heap space


Message du : 11/05/2011
De : Susanne Schneider  susanne.schnei...@interactive-systems.de
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: Fetching on 2 EOMODELS using different schema in DATABASE  with but 
have relationship


 
Hi,

at least in Oracle it should be possible if you

1) qualify the table name with the schema name, e.g. b.individu
2) allow the user of the separate schemes to select the tables from the 
other schemes.

If you have static (not changing) models, you can achieve the first by 
adding the scheme names to the table names in your EOModel. WO will then 
use the full qualified table names to build the fetch specification. For 
the second you have to extend your initial SQL-generation script.

HTH,
Susanne


 Message: 3
 Date: Tue, 10 May 2011 10:36:49 -0700
 From: Chuck Hill
 Subject: Re: Fetching on 2 EOMODELS using different schema in DATABASE
   with but have relationship
 To: naneon.raym...@neuf.fr
 Cc: WebObjects webobjects-dev
 Message-ID:
 Content-Type: text/plain; charset=us-ascii

 I think this is something that EOF can't do: qualify across schemas 
 (databases in EOF's view).

 Chuck

 On May 10, 2011, at 4:49 AM, naneon.raym...@neuf.fr wrote:

 Hi all,

 I have 2 models using different schema of a database. but these schemas have 
 table which have relationship. So in my model A, I use a fetch spec. on a 
 table which have the maximum relation with tables in model A and B.
 So when I excute my fech spec, WO don't see the schema of model A and show 
 exception ORA-00942 : table or view does not exist. This a the querry 
 generate by WO on fetching :

 SELECT t0.ANC_UV_OUVERTE_ID, t0.CATEG_ID, t0.CRE_DATE, t0.DIPL_SPEC_$C, 
 t0.DIPLOME_$C, t0.MAJ_AUTEUR, t0.MAJ_DATE, t0.NLE_UV_OUVERTE_ID, 
 t0.UV_CREDITS_ECTS, t0.UV_OUV_ID FROM UV_OUVERTES t0, INDIVIDU T4, UV_OUV 
 T1, ETU_INSCR_ADM T3, DIPLOME T2 WHERE ((T1.AN_UNIV like ? ESCAPE '\' AND 
 T1.PRD_UNIV like ? ESCAPE '\') OR t0.DIPLOME_$C like ? ESCAPE '\' OR 
 T3.NIVEAU_ADM = ? OR T1.UV_OUV_ID = ?) AND T3.CONSEILLER_ID = T4.INDIV_ID 
 AND t0.UV_OUV_ID = T1.UV_OUV_ID AND T2.DIPLOME_$C = T3.DIPLOME_$C AND 
 t0.DIPLOME_$C = T2.DIPLOME_$C ORDER BY T4.NOM ASC, T4.PRENOM ASC 
 withBindings: 1:2005(anUniv), 2:1A(prdUniv), 3:ING2(diplomec), 
 4:1(niveauAdm), 5:131(uvOuvId)

 tables INDIVIDU, ETU_INSCR_ADM and DIPLOME are table of schema B but WO 
 can't translate it like that i.e : A.INDIVIDU or A.ETU_INSCR_ADM.

 Thanks for your help

 PS : I have a storedProcedure which return data and do the same request but 
 I don't know how to insert it in my code and binding it with WODisplayGroup 
 for batch view (previous, next) with 10 students per batch.
 ___
 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


-- 
Susanne Schneider
Coordinator secuTrial Development

iAS interActive Systems GmbH
Dieffenbachstraße 33 c, D-10967 Berlin

fon+49(0)30 22 50 50 - 498
fax+49(0)30 22 50 50 - 451
mail   susanne.schnei...@interactive-systems.de
webhttp://www.interActive-Systems.de



Re: Re: Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-11 Thread naneon . raymond

HI All,


I chosed storedProcedure which is execute database side (to get speed) but I 
have big problem when I execute it.


in my seach Class : 

private static final String PROCEDURE_NAME = searchEtudiants;

public static NSMutableDictionary parameters(String pperiode, 
   String pdiplome, String pniveau, String puv, String pnom,
String pprenom, Number pnum, Long pconseiller) { 
NSMutableDictionaryString, Object bindings = new 
NSMutableDictionaryString, Object(); 
bindings.takeValueForKey(pperiode, 010_pperiode); 
bindings.takeValueForKey(pdiplome, 020_pdiplome); 
bindings.takeValueForKey(pniveau, 030_pniveau); 
bindings.takeValueForKey(puv, 040_puv); 
bindings.takeValueForKey(pnom, 050_pnom); 
bindings.takeValueForKey(pprenom, 060_pprenom); 
bindings.takeValueForKey(pnum, 070_pnum); 
bindings.takeValueForKey(pconseiller, 080_pconseiller); 
bindings.takeValueForKey(null, 090_etu_cur); 
return bindings; 
}
etudiantList = 
EOUtilities.executeStoredProcedureNamed(ed,PROCEDURE_NAME,parameters(periode, 
diplome, niveau, uv, nom,prenom, nombre, null));
etudiantList is a NSDictionary


StoredProcedures Information


EOStoredProcedure searchEtudiants
arguments : '({columnName = 010_pperiode; className = 
java.lang.String; externalType = VARCHAR2; parameterDirection = 1; 
allowsNull = Y; name = 010_pperiode; }, {columnName = 020_pdiplome; 
className = java.lang.String; externalType = VARCHAR2; parameterDirection = 
1; allowsNull = Y; name = 020_pdiplome; }, {columnName = 030_pniveau; 
className = java.lang.String; externalType = VARCHAR2; parameterDirection = 
1; allowsNull = Y; name = 030_pniveau; }, {columnName = 040_puv; 
className = java.lang.String; externalType = VARCHAR2; parameterDirection = 
1; allowsNull = Y; name = 040_puv; }, {columnName = 050_pnom; className 
= java.lang.String; externalType = VARCHAR2; parameterDirection = 1; 
allowsNull = Y; name = 050_pnom; }, {columnName = 060_pprenom; className 
= java.lang.String; externalType = VARCHAR2; parameterDirection = 1; 
allowsNull = Y; name = 060_pprenom; }, {valueType = i; columnName = 
070_pnum; className = java.lang.Number; externalType = NUMBER; 
parameterDirection = 1; allowsNull = Y; name = 070_pnum; }, {valueType = 
i; columnName = 080_pconseiller; className = java.lang.Number; 
externalType = NUMBER; parameterDirection = 1; allowsNull = Y; name = 
080_pconseiller; }, {columnName = 090_etu_cur; className = 
com.webobjects.foundation.NSData; parameterDirection = 2; allowsNull = Y; 
name = 090_etu_cur; })'
name : 'searchEtudiants'
externalName : 'GERRY.PROFIL_ETUDIANTS.SEARCH_ETUDIANTS'



parameters can have null value (allowsNull = Y) and it's considered in my 
sotredProcedure and tested (so problem)


1 : Parameters are null


283554 [WorkerThread0] DEBUG NSLog  - executeStoredProcedure: searchEtudiants 
withValues:{}
283556 [WorkerThread0] DEBUG NSLog  -  === Begin Internal Transaction
283557 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: { call 
GERRY.PROFIL_ETUDIANTS.SEARCH_ETUDIANTS (?, ?, ?, ?, ?, ?, ?, ?, ?)} 
withBindings: 
1:com.webobjects.foundation.NSKeyValueCoding$Null(010_pperiode), 
2:com.webobjects.foundation.NSKeyValueCoding$Null(020_pdiplome), 
3:com.webobjects.foundation.NSKeyValueCoding$Null(030_pniveau), 
4:com.webobjects.foundation.NSKeyValueCoding$Null(040_puv), 
5:com.webobjects.foundation.NSKeyValueCoding$Null(050_pnom), 
6:com.webobjects.foundation.NSKeyValueCoding$Null(060_pprenom), 
7:com.webobjects.foundation.NSKeyValueCoding$Null(070_pnum), 
8:com.webobjects.foundation.NSKeyValueCoding$Null(080_pconseiller), 
9:com.webobjects.foundation.NSKeyValueCoding$Null(090_etu_cur)


Exception : java.lang.NullPointerException


2 : parameters have nom, prenom, numero and conseiller *null*


247225 [WorkerThread0] DEBUG NSLog  - executeStoredProcedure: searchEtudiants 
withValues:{030_pniveau = 783  -M2; 010_pperiode = 20101A; 040_puv = 
10803; 020_pdiplome = MST; }
247228 [WorkerThread0] DEBUG NSLog  -  === Begin Internal Transaction
247229 [WorkerThread0] DEBUG NSLog  -  evaluateExpression: 
com.webobjects.jdbcadaptor.OraclePlugIn$OracleExpression: { call 
GERRY.PROFIL_ETUDIANTS.SEARCH_ETUDIANTS (?, ?, ?, ?, ?, ?, ?, ?, ?)} 
withBindings: 1:20101A(010_pperiode), 2:MST(020_pdiplome), 3:783  
-M2(030_pniveau), 4:10803(040_puv), 
5:com.webobjects.foundation.NSKeyValueCoding$Null(050_pnom), 
6:com.webobjects.foundation.NSKeyValueCoding$Null(060_pprenom), 
7:com.webobjects.foundation.NSKeyValueCoding$Null(070_pnum), 
8:com.webobjects.foundation.NSKeyValueCoding$Null(080_pconseiller), 
9:com.webobjects.foundation.NSKeyValueCoding$Null(090_etu_cur)


Exception : java.lang.NullPointerException


3 : Parameters have conseiller *null*


136288 [WorkerThread1] DEBUG NSLog  - executeStoredProcedure: searchEtudiants 
withValues:{050_pnom = 

Fetching on 2 EOMODELS using different schema in DATABASE with but have relationship

2011-05-10 Thread naneon . raymond
Hi all,

I have 2 models using different schema of a database. but these schemas have 
table which have relationship. So in my model A, I use a fetch spec. on a 
table which have the maximum relation with tables in model A and B.
So when I excute my fech spec, WO don't see the schema of model A and show 
exception ORA-00942 : table or view does not exist. This a the querry generate 
by WO on fetching : 

SELECT t0.ANC_UV_OUVERTE_ID, t0.CATEG_ID, t0.CRE_DATE, t0.DIPL_SPEC_$C, 
t0.DIPLOME_$C, t0.MAJ_AUTEUR, t0.MAJ_DATE, t0.NLE_UV_OUVERTE_ID, 
t0.UV_CREDITS_ECTS, t0.UV_OUV_ID FROM UV_OUVERTES t0, INDIVIDU T4, UV_OUV T1, 
ETU_INSCR_ADM T3, DIPLOME T2 WHERE ((T1.AN_UNIV like ? ESCAPE '\' AND 
T1.PRD_UNIV like ? ESCAPE '\') OR t0.DIPLOME_$C like ? ESCAPE '\' OR 
T3.NIVEAU_ADM = ? OR T1.UV_OUV_ID = ?) AND T3.CONSEILLER_ID = T4.INDIV_ID AND 
t0.UV_OUV_ID = T1.UV_OUV_ID AND T2.DIPLOME_$C = T3.DIPLOME_$C AND t0.DIPLOME_$C 
= T2.DIPLOME_$C ORDER BY T4.NOM ASC, T4.PRENOM ASC withBindings: 
1:2005(anUniv), 2:1A(prdUniv), 3:ING2(diplomec), 4:1(niveauAdm), 
5:131(uvOuvId)

tables INDIVIDU, ETU_INSCR_ADM and DIPLOME are table of schema B but WO can't 
translate it like that i.e : A.INDIVIDU or A.ETU_INSCR_ADM.

Thanks for your help

PS : I have a storedProcedure which return data and do the same request but I 
don't know how to insert it in my code and binding it with WODisplayGroup for 
batch view (previous, next) with 10 students per batch.
 ___
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: Re: fetching on joined table

2011-04-14 Thread naneon . raymond
Hi ,

Thank you everyone for your information about my problem.
 It's true I just want to read my data, because for modification or recording, 
this side is already set.
 
To Chuck, I think that we can make everything with a framework ( WO) and even 
if it is difficult but there is always an issue.
 
To Joe, I do not necessarily execute SQL but just wondering if there is a way 
to do this in WO? Or make a stored procedure with my complex SQL query  in the 
lower part and just call it in WO. It would avoid me to every new version of my 
database to touch my WO code.

 I'm just looking for ways and John gave me a way



Message du : 13/04/2011
De : John Huss  johnth...@gmail.com
A : 
Copie à : naneon.raym...@neuf.fr, webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 IF your data is read-only and you really, really want to use a custom SQL 
statement, then it's ok to fetch raw rows and set the SQL using a hint:

         String sqlQuery = ...
 

         NSMutableDictionary hints = new NSMutableDictionary();
         hints.setObjectForKey( sqlQuery, 
EODatabaseContext.CustomQueryExpressionHintKey);
         fetchSpec.setHints( hints );
        fetchSpec.setRawRowKeyPaths( ... )
 


        return editingContext.objectsWithFetchSpecification( fetchSpec );

 

If this is editable data then this is definitely NOT the way to do it.


John

On Wed, Apr 13, 2011 at 10:18 AM, Chuck Hill ch...@global-village.net wrote:
 You will notice that Joe works at a rather well known university too.  :-)  
I'd listen to his advice or decide to not use WO. 

Chuck


On Apr 13, 2011, at 8:00 AM, Joe Little wrote:

Others will say similarly, but as someone who once used views, etc, you'll want 
to avoid these and stored procedures and build out all of this logic in 
EOF/Modeler and let WebObjects do it's thing. If you are executing SQL for 
results lists, you are likely trying too hard to outthink WO
 







 
 ___
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: Re: fetching on joined table

2011-04-13 Thread naneon . raymond
Hi Chuck,

thanks for your reply. So I thought about stored procedures? But How I include 
in my code and can I cast resultset in EOEntities Objects?
I want to use data in my WOPopUpButton.

Thanks

Ray




Message du : 12/04/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 Hi Ray,

WebObjects is not going to generate SQL like that for you (maybe it is 
possible, but it would be very difficult).  I think  that you have two choices:


1. Use views
2. Think and fetch in terms of Objects not tables and rows and joins.  This is 
going to be VERY different than how you are approaching the data now.


It is possible that WebObjects is just not a good thing to use with your schema.




Chuck





On Apr 12, 2011, at 12:49 AM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr 
wrote:

Hi chuck,

I go to give you more informations about data. I work in IT Universtity in 
France and we have huge database with lot of table. Here is an example of PDM 
(5 tables)


person 
students-degree--diploma--academic 
year--period_param-admin_resgistration
                               (fk_person)        (fk_student)      
(fk_academic_year)     (pk an_univ  prd_univ)    (fields an_univ_prd_univ)    
(fk_diploma, fk_person, fk_student, fk_academic_year)




and I have lof view (view_student_course on a period ...),
 Here is code of view vue_parcours_profil using to have student curse :


CREATE OR REPLACE FORCE VIEW GEST_UV.VUE_PROFIL_PARCOURS (ETU_ID, 
DIPLOME_$C, REORIENT_$F, PRD_DEBUT, PRD_FIN)
AS
  SELECT DISTINCT t3.e,
    t3.d,
    t3.reorient_$f,
    MIN(p_deb) over (partition BY t3.e, t3.d, t3.p_fin) debut,
    t3.p_fin fin
  FROM
    (SELECT DISTINCT t1.e,
      t1.d,
      t1.no,
      t1.p p_deb,
      NVL(MIN(t2.p) over (partition BY t1.e, t1.d, t1.no), MAX (t1.p) over 
(partition BY t1.e, t1.d)) p_fin,
      CASE
        WHEN t1.no = 1
        AND t2.r  IS NULL
        THEN t1.r
        ELSE DECODE(t2.r,NULL,'N',t2.r)
      END reorient_$f
      --DECODE(t2.r,null,'N',t2.r) reorient_$f
    FROM
      (SELECT DISTINCT etu_id e,
        diplome_$c d,
        an_univ
          prd_univ p,
        ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
          prd_univ NULLS LAST) no,
        DECODE(res_pedag_$c,'RE','O','DR','O','N') r
      FROM gerry.etu_inscr_adm eia1
      ) t1,
      (SELECT DISTINCT etu_id e,
        diplome_$c d,
        an_univ
          prd_univ p,
        ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
          prd_univ NULLS LAST) no,
        DECODE(res_pedag_$c,'RE','O','DR','O','N') r
      FROM gerry.etu_inscr_adm eia2
      ) t2
    WHERE t1.e = t2.e(+)
    AND t1.d   = t2.d(+)
    AND t1.no   t2.no(+)
    AND t1.r   t2.r(+)
      --and t1.r = 'N'
    AND ((t1.no        = 1
    AND NVL(t1.r,'N') IN ('O','N'))
    OR (t1.no           1
    AND NVL(t1.r,'N')  = 'N'))
    ) t3;



So when I want all students curse in sql developer this my request :


SELECT vtp.etu_id as STUDENT_ID,
    vtp.diplome_$c as DIPLOMA_CODE,
    DECODE (vtp.diplome_$c,'ING',d.diplome
       ' ancien règlement',d.diplome) as DIPLOMA_NAME,
    vtp.prd_debut as PERIOD_BEGIN,
    vtp.prd_fin as PERIOD_END,
    gerry.fonc_trad_prd_lib(vtp.prd_debut,'anprd') as ACADEMIC_YEAR_BEGIN,
    gerry.fonc_trad_prd_lib(vtp.prd_fin,'anprd') ACADEMIC_YEAR_END,
    vtp.reorient_$f as ORIENTATION,
    (SELECT DIPL_SPEC_ABR
         ' '
         DIPL_OPT_ABR
         ' '
         NIVEAU_ADM
    FROM gerry.vue_eia_abr veia
    WHERE veia.etu_id  = vtp.etu_id
    AND veia.diplome_$c=vtp.diplome_$c
    AND veia.an_univ
        veia.prd_univ=vtp.prd_fin
    ) as DIPLOMA_SPECIFICITY,
    (SELECT diplome_num
    FROM gest_uv.etu_diplome
    WHERE etu_id   = vtp.etu_id
    AND diplome_$c = vtp.diplome_$c
    AND an_univ
        prd_univ BETWEEN vtp.prd_debut AND vtp.prd_fin
    ) as DIPLOMA_NUMBER,
    (SELECT SITUATION
    FROM gerry.etu_inscr_adm eia,
      gerry.ref_situation rs
    WHERE rs.situation_$c = eia.situation_$c
    AND eia.etu_id        = vtp.etu_id
    AND eia.diplome_$c    =vtp.diplome_$c
    AND eia.an_univ
        eia.prd_univ=vtp.prd_fin
    ) as STUDENT_SITUATION,
    NVL(
    (SELECT DECODE(situation_$c,'DEMI','O','N')
    FROM gerry.etu_inscr_adm
    WHERE etu_id    = vtp.etu_id
    AND diplome_$c  =vtp.diplome_$c
    AND situation_$c='DEMI'
    AND an_univ
        prd_univ=vtp.prd_fin
    ),'N') as IS_STUDENT_RESIGNED,
    NVL(
    (SELECT DECODE(situation_$c,'UTX','O','N')
    FROM gerry.etu_inscr_adm
    WHERE etu_id    = vtp.etu_id
    AND diplome_$c  =vtp.diplome_$c
    AND situation_$c='UTX'
    AND an_univ
        prd_univ=vtp.prd_fin
    ),'N') as IS_STUDENT_TRANSFERED
  FROM gest_uv.VUE_PROFIL_PARCOURS vtp,
    gerry.diplome d
  WHERE vtp.diplome_$c = d.diplome_$c


Re: Re: fetching on joined table

2011-04-12 Thread naneon . raymond
Hi chuck,


I go to give you more informations about data. I work in IT Universtity in 
France and we have huge database with lot of table. Here is an example of PDM 
(5 tables)


person 
students-degree--diploma--academic 
year--period_param-admin_resgistration
   (fk_person)(fk_student)  
(fk_academic_year) (pk an_univ  prd_univ)(fields an_univ_prd_univ)
(fk_diploma, fk_person, fk_student, fk_academic_year)




and I have lof view (view_student_course on a period ...),
 Here is code of view vue_parcours_profil using to have student curse :



CREATE OR REPLACE FORCE VIEW GEST_UV.VUE_PROFIL_PARCOURS (ETU_ID, 
DIPLOME_$C, REORIENT_$F, PRD_DEBUT, PRD_FIN)
AS
  SELECT DISTINCT t3.e,
t3.d,
t3.reorient_$f,
MIN(p_deb) over (partition BY t3.e, t3.d, t3.p_fin) debut,
t3.p_fin fin
  FROM
(SELECT DISTINCT t1.e,
  t1.d,
  t1.no,
  t1.p p_deb,
  NVL(MIN(t2.p) over (partition BY t1.e, t1.d, t1.no), MAX (t1.p) over 
(partition BY t1.e, t1.d)) p_fin,
  CASE
WHEN t1.no = 1
AND t2.r  IS NULL
THEN t1.r
ELSE DECODE(t2.r,NULL,'N',t2.r)
  END reorient_$f
  --DECODE(t2.r,null,'N',t2.r) reorient_$f
FROM
  (SELECT DISTINCT etu_id e,
diplome_$c d,
an_univ
  prd_univ p,
ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
  prd_univ NULLS LAST) no,
DECODE(res_pedag_$c,'RE','O','DR','O','N') r
  FROM gerry.etu_inscr_adm eia1
  ) t1,
  (SELECT DISTINCT etu_id e,
diplome_$c d,
an_univ
  prd_univ p,
ROW_NUMBER() OVER (partition BY etu_id,diplome_$c order by an_univ
  prd_univ NULLS LAST) no,
DECODE(res_pedag_$c,'RE','O','DR','O','N') r
  FROM gerry.etu_inscr_adm eia2
  ) t2
WHERE t1.e = t2.e(+)
AND t1.d   = t2.d(+)
AND t1.no   t2.no(+)
AND t1.r   t2.r(+)
  --and t1.r = 'N'
AND ((t1.no= 1
AND NVL(t1.r,'N') IN ('O','N'))
OR (t1.no   1
AND NVL(t1.r,'N')  = 'N'))
) t3;


So when I want all students curse in sql developer this my request :



SELECT vtp.etu_id as STUDENT_ID,
vtp.diplome_$c as DIPLOMA_CODE,
DECODE (vtp.diplome_$c,'ING',d.diplome
   ' ancien règlement',d.diplome) as DIPLOMA_NAME,
vtp.prd_debut as PERIOD_BEGIN,
vtp.prd_fin as PERIOD_END,
gerry.fonc_trad_prd_lib(vtp.prd_debut,'anprd') as ACADEMIC_YEAR_BEGIN,
gerry.fonc_trad_prd_lib(vtp.prd_fin,'anprd') ACADEMIC_YEAR_END,
vtp.reorient_$f as ORIENTATION,
(SELECT DIPL_SPEC_ABR
 ' '
 DIPL_OPT_ABR
 ' '
 NIVEAU_ADM
FROM gerry.vue_eia_abr veia
WHERE veia.etu_id  = vtp.etu_id
AND veia.diplome_$c=vtp.diplome_$c
AND veia.an_univ
veia.prd_univ=vtp.prd_fin
) as DIPLOMA_SPECIFICITY,
(SELECT diplome_num
FROM gest_uv.etu_diplome
WHERE etu_id   = vtp.etu_id
AND diplome_$c = vtp.diplome_$c
AND an_univ
prd_univ BETWEEN vtp.prd_debut AND vtp.prd_fin
) as DIPLOMA_NUMBER,
(SELECT SITUATION
FROM gerry.etu_inscr_adm eia,
  gerry.ref_situation rs
WHERE rs.situation_$c = eia.situation_$c
AND eia.etu_id= vtp.etu_id
AND eia.diplome_$c=vtp.diplome_$c
AND eia.an_univ
eia.prd_univ=vtp.prd_fin
) as STUDENT_SITUATION,
NVL(
(SELECT DECODE(situation_$c,'DEMI','O','N')
FROM gerry.etu_inscr_adm
WHERE etu_id= vtp.etu_id
AND diplome_$c  =vtp.diplome_$c
AND situation_$c='DEMI'
AND an_univ
prd_univ=vtp.prd_fin
),'N') as IS_STUDENT_RESIGNED,
NVL(
(SELECT DECODE(situation_$c,'UTX','O','N')
FROM gerry.etu_inscr_adm
WHERE etu_id= vtp.etu_id
AND diplome_$c  =vtp.diplome_$c
AND situation_$c='UTX'
AND an_univ
prd_univ=vtp.prd_fin
),'N') as IS_STUDENT_TRANSFERED
  FROM gest_uv.VUE_PROFIL_PARCOURS vtp,
gerry.diplome d
  WHERE vtp.diplome_$c = d.diplome_$c
order by prd_debut, prd_fin;


So I must fetch on view vue_profil_parcours, diploma to display all students 
curse in a WOO table using batch. Here a little example and I have lof of 
fecthing such as this to do in my apps to display information about, sutdent, 
teacher so on...


I want a example code How to translate this sql request  or what the best 
practice in WebObjects in this situation? To fast forward in my apps, I create 
view every time when I want to display this kind of information. This allows me 
to browse my data in an accurate in WebObjects.


Thanks for your help


Ray,




Message du : 11/04/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 


On Apr 11, 2011, at 3:12 AM, naneon.raym...@neuf.fr wrote:
Hi Chuck,

Tables A, B, C, D haven't relationship but same fileds name.

If they don't have 

Re: Re: fetching on joined table

2011-04-11 Thread naneon . raymond
Hi Chuck,

Tables A, B, C, D haven't relationship but same fileds name. When i'am using 
raw rows to translate my sql in webobjects and get my data, I don't have EOF 
entities but dictionnaries.

So I would like to know what the best practice on my case? create view with my 
sql request on database and fetching on view  in my model?

Thanks for your help.

Ray




Message du : 11/04/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 Hello Ray,


On Apr 8, 2011, at 5:16 PM, naneon.raym...@neuf.fr wrote:

Hi, 

I'm newbie on WebObjects and I have big problem to fetching on joined table.
Example :
I have my SQL like that :


A good rule with WebObjects is If you are thinking about SQL, you are doing it 
wrong.  There are times (i.e. when optimizing) when you do need to think about 
the SQL, but thinking in terms of objects is usually the better way.



select 
a.id   b.id as ID,
c.option as option,
decode(d.no, 1, 'one', 2, 'two', 'unknow') as  order


WebObjects (EOF) does not do mixed table selects like this (unless you are 
selecting Raw Rows).  It selects whole rows of tables and makes them into 
related Java objects.




from
ta a, tb b, tc c, td d
where
c.option in ('1', '2','3')
and c.option = b.option


How to translate this SQL request in EOF using qualifier or spec qualifier?


Thanks for your help.


What are the relationships in the model between A, B, C, and D?  What are you 
trying to fetch?




Chuck


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


Tr: Re: Re: fetching on joined table

2011-04-11 Thread naneon . raymond
Hi Chuck,

Tables A, B, C, D haven't relationship but same fileds name. When i'am using 
raw rows to translate my sql in webobjects and get my data, I don't have EOF 
entities but dictionnaries.

So I would like to know what the best practice on my case? create view with my 
sql request on database and fetching on view  in my model?

Thanks for your help.

Ray




Message du : 11/04/2011
De : Chuck Hill  ch...@global-village.net
A : naneon.raym...@neuf.fr
Copie à : webobjects-dev@lists.apple.com
Sujet : Re: fetching on joined table


 Hello Ray,


On Apr 8, 2011, at 5:16 PM, naneon.raym...@neuf.fr wrote:

Hi, 

I'm newbie on WebObjects and I have big problem to fetching on joined table.
Example :
I have my SQL like that :


A good rule with WebObjects is If you are thinking about SQL, you are doing it 
wrong.  There are times (i.e. when optimizing) when you do need to think about 
the SQL, but thinking in terms of objects is usually the better way.



select 
a.id   b.id as ID,
c.option as option,
decode(d.no, 1, 'one', 2, 'two', 'unknow') as  order


WebObjects (EOF) does not do mixed table selects like this (unless you are 
selecting Raw Rows).  It selects whole rows of tables and makes them into 
related Java objects.




from
ta a, tb b, tc c, td d
where
c.option in ('1', '2','3')
and c.option = b.option


How to translate this SQL request in EOF using qualifier or spec qualifier?


Thanks for your help.


What are the relationships in the model between A, B, C, and D?  What are you 
trying to fetch?




Chuck


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


fetching on joined table

2011-04-08 Thread naneon . raymond
Hi, 


I'm newbie on WebObjects and I have big problem to fetching on joined table.
Example :
I have my SQL like that :


select 
a.id   b.id as ID,
c.option as option,
decode(d.no, 1, 'one', 2, 'two', 'unknow') as  order
from
ta a, tb b, tc c, td d
where
c.option in ('1', '2','3')
and c.option = b.option
 


How to translate this SQL request in EOF using qualifier or spec qualifier?


Thanks for your help.


Ray

 ___
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