Re: Problem with tapestry-yuicompressor in Tomcat

2012-03-07 Thread Jochen Frey
I can't speak to this authoritatively, but I know for a fact that it's a 
problem for us.

J

On Mar 7, 2012, at 11:13 PM, Yohan Yudanara wrote:

> Hi..
> 
> I'm sorry to waking an old thread.
> 
> This outstanding bug with title "Sometimes YUICompressor can fail with
> java.util.EmptyStackException", which has blocker severity, has been
> filed in JIRA since 26 Oct 2011.
> This is the link: https://issues.apache.org/jira/browse/TAP5-1729
> 
> I don't understand this bug, because I haven't experience it.
> 
> But I want to ask:
> If we're using Tapestry 5.3.2 production-mode in Apache Tomcat 7.0, do
> we have to remove "tapestry-yuicompressor" from our pom.xml, to avoid
> this intermittent bug?
> Or is it safe enough to ignore this bug ?
> 
> Thanks..
> Best regards,
> Yohan Yudanara
> 
> 
> On Fri, Mar 2, 2012 at 4:51 AM, Paul Stanton  wrote:
>> I found a solution too:
>> 
>> 
>> 
>> ;)
>> 
>> 
>> On 2/03/2012 1:34 AM, antalk wrote:
>>> 
>>> I had the same issue and found a solution:
>>> 
>>> 
>>> https://issues.apache.org/jira/browse/TAP5-1729?focusedCommentId=13220036&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13220036
>>> 
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Problem-with-tapestry-yuicompressor-in-Tomcat-tp4921500p5528011.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
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey



Re: Problem with tapestry-yuicompressor in Tomcat

2012-03-07 Thread Yohan Yudanara
Hi..

I'm sorry to waking an old thread.

This outstanding bug with title "Sometimes YUICompressor can fail with
java.util.EmptyStackException", which has blocker severity, has been
filed in JIRA since 26 Oct 2011.
This is the link: https://issues.apache.org/jira/browse/TAP5-1729

I don't understand this bug, because I haven't experience it.

But I want to ask:
If we're using Tapestry 5.3.2 production-mode in Apache Tomcat 7.0, do
we have to remove "tapestry-yuicompressor" from our pom.xml, to avoid
this intermittent bug?
Or is it safe enough to ignore this bug ?

Thanks..
Best regards,
Yohan Yudanara


On Fri, Mar 2, 2012 at 4:51 AM, Paul Stanton  wrote:
> I found a solution too:
>
> 
>
> ;)
>
>
> On 2/03/2012 1:34 AM, antalk wrote:
>>
>> I had the same issue and found a solution:
>>
>>
>> https://issues.apache.org/jira/browse/TAP5-1729?focusedCommentId=13220036&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13220036
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Problem-with-tapestry-yuicompressor-in-Tomcat-tp4921500p5528011.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
>

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



Re: [Tapestry5-jquery ajaxupload] How to change "Drop files here to upload" with button ?

2012-03-07 Thread ayok03
> Can you say what 'it' is that is not working? 

when i try demo sample from my browser and try to drop image file,
the image file not show in the list of component instead showing the image

is there any setting to my browser or something?

i use tapestry5-jquery-3.2.0-SNAPSHOT




Browse2.tml


Browse2.java




Christian Riedel-4 wrote
> 
> Can you say what 'it' is that is not working? 
> 
> Have you trouble getting a positive response when use the example on this
> page, too?
> http://tapestry5-jquery.com/components/docsajaxupload
> 
> Maybe it's related to your code. You should paste some of it here.
> 
> 
> Am 07.03.2012 um 04:24 schrieb ayok03:
> 
>> Guys,
>> 
>> How to change "Drop files here to upload" with button on tapestry5-jquery
>> ajaxupload multiple upload ? 
>> When i try to "drop file here to upload" it doesnt work
>> i try with chrome17, ff10, ie8 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5543058.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscribe@.apache
> For additional commands, e-mail: users-help@.apache
> 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5546316.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: Rendering components in Alerts

