[ANNOUNCEMENT] New Relic 4 Tapestry5

2015-06-29 Thread Joost Schouten (mailing lists)
Hi all,

I've been a bit absent from the list lately though still pleased and
actively developing with Tapestry 5. I just wanted to let you guys know of
a little project I have to help integration of your Tapestry project with New
Relic  found on github at:
https://github.com/joostschouten/newrelic4tapestry5

By default all requests in a tapestry app will show in new relic mapped to
the same page "FilterSomething...". This module will map it to the correct
page. It also allows for turning on RUM (Real User Monitoring) so that it
will insert the needed js in your pages.

Check it out, fork, pull to your hearts delight.

Cheers,
Joost


Re: FormFragment validates on the server even when not visible

2013-07-11 Thread Joost Schouten (mailing lists)
Hi,

Thanks for your help. Our mails must have crossed :)

isDeepVisible() does indeed seem to be setting the disabled attribute of the 
hidden form field! I did read the docs here but in all honesty they still don't 
make a lot of sense to me. I'll have a play with it as it sure sounds a bit 
more elegant than my solution in my previous mail :)

Thanks for your help,
Joost



On Jul 11, 2013, at 10:45 PM, Yunhua Sang wrote:

> I have the similar problem; I thinks it's because the FormFragment renders
> a hidden element, when the zone gets refreshed, the hidden element's
> disable property is set to be true, which is invalid, then the elements
> within the FromFragment get submitted  I guess it's related to
> isDeepVisible() Javascript function. Please correct me if I am wrong.
> 
> Probably you could specify the visibleBound property of the FormFragment,
> to override the default behavior.
> 
> 
> 
> 
> 
> On Thu, Jul 11, 2013 at 7:16 AM, Joost Schouten (ml)
> wrote:
> 
>> Hi,
>> 
>> I'm using a FormFragment triggered by two Radio's in a RadioGroup. This all
>> works fine and validation works as expected. The hidden Fragment is ignored
>> when the form is submitted. Except for one situation:
>> 
>> when I load the Form and containing FormFragment's in a Zone and use the
>> visible attribute on the FormFragment to hide one of them due to a
>> preselected Radio, the server will validate the fields in the Hidden
>> FormFragment as well. If I select the Radio's back and forth it works as
>> expected. When debugging I noticed the ProcessSubmission ComponentActions
>> are executed where they are not when the formfragment is ignored as
>> expected. Also the t:formdate is longer in my failing case as opposed to
>> the scenario where it ignores my hidden fields. This leads me to believe
>> there is some sort of javascript initialization call not being called in my
>> failing case.
>> 
>> Has anyone seen this before? And clues on how to solve it? I'm on Tap 5.3.6
>> 
>> Thanks,
>> Joost
>> 
>> some of my code:
>> 
>> @Component(id = "paymentTypeRadioGroup", parameters = {"value=paymentType",
>> 
>> "label=message:components.entities.EntitiesCreditCard.payByTypeLabel",
>> 
>> "validate=required"})
>> 
>> private RadioGroup paymentTypeRadioGroup;
>> 
>> 
>>  @Mixins("TriggerFragment")
>> 
>> @Component(id = "payByCreditCardRadio", parameters = {
>> "value=literal:CREDIT_CARD",
>> 
>> "label=message:components.entities.EntitiesCreditCard.payByCreditCard",
>> 
>> "fragment=creditCardBlock"})
>> 
>> private Radio payByCreditCardRadio;
>> 
>> 
>> @Mixins("TriggerFragment")
>> 
>> @Component(id = "payByInvoiceRadio", parameters = {
>> "value=literal:MANUAL_INVOICE",
>> 
>> "label=message:components.entities.EntitiesCreditCard.payByInvoice",
>> 
>> "fragment=manualInvoiceBlock"})
>> 
>> private Radio payByInvoiceRadio;
>> 
>> 
>>  @Component(id = "creditCardBlock", parameters = {
>> 
>> "visible=prop:showCreditCardBlock",
>> 
>> "alwaysSubmit=literal:false"})
>> 
>> private FormFragment creditCardBlock;
>> 
>> 
>> @Component(id = "manualInvoiceBlock", parameters = {
>> 
>> "visible=prop:showManualInvoiceBlock",
>> 
>> "alwaysSubmit=literal:false"})
>> 
>> private FormFragment manualInvoiceBlock;
>> 



Re: FormFragment validates on the server even when not visible

2013-07-11 Thread Joost Schouten (mailing lists)
A bit more on this. What seems to be going wrong that in my case the hidden 
form fields in the FormFragment's are submitted even when the fragments are 
hidden on initial render. When I show and hide them again, the hidden fields 
get a "disabled" attribute preventing them hidden from-fields from being 
submitted. It seems to me that this "disabled" attribute should also be 
provided on initial render if the fragment is hidden.

I now solved it by contributing some javascript to the ajax response disabling 
the hidden fields myself as shown in [1]. But I'm sure this is not how it is 
intended.

I'd love to feedback on this one. Thoughts?

Cheers,
Joost

[1] script in my event handler loading a Block containing the FormFragments and 
form elements.

ajaxResponseRenderer.addCallback(new JavaScriptCallback() {
public void run(JavaScriptSupport javascriptSupport) {  

if (!isShowCreditCardBlock()) {

javascriptSupport.addScript("$$('.creditCardFormItems.t-invisible 
INPUT[type=hidden]')[0].disabled=true;");
}

if (!isShowManualInvoiceBlock()) {

javascriptSupport.addScript("$$('.manualInvoiceBlock.t-invisible 
INPUT[type=hidden]')[0].disabled=true;");
   }
}
});


On Jul 11, 2013, at 1:16 PM, Joost Schouten (ml) wrote:

> Hi,
> 
> I'm using a FormFragment triggered by two Radio's in a RadioGroup. This all
> works fine and validation works as expected. The hidden Fragment is ignored
> when the form is submitted. Except for one situation:
> 
> when I load the Form and containing FormFragment's in a Zone and use the
> visible attribute on the FormFragment to hide one of them due to a
> preselected Radio, the server will validate the fields in the Hidden
> FormFragment as well. If I select the Radio's back and forth it works as
> expected. When debugging I noticed the ProcessSubmission ComponentActions
> are executed where they are not when the formfragment is ignored as
> expected. Also the t:formdate is longer in my failing case as opposed to
> the scenario where it ignores my hidden fields. This leads me to believe
> there is some sort of javascript initialization call not being called in my
> failing case.
> 
> Has anyone seen this before? And clues on how to solve it? I'm on Tap 5.3.6
> 
> Thanks,
> Joost
> 
> some of my code:
> 
> @Component(id = "paymentTypeRadioGroup", parameters = {"value=paymentType",
> 
> "label=message:components.entities.EntitiesCreditCard.payByTypeLabel",
> 
> "validate=required"})
> 
> private RadioGroup paymentTypeRadioGroup;
> 
> 
>  @Mixins("TriggerFragment")
> 
> @Component(id = "payByCreditCardRadio", parameters = {
> "value=literal:CREDIT_CARD",
> 
> "label=message:components.entities.EntitiesCreditCard.payByCreditCard",
> 
> "fragment=creditCardBlock"})
> 
> private Radio payByCreditCardRadio;
> 
> 
> @Mixins("TriggerFragment")
> 
> @Component(id = "payByInvoiceRadio", parameters = {
> "value=literal:MANUAL_INVOICE",
> 
> "label=message:components.entities.EntitiesCreditCard.payByInvoice",
> 
> "fragment=manualInvoiceBlock"})
> 
> private Radio payByInvoiceRadio;
> 
> 
>  @Component(id = "creditCardBlock", parameters = {
> 
> "visible=prop:showCreditCardBlock",
> 
> "alwaysSubmit=literal:false"})
> 
> private FormFragment creditCardBlock;
> 
> 
> @Component(id = "manualInvoiceBlock", parameters = {
> 
> "visible=prop:showManualInvoiceBlock",
> 
> "alwaysSubmit=literal:false"})
> 
> private FormFragment manualInvoiceBlock;


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



FormFragment validates on the server even when not visible

2013-07-11 Thread Joost Schouten (ml)
Hi,

I'm using a FormFragment triggered by two Radio's in a RadioGroup. This all
works fine and validation works as expected. The hidden Fragment is ignored
when the form is submitted. Except for one situation:

when I load the Form and containing FormFragment's in a Zone and use the
visible attribute on the FormFragment to hide one of them due to a
preselected Radio, the server will validate the fields in the Hidden
FormFragment as well. If I select the Radio's back and forth it works as
expected. When debugging I noticed the ProcessSubmission ComponentActions
are executed where they are not when the formfragment is ignored as
expected. Also the t:formdate is longer in my failing case as opposed to
the scenario where it ignores my hidden fields. This leads me to believe
there is some sort of javascript initialization call not being called in my
failing case.

Has anyone seen this before? And clues on how to solve it? I'm on Tap 5.3.6

Thanks,
Joost

some of my code:

@Component(id = "paymentTypeRadioGroup", parameters = {"value=paymentType",

 "label=message:components.entities.EntitiesCreditCard.payByTypeLabel",

 "validate=required"})

private RadioGroup paymentTypeRadioGroup;


  @Mixins("TriggerFragment")

@Component(id = "payByCreditCardRadio", parameters = {
"value=literal:CREDIT_CARD",

 "label=message:components.entities.EntitiesCreditCard.payByCreditCard",

 "fragment=creditCardBlock"})

private Radio payByCreditCardRadio;


 @Mixins("TriggerFragment")

@Component(id = "payByInvoiceRadio", parameters = {
"value=literal:MANUAL_INVOICE",

 "label=message:components.entities.EntitiesCreditCard.payByInvoice",

 "fragment=manualInvoiceBlock"})

private Radio payByInvoiceRadio;


  @Component(id = "creditCardBlock", parameters = {

 "visible=prop:showCreditCardBlock",

 "alwaysSubmit=literal:false"})

private FormFragment creditCardBlock;


 @Component(id = "manualInvoiceBlock", parameters = {

 "visible=prop:showManualInvoiceBlock",

 "alwaysSubmit=literal:false"})

private FormFragment manualInvoiceBlock;


Re: crash report

2013-03-13 Thread Joost Schouten (mailing lists)
Hi,

This is not related to tapestry but your database configuration. Though the 
nice thing is that the solution is to be found in your stacktrace. Bless 
Connectior/J for nice exception handling :)

"The last packet successfully received from th e server was 52,974,616 
milliseconds ago.  The last packet sent successfully to the server was 
52,974,616 milliseconds ago. is longer than the server configured value of 
'wait_timeout'. You should consider either expiring and/or testing con nection 
validity before use in your application, increasing the server configure d 
values for client timeouts, or using the Connector/J connection property 'auto 
Reconnect=true' to avoid this problem."

The solution here being to add autoReconnect=true to your db url. Like so:  
jdbc:mysql://localhost/jyour_db?autoReconnect=true

Cheers,
Joost

On Mar 13, 2013, at 4:05 PM, nhhockeyplayer nashua wrote:

> Folks,
> 
> Not sure why my tapestry app wont hold up over night.
> 
> I set my connect string to reconnect
>  name="hibernate.connection.url">jdbc:mysql://localhost:3306/thibernatestealth?autoReconnect=true
> 
> On timeout I am configured to invalidate the session and go back to home page
> 
> I get this message on browser window
> 
> any ideas ? Thanks
> An unexpected application exception has occurred.Render
> queue error in BeginRender[Home:gallery.outputraw_0]: Failure reading 
> parameter 'value' of component Home:gallery.outputraw_0: 
> org.apache.tapestry5.ioc.internal.util.TapestryException
> 
> Then I get this message on console
> [WARN] util.JDBCExceptionReporter SQL Error: 0, SQLState: 08S01
> [ERROR] util.JDBCExceptionReporter The last packet successfully received from 
> th
> e server was 52,974,616 milliseconds ago.  The last packet sent successfully 
> to
> the server was 52,974,616 milliseconds ago. is longer than the server 
> configured
> value of 'wait_timeout'. You should consider either expiring and/or testing 
> con
> nection validity before use in your application, increasing the server 
> configure
> d values for client timeouts, or using the Connector/J connection property 
> 'auto
> Reconnect=true' to avoid this problem.
> [ERROR] components.Gallery error loading data on collection gallery
> [ERROR] pages.Home Render queue error in 
> BeginRender[Home:gallery.outputraw_0]:
> Failure reading parameter 'value' of component Home:gallery.outputraw_0: 
> org.apa
> che.tapestry5.ioc.internal.util.TapestryException
> org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading 
> parame
> ter 'value' of component Home:gallery.outputraw_0: 
> org.apache.tapestry5.ioc.inte
> rnal.util.TapestryException [at 
> classpath:org/tynamo/examples/hibernatesecurity/
> components/Gallery.tml, line 74]
>at 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Abst
> ractPhase.invoke(ComponentPageElementImpl.java:153)
>at 
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$Begi
> nRenderPhase.render(ComponentPageElementImpl.java:209)
>at 
> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueu
> eImpl.java:72)
>at 
> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(Pag
> eRenderQueueImpl.java:124)
>at $PageRenderQueue_13b946f6e28a9.render(Unknown Source)
>at $PageRenderQueue_13b946f6e28a8.render(Unknown Source)
>at 
> org.apache.tapestry5.internal.services.MarkupRendererTerminator.rende
> rMarkup(MarkupRendererTerminator.java:37)
>at 
> org.apache.tapestry5.beanvalidator.BeanValidatorModule$2.renderMarkup
> (BeanValidatorModule.java:119)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$
> 1.renderMarkup(KawwaPortalComponentsModule.java:91)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> org.apache.tapestry5.services.TapestryModule$31.renderMarkup(Tapestry
> Module.java:1994)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> org.apache.tapestry5.services.TapestryModule$30.renderMarkup(Tapestry
> Module.java:1978)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> net.atos.kawwaportal.components.services.KawwaPortalComponentsModule$
> 3.renderMarkup(KawwaPortalComponentsModule.java:117)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> org.apache.tapestry5.services.TapestryModule$29.renderMarkup(Tapestry
> Module.java:1960)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> org.apache.tapestry5.services.TapestryModule$28.renderMarkup(Tapestry
> Module.java:1945)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown Source)
>at 
> org.apache.tapestry5.services.TapestryModule$27.renderMarkup(Tapestry
> Module.java:1931)
>at $MarkupRenderer_13b946f6e28ad.renderMarkup(Unknown So

Re: Get selected item from loop

2012-12-03 Thread Joost Schouten (mailing lists)
Hi,

I'm not quite sure what you are trying to achieve but in any case you do not 
use the context you pass in in your actionlinks and use hardcoded int's in 
stead. Change your action links to 3 and change your event handlers to

public void onActionFromJedan(int context) 
{ 
unesiOcenu(context); 
}

That should provide the right context to the right event handler.

Good luck,
Joost

On Dec 3, 2012, at 4:22 PM, dodjavola wrote:

> There is no form around loop.
> 
> Here is the code of my component:
> 
> public class Ocenjivanje 
> { 
>   @Parameter(required=true)
>   @Property
>   private int materijalID;
>   
>   private Materijal materijal;
>   
>   @Inject
>   private Session session;
>   
>   @SessionState
>   private User user;
>   
>   @CommitAfter
>   public Object unesiOcenu(int ocena)
>   {
>   Materijal m =
> (Materijal)session.createCriteria(Materijal.class).add(Restrictions.eq("materijalID",
> this.materijalID)).list().get(0);
>   Date d = new Date();
>   Ocena o = new Ocena();
>   o.setMaterijal(m);
>   o.setKorisnikID(this.user.getID());
>   o.setDatumOcene(d);
>   o.setOcena(ocena);
>   session.save(o);
>   return this;
>   }
>   
>   public void onActionFromJedan()
>   {
>   unesiOcenu(1);
>   }
>   
>   public void onActionFromDva()
>   {
>   unesiOcenu(2);
>   }
>   
>   public void onActionFromTri()
>   {
>   unesiOcenu(3);
>   }
>   
>   public void onActionFromCetiri()
>   {
>   unesiOcenu(4);
>   }
>   
>   public void onActionFromPet()
>   {
>   unesiOcenu(5);
>   }   
> }
> 
>  xmlns="http://www.w3.org/1999/xhtml";
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
>  xmlns:p="tapestry:parameter">
> 
>  Oceni sadržaj:   
>   1
>   2
>   3
>   4
>   5   
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Get-selected-item-from-loop-tp5718460p5718464.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: Get selected item from loop

2012-12-03 Thread Joost Schouten (mailing lists)
Can you share the code of "mycomponent"? I suspect you are persisting the value 
in stead of adding it to the context right away. And do you have a form around 
this loop?

Cheers,
Joost


On Dec 3, 2012, at 1:50 PM, dodjavola wrote:

> 'm currently working on some project, using Apache Tapestry 5.3.6. I have
> issue using t:loop component. Is there any way I can get selected item after
> loop finishes, and page is rendered? What I need to achieve is: Let's say I
> have loop like this:
> 
> 
>
> 
> This will work fine. But if I move this actionlink into my own component,
> and pass this ID through my parameter, if I click, I always get the last
> item from list, and not the one which is clicked.
> 
> 
>
> 
> 
> I tried putting formState="iteration", and puting ValueEncoder, but nothing
> helps. Please, can anyone help me, and show me how to solve this issue, and
> get the selected item from the list. Thanks in advance
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Get-selected-item-from-loop-tp5718460.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: Update the tapestry site

2012-11-21 Thread Joost Schouten (mailing lists)
Hi,

Which Confluence admin can grant me edit rights? My ICLA acceptance
email is below, as is my confluence username.

Thanks a million,
Joost

On Tue, Nov 20, 2012 at 1:08 AM, Joost Schouten (mailing lists)
 wrote:
> My confluence username: joost [a] yanomo [period] com
>
> Sam Ruby mailed me on August 9th 2011
>
> -
>
> Dear Joost Schouten,
>
> This message acknowledges receipt of your ICLA, which has been filed in the
> Apache Software Foundation records.
>
> If you have been voted in as a committer, please advise the project PMC that
> your ICLA has been filed.
>
> Warm Regards,
>
> -- Sam Ruby
> Assistant Secretary, Apache Software Foundation
> ---
>
>
> On Nov 20, 2012, at 12:31 AM, Dragan Sahpaski wrote:
>
> On Tue, Nov 20, 2012 at 12:24 AM, Joost Schouten (mailing lists) <
> joost...@jsportal.com> wrote:
>
> Looking at the apache license page I remembered I have already submitted
>
> my CLA a few years ago with apache. So the next question is: Who can I give
>
> my confluence username/email to setup the appropriate rights?
>
>
>
> After you send it to apache you get a confirmation email that you can
> forward here to the list and ask for access. Post your username in the same
> message.
>
>
>
> Cheers,
>
> Joost
>
>
>
> On Nov 19, 2012, at 11:21 PM, Dragan Sahpaski wrote:
>
>
> Done,
>
> You can get access by filling an apache ICLA (don't have to be a
>
> comitter).
>
> Read more here http://www.apache.org/licenses/
>
>
> Cheers,
>
> Dragan Sahpaski
>
>
>
>
> On Mon, Nov 19, 2012 at 10:45 PM, Joost Schouten (mailing lists) <
>
> joost...@jsportal.com> wrote:
>
>
> Hi Muhammad,
>
>
> I can see this is a somewhat minimal question. I guess I'm asking this
>
> to
>
> one of the comitters as I would like to update the Yanomo screenshot
>
> found
>
> at http://tapestry.apache.org/applications.html as it is outdated. As I
>
> have no editing rights at
>
> https://cwiki.apache.org/confluence/display/TAPESTRY/Applications# I
>
> can't do this myself.
>
>
> Sorry for the under specified question ;-)
>
>
> Cheers,
>
> Joost
>
>
>
> On Nov 19, 2012, at 10:39 PM, Muhammad Gelbana wrote:
>
>
> What do you mean by "Yanomo screenshot on the Tapetsry site", what is
>
> that ?
>
>
> On Mon, Nov 19, 2012 at 11:18 PM, Joost Schouten (mailing lists) <
>
> joost...@jsportal.com> wrote:
>
>
> Hi,
>
>
> The Yanomo screenshot on the Tapetsry site is outdated and we have a
>
> nice
>
> new fancy one. I believe I need to be a confluence admin to make this
>
> update right? How can I become one or who do I talk to?
>
>
> Thanks,
>
> Joost
>
> -
>
> 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: Update the tapestry site

