Hi Jens,
I have not used AjaxGrid but from the looks of things you have too many ivars.
Get rid of “value” completely like so:
Java
...
public AjaxGrid grid;
private String wordText;
public String getWordText() {
return wordText;
}
public void setWordText(String wordText) {
this.wordText = wordText;
}
Start with that… but most likely you’ll want to use an array of EOs but first
try this with only “one” ivar.
Cheers,
AARON ROSENZWEIG / Chat 'n Bike
e: [email protected] t: (301) 956-2319
On Apr 11, 2014, at 3:31 AM, Dipl.-Ing. Jens Lünstedt
<[email protected]> wrote:
> Hello all,
> is there anywhere an example on how to use the AjaxGrid with a textfield cell?
>
> I like to have a grid where I can change values directly in it and save with
> a submit button.
>
> I created a WOComponent with a WOTextField and set that for a column of the
> grid.
>
> My problem is that I don't know how to react in the java part.
> In a whole WO application it use the setter of the field variable but here it
> seems to be complete different and I don't understand that.
>
> This is the code of the Textfield component
> HTML
> <webobjects name="TextField"/>
>
> WO
> TextField: WOTextField {
> value = wordText;
> updateContainerID = grid.configurationData.updateContainerID; // VALID
> }
>
> Java
> ...
> public AjaxGrid grid;
> private String wordText;
> private String value;
>
> public String value()
> {
> return (String)valueForBinding("value");
> }
>
> public void setvalue(String value)
> {
> this.value = value;
> return;
> }
>
> public String getWordText() {
> wordText = value;
> return value;
> }
> public void setWordText(String wordText) {
> this.wordText = wordText;
> value = this.wordText;
> setValueForBinding(value, "value");
> }
>
> ...
>
> I think the getter and setter of wordText are complete wrong but I can't find
> an example how to do it right.
> I can't find the correct reference for setting the changed text.
>
> Thanks for help.
>
> Jens
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/aaron%40chatnbike.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]