Re: t5: passing date to a context

2009-11-05 Thread Inge Solvoll
Just create an onPassivate method that returns Date, and see what happens to
your url :)

On Fri, Nov 6, 2009 at 7:43 AM, Angelo Chen wrote:

>
> Hi,
>
> How to pass a date from url to a page with:
>
> void onActivate(Date date)
>
> --
> View this message in context:
> http://old.nabble.com/t5%3A-passing-date-to-a-context-tp26227575p26227575.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Help with HTML and Tapestry 5.0.10

2009-11-05 Thread Ashwanth Kumar
Hey thanks, that solved the problem!!

 - Ashwanth Kumar

On Fri, Nov 6, 2009 at 12:10 PM, Angelo Chen wrote:

>
> how about using "   >< ", put following in the first line:
>
>  !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
>
> Ashwanth Kumar wrote:
> >
> >  Hey,
> >
> > I just started working with TAPESTRY v5.0.10, and found one problem,
> while
> > defining my template (Home.tml), and characters like:
> >
> >   -
> >   - »
> >
> > etc., and any other HTML characters are treated as entities, and giving
> me
> > an error. How do i workaround this? Please Help!
> >
> > Thanks,
> > Ashwanth Kumar
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Help-with-HTML-and-Tapestry-5.0.10-tp26227277p26227555.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


t5: passing date to a context

2009-11-05 Thread Angelo Chen

Hi,

How to pass a date from url to a page with:

void onActivate(Date date) 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-passing-date-to-a-context-tp26227575p26227575.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Help with HTML and Tapestry 5.0.10

2009-11-05 Thread Angelo Chen

i meant & plus gt;


Angelo Chen wrote:
> 
> how about using "   >< ", put following in the first line:
> 
>  !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> 
> 
> Ashwanth Kumar wrote:
>> 
>>  Hey,
>> 
>> I just started working with TAPESTRY v5.0.10, and found one problem,
>> while
>> defining my template (Home.tml), and characters like:
>> 
>>   -  
>>   - »
>> 
>> etc., and any other HTML characters are treated as entities, and giving
>> me
>> an error. How do i workaround this? Please Help!
>> 
>> Thanks,
>> Ashwanth Kumar
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Help-with-HTML-and-Tapestry-5.0.10-tp26227277p26227557.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Help with HTML and Tapestry 5.0.10

2009-11-05 Thread Angelo Chen

how about using "   >< ", put following in the first line:

 !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


Ashwanth Kumar wrote:
> 
>  Hey,
> 
> I just started working with TAPESTRY v5.0.10, and found one problem, while
> defining my template (Home.tml), and characters like:
> 
>   -  
>   - »
> 
> etc., and any other HTML characters are treated as entities, and giving me
> an error. How do i workaround this? Please Help!
> 
> Thanks,
> Ashwanth Kumar
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Help-with-HTML-and-Tapestry-5.0.10-tp26227277p26227555.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Help with HTML and Tapestry 5.0.10

2009-11-05 Thread Ashwanth Kumar
 Hey,

I just started working with TAPESTRY v5.0.10, and found one problem, while
defining my template (Home.tml), and characters like:

  -  
  - »

etc., and any other HTML characters are treated as entities, and giving me
an error. How do i workaround this? Please Help!

Thanks,
Ashwanth Kumar


supressing rowsPerPage / pagination in grid component

2009-11-05 Thread Scot Mcphee
Is there any way in Tapestry 5 to suppress pagination for a gird
component? I have a requirement to display a grid with the full list
regardless of it's length. I tried rowsPerPage=0 but got a divide by
zero error. I don't really want to copy the value of Integer.MAX_VALUE
into that field ;-)

thanks
scot

-- 
let x=x - http://crazymcphee.net/x/
xray dubs - http://autonomous.org/music/

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Help with HTML and Tapestry 5.0.10

2009-11-05 Thread Ashwanth Kumar
Hey,

I just started working with TAPESTRY v5.0.10, and found one problem, while
defining my template (Home.tml), and characters like:

  -  
  - »

etc., and any other HTML characters are treated as entities, and giving me
an error. How do i workaround this? Please Help!

Thanks,
Ashwanth Kumar


Re: t5: updating a zone during loading of page?

2009-11-05 Thread Angelo Chen

Hi, good idea, question is, how can we know if the loading is over? if there
is a way in the current ProgressDisplay to trigger that event so that it can
make the img visible?


Howard Lewis Ship wrote:
> 
> Idea for a component: ImagePlaceholder that displays some content in a
> div (a "loading ..." message), and an invisible   tag in an
> non-visible div. When the image is loaded, it removes the loading div
> and makes the   visible.
> 
> On Thu, Nov 5, 2009 at 4:36 PM, Thiago H. de Paula Figueiredo
>  wrote:
>> Em Thu, 05 Nov 2009 22:06:28 -0200, Angelo Chen
>> 
>> escreveu:
>>
>>> Hi,
>>
>> Hi!
>>
>>> If we generate the image in the event, and return the link, then we need
>>> to store the image somewhere in the file system, and clean it up later
>>> after
>>> the image got rendered, any idea how to handle this ?
>>
>> Do not generate the image in the event nor store the image. I suggest you
>> to
>> try the approach I've already suggested: create a page that generates the
>> image and returns a StreamResponse of it in its onActivate() method. In
>> your
>> page, just use an  imageLink  tag, with a getImageLink() method
>> that returns a Link to your image page.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and
>> instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-updating-a-zone-during-loading-of-page--tp26208359p26226557.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Ville Virtanen

