Re: Using AjaxInPlaceEditor in WORepetition
Re: Using AjaxInPlaceEditor in WORepetition
- Subject: Re: Using AjaxInPlaceEditor in WORepetition
- From: Chuck Hill <email@hidden>
- Date: Thu, 04 Aug 2011 09:26:40 -0700
On 2011-08-03, at 3:04 PM, Raymond NANEON wrote:
> 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>
>>> <td><wo name = "pole" /></td>
>>> <td><wo name = "nompre" /></td>
>>> <td><wo name = "implication" /></td>
>>> <td><wo 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.
Users should not backtrack :-) but I think you can find better ways of handling 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
I don't understand what you are trying to do. :-)
>>
>>
>>> 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?
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.png><AjaxInPlaceEditor1.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 <email@hidden>
>>>>> Subject: Re: Using AjaxInPlaceEditor in WORepetition
>>>>> To: WebObjects webobjects-dev <email@hidden>
>>>>> Message-ID: <email@hidden>
>>>>> 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, email@hidden
>>>>> 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 (email@hidden)
>>> Help/Unsubscribe/Update your Subscription:
>>>
>>> This email sent to email@hidden
>>
>> --
>> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden