Hi Raymond,

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

WOSwitchComponent


Chuck


On Jun 14, 2011, at 5:43 AM, [email protected] wrote:

> Hi All,
> 
> I would like to add a WOComponent to a ajaxGrid without necessarily going 
> through a . plist file, but adds the component that goes well with the data 
> it 
> will reference via a method. The problem is that is WOComponent not show but 
> instead it displays the class and subclass of the component. And when I put a 
> reference component in my. plist file and the "name" of component will be 
> given when adding to the data, WO gives me an exception because AjaxGrid does 
> not find the component. In Indeed, this name does not match anything, I take 
> it like a variable.
> 
> i.e :  in WOD 
> 
> addData : WOSubmitButton {
>        action = addDataToGrid;
>        value = "Add";
>        updateContainerID = "dataAjaxGridContainer"; //Update the ajaxGrid
> }
> 
> in .plist file : 
> ..
> {
>   title = "HETIC";            
>   keyPath = "col1";           //Here is data  
>  },
>  {
>   title = "% de financement"; // Here is component referenced
>   keyPath = "col2"; //keyPath I choosed to add a component
>   *component = variable // get an exception because the Grid want a component 
> real name not an variable
>   }
> ..
> 
> in Java :
> public WOActionResults addDataToGrid() {
> AjaxGridPopFormInput formInput = new AjaxGridPopFormInput(ctxt);//a WOInput 
> component
> NSMutableArray dataDico = null;
> 
> 
> ...
> posteDico0.takeValueForKey(data1, "col1");
> posteDico0.takeValueForKey(formInput, "col2"); //This is my component
> posteDico = new NSMutableArray(posteDico0);
> ...           
> 
> Resulat : 
> 
> dataLabel                          dataComponent
> 
> Hello                                  
> <projet.rec.utt.server.components.AjaxGridPopFormInput name: 
> projet.rec.utt.server.components.AjaxGridPopFormInput subcomponents: null >
> 
> 
> My Problem is How to display the component correctly?
> 
> Thanks for all
> 
> 
> 
> 
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net
> 
> This email sent to [email protected]

-- 
Chuck Hill             Senior Consultant / VP Development

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to