2012-03-07 Thread Kalle Korhonen
On Wed, Mar 7, 2012 at 12:17 AM, Magnus Kvalheim  wrote:
> We've just upgraded to 5.3.2 and checked out some of the new components.
> The Alerts seems pretty useful, but looks like it's only possible to pass
> on strings.
> I'm thinking a pretty common use-case would be to render some
> components/markup in it - like links.
> I experimented a little by manually rendering a block and pass that on to
> alertManager. Got some inspiration from this thread about rendering blocks
> *alertManager.info(markupWriter.toString());*
> That seems to work, but it's a bit clumsy and don't know if it's
> the recommended approach for rendering blocks. Does a convenience method
> exist for rendering blocks/components?
> Not sure if it's possible, but how about if one could pass blocks to alerts
> directly. That could be pretty flexible as well...

Certainly the recommended approach is to use the provided render
queue, rather than create your own - but obviously the current
implementation doesn't always allow to do so. Completely agree with
you that rendering links, and, in general, rendering blocks would be
very useful for alerts. I don't see any major issue why it couldn't be
supported. Please open an issue for it.

Kalle

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



Re: ComponentParameters - Binding Expressions - "component:"

2012-03-07 Thread Jochen Frey
That's definitely another way of solving this.  Still goes by way of the java 
file, but provides a different sort of flexibility.

Cheers!
J

On Mar 7, 2012, at 9:30 AM, Thiago H. de Paula Figueiredo wrote:

> On Wed, 07 Mar 2012 13:41:02 -0300, Jochen Frey  wrote:
> 
>> Thanks guys!
> 
> Hi!
> 
>> I have a lot of components that are re-used either in loops, or just 
>> embedded in multiple components (often in the same page).
>> 
>> The pattern that Paul and Thiago are suggesting works fine if that component 
>> occurs a single time on a page.  However, if you use it multiple times, the 
>> client side zoneId (as well as the Tapestry JS initializers) are not unique 
>> any more, which causes the same zone to be updated all the time, no matter 
>> which EventLink got the click.
> 
> Again, provide the id yourself, in this case dinamically 
> (id="${generatedId}"). When you don't provide the id yourself, Tapestry 
> components generate a random one when it finds the original id, based in 
> t:id, is already taken.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey



Re: ComponentParameters - Binding Expressions - "component:"

2012-03-07 Thread Thiago H. de Paula Figueiredo
On Wed, 07 Mar 2012 13:41:02 -0300, Jochen Frey   
wrote:



Thanks guys!


Hi!

I have a lot of components that are re-used either in loops, or just  
embedded in multiple components (often in the same page).


The pattern that Paul and Thiago are suggesting works fine if that  
component occurs a single time on a page.  However, if you use it  
multiple times, the client side zoneId (as well as the Tapestry JS  
initializers) are not unique any more, which causes the same zone to be  
updated all the time, no matter which EventLink got the click.


Again, provide the id yourself, in this case dinamically  
(id="${generatedId}"). When you don't provide the id yourself, Tapestry  
components generate a random one when it finds the original id, based in  
t:id, is already taken.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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: ComponentParameters - Binding Expressions - "component:"

2012-03-07 Thread Jochen Frey
Thanks guys!

I have a lot of components that are re-used either in loops, or just embedded 
in multiple components (often in the same page).

The pattern that Paul and Thiago are suggesting works fine if that component 
occurs a single time on a page.  However, if you use it multiple times, the 
client side zoneId (as well as the Tapestry JS initializers) are not unique any 
more, which causes the same zone to be updated all the time, no matter which 
EventLink got the click.

Example

Page.tml:
http://tapestry.apache.org/schema/tapestry_5_3.xsd";>




Component.tml:
http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
click me
 ${counter} 


In this case, no matter which link you click, the first component will get 
updated because the zone in the first and the 2nd have the same client side id.

