You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Francis Amanfo <fa...@tydex.com> on 2004/12/10 11:52:44 UTC

what's the best way to do this?

Hi,

In public void pageBeginRender(PageEvent event) method
I retrieve a value form the HTTP Header and assign it to a variable in 
this page class. With this value, I retrieve data from the data source 
and display them in the fields of the form which this page class 
implements.
I have a validator class that extends the BaseValidator class. I have 
declared the class in my page specification. This class validates a field 
in the form when the Submit button is clicked. But during validation I 
need the value that I retrieved earlier from the HTTP header in my custom 
validation class. My question 
is how can I get access to this variable in my Validator class. How can I 
do this in my page specification so that the value I set in my page class 
can be visible to the custom validation class I have implemented.

Thanks in advance,

Francis

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: what's the best way to do this?

Posted by Jonathan Millett <jo...@millett.net>.
Create a setter method in your validator class and add a <set-property> 
element to the bean definition in your page specification.

You'll have to double check the docs for syntax, but something like:

<bean name="myValidator" class="foo.myValidator">
...
<set-property name="myproperty" expression="myproperty"/>
...
</bean>

You probably will also need to pass along your property value in a 
hidden form field (@Hidden) so that it will be available when the form 
is rewinding.

Jon

Francis Amanfo wrote:

> Hi,
>
> In public void pageBeginRender(PageEvent event) method
> I retrieve a value form the HTTP Header and assign it to a variable in 
> this page class. With this value, I retrieve data from the data source 
> and display them in the fields of the form which this page class 
> implements.
> I have a validator class that extends the BaseValidator class. I have 
> declared the class in my page specification. This class validates a 
> field in the form when the Submit button is clicked. But during 
> validation I need the value that I retrieved earlier from the HTTP 
> header in my custom validation class. My question is how can I get 
> access to this variable in my Validator class. How can I do this in my 
> page specification so that the value I set in my page class can be 
> visible to the custom validation class I have implemented.
>
> Thanks in advance,
>
> Francis
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable/Pageable Table example

Posted by sa...@women-at-work.org.
Hispacta doesn not use any Table component, they build the tables
themselves.

You already get a nice table with pageing/sorting without hardly any code.
The question is how to do it with the least possible lines of code
and just to be able to tell the table what the headings are instead
of using the headings mechanism with propery files.

So, has anyone of you done that yet?

Thanks!

> Next to the standard tapestry table component, you might consider
> looking into the following sample app, that uses Tapestry, Spring and
> Hibernate:
> 
> http://sourceforge.net/projects/hispacta
> 
> 
> 
> --- sarah.simbad@women-at-work.org wrote:
> 
> > Hello!
> > 
> > Has anyone got an example of a sortable/pageable table
> > that is easy to implement and that allows to specific the 
> > column headings without property files?
> > 
> > It looks awfully complicated with all the table models and
> > column models....is it really that difficult ?
> > 
> > 
> > Pleeeease help me!
> > 
> > Thanks!
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Sortable/Pageable Table example

Posted by David van Coevorden <dv...@yahoo.com>.
Next to the standard tapestry table component, you might consider
looking into the following sample app, that uses Tapestry, Spring and
Hibernate:

http://sourceforge.net/projects/hispacta



--- sarah.simbad@women-at-work.org wrote:

> Hello!
> 
> Has anyone got an example of a sortable/pageable table
> that is easy to implement and that allows to specific the 
> column headings without property files?
> 
> It looks awfully complicated with all the table models and
> column models....is it really that difficult ?
> 
> 
> Pleeeease help me!
> 
> Thanks!
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Sortable/Pageable Table example

Posted by sa...@women-at-work.org.
Hello!

Has anyone got an example of a sortable/pageable table
that is easy to implement and that allows to specific the 
column headings without property files?

It looks awfully complicated with all the table models and
column models....is it really that difficult ?


Pleeeease help me!

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org