You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Mitch Christensen <mi...@informatixinc.com> on 2002/11/01 17:31:57 UTC

Understanding $intake declaration

When I say...

#set ( $group = $intake.MyGroup.mapTo($formBean) )

What is happening?

I assumed the following...

Group.get("MyGroup").mapTo(instance_of_MyBeanClass) ;

however, there is no Group.mapTo() method.

I suppose another alternative would be...

Group.get("MyGroup").get("mapTo") ...but what about .($formBean)?

I must be missing something.

Thanks,
-Mitch

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Another Intake assumption (2.2b3)

Posted by Mitch Christensen <mi...@informatixinc.com>.
My latest testing of Intake has led to the following assumption...

o If you initialize (and display) a form using mapTo(formBean), then the
user enters valid form data (isAllValid() == true), then you re-display the
form, and call mapTo() again with different initilialization data, the
user's input does not get replaced.  In other words, once a user has entered
data, updating that data seems impossible.

FWIW, I'm trying to do some auto-completion and data scrubbing on user data.
Their input may be acceptable, but not normalized (to it's "proper" format).
For instance, I want to allow a user to type "CA" into a field, and when the
form redisplays (with search results appended to the bottom), "CA" is now
"CALIFORNIA".

My intent is to have the formBean setters scrub/normalize the data, use the
formBean to interact with our data tier, then display the results using
mapTo(formBean) which now contains normalized data.  I've verified that the
formBean contains normalized data in the context, but no matter what, the
original user data is re-displayed.  I suspect that the new (normalized)
value can't override Field.testValue.

Anyone have any thoughts on this one?

-Mitch


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Understanding $intake declaration

Posted by Mitch Christensen <mi...@informatixinc.com>.
Oops... Found it.

An inner class of IntakeTool called PullHelper.

Now the #set(...) looks like

((IntakeTool.PullHelper)IntakeTool.get("MyGroup")).mapTo(instance_of_MyBeanC
lass) ;


-----Original Message-----
From: Mitch Christensen [mailto:mitch.christensen@informatixinc.com]
Sent: Friday, November 01, 2002 8:35 AM
To: Turbine Users List
Subject: RE: Understanding $intake declaration


...I meant,

IntakeTool.get("MyGroup").mapTo(instance_of_MyBeanClass) ;

sorry. :)



-----Original Message-----
From: Mitch Christensen [mailto:mitch.christensen@informatixinc.com]
Sent: Friday, November 01, 2002 8:32 AM
To: Turbine Users List
Subject: Understanding $intake declaration


When I say...

#set ( $group = $intake.MyGroup.mapTo($formBean) )

What is happening?

I assumed the following...

Group.get("MyGroup").mapTo(instance_of_MyBeanClass) ;

however, there is no Group.mapTo() method.

I suppose another alternative would be...

Group.get("MyGroup").get("mapTo") ...but what about .($formBean)?

I must be missing something.

Thanks,
-Mitch

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Understanding $intake declaration

Posted by Mitch Christensen <mi...@informatixinc.com>.
...I meant,

IntakeTool.get("MyGroup").mapTo(instance_of_MyBeanClass) ;

sorry. :)



-----Original Message-----
From: Mitch Christensen [mailto:mitch.christensen@informatixinc.com]
Sent: Friday, November 01, 2002 8:32 AM
To: Turbine Users List
Subject: Understanding $intake declaration


When I say...

#set ( $group = $intake.MyGroup.mapTo($formBean) )

What is happening?

I assumed the following...

Group.get("MyGroup").mapTo(instance_of_MyBeanClass) ;

however, there is no Group.mapTo() method.

I suppose another alternative would be...

Group.get("MyGroup").get("mapTo") ...but what about .($formBean)?

I must be missing something.

Thanks,
-Mitch

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>