2012-11-19 Thread Joost Schouten (mailing lists)
My confluence username: joost [a] yanomo [period] com

Sam Ruby mailed me on August 9th 2011

-

Dear Joost Schouten,

This message acknowledges receipt of your ICLA, which has been filed in the 
Apache Software Foundation records.

If you have been voted in as a committer, please advise the project PMC that 
your ICLA has been filed.

Warm Regards,

-- Sam Ruby
Assistant Secretary, Apache Software Foundation
---


On Nov 20, 2012, at 12:31 AM, Dragan Sahpaski wrote:

> On Tue, Nov 20, 2012 at 12:24 AM, Joost Schouten (mailing lists) <
> joost...@jsportal.com> wrote:
> 
>> Looking at the apache license page I remembered I have already submitted
>> my CLA a few years ago with apache. So the next question is: Who can I give
>> my confluence username/email to setup the appropriate rights?
>> 
> 
> After you send it to apache you get a confirmation email that you can
> forward here to the list and ask for access. Post your username in the same
> message.
> 
> 
>> 
>> Cheers,
>> Joost
>> 
>> 
>> On Nov 19, 2012, at 11:21 PM, Dragan Sahpaski wrote:
>> 
>>> Done,
>>> You can get access by filling an apache ICLA (don't have to be a
>> comitter).
>>> Read more here http://www.apache.org/licenses/
>>> 
>>> Cheers,
>>> Dragan Sahpaski
>>> 
>>> 
>>> 
>>> On Mon, Nov 19, 2012 at 10:45 PM, Joost Schouten (mailing lists) <
>>> joost...@jsportal.com> wrote:
>>> 
>>>> Hi Muhammad,
>>>> 
>>>> I can see this is a somewhat minimal question. I guess I'm asking this
>> to
>>>> one of the comitters as I would like to update the Yanomo screenshot
>> found
>>>> at http://tapestry.apache.org/applications.html as it is outdated. As I
>>>> have no editing rights at
>>>> https://cwiki.apache.org/confluence/display/TAPESTRY/Applications# I
>>>> can't do this myself.
>>>> 
>>>> Sorry for the under specified question ;-)
>>>> 
>>>> Cheers,
>>>> Joost
>>>> 
>>>> 
>>>> On Nov 19, 2012, at 10:39 PM, Muhammad Gelbana wrote:
>>>> 
>>>>> What do you mean by "Yanomo screenshot on the Tapetsry site", what is
>>>> that ?
>>>>> 
>>>>> On Mon, Nov 19, 2012 at 11:18 PM, Joost Schouten (mailing lists) <
>>>>> joost...@jsportal.com> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> The Yanomo screenshot on the Tapetsry site is outdated and we have a
>>>> nice
>>>>>> new fancy one. I believe I need to be a confluence admin to make this
>>>>>> update right? How can I become one or who do I talk to?
>>>>>> 
>>>>>> Thanks,
>>>>>> Joost
>>>>>> -
>>>>>> 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: Update the tapestry site

2012-11-19 Thread Joost Schouten (mailing lists)
Looking at the apache license page I remembered I have already submitted my CLA 
a few years ago with apache. So the next question is: Who can I give my 
confluence username/email to setup the appropriate rights?

Cheers,
Joost


On Nov 19, 2012, at 11:21 PM, Dragan Sahpaski wrote:

> Done,
> You can get access by filling an apache ICLA (don't have to be a comitter).
> Read more here http://www.apache.org/licenses/
> 
> Cheers,
> Dragan Sahpaski
> 
> 
> 
> On Mon, Nov 19, 2012 at 10:45 PM, Joost Schouten (mailing lists) <
> joost...@jsportal.com> wrote:
> 
>> Hi Muhammad,
>> 
>> I can see this is a somewhat minimal question. I guess I'm asking this to
>> one of the comitters as I would like to update the Yanomo screenshot found
>> at http://tapestry.apache.org/applications.html as it is outdated. As I
>> have no editing rights at
>> https://cwiki.apache.org/confluence/display/TAPESTRY/Applications# I
>> can't do this myself.
>> 
>> Sorry for the under specified question ;-)
>> 
>> Cheers,
>> Joost
>> 
>> 
>> On Nov 19, 2012, at 10:39 PM, Muhammad Gelbana wrote:
>> 
>>> What do you mean by "Yanomo screenshot on the Tapetsry site", what is
>> that ?
>>> 
>>> On Mon, Nov 19, 2012 at 11:18 PM, Joost Schouten (mailing lists) <
>>> joost...@jsportal.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> The Yanomo screenshot on the Tapetsry site is outdated and we have a
>> nice
>>>> new fancy one. I believe I need to be a confluence admin to make this
>>>> update right? How can I become one or who do I talk to?
>>>> 
>>>> Thanks,
>>>> Joost
>>>> -
>>>> 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: Update the tapestry site

2012-11-19 Thread Joost Schouten (mailing lists)
That's quick! Thanks!

I'll go the ICLA way regardless as I was hoping to share a screenshot of the 
actual internal power as the public website is not the Tapestry part.

Cheers,
Joost


On Nov 19, 2012, at 11:21 PM, Dragan Sahpaski wrote:

> Done,
> You can get access by filling an apache ICLA (don't have to be a comitter).
> Read more here http://www.apache.org/licenses/
> 
> Cheers,
> Dragan Sahpaski
> 
> 
> 
> On Mon, Nov 19, 2012 at 10:45 PM, Joost Schouten (mailing lists) <
> joost...@jsportal.com> wrote:
> 
>> Hi Muhammad,
>> 
>> I can see this is a somewhat minimal question. I guess I'm asking this to
>> one of the comitters as I would like to update the Yanomo screenshot found
>> at http://tapestry.apache.org/applications.html as it is outdated. As I
>> have no editing rights at
>> https://cwiki.apache.org/confluence/display/TAPESTRY/Applications# I
>> can't do this myself.
>> 
>> Sorry for the under specified question ;-)
>> 
>> Cheers,
>> Joost
>> 
>> 
>> On Nov 19, 2012, at 10:39 PM, Muhammad Gelbana wrote:
>> 
>>> What do you mean by "Yanomo screenshot on the Tapetsry site", what is
>> that ?
>>> 
>>> On Mon, Nov 19, 2012 at 11:18 PM, Joost Schouten (mailing lists) <
>>> joost...@jsportal.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> The Yanomo screenshot on the Tapetsry site is outdated and we have a
>> nice
>>>> new fancy one. I believe I need to be a confluence admin to make this
>>>> update right? How can I become one or who do I talk to?
>>>> 
>>>> Thanks,
>>>> Joost
>>>> -
>>>> 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: Update the tapestry site

2012-11-19 Thread Joost Schouten (mailing lists)
Hi Muhammad,

I can see this is a somewhat minimal question. I guess I'm asking this to one 
of the comitters as I would like to update the Yanomo screenshot found at 
http://tapestry.apache.org/applications.html as it is outdated. As I have no 
editing rights at 
https://cwiki.apache.org/confluence/display/TAPESTRY/Applications# I can't do 
this myself.

Sorry for the under specified question ;-)

Cheers,
Joost


On Nov 19, 2012, at 10:39 PM, Muhammad Gelbana wrote:

> What do you mean by "Yanomo screenshot on the Tapetsry site", what is that ?
> 
> On Mon, Nov 19, 2012 at 11:18 PM, Joost Schouten (mailing lists) <
> joost...@jsportal.com> wrote:
> 
>> Hi,
>> 
>> The Yanomo screenshot on the Tapetsry site is outdated and we have a nice
>> new fancy one. I believe I need to be a confluence admin to make this
>> update right? How can I become one or who do I talk to?
>> 
>> Thanks,
>> Joost
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 



Update the tapestry site

2012-11-19 Thread Joost Schouten (mailing lists)
Hi,

The Yanomo screenshot on the Tapetsry site is outdated and we have a nice new 
fancy one. I believe I need to be a confluence admin to make this update right? 
How can I become one or who do I talk to?

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



Re: Alternatives to tapestry autocomplete

2012-07-30 Thread Joost Schouten (mailing lists)
Hi,

I had some specific needs here too (I wanted it to double as a drop down) and 
managed to customize all I wanted. I extended the autocomplete so I can 
overwrite the generateResponseMarkup method. Mine can be found below.

Also, it will be very easy to trim() the the String on the srever in 
provideCompletions event handler. Though also changing the JavaScript is not 
that hard. Below is an example where I change the onBlur method on the js 
object. This way you will be able to overwrite all you want.

Cheers,
Joost


//- changing a js method on the autocompleter ---

Ajax.Autocompleter.addMethods({ 
onBlur: function() { 
fa = $T(this.element).forceAutocompleter;
fa.inputFocus = false;
fa.onBlurSelectorItem();
} 
});


//- adding markup to the response ---


/**
 * Overwrites the Autocomplete method to add a title to each li
 */
@Override
protected void generateResponseMarkup(MarkupWriter writer, List 
matches){
writer.element("ul");

for (Object o : matches){
ForceAutocompleteItem item = 
ForceAutocompleteItem.constructFromString(o.toString());

Element li = writer.element("li", 
"title", item.getDisplayName());

if(item.getItemIdentifier() != null) {
li.attribute("id", item.getItemIdentifier());
}

for(String propName : item.getAttributes().keySet()) {
li.attribute(propName, 
item.getAttributes().get(propName));
}

li.attribute("serialized", item.toString());

writer.write(item.getDisplayName());
writer.end();
}

writer.end(); // ul
}


On Jul 31, 2012, at 8:00 AM, Chris Collins wrote:

> I was playing with the tapestry autocomplete that is based on the 
> script.aculo.us autocomplete and there were two things that I really wanted 
> in an autocomplete:
> 
> ability to not have trailing whitespace removed by the client side script.
> support for markup in the autocomplete suggestions.
> 
> Perhaps there is a way todo that with the builtin but scanning the js couldnt 
> see any way even at the scriptactuous level to tweak.
> 
> A quick look at the jquery-tapestry.com informed me that there isnt a mixin 
> for the jquery autocomplete (that seems not to butcher my spaces at least).
> 
> Any suggestions for an idle engineer like myself trying to avoid writing my 
> own mixin :-}
> 
> Best
> 
> C
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



Re: how to clear the textarea after submit

2012-07-28 Thread Joost Schouten (mailing lists)
You are probably @Persist'ing the value. Don't use persist or clear the 
persisted data on SUCCES and your TEXTAREA will show up cleared.

If that does not help you, please share your code with us.

Cheers,
Joost

On Jul 28, 2012, at 9:42 AM, Anbazhagan wrote:

> Hi 
> 
> I am using textarea component for feedback submit in application. After
> enter the value how to clear the textarea field. 
> 
> Thank u
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/how-to-clear-the-textarea-after-submit-tp5714847.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 APPLICATION_VERSION

2012-07-12 Thread Joost Schouten (mailing lists)
This should do the trick:

@Inject
@Symbol(SymbolConstants.APPLICATION_VERSION)
private String appVersion;

 Cheers,
Joost


On Jul 12, 2012, at 8:58 PM, Norman Franke wrote:

> I give up. How do I programmatically get the value of the APPLICATION_VERSION 
> that I set in the AppModule? In my login page, I'd like to display the 
> version. I'm not sure what to inject. I've tried a number of things, but 
> nothing seems to work. Where is it stored?
> 
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
> 
> 
> 



Re: Make Report PDF

2012-04-23 Thread Joost Schouten (mailing lists)
I actually added an event handler to my page (could easily be a mixin) that 
returns the page as a pdf. I did somewhat cheat but it does work nicely. I use 
a HttpClient to request the same page again (with the sessionid so all session 
state is correct). From there on you have the exact xhtml you can use to 
generate your pdf (I use flying saucer) or whatever else you wish to do.

Hope it helps,
Joost


On Apr 23, 2012, at 2:12 PM, Lance Java wrote:

> Funny you should mention this, I actually had a quick try at doing this
> myself but I got a bit stuck... here's what I learned.
> 
> 1. I was trying to use this technique
> http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameterto
> specify a FOP parameter to a Page (or Component) in a tml template.
> 
> 2. From what I can see, there are two ways to return a StreamResponse
> 2a. Return a StreamResponse from the onActivate() method of a page
> 2b. Return a StreamResponse from an event handler method fired by a
> 
> 
> 3. Unfortunately, you can not use the method suggested in option 1 for
> cases 2a or 2b because tapestry does not initialize or run the page render
> sequence when a StreamResponse is returned in either of these two cases.
> 
> 4. I came to the conclusion that I would probably need to initialize the
> PageRenderQueue myself which would likely involve the use of internal
> tapestry classes.


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



Re: animated graph

2011-12-19 Thread Joost Schouten (mailing lists)
We've integrated Google visualization [1]. A small screenshot of it at [2]. It 
works nicely with googles visulisation java API [3] which you can use to 
buildup your JSON to initialize your charts.

It offers great extension possibilities as well.

Good luck,
Joost

[1]
http://code.google.com/apis/chart/interactive/docs/gallery.html
[2]
http://www.yanomo.com/en_GB/product/features/overview
[3]
 http://code.google.com/apis/chart/interactive/docs/dev/dsl_javadocs/index.html

It works nicely with the 

On Dec 19, 2011, at 9:10 AM, antalk wrote:

> I've integrated this library: http://www.highcharts.com/ in our webapp. It
> has a wrapper for Prototype so no need to add JQuery to your Tapestry
> project.
> 
> The possibilities are almost endless.
> 
> Antal
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/animated-graph-tp5083674p5085366.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
> 



SelectModel notation comma escape

2011-12-12 Thread Joost Schouten (mailing lists)
Hi,

I just found a little bug in my app where I have the following Select defined 


@Component(id = "onForSelect", parameters = {"value=onForValue",
"model=" + PROVIDER_SELECT_OPTION + "=${byMessage}," +
RECEIVER_SELECT_OPTION + "=${forMessage}",
"blankOption=never"})
private Select onForSelect;



This all works fine up to the point where my "byMessage" and or "forMessage" 
return a string with a comma in it. (eg "I am a string, with a comma"). This 
results in the drop down like:


I am a string
with a comma
A string without a 
comma


It's pretty clear to me this problem is due to the comma being interpeted as a 
list item seperator in the SelectModel but I found no way how to escape in the 
docs? Is there a nice escape possible and if so how? My workaround for now is 
to instantiate the SelectModel myself but I like the easy string notation.

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



Re: Textfield like Google search line

2011-12-10 Thread Joost Schouten (mailing lists)
I think you are looking for the autocomplete mixing. Check out: 
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html
 

Cheers,
Joost


On Dec 10, 2011, at 5:29 PM, bigcache1 wrote:

> Hello, everybody!
> If such topic already exists - please let me know, I didn't found one.
> 
> In my application I have places where usual Select element is not
> comfortable - for example I have the list of 180 clients (and it's growing),
> and I want to add some events with these people. I want such textfield, wich
> will suggest me those clients who's initials will be like what I just have
> typed.
> Is there such solutions like suggesting textfield, or something else?
> I will use client name as key in my database.
> 
> P.S. Sorry, if my english is bad, you can correct me.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Textfield-like-Google-search-line-tp5064607p5064607.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.1] ajaxFormLoop disabled once page reloaded and returning a PDFStreamResponse

2011-12-09 Thread Joost Schouten (mailing lists)
Another option (if an upgrade is not possible) is to download your pdf to a 
hidden iframe. No new page opens and the zonemanager does not get unload'ed.

On Dec 8, 2011, at 4:54 PM, antalk wrote:

> I've 'fixed'  a similair issue by using an eventlink where the user can
> download the document, but set the target attribute of the link to
> target="_blank".
> 
> The download page will open in a new window, but you dont have to refresh
> the form.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/t5-1-ajaxFormLoop-disabled-once-page-reloaded-and-returning-a-PDFStreamResponse-tp5053108p5059217.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.1] ajaxFormLoop disabled once page reloaded and returning a PDFStreamResponse

2011-12-08 Thread Joost Schouten (mailing lists)
oops, I meant upgrade to 5.3 obviously.

cheers,
Joost

On Dec 8, 2011, at 4:00 PM, Jérémie Charlet wrote:

> Does anyone have an idea on this? Is my presentation of the issue missing
> clarity/details ?
> Regards,
> Jeremie
> 
> 2011/12/6 Jérémie Charlet 
> 
>> Hello everyone,
>> 
>> I am facing an issue while using ajaxFormLoop:
>> 
>> On my page, I fill a form that includes among others a list of
>> phoneNumbers to be set in an ajaxFormLoop. Once I submit the form, it
>> generates a PDF (containing data from my form) and makes the user download
>> it in his web browser. The user is not redirected to another page, the page
>> is simply reloaded so that the user can fill once again the form and
>> generate a new PDF.
>> 
>> Problem is that once the page is reloaded (and my PDF file asked to be
>> download), I cannot use the ajaxFormLoop anymore: if I click on addRow,
>> nothing happens on the GUI. However if I reload manually the page, the
>> ajaxFormLoop works back again and displays moreothers as many rows as I
>> clicked previously on the addRow button. It seems that once I click on
>> addRow, requests are indeed done server side, but the javaScript doesn't
>> work anymore and and does not refresh the GUI and show the added rows.
>> 
>> The problem might occur because in the function handling the submit event,
>> I return a PDFStreamResponse instead of the tapestry page but I don't see
>> how to solve it.. Return the PDFStreamResponse and somehow reload
>> immediately after the page, but how? Is there a better way to make the user
>> download the generated PDF?
>> 
>> 
>> the ajaxFormLoop from the tml
>> 
>> > t:source="phoneNumberList" t:encoder="phoneNumberRowEncoder">
>> 
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:phoneNumber}
>> 
>> > t:validate="required" />
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:deletephoneNumber}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:addphoneNumber}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> the submit event handled in the java class
>> 
>> @OnEvent(component = "myForm", value = EventConstants.SUBMIT)
>> public Object generatePDF() {
>> 
>> InputStream pdfStream = null;
>> try {
>> pdfStream = pdfGeneratorService.generateMandatePDF();
>> } catch (PDFGeneratorServiceException e) {
>> e.printStackTrace();
>> }
>> 
>> // return the PDF as a PDFStreamResponse
>> return new PDFStreamResponse(pdfStream, "Addresses_" +
>> System.currentTimeMillis() + ".pdf");
>> }
>> 
>> 
>> Thanks in advance for the help :),
>> Jérémie
>> 


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



Re: [t5.1] ajaxFormLoop disabled once page reloaded and returning a PDFStreamResponse

2011-12-08 Thread Joost Schouten (mailing lists)
Have a look at https://issues.apache.org/jira/browse/TAP5-1533 An upgrade to 
5.2 will fix your problem.

Cheers,
Joost


On Dec 8, 2011, at 4:00 PM, Jérémie Charlet wrote:

> Does anyone have an idea on this? Is my presentation of the issue missing
> clarity/details ?
> Regards,
> Jeremie
> 
> 2011/12/6 Jérémie Charlet 
> 
>> Hello everyone,
>> 
>> I am facing an issue while using ajaxFormLoop:
>> 
>> On my page, I fill a form that includes among others a list of
>> phoneNumbers to be set in an ajaxFormLoop. Once I submit the form, it
>> generates a PDF (containing data from my form) and makes the user download
>> it in his web browser. The user is not redirected to another page, the page
>> is simply reloaded so that the user can fill once again the form and
>> generate a new PDF.
>> 
>> Problem is that once the page is reloaded (and my PDF file asked to be
>> download), I cannot use the ajaxFormLoop anymore: if I click on addRow,
>> nothing happens on the GUI. However if I reload manually the page, the
>> ajaxFormLoop works back again and displays moreothers as many rows as I
>> clicked previously on the addRow button. It seems that once I click on
>> addRow, requests are indeed done server side, but the javaScript doesn't
>> work anymore and and does not refresh the GUI and show the added rows.
>> 
>> The problem might occur because in the function handling the submit event,
>> I return a PDFStreamResponse instead of the tapestry page but I don't see
>> how to solve it.. Return the PDFStreamResponse and somehow reload
>> immediately after the page, but how? Is there a better way to make the user
>> download the generated PDF?
>> 
>> 
>> the ajaxFormLoop from the tml
>> 
>> > t:source="phoneNumberList" t:encoder="phoneNumberRowEncoder">
>> 
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:phoneNumber}
>> 
>> > t:validate="required" />
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:deletephoneNumber}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> ${sharedcatalog:addphoneNumber}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> the submit event handled in the java class
>> 
>> @OnEvent(component = "myForm", value = EventConstants.SUBMIT)
>> public Object generatePDF() {
>> 
>> InputStream pdfStream = null;
>> try {
>> pdfStream = pdfGeneratorService.generateMandatePDF();
>> } catch (PDFGeneratorServiceException e) {
>> e.printStackTrace();
>> }
>> 
>> // return the PDF as a PDFStreamResponse
>> return new PDFStreamResponse(pdfStream, "Addresses_" +
>> System.currentTimeMillis() + ".pdf");
>> }
>> 
>> 
>> Thanks in advance for the help :),
>> Jérémie
>> 



Re: T5.3 rc3 ordering of css

2011-11-10 Thread Joost Schouten (mailing lists)

On Nov 9, 2011, at 12:45 PM, Ville wrote:

> Thanks for the input again, live and learn :)
> 
> In case anyone comes looking, the easiest way is to set a class "c" to body
> and prepend all your styles with .c.

or if you have 

.t-error{color:red;} 

coming from your default.css you can add 

BODY .t-error{color:green;} 

to your own css.

This saves you from having to add classes to every page. 

> 
> - Ville

cheers, Joost

> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977487.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.3 rc3 ordering of css

2011-11-09 Thread Joost Schouten (mailing lists)
I might be missing something here but why do you not solve the problem with css 
specificity [1]? Css should never care about the order in which you load your 
css files IMHO.

Cheers,
Joost

[1]: http://www.htmldog.com/guides/cssadvanced/specificity/


On Nov 9, 2011, at 9:19 AM, Ville wrote:

> To clarify why the ordering IS important, if my css is included before
> Tapestry's default, then I can't override T5's default styles. (And the
> second picture in my earlier post demonstrates this..)
> 
> The proposed fix that I then exclude the T5 defaults altogether is not imho
> the most elegant fix.
> 
> - Ville
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-3-rc3-ordering-of-css-tp4969412p4977069.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.3 Grid, inPlace Update and expired Sessions

2011-09-11 Thread Joost Schouten (mailing lists)
I am not quite sure if this works for you as we have build our own
security package that protects page and event access and redirects to
the loginpage when required. On a loginpage forward we store the
requested page to be redirected to after login. The trick with the
AJAX call login forward we solve by an onActivate in the login page as
follows:

/**
 * when a user is redirected to the Logon page through a AJAX
request after their session has expired,
 * return an json response that redirects them to the logon page
 * @return
 * @throws IOException
 */
@OnEvent(value = EventConstants.ACTIVATE)
private Object activate() throws IOException {
if(request.isXHR()) {
PrintWriter writer = response.getPrintWriter("application/json");
Link link = linkSource.createPageRenderLink(Login.class);
writer.write("{\n\t\"redirectURL\" : \"" +
link.toAbsoluteURI() + "\"\n}");
writer.close();
}
return null;
}

Hope it helps,
Joost

On Sun, Sep 11, 2011 at 4:06 AM, Lenny Primak  wrote:
> I solved this problem finally by making a component somewhat derivative of
> tapestry-conversations moderator component.
> Wasn't easy in the last bit.  I will post the code to wiki shortly.
> What it does is just redirect to the same page if sessions expires,
> allowing the user to relogin, or if the 'remember me' feature is used,
> the page just reloads properly.
>
> Thanks everyone for helping me.
>
> On Sep 10, 2011, at 2:42 PM, Lenny Primak wrote:
>
>> That would be great, but I personally would be very happy with just a 
>> redirect to the current page,
>> which would just get me a login prompt once again,
>> but I suppose there are deeper tapestry-related javascript issues going on 
>> here,
>> otherwise this problem would have been licked already.
>>
>> On Sep 10, 2011, at 2:37 PM, Fernando Padilla wrote:
>>
>>> Hm..
>>>
>>> Did someone already propose to have Tapestry-Security support a popup-login 
>>> flow?
>>>
>>> So when tapestry-security hijacks a ajax request, it would return a 
>>> multizoneupdate that would generate a popup-zone (tapestry doesn't have 
>>> native support for those yet, but really should!); and would handle the 
>>> login flow within a popup, and replay the original ajax request after it's 
>>> done?
>>>
>>>
>>> This is a stretch though, since there are a few things needed:
>>>
>>> 1) a zone that support popup or dialog
>>> 2) security that has a new popup/dialog display option/flow
>>> 3) a really excited hacker to hack all of this and submit a patch! :)
>>>
>>>
>>> On 9/10/11 10:23 AM, Lenny Primak wrote:
 Did anybody test tapestry-conversation under Tap 5.3 (beta 5?)
 I am getting ReferenceError: Can't find variable: ConversationModerator
 The ConversationModerator.js doesn't seem to get included into the 
 Tapestry page,
 but the component is there.

 On Sep 10, 2011, at 12:29 PM, Lenny Primak wrote:

> Thanks, Kalle,
> I think this will work.
> I would love, if its possible, for tap-security, perhaps? to be able to 
> redirect AJAX requests
> correctly to the current page or login page in case the session expired.
> That way, it would all work automatically, instead of showing ugly 
> exception on the screen.
> I will try your method in the meanwhile, the session end warning sounds 
> like a good idea.
>
> On Sep 10, 2011, at 10:52 AM, Kalle Korhonen wrote:
>
>> On Sat, Sep 10, 2011 at 2:39 AM, Lenny Primak  
>> wrote:
>>> Digging through this a bit deeper, there is an interaction going on 
>>> here with tapestry-security.
>>> When the session expires, the user is no longer logged in, and thus
>>> ajax call is being redirected to a login screen, thus the exceptions.
>>> But the problem still remains the same, there seems to be no good way
>>> to redirect the page to itself when the Grid does inPlace update,
>>> and the session is no longer available.
>>> Any more thoughts/ideas?
>> Sounds like tapestry-security is doing the right thing, no? How I
>> would solve the problem, is that either I wouldn't let the session to
>> expire or warn the user that the session is about to expire, or a
>> combination of both. If you added conversational scope, it'd be
>> relatively easy to do (see
>> http://tynamo.org/tapestry-conversations+guide for more info).
>>
>> Kalle
>>
>>
>>> On Sep 10, 2011, at 4:38 AM, Lenny Primak wrote:
>>>
 As a matter of fact, I can't get any sort of graceful degradation 
 after session has expired.

 --- Screenshot 
 

 // somewhere we trigger session invalidation
       request.getSession(false).invalidate();


 // now lets try an AJAX event handler to redirect to my index page
   @OnEvent(value = "submit", c

Re: StreamResponse and inPlace Grid question

2011-09-04 Thread Joost Schouten (ml)

 This sounds like a problem I had a while ago. Check out [1] and [2]

A stream response will casue the pages onUnload to be called cleaning up 
all the zone managers (I believe). A quick fix is to add a 
target="_blank" to your download link. But this will in most browsers 
cause an empty tab to be opened for your download. The best way is to 
download the stream to a hidden iframe which will keep you page working 
as it should and the download to nicely download on the same page.


Hope it helps,
Joost

[1] 
http://tapestry.1045711.n5.nabble.com/File-download-breaks-ajax-zone-manager-td4434859.html

[2] https://issues.apache.org/jira/browse/TAP5-1533

On 1/09/11 11:18 PM, cqasker wrote:

Basically I have a inPlace=true grid and some linksubmits to various
exporting options. When the submits are hit, some data from the grid is
exported. That works great. However once things are exported and downloaded,
the paging and other partial page submits on the page don't work for the
grid. From firebug, I see the ajax calls are being made and data is
received. However the grid is not updated.

I would do the download in a hidden iframe or window but I want to avoid
this and besides I need the state of the grid and the grid data. Is there a
way to either fix the grid so that the grid is updated? or another way?



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/StreamResponse-and-inPlace-Grid-question-tp4760076p4760076.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: Block response with form causes nested form exception where this is not the case

2011-07-25 Thread Joost Schouten (ml)

 Taha,

Thanks. Personally I don't have a need for nested forms. I used them in 
wicket before, found them somewhat usefull but do not miss them in 
tapestry. As for my message, I was wrong and there actually was a nested 
form which I missed initially.


Cheers,
Joost

On 25/07/11 3:28 PM, Taha Hafeez wrote:

Hi Joost,

Nested forms are not supported by html. Tapestry only enforces it.
When you render a block(containing a form) within a form, the
environmental FormSupport is pushed in twice so it will complains.

IMHO, it is not a bug. Other frameworks support nested forms by using
javascript based POST request. Perhaps we should also do that, in
which case it will be a improvement.

regards
Taha


On Mon, Jul 25, 2011 at 6:31 PM, Joost Schouten (ml)
  wrote:

  Hi,

I have an EventLink that triggers an event method on a component nested in a
form (formA) and returns a Block with in it another form (formB) to update a
zone which is outside formA. Tapestry still complains about formB being
nested in formA. This is probably because of the fact that the component
that renders formB in the Block to be returned lives inside a formA.

Though slightly odd, this seems to me a valid usecase that should be
supported which would mean this is a bug. If I am missing something or am
just asking too much of tapestry, please tell me off :) If not, shall I
submit a bugreport?

Cheers,
Joost

-
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: Block response with form causes nested form exception where this is not the case

2011-07-25 Thread Joost Schouten (ml)
 My appologies. Tapestry was not to blame, it was me who overlooked 
another little form stashed away in a dark corner of my application. Doh!


Joost

On 25/07/11 3:01 PM, Joost Schouten (ml) wrote:

 Hi,

I have an EventLink that triggers an event method on a component 
nested in a form (formA) and returns a Block with in it another form 
(formB) to update a zone which is outside formA. Tapestry still 
complains about formB being nested in formA. This is probably because 
of the fact that the component that renders formB in the Block to be 
returned lives inside a formA.


Though slightly odd, this seems to me a valid usecase that should be 
supported which would mean this is a bug. If I am missing something or 
am just asking too much of tapestry, please tell me off :) If not, 
shall I submit a bugreport?


Cheers,
Joost



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



Block response with form causes nested form exception where this is not the case

2011-07-25 Thread Joost Schouten (ml)

 Hi,

I have an EventLink that triggers an event method on a component nested 
in a form (formA) and returns a Block with in it another form (formB) to 
update a zone which is outside formA. Tapestry still complains about 
formB being nested in formA. This is probably because of the fact that 
the component that renders formB in the Block to be returned lives 
inside a formA.


Though slightly odd, this seems to me a valid usecase that should be 
supported which would mean this is a bug. If I am missing something or 
am just asking too much of tapestry, please tell me off :) If not, shall 
I submit a bugreport?


Cheers,
Joost

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



JSONObject does not like javascript date constructor

2011-06-23 Thread Joost Schouten (ml)

 Hi,

I am not quite sure if this is a limitation of my javascript json 
knoledge or a tapestry one. But When I use google's visulisation package 
to create json representation of a DataTable 
JSONObject.add("jsonDataTable", dataTableJSONString) I get the follwing 
exception (full exception at [1]).


character 239 is found at:
,"rows":[{"c":[{"v":new Date(2011,5THIS IS CHARACTER 239---,23)},,{

It seems like an unescaped date constructor is not recognized as valid 
and it just sees the comma (,) and believes a new parameter should be 
defined. Is this correct JSON behaviour or is this a tapestry bug?


Cheers,
Joost



[1] the exception:
Expected a ':' after a key at character 239 of
{"cols":[{"id":"date","label":"Date","type":"date","pattern":""},{"id":"budget","label":"Spending 
(EUR)","type":"number","pattern":""},{"id":"income","label":"Budget 
(EUR)","type":"number","pattern":""}],"rows":[{"c":[{"v":new 
Date(2011,5,23)},,{"v":100 more of the same..

at org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
at org.apache.tapestry5.json.JSONObject.(JSONObject.java:233)
at 
org.apache.tapestry5.json.JSONTokener.nextValue(JSONTokener.java:272)

at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:142)
at org.apache.tapestry5.json.JSONArray.(JSONArray.java:121)
at 
org.apache.tapestry5.json.JSONTokener.nextValue(JSONTokener.java:275)

at org.apache.tapestry5.json.JSONObject.(JSONObject.java:234)
at 
org.apache.tapestry5.json.JSONTokener.nextValue(JSONTokener.java:272)

at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:142)
at org.apache.tapestry5.json.JSONArray.(JSONArray.java:121)
at 
org.apache.tapestry5.json.JSONTokener.nextValue(JSONTokener.java:275)

at org.apache.tapestry5.json.JSONObject.(JSONObject.java:234)
at org.apache.tapestry5.json.JSONObject.(JSONObject.java:266)
at 
com.jsportal.projectportal.client.http.components.template.CanvasChart.beginRender(CanvasChart.java:123)
at 
com.jsportal.projectportal.client.http.components.template.CanvasChart._$access_beginRender(CanvasChart.java)
at 
com.jsportal.projectportal.client.http.components.template.CanvasChart$MethodAccess_beginRender_130bbe008c9.invoke(CanvasChart$MethodAccess_beginRender_130bbe008c9.java)
at 
org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117)
at 
org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.jsportal.projectportal.client.http.components.template.CanvasChart.beginRender(CanvasChart.java)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:239)
at 
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:176)

... 94 more




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



Re: URL used for localization seems to have locale in path?

2011-06-22 Thread Joost Schouten (ml)
 You have done nothing wrong and this is the way it is supposed to 
work. I believe you can set the locale to be stored in a cookie as well 
in stead of the locale. Though for SEO the locale in de url is generally 
a good option. Have a look at [1]


Are you including css directly in the page using style tags? If so, 
externalizing your css into a seperate css file will solve your issue.


Hope it helps,
Joost

[1] 
http://tapestry.formos.com/nightly/tapestry5/apidocs/org/apache/tapestry5/SymbolConstants.html#ENCODE_LOCALE_INTO_PATH


On 22/06/11 3:12 PM, dkeenan wrote:

Hi there. When using localization to display different template files based
on the locale, it seems to ad the locale to the URL. Is that normal
behaviour?

Eg. I have 2 homepage files... Home_en.tml and Home_fr.tml.

If I set the locale to French, and go to the homepage, if goes to URL
/fr/Home rather than /Home. The problems is that may page uses relative CSS
paths which mean it doesn't display correctly. If I want to share css files
between 2 different templates in this case, it gets a little messy. Does it
look like Ive done something wrong?

Many thanks,

Dave.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/URL-used-for-localization-seems-to-have-locale-in-path-tp4513977p4513977.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: t5c-commons

2011-06-14 Thread Joost Schouten (ml)

 On 14/06/11 5:06 PM, gs_tapestry wrote:

Hi,

I am trying to upgrade to Tapestr5.2.5. But the t5c-commons (5.0.18)
component i am using is not compatible to 5.2.5. My application failed to
start up due to java.lang.NoClassDefFoundError:
org/apache/tapestry5/internal/services/RequestPathOptimizer.

If I remove the Maven dependence on this component. I am able to start my
application. But it will give run time error while using the application.
Research for above error says it's due to multiple Tapestry core is on the
classpath. My understanding is that t5c-commons(5.0.18) is using an internal
class RequestPathOptimizer which no longer existing in Tapestry5.2.5.

Does anyone run into this issue and what's the solution? 5.0.18 seems to be
the latest version of t5c-commons.
I believe t5c-commons is what chenillekit [1] used to be called in the 
5.0.18 days.


Cheers,
Joost

[1] http://chenillekit.codehaus.org/

Thanks,
Simon

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5c-commons-tp4488135p4488135.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: Importing multiple stacks in a formelement extending AbstractField causes a ghost processSubmission

2011-05-31 Thread Joost Schouten (ml)

 On 31/05/11 7:08 PM, Josh Canfield wrote:

If you create a stack with a noop script in it, do you get the same behavior?
I need to have another go at this to understand it better. It also only 
seemed to occur when in a zone after zone update. I'll get back to this 
once my missed deadline due to this problem has been met ;-)


Cheers,
Joost

On Tue, May 31, 2011 at 6:42 AM, Joost Schouten (ml)
  wrote:

  Hi,

I took the tapx datefield component as a base and altered it somewhat to my
own needs. One of those was to add two javascript stacks I use @Import(stack
= {CommonBaseStack.STACK_NAME, DateFieldStackV2.STACK_NAME})

It has taken me most of the day to figure out that this was the cause of the
validation being called twice on formsubmit. Once with the correct input id,
and one with a non existing input id. So if you set the validation to
required validation will always fail as the nonexisting field obviously will
always be null.

It seems like adding multiple stacks will for some reason add two
processSubmission actions to the form. My understanding of the form handling
at this level is not deep enough, but this smells like a bug. Can anyone
shed their light on this issue?

Adding one of the stacks to the other and just importing one into my
component fixes the problem. But shouldn't be importing multiple stacks be
possible?

Cheers,
Joost

-
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



Importing multiple stacks in a formelement extending AbstractField causes a ghost processSubmission

2011-05-31 Thread Joost Schouten (ml)

 Hi,

I took the tapx datefield component as a base and altered it somewhat to 
my own needs. One of those was to add two javascript stacks I use 
@Import(stack = {CommonBaseStack.STACK_NAME, DateFieldStackV2.STACK_NAME})


It has taken me most of the day to figure out that this was the cause of 
the validation being called twice on formsubmit. Once with the correct 
input id, and one with a non existing input id. So if you set the 
validation to required validation will always fail as the nonexisting 
field obviously will always be null.


It seems like adding multiple stacks will for some reason add two 
processSubmission actions to the form. My understanding of the form 
handling at this level is not deep enough, but this smells like a bug. 
Can anyone shed their light on this issue?


Adding one of the stacks to the other and just importing one into my 
component fixes the problem. But shouldn't be importing multiple stacks 
be possible?


Cheers,
Joost

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



Re: File download breaks ajax zone manager

2011-05-31 Thread Joost Schouten (ml)
 Thanks for the JIRA reference to the other tickets already open on 
this topic. For the record, until this is fixed I created a workaround 
where my downloads open in a new window (target="_blank"). The only 
downfall here is that some browsers end up with an empty screen. Better 
than a non functioning page though.


Cheers,
Joost

On 28/05/11 4:28 PM, Josh Canfield wrote:

If I recall correctly this is because the browser calls the unload event so
tapestry does some cleanup.

There may already be an issue filed,but if there isn't there should be.
On May 28, 2011 6:22 AM, "Joost Schouten (ml)"
wrote:

Hi,

When downloading a file from a tapestry page that gets saved to disk and
not opened in the window, it seems to break the zonemanagers on the
page. Any Ajax request after the file download and before the next
pagerefresh fails. The response is correct, it is just not handled
correctly. Once the page is refreshed all is fine again.

Has anyone else seen this problem and potentially found a solution?

Cheers,
Joost

PS: I'm using Tap 5.2.5

-
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: File download breaks ajax zone manager

2011-05-28 Thread Joost Schouten (ml)
 That sounds like a reasonable explenation. I've added 
https://issues.apache.org/jira/browse/TAP5-1533 as I could not find a 
ticket describing this issue.


On 28/05/11 4:28 PM, Josh Canfield wrote:

If I recall correctly this is because the browser calls the unload event so
tapestry does some cleanup.

There may already be an issue filed,but if there isn't there should be.
On May 28, 2011 6:22 AM, "Joost Schouten (ml)"
wrote:

Hi,

When downloading a file from a tapestry page that gets saved to disk and
not opened in the window, it seems to break the zonemanagers on the
page. Any Ajax request after the file download and before the next
pagerefresh fails. The response is correct, it is just not handled
correctly. Once the page is refreshed all is fine again.

Has anyone else seen this problem and potentially found a solution?

Cheers,
Joost

PS: I'm using Tap 5.2.5

-
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 Prevent user from multiple login

2011-05-28 Thread Joost Schouten (ml)
 What do you mean? Multiple logins at the same time from different 
browsers/machines? If so, you could associate the user with the 
sessionId the user logged in with (in memory or persisted). If the same 
user now logs in with a different sessionId invalidate the first one or 
disalow login on the second request.


Cheers,
Joost

On 28/05/11 3:16 PM, Denoite wrote:

Hi!

I would like to prevent users from login in multiple times at a time.
Is there a simple way to do that wit T5?

Thanks a lot.

Jo

-
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



File download breaks ajax zone manager

2011-05-28 Thread Joost Schouten (ml)

 Hi,

When downloading a file from a tapestry page that gets saved to disk and 
not opened in the window, it seems to break the zonemanagers on the 
page. Any Ajax request after the file download and before the next 
pagerefresh fails. The response is correct, it is just not handled 
correctly. Once the page is refreshed all is fine again.


Has anyone else seen this problem and potentially found a solution?

Cheers,
Joost

PS: I'm using Tap 5.2.5

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



Re: [T5.2.5] Ajax redirectURL does not work when invoked though ComponentRequestFilter

2011-05-27 Thread Joost Schouten (ml)
 My bad. My own code was generating this response from a dark little 
neglected corner.


On 23/05/11 11:12 AM, Joost Schouten (ml) wrote:

 Hi,

When an AJAX event handler method returns a Page the following 
response is generated which nicely redirects me to the page.


{
  "redirectURL" : 
"/jsportal-projectportal-client-tapestry/nl/secured/project/overview/3603"

}

When the same is generated though the process of the 
ComponentRequestFilter [1] this response is generated which does not 
work.


{'redirectURL':'https://localhost:8443/jsportal-projectportal-client-tapestry/nl/login'} 



When debuging the the javascript the reply is null but I can't seem to 
find why this is. Does anyone have any idea why this stopped working?


Thanks,
Joost



[1] part of my ComponentRequestFilter:

public void handleComponentEvent(ComponentEventRequestParameters 
parameters,
 ComponentRequestHandler handler) 
throws IOException {

...

String loginPage = 
componentClassResolver.resolvePageClassNameToPageName(logonService.getLogonPage().getName());


event = new ComponentEventRequestParameters(loginPage,
loginPage, "", EventConstants.ACTIVATE, 
emptyEventContext, emptyEventContext);

...

handler.handleComponentEvent(event);
}
}



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



Printing Grid table thead on empty source

2011-05-23 Thread Joost Schouten (ml)

 Hi,

It seems not to be possible to just print the Grid thead when the grid 
source is empty. Is this correct? And if so, can we not just introduce 
it as an option in the empty parameter as eg. block:thead


Cheers,
Joost

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



[T5.2.5] Ajax redirectURL does not work when invoked though ComponentRequestFilter

2011-05-23 Thread Joost Schouten (ml)

 Hi,

When an AJAX event handler method returns a Page the following response 
is generated which nicely redirects me to the page.


{
  "redirectURL" : 
"/jsportal-projectportal-client-tapestry/nl/secured/project/overview/3603"

}

When the same is generated though the process of the 
ComponentRequestFilter [1] this response is generated which does not work.


{'redirectURL':'https://localhost:8443/jsportal-projectportal-client-tapestry/nl/login'}

When debuging the the javascript the reply is null but I can't seem to 
find why this is. Does anyone have any idea why this stopped working?


Thanks,
Joost



[1] part of my ComponentRequestFilter:

public void handleComponentEvent(ComponentEventRequestParameters parameters,
 ComponentRequestHandler handler) 
throws IOException {

...

String loginPage = 
componentClassResolver.resolvePageClassNameToPageName(logonService.getLogonPage().getName());


event = new ComponentEventRequestParameters(loginPage,
loginPage, "", EventConstants.ACTIVATE, 
emptyEventContext, emptyEventContext);

...

handler.handleComponentEvent(event);
}
}

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



Re: Hyperlink not becoming hyperlink

2011-05-17 Thread Joost Schouten (ml)
 There is no logical relationship between the link and the Grid. I 
guess you want to display a link in one of your tabel cells right?


if so, you need to add this in your grid:



link



assuming that your component/page has a property getUrl() returning the url as 
a String.

by defining...  
you overwrite the default markup that tapestry generates for your table cell. Readup on the 
documentation as all of this is covered there eg: 
http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html


Cheers,
Joost




On 17/05/11 5:03 PM, TG wrote:

Thanks for the prompt response. Actually I meant url as part of tapestry grid
component. So I tried this -

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";
xmlns:p="tapestry:parameter">
...

...

${url.endpoint} Link

...

and it does not work. Any idea how to make the endpoint clickable URL
automagically?

Thanks.



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Hyperlink-not-becoming-hyperlink-tp4403607p4403743.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: Using iframe to include a T5 page

2011-05-09 Thread Joost Schouten (ml)
 adding target="_top" top your form will cause problems on form 
validation as also a failed submit will end up in _top. Sounds like you 
should return a block/page (http://localhost/A2/doneFormPageB/) that 
redirects the location of _top though javascript to 
http://localhost/A1/done/.


Cheers,
Joost

On 9/05/11 4:48 AM, Angelo C. wrote:

Hi,

This seems not too much related to T5, sorry. here is my situation:

two t5 applications, A1 and A2, A1's pageA use iframe to include A2's pageB,
and the pageB onSuccess returns new URL("http://localhost/A1/done/";);

this works, the only problem is, after returning from A2,
http://localhost/A1/done/ will be inside the PageA's iframe, I'd like to
just go to A1/done page, any idea how to do this?

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Using-iframe-to-include-a-T5-page-tp4380972p4380972.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: Chenillekit Editor component doesn't work after upgrading from 5.1.0.5 to 5.1.0.8-SNAPSHOT

2011-05-09 Thread Joost Schouten (ml)

 On 9/05/11 5:43 AM, Jeshurun Daniel wrote:

Ok, I fiddled with this for two whole days, did a whole bunch of stuff,
and couldn't figure it out. Finally after I had sent out this email, I was
reading the 5.2 docs and had an idea when reading the section on
securing assets from this page:

http://tapestry.formos.com/nightly/tapestry5/guide/assets.html



Long story short, I added this contribution to my AppModule and that seems to 
have fixed the issue:

 public static void contributeRegexAuthorizer(Configuration  
configuration)

   {

 String pattern = 
"([^/.]+/)*[^/.]+\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif)|(html)|(xml))$";

 configuration.add("^org/chenillekit/tapestry/core/" + pattern);

   }



Now, this brings up another question. Does this mean I have to add
similar contributions for all other component library jars, because all
of them are for Tapestry 5.1. I am not sure what else is broken at this
point, as I am yet to do my full test.
No, just change the pattern to be a bit more greedy by removing the 
"org/chenillekit/tapestry/core/" part. But only, if you wish to open up 
all files with the extensions 
(css)|(js)|(jpg)|(jpeg)|(png)|(gif)|(html)|(xml). Tapestry 5.2 reverted 
this system of very eager protection though. So an upgrade on your 
tapestry version to 5.2 would also solve your issue.


Cheers,
Joost




Anyways, thanks to anyone who looked at this.



--- On Sun, 5/8/11, Jeshurun Daniel  wrote:

From: Jeshurun Daniel
Subject: Chenillekit Editor component doesn't work after upgrading from 5.1.0.5 
to 5.1.0.8-SNAPSHOT
To: users@tapestry.apache.org
Received: Sunday, May 8, 2011, 9:32 PM

Hi Everyone,

I
  recently upgraded an application from Tapestry version 5.1.0.5 to
5.1.0.8, primarily to address a bug with the ajax form loop. But ever
since the upgrade, chenillekit's editor component has stopped working.
At the place where the component is rendered (via an iframe) is a Tomcat
  404 error page.

I noticed that the rendered url for the src attribute of the frame under both 
versions is:
https://localhost:8443/appname/assets/classpath/1.2.1/org/chenillekit/tapestry/core/components/fckeditor/editor/fckeditor.html?InstanceName=editor1&Toolbar=Default
Under 5.1.0.5, this returns the asset, wheras in 5.1.0.8 this comes up with 
Tomcat's 404 page.


By upgrading, I mean that I replaced the following jar files with their 
corresponding version in 5.1.0.8:
tapestry5-annotations-5.1.0.8.jar
tapestry-core-5.1.0.8.jar
tapestry-ioc-5.1.0.8.jar
tapestry-spring-5.1.0.8.jar
tapestry-test-5.1.0.8.jar
tapestry-upload-5.1.0.8.jar
I am not using Maven, and using it is presently not an option for us.

I
  am not very familiar with the internal workings of Tapestry, and have
been struggling with this problem for over two days now.

Any suggestions will be much appreciated!

Thanks,
Jeshurun




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



Re: @Persist vs @Retain

2011-05-06 Thread Joost Schouten (mailing lists)
>From the @Retain javadoc:

 * Marker annotation placed on fields whose value should be retained
past the end of the request. This is most often
 * associated with fields that are lazily loaded. By marking
such fields with the Retain annotation, the fields
 * will not be discarded at the end of the request.
 * 
 * This is quite different from {@link Persist}, because the value
that's allowed to be retained is not stored
 * persistently; it is simply not cleared out. A subsequent request,
even from the same user, may be processed by a
 * different instance of the page where the value is still null.

It is deprecated though, so I would stear clear of using it.

Cheers,
Joost

On Fri, May 6, 2011 at 9:18 AM, Josh Kamau  wrote:
> Hi Team,
>
> Whats the difference between @Persist and @Retain ?
>
> Regards.
> Josh
>

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



Re: What would YOU like to see in a four day Tapestry training course?

2011-05-03 Thread Joost Schouten (ml)

 In my early days I would have liked someone to have emphasized:

- onActivate and onPassivate so I would have stuffed less into my sessions.
- How components can interact with their containers and @Environmental 
services. I initially ended up building components that needed to know 
too much about their containers.
- the power of Block's and how they are great for passing as parameters 
and page/component buildups. How they can elminiate the need for 
template t:if tags when used with delegate's
- And how easy it is to build a @Inject'able tapestry service to wrap 
your legacy code. A new user might be a bit put off when confronted with 
tapestry-hibernate, tapestry-security if they already have all this in 
place in spring or something else.


Good luck,
Joost


On 2/05/11 7:10 PM, Howard Lewis Ship wrote:

I'm planning on rewriting my Tapestry training materials for Tapestry
5.3, once it is stable.  As

It will still be a four day course, but I want to change the approach
and emphasis.  As always, I try to balance the needs of Tapestry (and
even Java Web Developer) new comers with the desire to keep it useful
and interesting for Tapestry journeymen and masters.

Think back to when you were first learning Tapestry 5 ... what kinds
of things would have made the biggest difference in your first few
days using Tapestry?

... and, BTW, my current course still really rocks and my next public
teach is coming up in London, starting July on 26:
http://skillsmatter.com/course/java-jee/tapestry-web-development




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



Re: How to locate streamresponse of jasper in a page ?

2011-03-29 Thread Joost Schouten (ml)
 If you want to do this well cross browser, generate an image from your 
pdf and display that in your web-app. IText [1] can help you achieve this.


Good luck,
Joost

[1] http://sourceforge.net/projects/itext/

On 29/03/11 9:08 AM, ronizedsynch wrote:

Thank ael,

Does pdf display within new tab ?
I want to locate streamresponse of button Submit in this case is pdf display
as look as above picture.. when I using JRPdfExporter, its response is open
new tab in my browser..

Thanks&Regards
Rony

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-locate-streamresponse-of-jasper-in-a-page-with-screenshot-tp4258880p4268898.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: Missing Asset causes Exception where 404 would be more appropriate

2011-03-16 Thread Joost Schouten (ml)

 On 16/03/11 10:58 AM, Ulrich Stärk wrote:

Indeed. We should handle stack assets the same as context and classpath assets 
where we DO issue a
404 not found. Please file an issue.

Uli


Ah! Didn't even know we already did do 404's on the other assets. Issue 
filed at: https://issues.apache.org/jira/browse/TAP5-1477


Cheers,
Joost


On 16.03.2011 09:02, Joost Schouten (ml) wrote:


Hi,

I have a bunch of robots crawling my assets folder and trying all sorts of 
requests to see if they
can find holes in my app (example at [1]). Since the assets don't exist I get 
the following
exception [2]. Would it not make more sence in this case to just return a 404 
in stead? Would keep
my error logs a lot cleaner :)

I am sure I can achieve this by decorating a service but maybe people agree 
that this could be part
of the core? Any thoughts?

Cheers,
Joost

[1]:http://www.yanomo.com/assets/1.0.17/stack/en/application/x-www-form-urlencoded

[2]:
java.lang.RuntimeException: Invalid path for a stack asset request.
 at
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.assembleStackContent(StackAssetRequestHandler.java:156)

 at
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getUncompressedStream(StackAssetRequestHandler.java:144)

 at
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getCompressedStream(StackAssetRequestHandler.java:130)

 at
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getStream(StackAssetRequestHandler.java:121)

 at
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.handleAssetRequest(StackAssetRequestHandler.java:84)

 at 
org.apache.tapestry5.internal.services.AssetDispatcher.dispatch(AssetDispatcher.java:80)
 at $Dispatcher_12eb55c013f.dispatch($Dispatcher_12eb55c013f.java)
 at $Dispatcher_12eb55c0146.dispatch($Dispatcher_12eb55c0146.java)
 at $Dispatcher_12eb55c0137.dispatch($Dispatcher_12eb55c0137.java)
 at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
 at 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at 
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at 
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at
com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:91)

 at $RequestFilter_12eb55c0132.service($RequestFilter_12eb55c0132.java)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at
com.joostschouten.common.http.tapestrybase.services.PersistLocaleRequestFilter.service(PersistLocaleRequestFilter.java:53)

 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
 at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
 at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
 at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
 at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
 at $RequestHandler_12eb55c012c.service($RequestHandler_12eb55c012c.java)
 at
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)

 at
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)

 at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
 at 
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
 at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
 at 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
 at 
$HttpServletRequestFilter_12eb55c012a.service($HttpServletRequestFilter_12eb55c012a.java)
 at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
 at 
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
 at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
 at 
$HttpServletRequestHandler_12eb55c0128.service($HttpServletRequestHandler_1

Missing Asset causes Exception where 404 would be more appropriate

2011-03-16 Thread Joost Schouten (ml)



Hi,

I have a bunch of robots crawling my assets folder and trying all sorts of 
requests to see if they can find holes in my app (example at [1]). Since the 
assets don't exist I get the following exception [2]. Would it not make more 
sence in this case to just return a 404 in stead? Would keep my error logs a 
lot cleaner :)

I am sure I can achieve this by decorating a service but maybe people agree 
that this could be part of the core? Any thoughts?

Cheers,
Joost

[1]:http://www.yanomo.com/assets/1.0.17/stack/en/application/x-www-form-urlencoded

[2]:
java.lang.RuntimeException: Invalid path for a stack asset request.
at 
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.assembleStackContent(StackAssetRequestHandler.java:156)
at 
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getUncompressedStream(StackAssetRequestHandler.java:144)
at 
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getCompressedStream(StackAssetRequestHandler.java:130)
at 
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.getStream(StackAssetRequestHandler.java:121)
at 
org.apache.tapestry5.internal.services.assets.StackAssetRequestHandler.handleAssetRequest(StackAssetRequestHandler.java:84)
at 
org.apache.tapestry5.internal.services.AssetDispatcher.dispatch(AssetDispatcher.java:80)
at $Dispatcher_12eb55c013f.dispatch($Dispatcher_12eb55c013f.java)
at $Dispatcher_12eb55c0146.dispatch($Dispatcher_12eb55c0146.java)
at $Dispatcher_12eb55c0137.dispatch($Dispatcher_12eb55c0137.java)
at 
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
at 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
com.joostschouten.common.http.tapestrybase.services.TransactionFilter.service(TransactionFilter.java:91)
at $RequestFilter_12eb55c0132.service($RequestFilter_12eb55c0132.java)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
com.joostschouten.common.http.tapestrybase.services.PersistLocaleRequestFilter.service(PersistLocaleRequestFilter.java:53)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
at $RequestHandler_12eb55c0138.service($RequestHandler_12eb55c0138.java)
at $RequestHandler_12eb55c012c.service($RequestHandler_12eb55c012c.java)
at 
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
at
org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
at 
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
at 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at 
$HttpServletRequestFilter_12eb55c012a.service($HttpServletRequestFilter_12eb55c012a.java)
at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
at 
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
at 
$HttpServletRequestHandler_12eb55c012e.service($HttpServletRequestHandler_12eb55c012e.java)
at 
$HttpServletRequestHandler_12eb55c0128.service($HttpServletRequestHandler_12eb55c0128.java)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(Ap

Re: Disabling sort in Grid forces property names being java coded?

2011-02-26 Thread Joost Schouten (mailing lists)
You can use what you posted below but you can also do the following
which just shows a few ways to add and modify columns:

public BeanModel getUnsortableBeanModel() {

   BeanModel model =
beanModelSource.createDisplayModel(YourModel.class, messages);

   model.include("sortableColumn", "nonSortableColumn");

model.add(RelativePosition.BEFORE, "sortableColumn", "anotherNonSortable")
.label("label")
.sortable(false);

model.get("nonSortableColumn")
.sortable(false);

return model;
}

Hope it helps,
Joost

2011/2/26 Vjeran Marcinko :
> Hello,
>
> I want to create Grid with sorting disabled, similar to T4 grid usage with
> exclamation mark for sort disabling:
> "!username,!age, !creationTime"
> Property names are best specified in template, naturally.
>
> I heard somewhere that in order to achive that little thing in T5.2 I need
> to add to my java code following piece of code:
>
> @Inject private BeanModelSource beanModelSource;
>
>
>
> @Inject private Messages messages;
>
>
>
> public BeanModel getUnsortableBeanModel() {
>
>   BeanModel model = beanModelSource.createDisplayModel(YourModel.class,
> messages);
>
>   for (String propName : model.getPropertyNames()) { PropertyModel propModel
> = model.get(propName);
>
>   propModel.sortable(false);
>
>   }
>
> }
>
>
> And not only that, it also means that I cannot specify anymore my property
> names using Grid's "add" parameter since it works only with non-explicitly
> provided grid model.
>
> Is this all true?
>
> I hope that's not hte case, but if yes, has someone used only GripPager
> somehow to use only paging without sorting?
>
> Regards,
> Vjeran
>
>
> -
> 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: Access displayed rows of grid component in page

2011-02-21 Thread Joost Schouten (ml)
 I have a few places where I do this sort of thing. Preferable I wrap 
the original value obtained from my DAO in the GridDataSource right 
after obtaining it. Where the wrapper does the further initilization 
required. If that is not an option, you can always do the wrapping in 
@SetupRender and pass a List of Wrapped objects to the Grid.


Hope it helps,
Joost

On 21/02/11 11:46 AM, Timo Westkämper wrote:

Hi.

I have my own GridDataSource for that, but I want to extend the data 
fetched by the GridDataSource.


I can see the following options for that.

* lazily init reference data by using the objects return from 
dataSource.getRowValue(0) to 
dataSource.getRowValue(grid.getRowsPerPage() -1)


* add a listener to dataSource.prepare which initializes the reference 
data


For the first approach I couldn't find a proper page lifecycle hook to 
do it and the second approach means lots of work.


Is there really no better approach?

Br,
Timo Westkämper

On 02/21/2011 11:35 AM, Joost Schouten (ml) wrote:

 Hi,


I assume that I can use Grid.getCurrentPage() and 
Grid.getRowsPerPage() for that.
Correct, but even better would be to implement your own 
GridDataSource since then you can do all the data fetching and 
preperations in one go. Your own GridDataSource forms the source 
@Parameter for the Grid.


Cheers,
Joost

-
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: Access displayed rows of grid component in page

2011-02-21 Thread Joost Schouten (ml)

 Hi,


I assume that I can use Grid.getCurrentPage() and 
Grid.getRowsPerPage() for that.
Correct, but even better would be to implement your own GridDataSource 
since then you can do all the data fetching and preperations in one go. 
Your own GridDataSource forms the source @Parameter for the Grid.


Cheers,
Joost

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



Re: t5: clear cookie when browser closes

2011-02-11 Thread Joost Schouten (ml)
 From the Cookie javadoc at 
http://download.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge(int):



 setMaxAge

public void*setMaxAge*(int expiry)

   Sets the maximum age in seconds for this Cookie.

   A positive value indicates that the cookie will expire after that
   many seconds have passed. Note that the value is the /maximum/ age
   when the cookie will expire, not the cookie's current age.

   A negative value means that the cookie is not stored persistently
   and will be deleted when the Web browser exits. A zero value causes
   the cookie to be deleted.

   *Parameters:*
   |expiry| - an integer specifying the maximum age of the cookie
   in seconds; if negative, means the cookie is not stored; if
   zero, deletes the cookie
   *See Also:*
   |getMaxAge()|
   


Cheers,
Joost


On 11/02/11 4:37 AM, Angelo C. wrote:

Hi,
I'd like to write a cookie to the browser and it will be cleared when
browser closes, possible? thanks,
A.C.



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



Re: Noticed another stackoverflow question on Tapestry 5, go vote

2011-02-09 Thread Joost Schouten (ml)
 Same here. Using many Datasources. I even would say as much that 
tapestry caters really well for this as it allowed me through the use of 
a few simple custom services to inject my DAO's without ever having to 
worry about using the correct DS.


I don't use tap-hibernate as I prefer to completely seperate my 
persistance from presentation. I personally don't like the thought of 
having to change my presentation tier (tapestry) if we choose to use a 
different persistance tier.


my 2 cents,
Joost

On 9/02/11 3:08 PM, Newham, Cameron wrote:

Bit of an odd statement!

I'm using Hibernate with Spring and Tapestry and you can use multiple
data sources with that solution. No hacking involved.

I never have used Tapestry-Hibernate.



-Original Message-
From: antalk [mailto:ant...@intercommit.nl]
Sent: 09 February 2011 08:32
To: users@tapestry.apache.org
Subject: Re: Noticed another stackoverflow question on Tapestry 5, go
vote


True,

But they have forgotten to ask if the original poster wants to use
multiple
databases, if so i wouldn't encourage using Tapestry (sigh).

For me this is one of the biggest letdown's , i have written 2 apps in
Tap
5.2 who both require access to multiple datasources, but the inability
to
use multiple databases (through tap-hibernate) has required me to do
some
hacking around to get this working.

If i knew this beforehand i dont think i had choosen Tapestry..

On the other hand i think the framework is great and provides me with
enough
flexibilty to do what i want to do.



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



Re: StackOverflowError due to unexpected default property binding to itself

2011-02-06 Thread Joost Schouten (ml)

 On 6/02/11 1:55 PM, Igor Drobiazko wrote:

We should definitely forbid to bind a parameter to itself. Can you pleas
fill a JIRA issue?

just added: https://issues.apache.org/jira/browse/TAP5-1430

cheers,
Joost

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



StackOverflowError due to unexpected default property binding to itself

2011-02-05 Thread Joost Schouten (mailing lists)
Hi,

I had the following:

@Property
@Parameter(value="actionZone")
private String actionZone;

which caused the exception at [2]. I would not expect this behaviour
based on the documentation at [1] and am wondering if I should file a
bug report. The situation probably won't happen a lot and in all
honesty having the default value for a property the same as my
property name does not deserve beauty prize. Though still I have
provided the default "value" for a String parameter which should have
a default literal binding and thus do not expect the generated
getActionZone() method to be invoked. (Hence the StackOverflowError).

My quick fix was to change it to:

@Property
@Parameter(value="literal:actionZone")
private String actionZone;

But I do believe there is nothing wrong with my first option. And if
Tapesty is clever enough to change the default binding if it finds a
property by that name maybe an Exception should be thrown in the case
that the default is bound to itself.

Cheers,
Joost



[1] http://tapestry.apache.org/tapestry5/guide/parameters.html

[2]: the exception:


java.lang.StackOverflowError
at 
org.apache.tapestry5.internal.transform.PropertyWorker$2.advise(PropertyWorker.java:100)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable.getActionZone(TimeExpenseTable.java)
at $PropertyConduit_12df355dff1.get($PropertyConduit_12df355dff1.java)
at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:314)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:413)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$get_actionZone(TimeExpenseTable.java)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$readaccess_actionZone(TimeExpenseTable.java)
at $FieldAccess_12df355dfd9.read($FieldAccess_12df355dfd9.java)
at 
org.apache.tapestry5.internal.services.DelegateFieldAccess.read(DelegateFieldAccess.java:38)
at 
org.apache.tapestry5.internal.transform.PropertyWorker$2.advise(PropertyWorker.java:100)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable.getActionZone(TimeExpenseTable.java)
at $PropertyConduit_12df355dff1.get($PropertyConduit_12df355dff1.java)
at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:314)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:413)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$get_actionZone(TimeExpenseTable.java)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$readaccess_actionZone(TimeExpenseTable.java)
at $FieldAccess_12df355dfd9.read($FieldAccess_12df355dfd9.java)
at 
org.apache.tapestry5.internal.services.DelegateFieldAccess.read(DelegateFieldAccess.java:38)
at 
org.apache.tapestry5.internal.transform.PropertyWorker$2.advise(PropertyWorker.java:100)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable.getActionZone(TimeExpenseTable.java)
at $PropertyConduit_12df355dff1.get($PropertyConduit_12df355dff1.java)
at 
org.apache.tapestry5.internal.bindings.PropBinding.get(PropBinding.java:59)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.readFromBinding(ParameterWorker.java:314)
at 
org.apache.tapestry5.internal.transform.ParameterWorker$2$1.get(ParameterWorker.java:413)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$get_actionZone(TimeExpenseTable.java)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable._$readaccess_actionZone(TimeExpenseTable.java)
at $FieldAccess_12df355dfd9.read($FieldAccess_12df355dfd9.java)
at 
org.apache.tapestry5.internal.services.DelegateFieldAccess.read(DelegateFieldAccess.java:38)
at 
org.apache.tapestry5.internal.transform.PropertyWorker$2.advise(PropertyWorker.java:100)
at 
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at 
com.jsportal.projectportal.client.http.components.table.TimeExpenseTable.getActionZone(TimeExpenseTa

Re: FCKEditor/ChenilleKit Editor and zoneupdate mixin

2011-01-26 Thread Joost Schouten (ml)

 Hi,

The issue was reported for version 1.2.0 but is still relevant. The 
patch works with 1.3.1-SNAPSHOT which is the current trunk, but has not 
been included in the trunk or release (yet).  You would have to get the 
source [1], apply the patch and build yourself.


Hope it helps,
Joost

[1]: http://svn.codehaus.org/chenillekit/trunk/

On 26/01/11 8:18 AM, jeczmien wrote:

That patch is for version 1.2. As I remember chenillekit has new 1.3 version.
Is this patch merged with new version?




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



Re: FCKEditor/ChenilleKit Editor and zoneupdate mixin

2011-01-25 Thread Joost Schouten (ml)
 Change events are only fired from form elements when they are changed 
(often onblur). FCKEditor is not a form element but updates the hidden 
form element it uses to store the actual content on form submit (I 
believe). On top of that, chenillekit Editor does not yet support AJAX 
and will not set it's value in the underlying hidden field on AJAX 
submits. Have a look at: http://jira.codehaus.org/browse/CHEN-2. The 
patch I suggested there might fix your problem. (Though the change event 
would only be fired on form submit)


If you like the patch vote for the issue ;-)

