• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: Using AjaxInPlaceEditor in WORepetition


  • Subject: Re: Re: Re: Using AjaxInPlaceEditor in WORepetition
  • From: email@hidden
  • Date: Mon, 08 Aug 2011 11:30:28 +0200 (CEST)
  • Message-context: email-message

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>

          <td><wo name = "pole" /></td>

          <td><wo name = "nompre" /></td>

          <td><wo name = "implication" /></td>

          <td><wo 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) " <email@hidden>
A : email@hidden, "WebObjects webobjects-dev" <email@hidden>
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 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Using AjaxInPlaceEditor in WORepetition (From: Theodore Petrosky <email@hidden>)
 >Re: Using AjaxInPlaceEditor in WORepetition (From: Raymond NANEON <email@hidden>)
 >Re: Using AjaxInPlaceEditor in WORepetition (From: Raymond NANEON <email@hidden>)
 >Re: Re: Using AjaxInPlaceEditor in WORepetition (From: email@hidden)
 >Re: Re: Using AjaxInPlaceEditor in WORepetition (From: "Cheong Hee (Gmail)" <email@hidden>)

  • Prev by Date: Re: Re: Using AjaxInPlaceEditor in WORepetition
  • Next by Date: Re: Re: Using AjaxInPlaceEditor in WORepetition
  • Previous by thread: Re: Re: Using AjaxInPlaceEditor in WORepetition
  • Next by thread: Re: Re: Using AjaxInPlaceEditor in WORepetition
  • Index(es):
    • Date
    • Thread