Hi,

I think this could be a framework level component, as it seems that there
are many of us solving the same problem with a bit different approaches.
(Everyone invents the wheel..)

so +1 for this idea! :)

 - Ville


Howard Lewis Ship wrote:
> 
> Idea for a component: ImagePlaceholder that displays some content in a
> div (a "loading ..." message), and an invisible   tag in an
> non-visible div. When the image is loaded, it removes the loading div
> and makes the   visible.
> 
> On Thu, Nov 5, 2009 at 4:36 PM, Thiago H. de Paula Figueiredo
>  wrote:
>> Em Thu, 05 Nov 2009 22:06:28 -0200, Angelo Chen
>> 
>> escreveu:
>>
>>> Hi,
>>
>> Hi!
>>
>>> If we generate the image in the event, and return the link, then we need
>>> to store the image somewhere in the file system, and clean it up later
>>> after
>>> the image got rendered, any idea how to handle this ?
>>
>> Do not generate the image in the event nor store the image. I suggest you
>> to
>> try the approach I've already suggested: create a page that generates the
>> image and returns a StreamResponse of it in its onActivate() method. In
>> your
>> page, just use an  imageLink  tag, with a getImageLink() method
>> that returns a Link to your image page.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and
>> instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-updating-a-zone-during-loading-of-page--tp26208359p26226549.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Howard Lewis Ship
Idea for a component: ImagePlaceholder that displays some content in a
div (a "loading ..." message), and an invisible  tag in an
non-visible div. When the image is loaded, it removes the loading div
and makes the  visible.

On Thu, Nov 5, 2009 at 4:36 PM, Thiago H. de Paula Figueiredo
 wrote:
> Em Thu, 05 Nov 2009 22:06:28 -0200, Angelo Chen 
> escreveu:
>
>> Hi,
>
> Hi!
>
>> If we generate the image in the event, and return the link, then we need
>> to store the image somewhere in the file system, and clean it up later after
>> the image got rendered, any idea how to handle this ?
>
> Do not generate the image in the event nor store the image. I suggest you to
> try the approach I've already suggested: create a page that generates the
> image and returns a StreamResponse of it in its onActivate() method. In your
> page, just use an  tag, with a getImageLink() method
> that returns a Link to your image page.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Thiago H. de Paula Figueiredo
Em Thu, 05 Nov 2009 22:06:28 -0200, Angelo Chen  
 escreveu:



Hi,


Hi!

If we generate the image in the event, and return the link, then we need  
to store the image somewhere in the file system, and clean it up later  
after

the image got rendered, any idea how to handle this ?


Do not generate the image in the event nor store the image. I suggest you  
to try the approach I've already suggested: create a page that generates  
the image and returns a StreamResponse of it in its onActivate() method.  
In your page, just use an  tag, with a  
getImageLink() method that returns a Link to your image page.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Angelo Chen

Hi,

If we generate the image in the event, and return the link, then we need to
store the image somewhere in the file system, and clean it up later after
the image got rendered, any idea how to handle this ?

Thanks,

A.C.


Kalle Korhonen-2 wrote:
> 
> You can even handle the progressivedisplay event (i.e. @OnEvent(value
> = EventConstants.PROGRESSIVE_DISPLAY, component =
> "progressiveDisplay")), construct the image there and then render the
> image link to it. ProgressiveDisplay works for most partial rendering
> cases, it's just a matter of how you are using it.
> 
> Kalle
> 
> 
> On Thu, Nov 5, 2009 at 3:07 AM, Thiago H. de Paula Figueiredo
>  wrote:
>> Em Thu, 05 Nov 2009 05:40:20 -0200, Angelo Chen
>> 
>> escreveu:
>>
>>> Hi,
>>
>> Hi!
>>
>> As Ville suggested, instead of
>>
>> 
>>         ${myimagestreamresponse}
>> 
>>
>> try
>>
>> 
>>          ${myimagelink} 
>> 
>>
>> You'll need to create a page that returns the image as a StreamResponse
>> on
>> its onActivate() method. That's what I always do in these cases.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and
>> instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-updating-a-zone-during-loading-of-page--tp26208359p26224579.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Underscore rule(s)?

2009-11-05 Thread Juan E. Maya
Hi Melidramo,
as far as i know the _ is a shortcut to avoid the use of "this."
inside a java class. So u can still clearly see that you r accessing a
property from the class and not a local variable.

When tapestry uses @Property to generate the get and set of a property
it ingores the _