Cheers,
Joost

On 25/01/11 1:38 PM, jeczmien wrote:

Hi.
I have problem with FCKEditor (wrapped by chenillekit Editor component) with
zoneupdater mixin.
It doesnt issue "change" clientEvent.
Can anyone tell me how to use it with zoneupdater?
Or if there is another rich text component which can be used with
zoneupdate.

Best regards.




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



Re: Dynamic Layout

2011-01-23 Thread Joost Schouten (mailing lists)
Hi,

What does "page is in error" mean? Actual Exception on your page? Form
validation problem? And please post the code of your condition
(isCondition()) as that will most likely be the problem. Or if you are
using a zone (AJAX) your layout will not be reloded either. On a
normal page request your code should work so the problem lies
somewhere else.

Cheers,
Joost

On Sun, Jan 23, 2011 at 5:18 PM, Gnu Ubuntu  wrote:
> Hi,
> I need to apply an if condition in the  in a layout component.
> In my layout I want to do :
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
>    
>        Error in Page title
>    
>    ...
>
> So I can get the information that current page is in error
> (information stored in session),
> but I seem that Tapestry don't reload Layout. So even if my page is in
> error my IF is not verifiyed.
>
> How can I tell Tapestry to reload layout page ?
>
> thanks in advance.
>

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



Re: Create a component event link for another page

2011-01-21 Thread Joost Schouten (ml)
 I am not quite sure what that means but you can always generate the 
links completely manually.


http://www.yourdomain.com/yourApp/yourPage:yourEvent/eventContextIfNeeded?t:ac=pageActivationContextIfNeeded

Cheers,
Joost

On 21/01/11 12:08 PM, Markus Feindler wrote:

Thanks, but this won't work for me, cause Im using the portletbridge which
creates a RenderUrl for pagelinks instead of ActionUrls.



 Original-Nachricht 
Datum: Fri, 21 Jan 2011 11:34:54 +0100
Von: "Joost Schouten (ml)"
An: Tapestry users
Betreff: Re: Create a component event link for another page

 You can create a normal pagelink with PageRenderLinkSource
and
manually add the event name. Like so:

Link link =
pageRenderLinkSource.createPageRenderLink(YourOtherPage.class);
return link.toRedirectURI() + ":yourEventName";

Add context is required
return link.toRedirectURI() + ":yourEventName/contextValue";

There might be a service for it somewhere but not much that can go wrong
here ;-)

Cheers,
Joost

On 21/01/11 11:22 AM, Markus Feindler wrote:

No, I do not want to send a redirect in my Event Link to a different

page.

I want to create an Event Link on Page1, which is handled directly /
triggers the event in Page2.


 Original-Nachricht 
Datum: Fri, 21 Jan 2011 11:12:18 +0100
Von: Alberto Almagro
An: Tapestry users
Betreff: Re: Create a component event link for another page

  Maybe this can help?




http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/eventlinks

Alberto

2011/1/21 Markus Feindler:

Hi,

how to create a Component Event Link for a different page?

This is not a suitable solution for my problem:
http://www.mail-archive.com/users@tapestry.apache.org/msg36825.html

Best Regards
Markus


--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl


-
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: Create a component event link for another page

2011-01-21 Thread Joost Schouten (ml)

 oops:

"Add context *is* required"

should be

"Add context *if* required"

On 21/01/11 11:34 AM, Joost Schouten (ml) wrote:
 You can create a normal pagelink with PageRenderLinkSource and 
manually add the event name. Like so:


Link link = 
pageRenderLinkSource.createPageRenderLink(YourOtherPage.class);

return link.toRedirectURI() + ":yourEventName";

Add context is required
return link.toRedirectURI() + ":yourEventName/contextValue";

There might be a service for it somewhere but not much that can go 
wrong here ;-)


Cheers,
Joost

On 21/01/11 11:22 AM, Markus Feindler wrote:
No, I do not want to send a redirect in my Event Link to a different 
page.

I want to create an Event Link on Page1, which is handled directly /
triggers the event in Page2.



 Original-Nachricht 
Datum: Fri, 21 Jan 2011 11:12:18 +0100
Von: Alberto Almagro
An: Tapestry users
Betreff: Re: Create a component event link for another page

 Maybe this can help?


http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/eventlinks 



Alberto

2011/1/21 Markus Feindler:

Hi,

how to create a Component Event Link for a different page?

This is not a suitable solution for my problem:
http://www.mail-archive.com/users@tapestry.apache.org/msg36825.html

Best Regards
Markus


--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl


-
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: Create a component event link for another page

2011-01-21 Thread Joost Schouten (ml)
 You can create a normal pagelink with PageRenderLinkSource and 
manually add the event name. Like so:


Link link = pageRenderLinkSource.createPageRenderLink(YourOtherPage.class);
return link.toRedirectURI() + ":yourEventName";

Add context is required
return link.toRedirectURI() + ":yourEventName/contextValue";

There might be a service for it somewhere but not much that can go wrong 
here ;-)


Cheers,
Joost

On 21/01/11 11:22 AM, Markus Feindler wrote:

No, I do not want to send a redirect in my Event Link to a different page.
I want to create an Event Link on Page1, which is handled directly /
triggers the event in Page2.



 Original-Nachricht 
Datum: Fri, 21 Jan 2011 11:12:18 +0100
Von: Alberto Almagro
An: Tapestry users
Betreff: Re: Create a component event link for another page

 Maybe this can help?


http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/eventlinks

Alberto

2011/1/21 Markus Feindler:

Hi,

how to create a Component Event Link for a different page?

This is not a suitable solution for my problem:
http://www.mail-archive.com/users@tapestry.apache.org/msg36825.html

Best Regards
Markus


--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl


-
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: HTML Ajax components package for Tapestry

2011-01-21 Thread Joost Schouten (ml)
 More examples at: http://jumpstart.doublenegative.com.au/jumpstart/

Cheers,
Joost

On 21/01/11 9:54 AM, Taha Hafeez wrote:
> Hi
>
> You may find some here http://www.chenillekit.org/. Demo is
> http://www.chenillekit.org/demo/tapcomp
>
> regards
> Taha
>
>
> 2011/1/21 Gavin Lei 
>
>> Hi guys,
>>
>> Recently, i want to develop a tapestry based Web2.0 application. So, i want
>> to know that where there are some projects which supply HTML components
>> with
>> Ajax features for Taperstry? Such as Auto-complete tapestry component ? If
>> there are some famous project, i think we can use these components
>> directly,
>> it will save us much time.
>>
>> So, helping replies from your guys, thank you :-)
>>
>> --
>> -
>> Best Regards
>> Gavin Lei (雷银)
>> Email: gavingui2...@gmail.com
>>


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



Re: CSS not applied on zone update in IE7

2011-01-19 Thread Joost Schouten (ml)
 Ok, 2 days of testing later I think I know what's going on. The 
problems arise when there are a lot of css files loaded on page load. I 
have a complex page with lots of components which loads about 26 css 
files. On ajax zone update the new css files associated with the loaded 
content will be added to the HEAD, but the rules will not be applied. IE 
developer tools does not show them as available under the CSS tab 
either. Once I reduce the number of css files loaded on page load under 
25, it starts to work again. This is both the case under IE8 and IE7.


The good news is that I now have a pressing reason to optimise the 
number of css files i use ;-) On that note, I have just voted for: 
https://issues.apache.org/jira/browse/TAP5-1377 so that css can be 
combined as well.


I Hope it saves someone else some time.

Cheers,
Joost

On 17/01/11 10:41 PM, Joost Schouten (mailing lists) wrote:

Hi,

I'm doing some more testing as we speak and I might have been too
quick in my assumptions. It might be related to some incorrect
formatting in an unrelated area of my page which upsets IE but not the
other browsers.