Hence my looking around for a solution that would allow me to do this in .tml 
only as per my original mail. "component:" seemed to be a solution as per the 
documentation (see below), but doesn't do the trick.

In other words, it would be nice if there was a component binding that did the 
equivalent of this:

.java
@InjectComponent @Property Zone aZone;

.tml
"prop:aZone.clientId"


Cheers!
Jochen

On Mar 6, 2012, at 11:30 PM, Paul Stanton wrote:

> Why not just use:
> 
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>
>
> 
> 
> ?
> 
> On 7/03/2012 4:18 PM, Jochen Frey wrote:
>> Hi!
>> 
>> A general pattern for an Eventlink with an Ajax zone can look something like 
>> this:
>> 
>> X.java:
>> public class CTest {
>> @InjectComponent @Property private Zone aZone;
>> }
>> 
>> X.tml:
>> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> 
>> 
>> 
>> 
>> 
>> Where in essence I use a @Property in Java to generate the correct clientId 
>> for the t:zone parameter to the eventlink.
>> 
>> I was wondering if there's a way to guarantee the correct clientID (not the 
>> t:id) without going through a Java @Property.
>> 
>> 
>> Looking at the documentation one might hope that something like this would 
>> work:
>> 
>> http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
>> >  "component:aZone"
>>  />
>> 
>> 
>> 
>> 
>> But "component:aZone" doesn't get the ID (which I expected from the 
>> documentation here: Binding Expressions - component: 
>> http://tapestry.apache.org/component-parameters.html), but instead I gets 
>> the actual Zone Object (which is great for many other use cases).
>> 
>> And as far as I can tell, it's not possible to do something like this (see 
>> below) either:
>> 
>>  "component:aZone.clientId"
>> 
>> Am I missing something, or is it simply a requirement to go through the java 
>> class?
>> 
>> Thanks so much!
>> Jochen
>> ---
>>   joc...@jochenfrey.com
>>   +1.415.366.0450
>>   @jochen_frey
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 

---
  joc...@jochenfrey.com
  +1.415.366.0450
  @jochen_frey


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



Re: [Tapestry5-jquery ajaxupload] How to change "Drop files here to upload" with button ?

2012-03-07 Thread Christian Riedel
Can you say what 'it' is that is not working? 

Have you trouble getting a positive response when use the example on this page, 
too?
http://tapestry5-jquery.com/components/docsajaxupload

Maybe it's related to your code. You should paste some of it here.


Am 07.03.2012 um 04:24 schrieb ayok03:

> Guys,
> 
> How to change "Drop files here to upload" with button on tapestry5-jquery
> ajaxupload multiple upload ? 
> When i try to "drop file here to upload" it doesnt work
> i try with chrome17, ff10, ie8 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5543058.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: Tapestry 5.3 binaries

2012-03-07 Thread TechniciuM
@Howard, please do it so already, please. :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-5-3-binaries-tp5537651p5544602.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



[Tapestry5-jquery ajaxupload] How to change "Drop files here to upload" with button ?

2012-03-07 Thread ayok03
Guys,

How to change "Drop files here to upload" with button on tapestry5-jquery
ajaxupload multiple upload ? 
When i try to "drop file here to upload" it doesnt work
i try with chrome17, ff10, ie8 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5543058.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: Tapestry Forums

2012-03-07 Thread Chris Mylonas
How many weeks of the course are there to go?

The problem with putting up some forums is that everything gets done on the 
mailing list.
It looks like tapestryforums.com has been hit by spam.
If you do a whois search you can try contacting the person responsible and see 
if they'd be willing to sort it out.

If there are 1000 students doing a course on tapestry and there's a need for a 
forum, maybe it's something the ASF and your educational institution can start 
talking perhaps
*shrug*

Good luck with it!
Chris

On 07/03/2012, at 11:45 PM, TechniciuM wrote:

