Re: Using AjaxInPlaceEditor in WORepetition
On 2011-08-08, at 2:58 AM, naneon.raym...@neuf.fr naneon.raym...@neuf.fr wrote: 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 You can still put it in your model. That is what you should do. 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 You can also create and insert the objects. If they are not used, then delete them before saving. 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
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 object that 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 comes to 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: Re: Using AjaxInPlaceEditor in WORepetition
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
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
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: Using AjaxInPlaceEditor in WORepetition
Hi Hee Hi Ray Bonjou. Is the txImplication a project-based or person-based entity? txImplication is the project-based Entity not person-based Entity If it is project-based, and since the person has the relationship to project, it could transverse the object graph to get the txImpliction e.g. aPerson.project().txImplementation(). Yes I thought about this code aPerson.project().txImplementation() and it's great when I saved in data base but When I want to manipulate(modify each row in the loop) txImplication before saved? Then I will pull out the txImplication from the loop and place it in the same form. It's in the form before in the loop It could then be saved by calling ec saveChanges. However, if the txImplication is person-based, I think you may need to change the model accordingly and txImplication as a attribute. You may not be able to put the same string variable in the repetition loop and get the values saved. I can not change the model because I exploit a database which I can modify. I only create my table project to do relationship between all tables. Cheers Cheong Hee - Original Message - From: Raymond NANEON To: Theodore Petrosky Cc: WebObjects webobjects-dev Sent: Thursday, August 04, 2011 6:12 AM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi Ted Le 3 août 2011 à 21:28, Theodore Petrosky a écrit : Raymond, I assume I do not understand but, it appears that you are trying to bind the value of the inPlaceEditor to a single string var in your session. then when you click the ok or exit the inPlaceEditor you are trying to assign this value to the appropriate person object. I will ask again. Is there a reason that you can not add an attribute txImplication to your entity person? I can't add an attribute txImplication to my entity person because this attribute exist in the entity project which have relationship with entity person. perhaps I am doing something wrong in my code. I would love to see your project perhaps you would like to use teamviewer and allow me to look? No problem with team viewer but I am in france and there is jet lag beetwen us. I will be home around 5pm http://www.teamviewer.com Ted Ray --- On Wed, 8/3/11, Raymond NANEON naneon.raym...@neuf.fr wrote: From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects webobjects-dev webobjects-dev@lists.apple.com Date: Wednesday, August 3, 2011, 1:50 PM Hi All, Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); persTxKey.addEntriesFromDictionary(dicKey); //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh
Re: Using AjaxInPlaceEditor in WORepetition
. What does the model look like? persTxKey is a dictionary which have all txImplication for each person where it's mentioned. When I will to save all information in data base, I go to take persTxKey and get all the txImplication for each person. What part of the model do you want to see? Project, Person, and anything related to txImplication. Chuck //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … AjaxInPlaceEditor0.pngAjaxInPlaceEditor1.png Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 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/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects -- 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 -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray Yes I thought about this code aPerson.project().txImplementation() and it's great when I saved in data base but When I want to manipulate(modify each row in the loop) 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 can not change the model because I exploit a database which I can modify. I only create my table project to do relationship between all tables. 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(). 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: Using AjaxInPlaceEditor in WORepetition
Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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 th= ... 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
Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray Have you tried with display group to get the right object so that you could put the string values into? May be you could post some code in saveInPlaceEditor to share. Cheers Cheong Hee ps. I was not available to access mail yesterday. - Original Message - From: Raymond NANEON To: WebObjects webobjects-dev Sent: Wednesday, August 03, 2011 3:42 PM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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
Re: Using AjaxInPlaceEditor in WORepetition
Ray: I may not be understanding the gist of your entire issue but I do have a question: In the wod for your AjaxInPlaceEditor, what do you have for the id binding and how are you setting it? Tim On Aug 3, 2011, at 12:53 AM, Cheong Hee (Gmail) wrote: Hi Ray Have you tried with display group to get the right object so that you could put the string values into? May be you could post some code in saveInPlaceEditor to share. Cheers Cheong Hee ps. I was not available to access mail yesterday. - Original Message - From: Raymond NANEON To: WebObjects webobjects-dev Sent: Wednesday, August 03, 2011 3:42 PM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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 th= ... WOD : repeat : WORepetition { list = Movies; index = movieRepetition
Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray Realizing what you need is to put the string into the movie object. It is a problem if it is a common string set for all objects in the loop. Could you hold the critical string in a repetition? I will suggest using selectObject in display group rather than using objectAtIndex. Cheers Cheong Hee - Original Message - From: Raymond NANEON To: WebObjects webobjects-dev Sent: Wednesday, August 03, 2011 3:42 PM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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
Re: Using AjaxInPlaceEditor in WORepetition
hi Hee, I go to post all my code after. I'm not at office or at home. Sent from my iPhone. Le 3 août 2011 à 12:22, Cheong Hee (Gmail) a écrit : Hi Ray Realizing what you need is to put the string into the movie object. It is a problem if it is a common string set for all objects in the loop. Could you hold the critical string in a repetition? I will suggest using selectObject in display group rather than using objectAtIndex. Cheers Cheong Hee - Original Message - From: Raymond NANEON To: WebObjects webobjects-dev Sent: Wednesday, August 03, 2011 3:42 PM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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 th= ... WOD : repeat : WORepetition { list = Movies; index = movieRepetition; } movieView : WOString { value
Re: Using AjaxInPlaceEditor in WORepetition
I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 ___ 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: Using AjaxInPlaceEditor in WORepetition
Hi Raymond. On 2011-08-03, at 10:50 AM, Raymond NANEON wrote: Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; Having personneDg and personRepetition in the session is not a good way to write WebObjects applications. These should be on the page or component. } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; TxImplication should also not be on the session. I think it should be on the person. And variables in Java should not start with a capital letter, txImplication would be a better name. action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); I don't know if you need either of those lines. //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); Using the primary key like this suggests that you are using EOF incorrectly. persTxKey.addEntriesFromDictionary(dicKey); Now I am lost. What does the model look like? Chuck //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … AjaxInPlaceEditor0.pngAjaxInPlaceEditor1.png Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 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/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev
Re: Using AjaxInPlaceEditor in WORepetition
Raymond, I assume I do not understand but, it appears that you are trying to bind the value of the inPlaceEditor to a single string var in your session. then when you click the ok or exit the inPlaceEditor you are trying to assign this value to the appropriate person object. I will ask again. Is there a reason that you can not add an attribute txImplication to your entity person? I would love to see your project perhaps you would like to use teamviewer and allow me to look? http://www.teamviewer.com Ted --- On Wed, 8/3/11, Raymond NANEON naneon.raym...@neuf.fr wrote: From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects webobjects-dev webobjects-dev@lists.apple.com Date: Wednesday, August 3, 2011, 1:50 PM Hi All, Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); persTxKey.addEntriesFromDictionary(dicKey); //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 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: Using AjaxInPlaceEditor in WORepetition
Hi Chuck Le 3 août 2011 à 21:11, Chuck Hill a écrit : Hi Raymond. On 2011-08-03, at 10:50 AM, Raymond NANEON wrote: Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; Having personneDg and personRepetition in the session is not a good way to write WebObjects applications. These should be on the page or component. I use session because user can backtracking and if I don't use it he can loose his data after backtracking. } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; TxImplication should also not be on the session. I think it should be on the person. And variables in Java should not start with a capital letter, txImplication would be a better name. Session for backtracking. I don't use capital letter on this variable it's getTxImplication. Yes it should be on person but I don't have column txImplication in the Entity person but in the Entity Project which have relationShip with person. action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); I don't know if you need either of those lines. I need this line for ajaxEditor. to set the txImplication for the selected person. //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); Using the primary key like this suggests that you are using EOF incorrectly. I don't know, Show me the right way persTxKey.addEntriesFromDictionary(dicKey); Now I am lost. What does the model look like? persTxKey is a dictionary which have all txImplication for each person where it's mentioned. When I will to save all information in data base, I go to take persTxKey and get all the txImplication for each person. What part of the model do you want to see? Chuck //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … AjaxInPlaceEditor0.pngAjaxInPlaceEditor1.png Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 Thanks Ray
Re: Using AjaxInPlaceEditor in WORepetition
Hi Ted Le 3 août 2011 à 21:28, Theodore Petrosky a écrit : Raymond, I assume I do not understand but, it appears that you are trying to bind the value of the inPlaceEditor to a single string var in your session. then when you click the ok or exit the inPlaceEditor you are trying to assign this value to the appropriate person object. I will ask again. Is there a reason that you can not add an attribute txImplication to your entity person? I can't add an attribute txImplication to my entity person because this attribute exist in the entity project which have relationship with entity person. perhaps I am doing something wrong in my code. I would love to see your project perhaps you would like to use teamviewer and allow me to look? No problem with team viewer but I am in france and there is jet lag beetwen us. I will be home around 5pm http://www.teamviewer.com Ted Ray --- On Wed, 8/3/11, Raymond NANEON naneon.raym...@neuf.fr wrote: From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects webobjects-dev webobjects-dev@lists.apple.com Date: Wednesday, August 3, 2011, 1:50 PM Hi All, Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); persTxKey.addEntriesFromDictionary(dicKey); //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 Thanks Ray ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev
Re: Using AjaxInPlaceEditor in WORepetition
OK, I'll let the others chime in on other aspects of what you're trying to do. However, the reason I asked previously about the id of the AjaxInPlaceEditor is because each needs a unique id. AjaxInPlaceEditor will not function properly in a repetition if you do not make sure each has a unique id. Your component needs a method to do this. implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; id = implicationEditorId; } You could make it psuedocodeImplicationEditor_ + yourArray.indexOfObject()/pseudocode to get: ImplicationEditor_1, ImplicationEditor_2, etc. Using Wonder there are also methods for generating guaranteed unique id's. T On Aug 3, 2011, at 10:50 AM, Raymond NANEON wrote: Hi All, Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); persTxKey.addEntriesFromDictionary(dicKey); //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … AjaxInPlaceEditor0.pngAjaxInPlaceEditor1.png Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed, 03 Aug 2011 09:42:05 +0200 From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: WebObjects webobjects-dev webobjects-dev@lists.apple.com Message-ID: fb960eda-646e-4f1b-bcb6-0d8fc1d1a...@neuf.fr Content-Type: text/plain; charset=iso-8859-1 Hi All, Someone can help me about my problem? I have almost finish my app but this thing make me late. Thanks for your help Le 1 août 2011 à 12:47, naneon.raym...@neuf.fr a écrit : 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 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/lists%40thetimmy.com This email sent to li...@thetimmy.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
Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray Bonjou. Is the txImplication a project-based or person-based entity? If it is project-based, and since the person has the relationship to project, it could transverse the object graph to get the txImpliction e.g. aPerson.project().txImplementation(). Then I will pull out the txImplication from the loop and place it in the same form. It could then be saved by calling ec saveChanges. However, if the txImplication is person-based, I think you may need to change the model accordingly and txImplication as a attribute. You may not be able to put the same string variable in the repetition loop and get the values saved. Cheers Cheong Hee - Original Message - From: Raymond NANEON To: Theodore Petrosky Cc: WebObjects webobjects-dev Sent: Thursday, August 04, 2011 6:12 AM Subject: Re: Using AjaxInPlaceEditor in WORepetition Hi Ted Le 3 août 2011 à 21:28, Theodore Petrosky a écrit : Raymond, I assume I do not understand but, it appears that you are trying to bind the value of the inPlaceEditor to a single string var in your session. then when you click the ok or exit the inPlaceEditor you are trying to assign this value to the appropriate person object. I will ask again. Is there a reason that you can not add an attribute txImplication to your entity person? I can't add an attribute txImplication to my entity person because this attribute exist in the entity project which have relationship with entity person. perhaps I am doing something wrong in my code. I would love to see your project perhaps you would like to use teamviewer and allow me to look? No problem with team viewer but I am in france and there is jet lag beetwen us. I will be home around 5pm http://www.teamviewer.com Ted Ray --- On Wed, 8/3/11, Raymond NANEON naneon.raym...@neuf.fr wrote: From: Raymond NANEON naneon.raym...@neuf.fr Subject: Re: Using AjaxInPlaceEditor in WORepetition To: Theodore Petrosky tedp...@yahoo.com Cc: WebObjects webobjects-dev webobjects-dev@lists.apple.com Date: Wednesday, August 3, 2011, 1:50 PM Hi All, Here is the code of what I'm telling and I attached picture too see how the app look like. In html : ... wo name = tableRow tr tdwo name = pole //td tdwo name = nompre //td tdwo name = implication //td tdwo name = cout //td /tr /wo ... In WOD ... tableRow : WORepetition { list = session.personneDg.displayedObjects; item = session.personRepetition; } pole : WOString { value = poleValues; } nompre : WOString { value = ~+session.personRepetition.nomPatronymique+ +session.personRepetition.prenom; } implication : AjaxInPlaceEditor { value = session.TxImplication; action = saveOnChange; } ... In java Class ... public void saveOnChange() { System.out.println(Implication.saveOnChange: save on change was performed for value + session.getTxImplication()); NSMutableDictionary dicKey = new NSMutableDictionary(); //Here I select the person where the app user put the information session.getPersonneDg().setSelectedObject(session.getPersonRepetition()); EOIndividuUlr perso = ((EOIndividuUlr) session.getPersonneDg().selectedObject()).localInstanceIn(ed); //Here I take Id of the selected person in the displayGroup and associate the information about him and put all in a dictionnary to have for each information about person, the id attached dicKey.put(perso.primaryKey(), session.getTxImplication()); persTxKey.addEntriesFromDictionary(dicKey); //return this.value; return true;; } ... In Session Class : ... private String txImplication = taux%; ... //Here is my problem because the variable txImplication is the same for each person in the repetition /** * @return the txImplication */ public String getTxImplication() { return txImplication; } /** * @param txImplication the txImplication to set */ public void setTxImplication(String txImplication) { this.txImplication = txImplication; } … Le 3 août 2011 à 16:51, Theodore Petrosky a écrit : I still have to ask how is this being used? Why can you not add this attribute to the entity and be done? If each entity had the column you need just bind to the attribute. When you say add this attribut to teh entity, what do you mean? Each Enttity don't have the column I need. The column I need exist in another entity which have relationship with the Entity that I want to bind the attribut. Look at my code and screen shot ted Message: 1 Date: Wed
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 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
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 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: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 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
Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
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; } - Original Message - From: Cheong Hee (Gmail) chn...@gmail.com To: naneon.raym...@neuf.fr; WebObjects webobjects-dev webobjects-dev@lists.apple.com 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 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: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 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
Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
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; } - Original Message - From: Cheong Hee (Gmail) chn...@gmail.com To: naneon.raym...@neuf.fr; WebObjects webobjects-dev webobjects-dev@lists.apple.com 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 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: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 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
Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
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
Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray 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. Cheers Cheong Hee - Original Message - From: naneon.raym...@neuf.fr To: Cheong Hee (Gmail) ; WebObjects webobjects-dev Sent: Monday, August 01, 2011 6:01 PM Subject: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition 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
Re: Re: Re: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
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: 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 naneon.raym...@neuf.fr wrote: From: naneon.raym...@neuf.fr naneon.raym...@neuf.fr Subject: Re: Re: Using AjaxInPlaceEditor in WORepetition To: Theodore Petrosky tedp...@yahoo.com, WebObjects webobjects-dev webobjects-dev@lists.apple.com 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 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
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 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
Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
Hi Ray 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. Cheers Cheong Hee - 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 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-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/chng34%40gmail.com This email sent to chn...@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
Using AjaxInPlaceEditor in WORepetition
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: 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. wo:loop list = $theGridListDG.displayedObjects item = $theGridItem tr tda string/td td webobject name =ImageEditInPlace//td /tr /wo:loop 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 webobjects-dev@lists.apple.com 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
Re: Re: Using AjaxInPlaceEditor in WORepetition
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