I'll post back if I can consistently reproduce the problem. Running a
slow VMWare windows image on my mac makes this testing slightly
tedious though :(

Thx,
Joost

On Mon, Jan 17, 2011 at 8:57 PM, Howard Lewis Ship  wrote:

It's supposed to just work; the new CSS assets are converted into new
  tags and IE is supposed to load them. I'm pretty certain this
works for FF and I tested, at one time with IE 6, I believe.

On Sat, Jan 15, 2011 at 9:59 AM, Joost Schouten (mailing lists)
  wrote:

Hi,

When I update a zone with a block containing new CSS files these CSS
rules do not seem to get applied to the content in IE7. Does anyone
know this problem and if so, a fix?

I run tap 5.2.4

Cheers,
Joost

PS: I'm now hacking in a fix by adding the css needed by the ajax
requests to the containing page. But this obviously is not very
elegant.

-
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





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



Re: t5: 5.2.4 and IE8

2011-01-18 Thread Joost Schouten (ml)

 I did test it now and it doesn't work. The code should have been:

@AfterRender
private void afterRender(MarkupWriter writer) throws JaxenException {

Element foundIEMode = 
TapestryXPath.xpath("html/head/meta[@http-equiv='X-UA-Compatible']").selectSingleElement(writer.getDocument());

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

But that still doesn't work as like you said the css and js are added to 
the page at a later stage in the rendering phase. Sounds like you need 
to do the reordering after the css/js is added. I guess you can decorate 
the service which does this. Unfortunatly I don't know where this is 
done of the top of my head. Have a look at the source or maybe someone 
else can comment.


Good luck,
Joost


On 18/01/11 9:50 AM, Joost Schouten (ml) wrote:

 Haven't tested it but something like this will probably do the trick:

@AfterRender
private void afterRender(MarkupWriter writer) {
Element foundIEMode = 
writer.getDocument().find("html/head/meta[@http-equiv='X-UA-Compatible']");

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

Cheers,
Joost

On 18/01/11 9:24 AM, Angelo C. wrote:

Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:



but T5.2.4 always has scripts inserted first:

<  script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo







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



Re: t5: 5.2.4 and IE8

2011-01-18 Thread Joost Schouten (ml)

 Haven't tested it but something like this will probably do the trick:

@AfterRender
private void afterRender(MarkupWriter writer) {
Element foundIEMode = 
writer.getDocument().find("html/head/meta[@http-equiv='X-UA-Compatible']");

Element head = writer.getDocument().find("html/head");
if(foundIEMode != null) {
foundIEMode.moveToTop(head);
}
}

Cheers,
Joost

On 18/01/11 9:24 AM, Angelo C. wrote:

Hi,

after upgrading, my app has problem with IE8 all the time, I need to put
this as the first entry in the head section:

  

but T5.2.4 always has scripts inserted first:

<  script
src="/tapestry5-hotel-booking/assets/1.2-SNAPSHOT/stack/en/core.js"...

any approach to force that meta tag to be the first? Thanks,

Angelo





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



Re: CSS not applied on zone update in IE7

2011-01-17 Thread Joost Schouten (mailing lists)
Hi,

I'm doing some more testing as we speak and I might have been too
quick in my assumptions. It might be related to some incorrect
formatting in an unrelated area of my page which upsets IE but not the
other browsers.

I'll post back if I can consistently reproduce the problem. Running a
slow VMWare windows image on my mac makes this testing slightly
tedious though :(

Thx,
Joost

On Mon, Jan 17, 2011 at 8:57 PM, Howard Lewis Ship  wrote:
> It's supposed to just work; the new CSS assets are converted into new
>  tags and IE is supposed to load them. I'm pretty certain this
> works for FF and I tested, at one time with IE 6, I believe.
>
> On Sat, Jan 15, 2011 at 9:59 AM, Joost Schouten (mailing lists)
>  wrote:
>> Hi,
>>
>> When I update a zone with a block containing new CSS files these CSS
>> rules do not seem to get applied to the content in IE7. Does anyone
>> know this problem and if so, a fix?
>>
>> I run tap 5.2.4
>>
>> Cheers,
>> Joost
>>
>> PS: I'm now hacking in a fix by adding the css needed by the ajax
>> requests to the containing page. But this obviously is not very
>> elegant.
>>
>> -
>> 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
>
>

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



CSS not applied on zone update in IE7

2011-01-15 Thread Joost Schouten (mailing lists)
Hi,

When I update a zone with a block containing new CSS files these CSS
rules do not seem to get applied to the content in IE7. Does anyone
know this problem and if so, a fix?

I run tap 5.2.4

Cheers,
Joost

PS: I'm now hacking in a fix by adding the css needed by the ajax
requests to the containing page. But this obviously is not very
elegant.

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



Re: Clearing session data T 5.1.0.5

2011-01-13 Thread Joost Schouten (ml)

 Good point. I think looping over the objects sounds like a good option.

I personally try to keep all persisted state for a user in one object So 
that I have tight conrol over what is in the session and what is not. 
Then you only have to alter/remove one object from the session and you 
know which one it is ;-). More and more I favour activate and passivate 
over @Persist btw. Especially when you start combining stay logged 
cookies and ajax. But that's a whole diferent discussion.


Good luck,
Joost

On 13/01/11 3:16 PM, Richard Hill wrote:

Hi Joost,

I'd prefer not to do it in setupRender as that will clear the session
even if the logged-in user has accidently hit the back button - when he
goes forward to the app the state will be cleared. So I'll loop over the
objects and do it manually.

Cheers



On Thu, 2011-01-13 at 15:09 +0100, Joost Schouten (ml) wrote:

Go with the suggestion you already posted or try to invalidate the
session on the setupRender of the login page in stead.

Cheers,
Joost

On 13/01/11 2:50 PM, Richard Hill wrote:

Hi All,

I have an app that's stateful, a fair number of @Persist'd fields on
various pages + an SSO with logged in user info.

What I want to do is clear all of this session data when a user logs in.
The scenario here is a user logging in when he's already logged in (or
logging in as a different user when already logged in) - so I want to
start with a blank slate.

I've tried invalidating the Session, but subsequently setting an SSO
with ApplicationStateManger throws an IllegalStateException:


@Inject
private ApplicationStateManager stateManager;
@Inject
private Request request;

private void login(Client client) {

Session session = request.getSession(false);
session.invalidate();

stateManager.set(ClientState.class, new ClientState(client));

}

which is not surprising I guess. So is it possible to create/validate a
new Session? Or is there a way to clear the Session without
destroying/invalidating?

I've taken a look at this post here:
http://tapestry-user.markmail.org/search/?q=session+peter#query:session%
20peter+page:1+mid:25lfcwf67itjg2ie+state:results

which suggests looping over every ASM object. Is the best way to go?

Thanks Richard.











-
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




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



Re: Clearing session data T 5.1.0.5

2011-01-13 Thread Joost Schouten (ml)
 Go with the suggestion you already posted or try to invalidate the 
session on the setupRender of the login page in stead.


Cheers,
Joost

On 13/01/11 2:50 PM, Richard Hill wrote:

Hi All,

I have an app that's stateful, a fair number of @Persist'd fields on
various pages + an SSO with logged in user info.

What I want to do is clear all of this session data when a user logs in.
The scenario here is a user logging in when he's already logged in (or
logging in as a different user when already logged in) - so I want to
start with a blank slate.

I've tried invalidating the Session, but subsequently setting an SSO
with ApplicationStateManger throws an IllegalStateException:


@Inject
private ApplicationStateManager stateManager;
@Inject
private Request request;

private void login(Client client) {

   Session session = request.getSession(false);
   session.invalidate();

   stateManager.set(ClientState.class, new ClientState(client));

}

which is not surprising I guess. So is it possible to create/validate a
new Session? Or is there a way to clear the Session without
destroying/invalidating?

I've taken a look at this post here:
http://tapestry-user.markmail.org/search/?q=session+peter#query:session%
20peter+page:1+mid:25lfcwf67itjg2ie+state:results

which suggests looping over every ASM object. Is the best way to go?

Thanks Richard.











-
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: zone in a grid

2011-01-13 Thread Joost Schouten (ml)

 Make sure each zone has a unique DOM id. So something like:


  
  <  a t:type="actionlink" t:id="review" context="msg.id" 
zone="prop:outputZoneId">
  action


  
  
  


 

where your java file has:

public String getOutputZoneId() {
return uniqueIdForThisRow;
}

Cheers,
Joost





On 13/01/11 10:26 AM, Angelo C. wrote:

Hi,

I have a grid with a actionLink in each row, it links to a zone, it works.
but the zone's location is fixed in the first row, is there way to put the
zone in each row ? Thanks,

Angelo


   
   <  a t:type="actionlink" t:id="review" context="msg.id" zone="output">
   action


   
   
   
  



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



Re: t5: secure annotation

2011-01-10 Thread Joost Schouten (ml)
 This [1] is my jetty plugin in my pom.xml where 
src/test/resources/jettykeystore.cert is my selfsigned certificate.


Hope it is what you are looking for.

Cheers,
Joost

[1] maven jetty plugin with SSL enabled



org.mortbay.jetty
maven-jetty-plugin



8080
6


8443
3
src/test/resources/jettykeystore.cert
changeit
changeit



true






org.mortbay.jetty
jetty
6.1.21







On 10/01/11 2:31 PM, Angelo C. wrote:

Hi,

putting @secure in a class and run it in mvn jetty:rn, got: SSL connection
error.
how to setup jetty to  take care of this? Thanks,

Angelo



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



Re: T5: archiving a page

2010-12-31 Thread Joost Schouten (ml)
1/12/10 12:54 AM, Angelo C. wrote:

Hi Joost,

This is a good solution, is there any maven dependencies I can directly
specify to pull down the Flying Saucer? or some codes that I can directly
use in a T5 app?

Thanks,

Angelo


Joost Schouten (mailing lists) wrote:

Another option is to use Flying Saucer [1] to render the html in pure
java. I use it with iText [2] to create pdf's from any xhtml page.
This is a nice combination as it basically allows you to template your
pdf's with tapestry pages. So from within a Tapestry page you retreive
any html with the use of an URLConnection (in my case another page in
my own app) and return it in the form of an pdf.

I'm sure there are ways to render to images i n Flying Saucer as well.

Good luck,
Joost

[1] https://xhtmlrenderer.dev.java.net/
[2]
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html

On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny
wrote:

Kind of. You can run it using xvfb (assuming linux), so you don't need a
full x server.

Selenium is a remote control tool for browsers, mainly used for writing
tests for webapps. It starts up firefox (or ie, chrome, or safari) and
controls the browser, telling it to click on links / type things, and you
can make assertions on the output. Usually it's only run on developer/CI
machines, not on your production machine, although I've seen it done.

On Thu, Dec 30, 2010 at 11:12 AM, Angelo C.
wrote:


Thanks for the quick answer, not so familiar with selenium, can it be
run
headless in the server?
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.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: T5: archiving a page

2010-12-30 Thread Joost Schouten (mailing lists)
Another option is to use Flying Saucer [1] to render the html in pure
java. I use it with iText [2] to create pdf's from any xhtml page.
This is a nice combination as it basically allows you to template your
pdf's with tapestry pages. So from within a Tapestry page you retreive
any html with the use of an URLConnection (in my case another page in
my own app) and return it in the form of an pdf.

I'm sure there are ways to render to images in Flying Saucer as well.

Good luck,
Joost

[1] https://xhtmlrenderer.dev.java.net/
[2] 
http://today.java.net/pub/a/today/2007/06/26/generating-pdfs-with-flying-saucer-and-itext.html

On Thu, Dec 30, 2010 at 5:19 PM, Donny Nadolny  wrote:
> Kind of. You can run it using xvfb (assuming linux), so you don't need a
> full x server.
>
> Selenium is a remote control tool for browsers, mainly used for writing
> tests for webapps. It starts up firefox (or ie, chrome, or safari) and
> controls the browser, telling it to click on links / type things, and you
> can make assertions on the output. Usually it's only run on developer/CI
> machines, not on your production machine, although I've seen it done.
>
> On Thu, Dec 30, 2010 at 11:12 AM, Angelo C.  wrote:
>
>>
>> Thanks for the quick answer, not so familiar with selenium, can it be run
>> headless in the server?
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/T5-archiving-a-page-tp3322541p3322591.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: Discussion

2010-12-21 Thread Joost Schouten (ml)
 We run http://www.yanomo.com on tapestry 5. Features business critical 
project management and invoicing. Sounds serious enough to me ;-) I have 
also worked on a project using tap5 on clustered servers handling 
millions of requests a day. Having tried numurous frameworks I stuck 
with Tapetsry because it so bloody elegant. Works out of the box but 
allows customisation of almost everything if so required.


Cheers,
Joost


On 21/12/10 12:18 PM, Vangel V. Ajanovski wrote:

On 21.12.2010 11:48, George Banus wrote:

Is Tapestry really used for serious projects?

We use Tapestry to build the core of our student information system.
Term enrollments, course enrollments, grades, exams, class schedules.

Having in mind that the students are studying computer science - and
that some have already tried to break in in the past, and some probably
will try in the future - it is indeed a serious project.




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



Re: T5.2.4 Tomcat unable to find .tml files on classpath

2010-12-21 Thread Joost Schouten (ml)
 Smells like a classpath problem where an old version of your app is 
(or parts thereoff are) still lingering around on tomcat's classpath. 
Try to run your app on a clean install of tomcat and see if it works. If 
it runs in jetty on eclipse there is no problem with your tml's.


A quick way to see what's on the classpath is to use tapestries 
ExceptionReport (http://localhost:8080/yourContext/ExceptionReport) ;-)


Cheers,
Joost


On 21/12/10 12:09 AM, Joe Klecko wrote:

Hi all,

I'm having problems getting my my T5.2.4 application to work on tomcat.  It
works correctly when running via jetty (inside eclipse) but when I deploy it
to tomcat it throws this error:
"Embedded component(s) gridPlayerWallPostResponses are defined within
component class
com.presentation.components.editor.lists.PlayerWallpostResponseList (or a
super-class of PlayerWallpostResponseList), but are not present in the
component template (null)"

I have verified the .tml files are in the corerct classpath in the war file
(and I have also tried changing the maven-war-plugin setting "archiveClass"
configuration option to true).

Any help is much appreciated.


A bit more info on the .tml layout (if it helps):

Page:
Players.tml(path=classes/com/presentation/pages/editor/)
...


...


Components:

EditPlayer.tml(path=classes/com/presentation/components/editor/)
...



...


PlayerWallpostResponseList.tml:
(path=classes/com/presentation/components/editor/lists/)
...

...


Thanks,
Joe



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



Re: dynamic component id?

2010-12-03 Thread Joost Schouten (ml)
 It sounds like you are confusing the t:id with the html dom id. I 
think you are looking for:


http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>





Cheers,
Joost



On 3/12/10 12:54 PM, Christian Koller wrote:

I have the following template:

http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>





But Tapestry calls out:
Component id 'prop:index' is not valid; component ids must be valid Java 
identifiers: start with a letter, and consist of letters, numbers and 
underscores.

Is it not possible to use a property as id?

If I use a literal as the id, then it works, but then all the generated 
timeSlot components within the loop will have the same id.
If I use afterwards the persist annotation within the timeSlot component all 
the generated timeSlots share this session value because the id is the same.

Any ideas how to solve this?
Thank you
chris
-
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 Web Site Updated

2010-11-20 Thread Joost Schouten (mailing lists)
Quick comment: the link to wooki on the homepage is broken. The URL
should be http://wookicentral.com/ right?

Cheers,
Joost


On Sat, Nov 20, 2010 at 10:15 AM, Ulrich Stärk  wrote:
> For obvious reasons not everyone can change it. Only Tapestry committers and 
> people who signed an ICLA can.
>
> Am 20.11.2010 um 04:37 schrieb Kalle Korhonen :
>
>> On Fri, Nov 19, 2010 at 6:38 PM, nille hammer
>>  wrote:
>>> Hi Howard,
>>> just a minor error. On the index page 
>>> (http://tapestry.apache.org/index.html) the paragraph "Tapestry is ... 
>>> scalable" occurs twice with slightly different content. (Or was that on 
>>> purpose? :-)) ) Thanks for the great work, nillehammer
>>
>> It's a wiki, *you* can fix it.
>>
>> Removed the first occurrence since its content was included in the
>> second entry and I think the order makes more sense this way. Great
>> job Howard & the gang, wish I had more time to contribute.
>>
>> Kalle
>>
>>
>>> - original Nachricht 
>>>
>>> Betreff: Tapestry Web Site Updated
>>> Gesendet: Fr, 19. Nov 2010
>>> Von: Howard Lewis Ship
>>>
 We're still working out the kinks ... and I've been working hard on
 revising
 the tutorial ... but at long last, we're debuting the new Tapestry Web
 Site:

 http://tapestry.apache.org/

 Feedback is encouraged; just post to users@tapestry.apache.org with [SITE]
 in the subject.

 --
 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

>>>
>>> --- original Nachricht Ende 
>>>
>>>
>>> -
>>> 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
>
>

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



Re: Tapestry Web Site Updated

2010-11-20 Thread Joost Schouten (mailing lists)
Congrats! A great improvement that puts a worthy face on a kick-ass
framework ;-)

Cheers,
Joost

On Sat, Nov 20, 2010 at 4:37 AM, Kalle Korhonen
 wrote:
> On Fri, Nov 19, 2010 at 6:38 PM, nille hammer
>  wrote:
>> Hi Howard,
>> just a minor error. On the index page 
>> (http://tapestry.apache.org/index.html) the paragraph "Tapestry is ... 
>> scalable" occurs twice with slightly different content. (Or was that on 
>> purpose? :-)) ) Thanks for the great work, nillehammer
>
> It's a wiki, *you* can fix it.
>
> Removed the first occurrence since its content was included in the
> second entry and I think the order makes more sense this way. Great
> job Howard & the gang, wish I had more time to contribute.
>
> Kalle
>
>
>> - original Nachricht 
>>
>> Betreff: Tapestry Web Site Updated
>> Gesendet: Fr, 19. Nov 2010
>> Von: Howard Lewis Ship
>>
>>> We're still working out the kinks ... and I've been working hard on
>>> revising
>>> the tutorial ... but at long last, we're debuting the new Tapestry Web
>>> Site:
>>>
>>> http://tapestry.apache.org/
>>>
>>> Feedback is encouraged; just post to users@tapestry.apache.org with [SITE]
>>> in the subject.
>>>
>>> --
>>> 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
>>>
>>
>> --- original Nachricht Ende 
>>
>>
>> -
>> 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: XML requests

2010-11-17 Thread Joost Schouten (ml)
 More common is to deal with xml requests though a POST. In that case 
you can do something like below.


Cheers,
Joost


@Inject
private RequestGlobals requestGlobals;

@OnEvent(value = EventConstants.ACTIVATE)
private Object activate() throws Exception {

HttpServletRequest httpServletRequest = 
requestGlobals.getHTTPServletRequest();
ServletInputStream inputStream = 
httpServletRequest.getInputStream();


SAXBuilder builder = new SAXBuilder();
Document xmlRequest = builder.build(inputStream);

String xmlStringResponse =  build up your xml response 

final ByteArrayInputStream output = new 
ByteArrayInputStream(xmlStringResponse);


final StreamResponse streamResponse = new StreamResponse() {

public String getContentType() {
return "text/xml";
}

public InputStream getStream() throws IOException {
return output;
}

public void prepareResponse(Response response) {
}
};
return streamResponse;
}

On 15/11/10 4:47 PM, niksami wrote:

This will work for me. Basically I need to receive XML as a parameter, for
example as a String in onActivate() method. So, I think this will do job for
me:

  public TextStreamResponse onActivate(String xml) {

 //doing something with xml

 return new TextStreamResponse("text/xml", xml);

}

Thank you!

Niksa


Richard Hill-7 wrote:


You don't specify where/how you want to receive XML requests from - is
this server-to-server? If so this out of the realm of Tapestry, but
there's plenty of java networking libs to help you do this.

With respect to sending an xml document/page to a browser client,
tapestry is not really designed for this. Although you could use
TextStreamResponse for this:

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/util/TextStreamResponse.html


public TextStreamResponse onActivate() {

 String xml = getMyXMLFromSomeWhere

 return new TextStreamResponse("text/xml", xml);

}


R.



-Original Message-
From: niksami
Reply-to: "Tapestry users"
To: users@tapestry.apache.org
Subject: XML requests
Date: Mon, 15 Nov 2010 06:18:03 -0800 (PST)

Hello everyone.

In my application I need to receive XML requests, and then to send the
response back to the client in XML format too. I tried to find some nice
solution here, but with no success. I hope you can give me some short code
examples.

Best regards,
Niksa



-
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: Do a post with Tapestry and Link

2010-11-08 Thread Joost Schouten (ml)
 If I read this correctly you are using an external java program to 
post to a tapestry page. Correct?


The error you are refering to is usually associated with the required 
return type from an event method which you have not shown in your post.


Can you post the page code handeling the POST request? For refference, 
below you will find the onActivate code of a page I use to handle 
external XML POST requests.


Cheers,
Joost

-- a POST handling page --
@OnEvent(value = EventConstants.ACTIVATE)
private Object activate() throws Exception {

HttpServletRequest httpServletRequest = 
requestGlobals.getHTTPServletRequest();
ServletInputStream inputStream = 
httpServletRequest.getInputStream();


SAXBuilder builder = new SAXBuilder();
Document xmlRequest = builder.build(inputStream);

String response = ... build the response xml Document 


final ByteArrayInputStream output = new 
ByteArrayInputStream(response.getBytes());


final StreamResponse streamResponse = new StreamResponse() {

public String getContentType() {
return "text/xml";
}

public InputStream getStream() throws IOException {
return output;
}

public void prepareResponse(Response response) {
}
};
return streamResponse;
}


On 8/11/10 11:36 AM, Khalid EL BOUKHARI wrote:

Hi,
I need to do POST in Tapestry for example :



 

 




When I try :


