Yea interesting. But it worked ONLY when i changed the regular binding/expression to inherited/parameter. I think its necessary to pass in parameters this way. In 3.0, maybe this is the mechanism Tapestry uses to determine if the values are to be looked up via ognl (from the .java ) , ie using the regular binding/expression mechanism, or if the values are lookup up/gotten from the parameters and NOT the .java, ie via inherited/parameter mechnism.


From: Jamie Orchard-Hays <[EMAIL PROTECTED]>
Reply-To: "Tapestry users" <[email protected]>
To: "Tapestry users" <[email protected]>
Subject: Re: creating jwc:101
Date: Tue, 2 Aug 2005 15:05:09 -0400

The inherited binding is the way to pass through a parameter unmodified. I'm not sure why your previous code didn't work though. There may be a difference in the processing sequence between an inherited binding and a regular one. (In 4.0 there is just "binding".) I don't have my 3.0 source code open and at hand, or I'd go diving to look at it.

Jamie



On Aug 2, 2005, at 2:31 PM, Dan   wrote:

thanks for reply Jamie ... ok i just fig out the prob...

heres the change i made to my jwc:

<component id="tableStudentList" type="contrib:Table">
   <inherited-binding name="source" parameter-name="ticketList"/>
   <static-binding name="columns" value="student:Name:name" />
</component>

basically this ties in the passed params into the comp...i guess

BUT, i have a ques," is this how u ALWAYS bind parameters passed to a jwc with the jwc's components? "

bascially i googled around and got over my error... but what is the logic/explanation behind the inherited-binding / parameter-name properties?

yaay..finally i can submit my HW ;-)






From: Jamie Orchard-Hays <[EMAIL PROTECTED]>
Reply-To: "Tapestry users" <[email protected]>
To: "Tapestry users" <[email protected]>
Subject: Re: creating jwc:101
Date: Tue, 2 Aug 2005 14:19:19 -0400

pageBeginRender() is called before the components are rendered, so that shouldn't be your problem.

can you paste up the code in your page's pageBeginRender() method?

On Aug 2, 2005, at 1:29 PM, Dan   wrote:


Hi,

I am trying to create a component using the contrib:Table component. Basically in my application, there is a student resultSet that I display many number of times. Only the source of the contrib:Table keeps changing and so I decided to make a StudentTable component, accepting a list of students as a parameter. But I keep getting a runtime error:

org.apache.tapestry.ApplicationRuntimeException
Either the tableModel parameter or both source and columns parameters must be specified by component StartPage/ stuentsRegisteredForCourses.tableStudentList.tableView

.jwc:

<parameter name="studentList" type="java.util.List" required="yes"/>
<property-specification name="student" type="edu.reg.hb.Student"/>

<component id="tableStudentList" type="contrib:Table">
    <binding name="source" expression="studentList"/>
    <static-binding name="columns" value="student:Name:name" />
</component>

.java has the respecitive getter/setter for studentList and student

-----

now trying to use this comp in a page:

.page:

<property-specification name="students" type="java.util.List" persistent="yes"/>

<component id="stuentsRegisteredForCourses" type="TableStudentList">
       <binding name="studentList" expression="students"/>
</component>

.html:

<table jwcid="stuentsRegisteredForCourses" />

---

i dont know when the component gets loaded, but i suspect that it gets called before the pageBeginRender(), which actually sets the students list with some value.

i cant fig out what am i doing wrong :(

Thanks,
-Dan

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/ direct/01/


-------------------------------------------------------------------- -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: tapestry-user- [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: tapestry-user- [EMAIL PROTECTED]



_________________________________________________________________
DonÂ’t just search. Find. Check out the new MSN Search! http:// search.msn.click-url.com/go/onm00200636ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to