> I have a friend who attends that faculty. As for the question where do I
> study, it's http://www.tu-sofia.bg/index.html . Cheers. :)
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-Forums-tp5541874p5544008.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: Tapestry Forums

2012-03-07 Thread TechniciuM
I have a friend who attends that faculty. As for the question where do I
study, it's http://www.tu-sofia.bg/index.html . Cheers. :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Forums-tp5541874p5544008.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: Tapestry Forums

2012-03-07 Thread Chris Mylonas
Wow!!

Are your lecture notes written in tapestry?  That would be a very cool well 
informed lecturer/tutor.

I have a lot of to-dos but not much time or money :(
Anyone students that want to build a project for experience :)
Open source interfacing to telephone systems...

Cheers
Chris




On 07/03/2012, at 11:31 PM, TechniciuM wrote:

> @Alex,
> well currently my university which attends more than 1000 students has focus
> on Tapestry5.3., and strictly speaking we study only that framework in the
> web programming. Aside from it, I know one state university in Skopje which
> has similar program and is home to near 1500 students. If you do the math on
> only these two, you will see how much popularity is conserved for the
> upcoming years for Tapestry. ;)
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-Forums-tp5541874p5543967.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: Tapestry Forums

2012-03-07 Thread Dragan Sahpaski
On Wed, Mar 7, 2012 at 1:31 PM, TechniciuM  wrote:

> @Alex,
> well currently my university which attends more than 1000 students has
> focus
> on Tapestry5.3., and strictly speaking we study only that framework in the
> web programming.


Which university? Just curious.


> Aside from it, I know one state university in Skopje which
> has similar program and is home to near 1500 students.


Coming from that university ( guess it's http://www.finki.ukim.mk/) I'm
curious to know how did you found about this. Tapestry is not studied
officially in a course but we have several projects in tapestry involving
student work.

Cheers,
Dragan Sahpaski


> If you do the math on
> only these two, you will see how much popularity is conserved for the
> upcoming years for Tapestry. ;)
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-Forums-tp5541874p5543967.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: Tapestry Forums

2012-03-07 Thread TechniciuM
@Alex,
well currently my university which attends more than 1000 students has focus
on Tapestry5.3., and strictly speaking we study only that framework in the
web programming. Aside from it, I know one state university in Skopje which
has similar program and is home to near 1500 students. If you do the math on
only these two, you will see how much popularity is conserved for the
upcoming years for Tapestry. ;)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-Forums-tp5541874p5543967.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: Rendering components in Alerts

2012-03-07 Thread Magnus Kvalheim
Haha... That's awesome - glad I could help out :)


Regarding the alerts.
How are you people using it-  is it only me that would like to render
components with it as well?


On Wed, Mar 7, 2012 at 11:28 AM, Lance Java wrote:

> Magnus, I think you've just answered my previous threads
>
>
> http://tapestry.1045711.n5.nabble.com/How-does-MultiZoneUpdateEventResultProcessor-get-a-html-string-from-a-RenderCommand-td5518968.html
>
>
> http://tapestry.1045711.n5.nabble.com/tml-parameter-rendered-into-a-JavaScript-string-td5512889.html#a5518439
>
> Thanks very much!!
>
> On Wednesday, 7 March 2012, Magnus Kvalheim  wrote:
> > Hi Tapestry friends,
> >
> > We've just upgraded to 5.3.2 and checked out some of the new components.
> > The Alerts seems pretty useful, but looks like it's only possible to pass
> > on strings.
> >
> > I'm thinking a pretty common use-case would be to render some
> > components/markup in it - like links.
> >
> > I experimented a little by manually rendering a block and pass that on to
> > alertManager. Got some inspiration from this thread about rendering
> blocks
> > -
> >
>
> http://tapestry.1045711.n5.nabble.com/Howto-render-a-block-and-put-it-into-a-JSON-reply-td5486823.html
> >
> > 
> > *RenderCommand renderCommand = (RenderCommand)alertBlock;*
> > *MarkupWriter markupWriter = new MarkupWriterImpl();*
> > *RenderQueueImpl renderQueue = new RenderQueueImpl(log);*
> > *renderQueue.push(renderCommand);*
> > *renderQueue.run(markupWriter);*
> > *
> > *
> > *alertManager.info(markupWriter.toString());*
> > 
> > That seems to work, but it's a bit clumsy and don't know if it's
> > the recommended approach for rendering blocks. Does a convenience method
> > exist for rendering blocks/components?
> >
> >
> > Not sure if it's possible, but how about if one could pass blocks to
> alerts
> > directly. That could be pretty flexible as well...
> >
> >
> > Thoughts?
> >
> > Cheers
> > Magnus
> >
>