Therefore the following is equivalent
@Property
private int _id;

@Property
private int id;


On Thu, Nov 5, 2009 at 12:40 PM, Melidramo  wrote:
>
> Hi
>
> I'd like to know the exact rule about prefixed private properties with '_'
> in the Java code:
> - does that mean that the prop is used without the _ in the Tapestry
> template?
> - does that mean that Tapestry won't expect method prefixed with 'is' /
> 'get' / 'set'?
>
> Thanks
> --
> View this message in context: 
> http://old.nabble.com/Underscore-rule%28s%29--tp26211699p26211699.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Angelo Chen

i believe this is the solution, thanks.


Kalle Korhonen-2 wrote:
> 
> You can even handle the progressivedisplay event (i.e. @OnEvent(value
> = EventConstants.PROGRESSIVE_DISPLAY, component =
> "progressiveDisplay")), construct the image there and then render the
> image link to it. ProgressiveDisplay works for most partial rendering
> cases, it's just a matter of how you are using it.
> 
> Kalle
> 
> 
> On Thu, Nov 5, 2009 at 3:07 AM, Thiago H. de Paula Figueiredo
>  wrote:
>> Em Thu, 05 Nov 2009 05:40:20 -0200, Angelo Chen
>> 
>> escreveu:
>>
>>> Hi,
>>
>> Hi!
>>
>> As Ville suggested, instead of
>>
>> 
>>         ${myimagestreamresponse}
>> 
>>
>> try
>>
>> 
>>          ${myimagelink} 
>> 
>>
>> You'll need to create a page that returns the image as a StreamResponse
>> on
>> its onActivate() method. That's what I always do in these cases.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and
>> instructor
>> Owner, software architect and developer, Ars Machina Tecnologia da
>> Informação Ltda.
>> http://www.arsmachina.com.br
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-updating-a-zone-during-loading-of-page--tp26208359p26223288.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Missing a Business Service figure in T5.1

2009-11-05 Thread Robert Zeigler

Why not use action or event links to do this?
If you need the links available from every page, then write yourself a  
component that you drop onto any page (eg: a layout component).  Then  
you can do your heavy processing inside of the event handlers, even  
return the new page to render.


Robert

On Nov 5, 2009, at 11/51:22 PM , josete wrote:

king on a page link makes the application do lot of business logic,  
and then, sends the user to the end page.


The business logic is done inside in a non-viewable ( has no .tml )  
page, inside its onActivate method .. who then return the resulting  
page.


The flow is like this :

list.tml -> doTheLogic.java:onActivate -> result.tml / error.tml

I don't feel comfortable doing it like this .. but if any of you  
think there's a better solution, please let me know.
As you can see, i am using a page as a 'business service' class ..  
because i found no way to cook it ..


BTW: inside the doTheLogic.java i have a hibernate session injected,  
and two T5 pages injected ( to be returned )


Thanks all.



 some code ---

list.tml





-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Missing a Business Service figure in T5.1

2009-11-05 Thread josete

Hi all.

I'm facing some 'teorical' problem, i still haven't found a solution to.

Let me explain :
I have a page, with a list of pagelinks.

Clicking on a page link makes the application do lot of business logic, 
and then, sends the user to the end page.


The business logic is done inside in a non-viewable ( has no .tml ) 
page, inside its onActivate method .. who then return the resulting page.


The flow is like this :

list.tml -> doTheLogic.java:onActivate -> result.tml / error.tml

I don't feel comfortable doing it like this .. but if any of you think 
there's a better solution, please let me know.
As you can see, i am using a page as a 'business service' class .. 
because i found no way to cook it ..


BTW: inside the doTheLogic.java i have a hibernate session injected, and 
two T5 pages injected ( to be returned )


Thanks all.



 some code ---

list.tml

src="${buybutton}"/>



doSomeLogic.Java

@Inject
Session session;
@InjectPage
ErrorPage errorPage;
@InjectPage
ResultPage resultPage;

Object onActivate(Long aPlanId)  {

if ( condition1) {
heavy database stuff with the session
lots of logic
return resultPage
} else {
heavy database stuff with the session
lots of logic
return errorPage
  }
}


result.tml/error.tml




-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Kalle Korhonen
You can even handle the progressivedisplay event (i.e. @OnEvent(value
= EventConstants.PROGRESSIVE_DISPLAY, component =
"progressiveDisplay")), construct the image there and then render the
image link to it. ProgressiveDisplay works for most partial rendering
cases, it's just a matter of how you are using it.

Kalle


On Thu, Nov 5, 2009 at 3:07 AM, Thiago H. de Paula Figueiredo
 wrote:
> Em Thu, 05 Nov 2009 05:40:20 -0200, Angelo Chen 
> escreveu:
>
>> Hi,
>
> Hi!
>
> As Ville suggested, instead of
>
> 
>         ${myimagestreamresponse}
> 
>
> try
>
> 
>         
> 
>
> You'll need to create a page that returns the image as a StreamResponse on
> its onActivate() method. That's what I always do in these cases.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org