Re: displayGroup usage?
Re: displayGroup usage?
- Subject: Re: displayGroup usage?
- From: Theodore Petrosky <email@hidden>
- Date: Thu, 2 Apr 2009 06:28:34 -0700 (PDT)
I switched to using the .wo (no inline binding for these objects) and used your //valid switch.
UserNameField: WOTextField {
value = userDG.selectedObject.username; //valid
size = "35";
}
worked like a charm.
I don't understand why this same line from a different component throws no error:
<wo:WOTextField value = "$dg.selectedObject.salutation" size = "35" />
I understand that selectedObject could be any type but $dg.selectedObject is an object of type dg which is defined.
I could not get the //valid to work with the inline binding so I pushed everything into the .wo.
Thanks for a solution.
Ted
--- On Thu, 4/2/09, David Avendasora <email@hidden> wrote:
> I don't do DisplayGroups, but I think the problem is that
> since "selectedObject" could be any type, there is no way
> for the component validator to know that password is valid.
>
> I know with non-inline components, you simply add "//valid"
> after the binding in the .wo file. I'm not sure how that is
> done with inline tags.
>
> Last I can find (from Mike back in May 2008), it is
> supposed to work like this: <wo:WOTextField value =
> "$userDG.selectedObject.password //valid" size = "35" />
>
> Dave
>
> On Apr 2, 2009, at 8:32 AM, Theodore Petrosky wrote:
>
> >
> > I have started an project to track contacts... It is a
> very simple concept but I thought I would use it to learn
> something of displayGroups.
> >
> > Here is how I am using them now:
> >
> > in my .java I create a definition with:
> >
> > public ERXDisplayGroup<User> userDG;
> >
> > and in the constructor:
> >
> > userListEO = ERXEC.newEditingContext();
> > userList = User.fetchByLastName(userListEO);
> >
> > userDG = new ERXDisplayGroup<User>();
> > userDG.setObjectArray(userList);
> >
> >
> > In my HTML I am doing this:
> >
> > <wo:WOTextField value =
> "$userDG.selectedObject.password" size = "35" />
> >
> > I get an error: there is no key 'password' for keypath
> 'userDG.selectedObject' in AdminMain
> >
> > userDG is of type User and User does indeed have a
> 'password'.
> >
> > I notice there is a tab in Eclipse that says
> DisplayGroups but I am doing nothing here.
> >
> > The app runs just fine and does what I expect. Why do
> I get this error?
> >
> > BTW, I am using this same technique in a different
> component and I get no error.
> >
> > Ted
_______________________________________________
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