Re: ComponentParameters - Binding Expressions - "component:"

2012-03-07 Thread Thiago H. de Paula Figueiredo
On Wed, 07 Mar 2012 04:30:49 -0300, Paul Stanton   
wrote:



Why not just use:

xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>

 
 


?


Yep! Most Tapestry components, including Zone, use the id which is  
explicitly provided such as in the above example.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, 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: Rendering components in Alerts

2012-03-07 Thread Lance Java
Magnus, I think you've just answered my previous threads

http://tapestry.1045711.n5.nabble.com/How-does-MultiZoneUpdateEventResultProcessor-get-a-html-string-from-a-RenderCommand-td5518968.html

http://tapestry.1045711.n5.nabble.com/tml-parameter-rendered-into-a-JavaScript-string-td5512889.html#a5518439

Thanks very much!!

On Wednesday, 7 March 2012, Magnus Kvalheim  wrote:
> Hi Tapestry friends,
>
> We've just upgraded to 5.3.2 and checked out some of the new components.
> The Alerts seems pretty useful, but looks like it's only possible to pass
> on strings.
>
> I'm thinking a pretty common use-case would be to render some
> components/markup in it - like links.
>
> I experimented a little by manually rendering a block and pass that on to
> alertManager. Got some inspiration from this thread about rendering blocks
> -
>
http://tapestry.1045711.n5.nabble.com/Howto-render-a-block-and-put-it-into-a-JSON-reply-td5486823.html
>
> 
> *RenderCommand renderCommand = (RenderCommand)alertBlock;*
> *MarkupWriter markupWriter = new MarkupWriterImpl();*
> *RenderQueueImpl renderQueue = new RenderQueueImpl(log);*
> *renderQueue.push(renderCommand);*
> *renderQueue.run(markupWriter);*
> *
> *
> *alertManager.info(markupWriter.toString());*
> 
> That seems to work, but it's a bit clumsy and don't know if it's
> the recommended approach for rendering blocks. Does a convenience method
> exist for rendering blocks/components?
>
>
> Not sure if it's possible, but how about if one could pass blocks to
alerts
> directly. That could be pretty flexible as well...
>
>
> Thoughts?
>
> Cheers
> Magnus
>


RE: Testing Palette component with HTMLUnit

2012-03-07 Thread Demey Emmanuel
I had the same problem with the Selenium test of the Tapestry-jQuery version of 
the Palette component .

Please check my test class : 
https://github.com/got5/tapestry5-jquery/blob/master/src/test/java/org/got5/tapestry5/jquery/PaletteTest.java

Manu

-Message d'origine-
De : Stephan Windmüller [mailto:stephan.windmuel...@tu-dortmund.de]
Envoyé : mercredi 7 mars 2012 10:27
À : users@tapestry.apache.org
Objet : Testing Palette component with HTMLUnit

Hello!

Did anyone try to test a page containing the palette component with 
Selenium/HTMLUnit?

FirefoxDriver works perfectly, but if I select an option in the palette with 
HTMLUnit, the add button is not enabled.

- Stephan



