Hi Chuck,
I try to follow your advice but I have some problems.
In HTML (my textfield and button using to add person in my Grid: )
<wo:tPopUpButton list="$personList" item="$person" value="$selectedPerson"/>
<wo:AjaxModalDialogOpener id="refreshGrid">
<wo:AjaxSubmitButton action="$addPerson" value="add">
</wo:AjaxModalDialogOpener>
<webobject name=personNavBar">
<webobject name"personGrid">
In WOD
...
personGrid : AjaxGrid {
configurationData = personDataConfig;
displayGroup = personDg;
afterUpdate = "personNavBarUpdate();";
}
in java class
... variable declaration
public WOActionResults addPerson(){
personDg = new WODisplayGroup();
persondg.setObjectArray(PersonData(selectedPerson.fullname));
}
private NSMutableArray PersonData(String aPerson) {
NSMutableDictionnary personDico = new NSMutableDictionnary ();
if(aPerson.equals(null)){
return null;
}
personDico.takeValueForKey(aPerson, "persnoFullname 1");
return (NSMutableArray) personDico.allValues();
}
My question is How to refresh my Grid to know if the person I added is present
in the grid?
Thanks
========================================
Message du : 19/05/2011
De : "Chuck Hill " <[email protected]>
A : [email protected]
Copie à : [email protected]
Sujet : Re: Using DataGrid in WO
I have never added data directly in a grid. You would need to create a new
object in the display group that the grid is using and use AjaxInPlace fields
to edit the data. Instead, I use an AjaxModalDialogOpener in the grid and an
AjaxModalDialog to add or edit one object. When the modal dialog closed, it
refreshes the grid.
Chuck
On May 19, 2011, at 10:31 AM, <[email protected]> wrote:
Hi Chuck,
I want to fill my AjaxGrid by adding data using textField and submitButton.
How my addData() method can look like? I want to add person by company
(PopUpButton with companies).
my configData file .plist is :
{
tableID = "personGrid";
updateContainerID = "ajaxGridContainer";
sortable = true;
canReorder = true;
batchSize = 4;
cssClass = "ajaxGridTab";
cssStyle = "border: thin solid #000000;";
evenRowCSSClass = "none";
oddRowCSSStyle = "background:lightgrey;";
selectedRowCSSStyle = "font-weight: bold;";
selectedRowCSSClass = "ajaxGridSelectedRow";
rowIdentifier = number;
dragHeaderOnly = true;
columns = (
{
title = "Apple";
keyPath = "personFullName 1";
},
{
title = "Microsoft";
keyPath = "personFullName 2";
},
{
title = "Rim";
keyPath = "personFullName 3";
},
{
title = "Google";
keyPath = "personFullName 4";
}
);
sortOrder = (
{
keyPath = "personFullName 1";
direction = "descending";
},
{
keyPath = "personFullName 2";
direction = "ascending";
}
);
}
Thanks
Ray
========================================
Message du : 19/05/2011
De : "Chuck Hill " <[email protected]>
A : [email protected]
Copie à : [email protected]
Sujet : Re: Using DataGrid in WO
That is the default. You could make an extension to get that information
elsewhere.
Chuck
On May 19, 2011, at 1:14 AM, <[email protected]> wrote:
Hi,
it's necessary to use a .plist file to configure the AjaxGrid configurationData?
========================================
Message du : 19/05/2011
De : "Stefan Klein " <[email protected]>
A : [email protected]
Copie à :
Sujet : Re: Using DataGrid in WO
You can find an online demo under
http://wiki.objectstyle.org/confluence/display/WONDER/Example+Applications.
Choose AjaxExample -> Online demo.
Using the link AjaxExample you will see the source code.
Stefan
Am 19.05.11 08:41, schrieb [email protected]: Hi Chuck,
Do you have an example how to use it?
========================================
Message du : 18/05/2011
De : "Chuck Hill " <[email protected]>
A : [email protected]
Copie à : [email protected]
Sujet : Re: Using DataGrid in WO
There is an AjaxGrid component in the Ajax framework in Wonder.
That might give you what you want.
Chuck
On May 18, 2011, at 11:52 AM, [email protected]
wrote:
Is it possible to use a DataGrid in
a WebObjects project like Wonder or other? Is there
a special framework to use it?
Thanks
Ray
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC this July for unparalleled WO learning
opportunities and real peer to peer problem solving! Network,
socialize, and enjoy a great cosmopolitan city. See you there!
http://www.wocommunity.org/wowodc11/
_______________________________________________ Do not post admin
requests to the list. They will be ignored. Webobjects-dev mailing list
([email protected]) Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de
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/
--
Chuck Hill Senior Consultant / VP Development
Come to WOWODC this July for unparalleled WO learning opportunities and real
peer to peer problem solving! Network, socialize, and enjoy a great
cosmopolitan city. See you there! http://www.wocommunity.org/wowodc11/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([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]