String data = URLEncoder.encode("*FirstParam*", "UTF-8") + "=" +
URLEncoder.encode("*FirstParam*", "UTF-8");
 data += "&" + URLEncoder.encode("*SndParam*", "UTF-8") +
"=" + URLEncoder.encode("*SndParam"*, "UTF-8");
// Send data
URL url = new URL(*MyURL*);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();

But Tapestry tell me that I must use :
java.net.URL, org.apache.tapestry5.Link, org.apache.tapestry5.
StreamResponse

Any one know how to do ?

Thanks in advance

*Khalid.*




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



Re: How to display form success?

2010-09-15 Thread Joost Schouten (ml)

 Use: @Persist(PersistenceConstants.FLASH)

Cheers,
Joost

On 15/09/10 6:38 PM, Tim Koop wrote:

 Hi everyone.  I hope this is a quick and easy question.

I want to show a "Form successfully submitted" message, so in my Page 
object I have this:


@Persist
@Property
private boolean showSuccess;

Then in my onSuccess method I have this:

private void onSuccess() {
...
showSuccess = true;
}

My question is this: where do I set showSuccess to be false?  If the 
user ever comes back to the page again, the value will still be true 
but it should be false.  If I set it false in pageLoaded or 
pageAttached, it will always be false because that happens after 
onSuccess (on the reload).


Thanks.




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



Re: [Announce] Tapestry Testify project - v1.0.3-SNAPSHOT with Tapestry 5.2 support is available

2010-08-24 Thread Joost Schouten (mailing lists)
Great news! Thanks for this update. I can remove a few @Ignore's

I'll let you know if I run into any issues.

Cheers,
Joost

On Sat, Aug 21, 2010 at 2:28 PM, Paul Field
 wrote:
> I'd like to announce the latest snapshot of the Tapestry Testify project at
> Tapestry 360:
> http://tapestry.formos.com/nightly/tapestry-testify/
>
> Tapestry Testify is an extension to Tapestry that allows you to write page
> and component tests very easily and have them run very efficiently.
>
>
> ** Release Notes **
>
> Updated to work with Tapestry 5.2 (now *requires* Tapestry 5.2)
>
>
> ** Notes **
>
> I haven't yet run this against a large project's test suite (my usual
> projects are still on T5.1) so feedback is very appreciated.
>
> To get the snapshot version, follow download instructions
> for "latest development version"
> http://tapestry.formos.com/nightly/tapestry-testify/getting-testify.html
>
> This version is currently built on Tapestry 5.2.1-SNAPSHOT
> because I couldn't find 5.2.0-SNAPSHOT in the maven repositories.
>
> The documentation on the site is slightly out-of-date because the site
> deploy function at Tapestry Formos is broken.
>
> Currently the Tapestry Formos site JIRA is broken, so try that first but
> if it's not working send issues to me directly.
>
>
> Enjoy the functionality!
> - Paul
>
>
> -
> 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 grid problem,when sorting,redirected to Start page

2010-08-20 Thread Joost Schouten (mailing lists)
Hi,

Though using ajax might solve it, there is a root cause of this
problem that needs to be addressed.

It almost sounds like  you have a method that catches all events fired
by the grid and forward to the start page. Probably unintentionally by
specifying your component in an event method and not the value (event
name).

Please share with us the full *.tml and *.java of your page with the grid.

Cheers,
Joost

On Fri, Aug 20, 2010 at 2:24 PM, Joost Schouten (ml)
 wrote:
> Hi,
>
> Though using ajax might solve it, there is a root cause of this problem that
> needs to be addressed.
>
> It almost sounds like  you have a method that catches all events fired by
> the grid and forward to the start page. Probably unintentionally by
> specifying your component in an event method and not the value (event name).
>
> Please share with us the full *.tml and *.java of your page with the grid.
>
> Cheers,
> Joost
>
> Alexander Muthmann wrote:
>
>  Hi bugxiaoya,
>
> I think you can solve this problem by setting the inPlace parameter of your
> grid. This causes your grid to act like a ajax component and prevents
> reloading the whole site.
>
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>
> ...
>
> greeting
>
> On 20.08.2010 06:43, bugxiaoya wrote:
>
> I am using Tapestry 5.1 Grid Component for data display.
> the problem is:
> when click the sort icon in the table head,it is just redirected to the
> Start page.
> set the SymbolConstants.SUPPRESS_REDIRECT_FROM_ACTION_REQUESTS  to be "true"
> in AppModule.contributeApplicationDefaults() can resolve this problem,but is
> there any other way?
>
> P.S:the same problem when click the paging label of grid component.
>
> the source code is as follows:
>      pagerPosition="bottom" exclude="id">
>     
>     ${user.name}
>     
>     
>     
>      context="user.id">${message:delete-label}
>     
>     
> 
>
> http://tapestry.1045711.n5.nabble.com/file/n2641788/%E6%90%9C%E7%8B%97%E6%88%AA%E5%9B%BE_2010-08-20_12-41-38.bmp
>
>
>
>

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



Re: Calling different pages depending on browser

2010-08-20 Thread Joost Schouten (mailing lists)
This [1] is some code from one of my pages doing what you ask for. You
could also wrap this in a dispatcher, use rewrite rules on your http
server or tuckey.org java rewrite filter.

Good luck,
Joost


[1]: forward iphone users to another page
@Inject
private RequestGlobals requestGlobals;

@OnEvent(value = EventConstants.ACTIVATE)
private Object activate() {

HttpServletRequest httpServletRequest =
requestGlobals.getHTTPServletRequest();
String userAgent = httpServletRequest.getHeader("User-Agent");
if(userAgent.contains("iPhone")) {
//return a page, link URL etc. to forward wherever you
want them to go
}

return null;
}

On Fri, Aug 20, 2010 at 8:19 AM, Kalle Korhonen
 wrote:
> Use the User-Agent header (e.g http://en.wikipedia.org/wiki/User_agent).
>
> Kalle
>
>
> On Thu, Aug 19, 2010 at 10:48 PM, Omar Carvajal
>  wrote:
>> Hey all,
>>
>> I wanted to know if there was a way to get my app to call different pages
>> depending on the browser that is being used.
>>
>> For example if the application is being accessed from an iPhone, it should
>> go to the page /mobile for example. And if FireFox is used, it should load
>> /desktop.
>>
>> How could I achieve this?
>>
>> Thanks in advance,
>>
>> Omar
>>
>> -
>> 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: Testify and Tapestry 5.2

2010-08-10 Thread Joost Schouten (mailing lists)
On Tue, Aug 10, 2010 at 8:27 PM, Paul Field  wrote:
> Hi Joost,

Hi,

>
> I was waiting for T5.2 to settle down. I guess with the alpha release it's
> time for me to take a look :-) Probably won't be for a couple of weeks
> though...
>
> Paul

Great! I look forward to it. Thanks,
Joost

>
>
>
>
>
> "Joost Schouten (ml)" 
> 10/08/2010 16:41
> Please respond to
> "Tapestry users" 
>
>
> To
> Tapestry users 
> cc
>
> Subject
> Testify and Tapestry 5.2
>
>
>
>
>
>
> Hi,
>
> Does anyone know if there is a plan to upgrade the testify trunk to work
> with tapestry 5.2? Would be great.
>
> Thanks,
> Joost
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
>
>
>
> ---
>
> This e-mail may contain confidential and/or privileged information. If you 
> are not the intended recipient (or have received this e-mail in error) please 
> notify the sender immediately and delete this e-mail. Any unauthorized 
> copying, disclosure or distribution of the material in this e-mail is 
> strictly forbidden.
>
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for 
> additional EU corporate and regulatory disclosures.

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



Testify and Tapestry 5.2

2010-08-10 Thread Joost Schouten (ml)

Hi,

Does anyone know if there is a plan to upgrade the testify trunk to work 
with tapestry 5.2? Would be great.


Thanks,
Joost

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



Re: DISCUSSION: Time zones and date selection

2010-08-08 Thread Joost Schouten (mailing lists)
Hi,

I do everything server side with the help of a custom
TimeZoneAwareDatePicker wrapping your tapx datepicker. It takes a
source (I store everything in UTC) and display timezone (the users
timezone) to do the conversion. This suits me because I will almost
always know my users timezone as they need to be logged in.

In all my applications where I need to be timezone aware, I make sure
to have my users specify it upfront and store it all server side. To
help my users I assume the most logical tz through some util classes I
build around http://icu-project.org/apiref/icu4j/. These util classes
have methods like getBestMatchingTimeZone(Locale locale).

Personally I wouldn't want to add a time zone drop down to a date
picker as it would be too much in my opinion.

Cheers,
Joost

On Sat, Aug 7, 2010 at 6:10 PM, Howard Lewis Ship  wrote:
> This is something that's been nagging me. Although there's a bunch of good
> options for selecting a date (or date/time) as JavaScript components bult
> into Tapestry, or available elsewhere ... none of them address the issue of
> the client and the server operating in different time zones.
>
> At the very least, these components probably should include a time zone drop
> down list (or other means of selection).
>
> I haven't been able to find a sure-fire way of determing the user's time
> zone from the HttpRequest.
>
> I'm curious what kinds of solutions the community have used to address this
> issue. It would be nice to come up with a true solution for Tapestry 5.3.
>
> One option is a bit of JavaScript that reports the client's time zone (or
> just time) to the server so that the server can identify their time zone
> automatically.
>
> --
> 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



A big thank you to Tapestry

2010-08-01 Thread Joost Schouten (mailing lists)
Dear Peter,

The "Take a tour" form at http://www.jsportal.com/product/demo should
bypass the need for any login information. It could be that you
attempted to use the login function on the same page in stead.

If this is not working for you, I'd love to know the details (url,
browser, OS etc.) about your situation so I can fix where needed.

Thank you for your feedback,
Joost

On Fri, Jul 30, 2010 at 7:15 PM, Peter Niederwieser  wrote:
>
> "Try it yourself" failed my 1-minute test. Always get "License not
> recognized". No idea what to enter in the license field.
>
> Cheers,
> Peter
>
> --
> View this message in context: 
> http://old.nabble.com/A-big-thank-you-to-Tapestry-tp29291226p29308137.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: A big thank you to Tapestry

2010-07-29 Thread Joost Schouten (ml)

Thiago H. de Paula Figueiredo wrote:


I took a quick look at JSPortal and it seems very cool. Congratulations!
Don't forget to add it to the list of Tapestry-powered projects: 
http://wiki.apache.org/tapestry/PoweredByTapestry.



Thanks! And I have added jsportal.com to the PoweredByTapestry section.

Regards,
Joost

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



A big thank you to Tapestry

2010-07-28 Thread Joost Schouten (ml)

Hi,

A big thank you to all of you that make tapestry possible. We have just 
had our soft release of www.jsportal.com (beta) and this mailing list 
has contributed a lot toward making that possible. A few small bugs and 
some IE beautifications left, but other than that there is another T 5.2 
app life and kicking ;-)


Thanks,
Joost


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



Re: production html whitespace compression alters rendered markup

2010-07-15 Thread Joost Schouten (ml)

I agree Paul,

I have been using configuration.add(SymbolConstants.COMPRESS_WHITESPACE, 
"false"); for a while as a quick fix. But I too believe the white space 
compression can be a bit more intelligent and leave one space between 
tags if there are any.


My 2 cents,
Joost

Paul Stanton wrote:
Firstly, I'd like to say that tapestry does most things very well and 
I probably only comment on the things it doesn't do well. Thank you to 
those who've spent time improving the framework for making my job as a 
developer more enjoyable.


I do have an issue with the production mode Considering the following 
in your average TML:


This is my paragraph and sometimes a single word or phrase style="text-decoration:underline;">might need some special 
attention so I might do 
this, but it's still my 
paragraph.


or a shorter eg:
A B C D

In development mode, this will render unchanged:

A B C D

However in production mode, tapestry will take out some important 
whitespace:


A BC D

I know you can partially combat this by using a non-breaking space in 
the markup ( ) however, this has the expected drawback of 
disallowing line breaking where it may be required.


for example, a list of links:
1
2
3
4
5
...

becomes
123href="url4">45...


I agree that some 'compression' on html syntax is a good thing in a 
production environment, but to keep the integrity of the document I 
think tapestry should replace multiple whitespace characters with one 
whitespace character instead of removing all whitespace between tags. 
Therefore, while I know I can set "tapestry.compress-whitespace" to 
false, I would prefer to have my suggestion implemented in place of 
the existing mechanism or as an alternative.


The main issues for me:
1. Rendered markup is fundamentally different between production and 
development environments, making the most commonly used form of 
testing flawed
2. In some cases a space is the only solution to layout problems and 
tapestry won't allow it


Keen to hear other opinions...

p.

-
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



blank gird column labels cause exception

2010-07-13 Thread Joost Schouten (ml)

Hi,

I have the need for a blank label in my grid, but when I try:

BeanModel.add(RelativePosition.BEFORE, "secondCol", "firstCol", 
null).label("");


Tapetry compains about a blank label. I can fix this by an @AfterRender 
alteration of the generated DOM, but that is somewhat cumbersome. Am I 
missing how I can set a blank label or is it just not possible through 
the BeanModel?


Another hacky option is to set the css color to the backgroun color. 
display:none removes the whole cell which screws up the table layout.


Cheers,
Joost


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



Re: [T5.2] Tapestry.remove() js function causes exception IE7

2010-07-08 Thread Joost Schouten (ml)

Hi,

Doing some more debugging I would that element.remove == null. The whole 
function doesn't exist on the element. When I add a null check, I run 
into a similair problem on the formFragment where element.isDeepVisible 
== null.


In  IE8 I also encounter the problem as described in 
https://issues.apache.org/jira/browse/TAP5-1192


Before I dive in too deep can anyone comment on the state of tapestry.js 
in the trunk? Has it been tested against IE7 and IE8?


Thanks,
Joost

Joost Schouten (ml) wrote:

Hi,

Recently I started experiencing problems when clicking the remove 
button in the AjaxFormLoop in IE7. I traced it down to something with:


"formLoopRemoveLink effect.options.afterFinish" calling "Tapestry.remove"

In the remove function the element is there, but I get a object not 
recognized on the element.remove function.


Has anyone else experienced these problems and found a solution?

Cheers,
Joost



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




[T5.2] Tapestry.remove() js function causes exception IE7

2010-07-07 Thread Joost Schouten (ml)

Hi,

Recently I started experiencing problems when clicking the remove button 
in the AjaxFormLoop in IE7. I traced it down to something with:


"formLoopRemoveLink effect.options.afterFinish" calling "Tapestry.remove"

In the remove function the element is there, but I get a object not 
recognized on the element.remove function.


Has anyone else experienced these problems and found a solution?

Cheers,
Joost

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



[T-5.2] t:submit bug when using image parameter

2010-07-01 Thread Joost Schouten (ml)

Hi,

When I use t:submit without the image parameter the 
onSelectedFromMyButton method gets called. When using the image 
parameter it does not get called. When no image is used the post [1] 
includes the t:submit value. When an image is used [2] only the java 
component id is added as a parameter name. Could this be a bug or am I 
missing something?


Thanks,
Joost

[1] post without image:

myField   value  
t:ac   639

t:formdata Shortened...hAgAAA==
t:zoneidcreateEditZone
t:submitmyButton_1298e6f8ec3


[2] post with image:

myFieldvalue  
t:ac639

t:formdata Shortened...hAgAAA==
t:zoneidcreateEditZone
myButton

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



Re: Render phase return type equivalent to void

2010-06-07 Thread Joost Schouten (ml)

So simple, I could have guessed that ;-)

Thanks,
Joost

Thiago H. de Paula Figueiredo wrote:
On Mon, 07 Jun 2010 04:36:08 -0300, Joost Schouten (ml) 
 wrote:



Hi,


Hi!

Render phase return type equivalent to void: null.




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



Render phase return type equivalent to void

2010-06-07 Thread Joost Schouten (ml)

Hi,

I have build a RestrictedVisibility Mixin which shows or hides an entire 
component by returning true or false in the @SetupRender method [1]. 
This works well but I just realized there is one drawback. When I return 
true, setup render skips to the next step (@BeginRender) where I would 
like it to continue down the line so @SetupRender of the component it is 
mixed in is also executed.


I have partially solved this by annotating the mixing with @MixinAfter, 
but now I execute the setup render methods of components that are never 
shown which not ideal.


Is there another return type or another way to achieve this? Or are 
there better ways to achieve my visibility restriction.


Thanks,
Joost

[1] (simplified)
@SetupRender
private Object setup() {
   if(showComponent) {
   return true;
   }
   return false;
}

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



Re: clientsidevalidate show only 1 error

2010-06-03 Thread Joost Schouten (ml)
Ah sorry, I assumed tapestry 5. I have no experiance with tapestry 4 so 
will have to leave this question to somebody else.


Good luck,
Joost

asianCoolz wrote:

nope, i do not want to turn off clientsidevalidation. i want to use it, but i
only want to show 1 error at a time.  i'm using tapestry4


-
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



  1   2   3   >