Ce message et les pièces jointes sont confidentiels et réservés à l'usage 
exclusif de ses destinataires. Il peut également être protégé par le secret 
professionnel. Si vous recevez ce message par erreur, merci d'en avertir 
immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant 
être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée 
quant au contenu de ce message. Bien que les meilleurs efforts soient faits 
pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne 
aucune garantie à cet égard et sa responsabilité ne saurait être recherchée 
pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, the Atos liability cannot be triggered for the message 
content. Although the sender endeavours to maintain a computer virus-free 
network, the sender does not warrant that this transmission is virus-free and 
will not be liable for any damages resulting from any virus transmitted.


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



Testing Palette component with HTMLUnit

2012-03-07 Thread Stephan Windmüller
Hello!

Did anyone try to test a page containing the palette component with
Selenium/HTMLUnit?

FirefoxDriver works perfectly, but if I select an option in the palette
with HTMLUnit, the add button is not enabled.

- Stephan



signature.asc
Description: OpenPGP digital signature


Re: classloader issues casting objects to their tapestry type

2012-03-07 Thread Lance Java
Thiago is correct in that the @HeartbeatDeferred annotation will only work
in components.

I think you might be able to achieve the same thing doing the following:

@Inject Environment environment;

Heartbeat heartbeat = environment.peek(Heartbeat.class);
heartbeat.defer(new Runnable()) {
   public void run() {
  // do stuff here with clientId's
   }
}

Cheers,
Lance.

On Monday, 5 March 2012, Paul Stanton  wrote:
> Well it seems to be working (multiple times, so it's finding the
zone/component to render) as is, however I'd prefer to implement something
that should work rather than something that just happens to work!
>
> Is lance's suggestion regarding  @HeartbeatDeferred a better idea? I
can't figure out how to implement the use of heartbeat in the context of a
service...  I tried annotating the method directly, but that didn't seem to
have any effect.
>
> Thanks, Paul.
>
> On 5/03/2012 11:12 PM, Thiago H. de Paula Figueiredo wrote:
>>
>> On Sun, 04 Mar 2012 20:25:12 -0300, Paul Stanton 
wrote:
>>
>>>
>>> On 29/02/2012 12:13 AM, Thiago H. de Paula Figueiredo wrote:

 No, you're using the t:id (server-side Tapestry component id) to
retrieve the component, so it may not have its clientId set yet.

>>> Thiago,
>>
>> Hi!
>>
>>> If I'm using the server-side tapestry component id, than what I'm doing
is still wrong and might cause issues, since AjaxResponseRenderer expects
*clientId*, block and not *componentId*, block...:
>>
>> Yes.
>>
>>>
>>> ClientBodyElement zone = (ClientBodyElement)
getEmbeddedComponent(container, componentId);
>>
>> but getEmbeddedComponent() expects the Tapestry server-side component
id. ;)
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Rendering components in Alerts

2012-03-07 Thread Magnus Kvalheim
Hi Tapestry friends,

We've just upgraded to 5.3.2 and checked out some of the new components.
The Alerts seems pretty useful, but looks like it's only possible to pass
on strings.

I'm thinking a pretty common use-case would be to render some
components/markup in it - like links.

I experimented a little by manually rendering a block and pass that on to
alertManager. Got some inspiration from this thread about rendering blocks
-
http://tapestry.1045711.n5.nabble.com/Howto-render-a-block-and-put-it-into-a-JSON-reply-td5486823.html


*RenderCommand renderCommand = (RenderCommand)alertBlock;*
*MarkupWriter markupWriter = new MarkupWriterImpl();*
*RenderQueueImpl renderQueue = new RenderQueueImpl(log);*
*renderQueue.push(renderCommand);*
*renderQueue.run(markupWriter);*
*
*
*alertManager.info(markupWriter.toString());*

That seems to work, but it's a bit clumsy and don't know if it's
the recommended approach for rendering blocks. Does a convenience method
exist for rendering blocks/components?


Not sure if it's possible, but how about if one could pass blocks to alerts
directly. That could be pretty flexible as well...


Thoughts?

Cheers
Magnus