Re: Classloader issues under JBoss 6.X - 7.X - Patch Included

2017-12-03 Thread Christian Riedel
Nice job!

I think the general path to get things patched is to open a Jira issue and 
attach a proper patch file, possibly including a test. The committers can’t use 
your code otherwise for apache license reasons IIRC…

Cheers
Christian


> Am 01.12.2017 um 17:38 schrieb Luca Arzeni :
> 
> Hi to all,
> few years ago, I raised an alert concerning the compatibility between 
> Tapestry5 and JBoss; the thread was:
> 
> "Is tapestry plastic incompatible with JEE specs?"
> 
> https://mail-archives.apache.org/mod_mbox/tapestry-users/201512.mbox/%3Ctrinity-fc3b0e36-0402-4d71-b48a-4a464cbd6474-1449857158334@3capp-mailcom-lxa14%3E
> 
> At that time I found a workaround and concluded that there was no way to 
> solve the issue, thinking that was a problem related to the jboss classloader 
> (or, more generally, between an appserver classloader and the behaviour of 
> plastic).
> 
> Few days ago, working on a new project under JBoss 7.0.0.GA, I was again 
> badly hitted by this problem, but this time I investigated more thoroughly 
> the issue and I found the source of all evil: the class 
> "org.apache.tapestry5.internal.plastic.asm.ClassWriter" of plastic.
> 
> The classloader used to find (and load) the classes by plastic is really not 
> compatible with an appserver. An appserver is required to enforce classloaded 
> isolation and plastic ignores this.
> Anyway plastic can be patched to solve the issue; here I attach a patch, 
> please I ask to some developer to kindly forward and apply this patch to the 
> 5.4.x branch and to the 5.5.
> 
> I also want to give thanks to these guys to help me to focus the problem:
> 
> https://stackoverflow.com/questions/42423907/unable-to-move-tapestry-jars-out-of-the-war-with-page-code-inside-the-war-still
> https://blog.progs.be/50/tapestry-classloading-problems-on-jboss
> 
> Regards,
> Luca Arzeni
> 
> 
> *** Here is the original code: ***
> 
> 1752 protected String getCommonSuperClass(final String type1, final 
> String type2) {
> 1753 Class c, d;
> 1754 ClassLoader classLoader = getClass().getClassLoader();
> 1755 try {
> 1756 c = Class.forName(type1.replace('/', '.'), false, 
> classLoader);
> 1757 d = Class.forName(type2.replace('/', '.'), false, 
> classLoader);
> 1758 } catch (Exception e) {
> 1759 throw new RuntimeException(e.toString());
> 1760 }
> 1761 if (c.isAssignableFrom(d)) {
> 1762 return type1;
> 1763 }
> 1764 if (d.isAssignableFrom(c)) {
> 1765 return type2;
> 1766 }
> 1767 if (c.isInterface() || d.isInterface()) {
> 1768 return "java/lang/Object";
> 1769 } else {
> 1770 do {
> 1771 c = c.getSuperclass();
> 1772 } while (!c.isAssignableFrom(d));
> 1773 return c.getName().replace('.', '/');
> 1774 }
> 1775 }
> 
> *** Here is the patch: ***
> 
> 1752protected String getCommonSuperClass(final String type1, final String 
> type2) {
> 1753Class c, d;
> 1754ClassLoader classLoader = getClass().getClassLoader();
> 1755try {
> 1756c = Class.forName(type1.replace('/', '.'), false, 
> classLoader);
> 1757d = Class.forName(type2.replace('/', '.'), false, 
> classLoader);
> 1758} catch (Exception e) {
> // --- ARZILLO PATCH BEGIN 
> ---
> 
>   System.err.println("WARNING: type1:" + type1 + ", type2: " + 
> type2 + ", exception: " + e + ", classLoader: " + classLoader +", attempting 
> to use the classloader of the current thread");
> 
>   classLoader = Thread.currentThread().getContextClassLoader();
>   if ( classLoader != null ) {
> 
>   try {
>   c = Class.forName(type1.replace('/', '.'), 
> false, classLoader);
>   d = Class.forName(type2.replace('/', '.'), 
> false, classLoader);
>   }
>catch (Exception e_inner) {
>   System.err.println("ERROR 1: type1:" + type1 + ", 
> type2: " + type2 + ", e_inner: " + e_inner + ", classLoader: " + classLoader 
> +", failed even using the classloader of the current thread");
>   throw new RuntimeException(e_inner.toString());
>}
>   }
>   else {
>   System.err.println("ERROR 2: type1:" + type1 + ", 
> type2: " + type2 + ", exception: " + e + ", classLoader: " + classLoader +", 
> unable to get the classloader of the current thread");
>   throw new RuntimeException(e.toString());
>   }
> // --- ARZILLO PATCH END 
> ---
> 1760}
> 1761  if (c.isAssignableFrom(d)) {
> 1762return type1;
> 1763}
> 1764if (d.isAssignableFrom(c))

Re: Contribution to ApplicationStateManager not called on ApplicationModule

2017-05-07 Thread Christian Riedel
Hi, 
may we have a look at your web.xml? Maybe your app isn’t called 'application‘. 


> Am 07.05.2017 um 06:46 schrieb yazmin georgina quintal 
> :
> 
> I have this code con ApplicationModule (T.5.4.3), but I do not see my 
> contribution method being called:
> @Contribute(value = ApplicationStateManager.class)
> public static void provideStateCreators(MappedConfiguration ApplicationStateContribution> configuration) {
> 
> System.out.println("provideStateCreators");
> 
> configuration.add(Cotizacion.class,
> new ApplicationStateContribution(CayenneConstants.ENTITY, new 
> ApplicationStateCreator() {
> @Override
> public Cotizacion create() {
> System.out.println("contributeApplicationStateManager.create 
> call");
> return new Cotizacion();
> }
> }
> ));
> }
> Thanks. 
> 
> Saludos.
> Atte. Yazmín Georgina Quintal Moo 
> Local 63 y 64 de Plaza de la Tecnología. Villahermosa, Tab. 
> Tel 993 1311688 
> Cel. 9931 689207


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



Re: Prototype Constants replacement in v5.4`

2017-04-03 Thread Christian Riedel
for the events:

require t5/core/events like so:

define(['t5/core/events'], function(events) {
  
});

see the documentation of the events here: 
http://tapestry.apache.org/current/coffeescript/events.html 


> Tapestry.currentFocusField
I’m not quite sure what that did tbh.. no direct replacement.

> Tapestry.ajaxExceptionHandler
> Tapestry.ajaxFailureHandler
-> for those just specify the handlers in the options: 
http://tapestry.apache.org/current/coffeescript/t5-core-dom-jquery.html 




> Am 03.04.2017 um 13:01 schrieb Ankit Jain :
> 
> Hi,
> 
> We have been using the following constants in our program but they no longer 
> work as we are removing Prototype.
> Can you please suggest the replacements of these constants in Tapestry v5.4.
> 
> Tapestry.FORM_PREPARE_FOR_SUBMIT_EVENT
> Tapestry.ZONE_UPDATED_EVENT
> Tapestry.currentFocusField
> Tapestry.FOCUS_CHANGE_EVENT
> Tapestry.FORM_PROCESS_SUBMIT_EVENT
> Tapestry.ajaxExceptionHandler
> Tapestry.ajaxFailureHandler
> 
> Regards, Ankit
> [Aspire Systems]
> 
> This e-mail message and any attachments are for the sole use of the intended 
> recipient(s) and may contain proprietary, confidential, trade secret or 
> privileged information. Any unauthorized review, use, disclosure or 
> distribution is prohibited and may be a violation of law. If you are not the 
> intended recipient, please contact the sender by reply e-mail and destroy all 
> copies of the original message.



Re: Unable to get custom attributes value in Mixin from Select control

2017-03-30 Thread Christian Riedel
hi ankit,

1. no need to post your questions to both, dev and users lists. this is a 
user-list topic.

2. don’t mix parameters and expansions ($-notation). 
try:
  @Parameter // leave the defaultPrefix as is
  private String varid;

  t:model="dropDownDateValues" 
> t:validate="prop:fieldValidator"
>encoder="stringEncoder"
>varid1="${ob1.sub1.sub2.id}"
>t:varid="${ob1.sub1.sub2.id}"
>t:mixins="mixinDropDown"
> t:dataType="dropdown"
>style="width:${tbxwidth}"
>t:blankOption="prop:blankOption">
> 
> In mixinDropDown, I have declared the varid as following:
>@Parameter(defaultPrefix = BindingConstants.LITERAL)
>private String varid;
> 
> when I am accessing it in AfterRender, 'varid' is coming as null.
> 
> Note: I have tested that "${ob1.sub1.sub2.id}" is returning a valid value and 
> not null.
> 
> Regards, Ankit
> [Aspire Systems]
> 
> This e-mail message and any attachments are for the sole use of the intended 
> recipient(s) and may contain proprietary, confidential, trade secret or 
> privileged information. Any unauthorized review, use, disclosure or 
> distribution is prohibited and may be a violation of law. If you are not the 
> intended recipient, please contact the sender by reply e-mail and destroy all 
> copies of the original message.


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



Re: Finding out when actionLink action is completed on the user side

2017-03-28 Thread Christian Riedel
Sure, the equivalent in 5.3 is to use t:zone or better: write a mixin and add a 
custom listener to your link.
I once wrote a very generic mixin that you can use as click or change (or any 
event) listener:

https://gist.github.com/criedel/315d0cf8dab312870a7bc0d184ef0dd4

I think there are also similar examples to be found here: 
http://jumpstart.doublenegative.com.au/jumpstart/examples/input/atonevent/0




> Am 27.03.2017 um 17:05 schrieb g kuczera :
> 
> Right now we are using Tapestry 5.3.7 and upgrading is unlikely, so the
> async option is out of the reach, I think. I also do not want to open the
> save-file-dialog by default (the requirement from the client).
> 
> I will check the FileSaver as soon as I can.
> 
> Is there a possibility that the zones could be used to refresh the button
> state (changing from disabled to enabled)?
> 
> 2017-03-27 11:19 GMT+02:00 Christian Riedel :
> 
>> you could use t:async="true“ instead and return the pdf along with some
>> custom script that re-activates your button.
>> the binary of the pdf could be passed into FileSaver[0] to create the
>> save-file-dialog of the browser. while all this happens you could show a
>> progress indicator to the user.
>> 
>> if you find this too complicated you could keep the traditional requests
>> but maybe open a popup that triggers the download.
>> 
>> [0] https://github.com/eligrey/FileSaver.js
>> 
>>> Am 27.03.2017 um 10:36 schrieb g kuczera :
>>> 
>>> Hi everybody,
>>> I have an actionLink, which action returns the pdf document from the
>>> server. The document is dynamically generated, so it can take few seconds
>>> to deliver it to the user. I want to prevent the user from clicking on
>> the
>>> actionLink multiple times. I can block it in java script after the click
>>> event occurrs, but I don't know how to find out when to unblock it.
>>> 
>>> Is there a way to find out when the document is received by the user and
>>> then unblock the actionLink? I found one possible solution, but it seems
>>> like an overhead:
>>> http://stackoverflow.com/questions/1106377/detect-when-
>> browser-receives-file-download
>>> Is there a more tapestry way to do it?
>>> 
>>> Here is the actionLink code:
>>>   >> t:id="downloadDocumentAsPdf" context="document.document_id"
>>>   target="_blank">
>>>   ${message:download.document.
>> as.pdf}
>>>   
>> 
>> 
>> -
>> 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: Finding out when actionLink action is completed on the user side

2017-03-27 Thread Christian Riedel
you could use t:async="true“ instead and return the pdf along with some custom 
script that re-activates your button.
the binary of the pdf could be passed into FileSaver[0] to create the 
save-file-dialog of the browser. while all this happens you could show a 
progress indicator to the user.

if you find this too complicated you could keep the traditional requests but 
maybe open a popup that triggers the download.

[0] https://github.com/eligrey/FileSaver.js

> Am 27.03.2017 um 10:36 schrieb g kuczera :
> 
> Hi everybody,
> I have an actionLink, which action returns the pdf document from the
> server. The document is dynamically generated, so it can take few seconds
> to deliver it to the user. I want to prevent the user from clicking on the
> actionLink multiple times. I can block it in java script after the click
> event occurrs, but I don't know how to find out when to unblock it.
> 
> Is there a way to find out when the document is received by the user and
> then unblock the actionLink? I found one possible solution, but it seems
> like an overhead:
> http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download
> Is there a more tapestry way to do it?
> 
> Here is the actionLink code:
> t:id="downloadDocumentAsPdf" context="document.document_id"
>target="_blank">
>${message:download.document.as.pdf}
>


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



Re: NPE in dispatchComponentEvent of a page class (which doesn't have such method)

2017-03-23 Thread Christian Riedel
dispatchComponentEvent is one of the methods of the Component [0] interface. 
Every page / component / mixin implements this interface through some class 
transformation by Tapestry. Same as with setupRender; if you don’t implement 
this method, Tapestry will do it for you.

[0] 
https://github.com/apache/tapestry5/blob/a197470fc1e698ca713741150114543a3f30d25b/tapestry-core/src/main/java/org/apache/tapestry5/runtime/Component.java

> Am 23.03.2017 um 09:30 schrieb Davide Vecchi :
> 
> Thank you. The problem was actually in the terms you mentioned. The null 
> value that was attempted to be passed in the primitive long argument was 
> coming from our customization of GridRows, which in its afterRender calls 
> ComponentResourcesCommon.createEventLink(String, Object...) for the 
> selectReceipt event. In some cases null is passed in the 2nd argument of the 
> createEventLink call, and that argument represents the context that will be 
> passed to the handler of created event. So when that event is triggered by 
> clicking a row, the onSelectReceipt handler is called and that null context 
> is attempted to be passed in the long argument, causing the null pointer.
> 
> I'm still not clear if the first line of the stacktrace is normal, mentioning 
> a Receipts.dispatchComponentEvent method that doesn't exist and not 
> mentioning the line number, but anyway the null pointer was caused by the 
> null value that our code was erroneously setting as the event context.
> 
> Thanks a lot for your help.
> 
> -Original Message-
> From: Christian Riedel [mailto:cr.ml...@googlemail.com] 
> Sent: Wednesday, March 22, 2017 19:32
> To: Tapestry users 
> Subject: Re: NPE in dispatchComponentEvent of a page class (which doesn't 
> have such method)
> 
> Just a wild guess without seeing your template: your method is called with a 
> null value. Assigning null to a primitive variable results in a nullpointer.
> Try *Long* sysRowId instead and you probably won’t get that exception. The 
> root cause might be that the context of your event link does not contain the 
> value that it should.
> Check the network inspector in your browser to see what’s sent to the server.
> 
> 
> Christian
> 
> 
>> Am 22.03.2017 um 15:41 schrieb Davide Vecchi :
>> 
>> Hi everybody,
>> 
>> I'm using Tapestry 5.3.8 . I am at a complete loss trying to figure out why 
>> I always get a NullPointerException when I click on a grid row of a certain 
>> page.
>> 
>> I'm describing the situation here and if anyone has *any* thought, feeling, 
>> suggestion, observation, things to check or anything else about one or more 
>> parts of this issue, I would really appreciate to hear about it, because I 
>> know it's impossible to think of a solution for this kind of problem, and 
>> anything that *potentially* could allow me to get a tiny bit closer to the 
>> solution or narrow down the possible cause or discard possibilities is very 
>> welcome. I'm at the stage where I'm progressively removing stuff from that 
>> page until the crash disappears so I will know that was the "cause"...
>> 
>> The weird thing is that in the Java side I have a handler for the 
>> t:rowevent="selectReceipt" event, and if such method is coded without 
>> any argument, like
>> 
>>  public void onSelectReceipt ()  // This works normally.
>>  {
>>  System.out.println("onSelectReceipt () executed");
>>  }
>> 
>> , then when I click on a grid row this null pointer doesn't occur and the 
>> method is entered, but if I add an argument to it which is the row index 
>> (like all the other grids of this webapp have), then the null pointer on 
>> click does occur and the method is not entered:
>> 
>>  public void onSelectReceipt (long sysRowId) // This causes the NPE.
>>  {
>>  System.out.println("onSelectReceipt (" + sysRowId + ") 
>> executed");
>>  }
>> 
>> To make this even more interesting... if both the above mentioned handlers 
>> are there, the null pointer occurs. Then I just remove the 1-argument 
>> handler and the null pointer doesn't occur. So, the mere presence of the 
>> non-working, 1-argument handler causes the null pointer, even if the 
>> working, no-arguments handler is there as well.
>> 
>> We use a customized grid, but the grid in the problematic page is being used 
>> in the same way as the grids in all the other pages, which all have the 
>> 1-argument handler and don't have this problem.
>> 
>> If the cause was th

Re: NPE in dispatchComponentEvent of a page class (which doesn't have such method)

2017-03-22 Thread Christian Riedel
Just a wild guess without seeing your template: your method is called with a 
null value. Assigning null to a primitive variable results in a nullpointer.
Try *Long* sysRowId instead and you probably won’t get that exception. The root 
cause might be that the context of your event link does not contain the value 
that it should.
Check the network inspector in your browser to see what’s sent to the server.


Christian


> Am 22.03.2017 um 15:41 schrieb Davide Vecchi :
> 
> Hi everybody,
> 
> I'm using Tapestry 5.3.8 . I am at a complete loss trying to figure out why I 
> always get a NullPointerException when I click on a grid row of a certain 
> page.
> 
> I'm describing the situation here and if anyone has *any* thought, feeling, 
> suggestion, observation, things to check or anything else about one or more 
> parts of this issue, I would really appreciate to hear about it, because I 
> know it's impossible to think of a solution for this kind of problem, and 
> anything that *potentially* could allow me to get a tiny bit closer to the 
> solution or narrow down the possible cause or discard possibilities is very 
> welcome. I'm at the stage where I'm progressively removing stuff from that 
> page until the crash disappears so I will know that was the "cause"...
> 
> The weird thing is that in the Java side I have a handler for the 
> t:rowevent="selectReceipt" event, and if such method is coded without any 
> argument, like
> 
>   public void onSelectReceipt ()  // This works normally.
>   {
>   System.out.println("onSelectReceipt () executed");
>   }
> 
> , then when I click on a grid row this null pointer doesn't occur and the 
> method is entered, but if I add an argument to it which is the row index 
> (like all the other grids of this webapp have), then the null pointer on 
> click does occur and the method is not entered:
> 
>   public void onSelectReceipt (long sysRowId) // This causes the NPE.
>   {
>   System.out.println("onSelectReceipt (" + sysRowId + ") 
> executed");
>   }
> 
> To make this even more interesting... if both the above mentioned handlers 
> are there, the null pointer occurs. Then I just remove the 1-argument handler 
> and the null pointer doesn't occur. So, the mere presence of the non-working, 
> 1-argument handler causes the null pointer, even if the working, no-arguments 
> handler is there as well.
> 
> We use a customized grid, but the grid in the problematic page is being used 
> in the same way as the grids in all the other pages, which all have the 
> 1-argument handler and don't have this problem.
> 
> If the cause was that (for some reason unknown to me) the 1-argument handler 
> was not recognized as the handler of the t:rowevent="selectReceipt" event, I 
> would expect that the exception would be a TapestryException "... you must 
> provide a matching event handler method ...", as it always happens when I 
> forget to write the event handler. Instead I get this null pointer. And if in 
> this page itself I omit the 1-argument event handler too, then I do get that 
> TapestryException as expected; but when I put it back I get the null pointer, 
> and the method is not even entered. 
> 
> This is the full stacktrace of the NullPointerException, from the exception 
> page. The first line is the one that puzzles me the most, because 
> Receipts.java is actually the problematic page, but it does not have the 
> dispatchComponentEvent method, plus that line doesn't show the number of the 
> line of source code or "Unknown Source", while all the others do.
> 
> en.abc.link.tapestry.pages.function.magazines.receipts.Receipts.dispatchComponentEvent(Receipts.java)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:932)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1117)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1062)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1060)
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
> org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
> org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
> org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1058)
> org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:110)
> org.apache.tapestry5.internal.services.ajax.AjaxFo

Re: Location of assets

2017-02-24 Thread Christian Riedel
Hi Jarda,

you just use the path relative to your servlet context.

> background-image: url('/images/myimage.png');


this could work. If your app is not deployed under the root context but under 
/foo-bar/ then I guess this should work:

background-image: url('/foo-bar/images/myimage.png‘);

If both, your images and your css files are stored in src/main/webapp you can 
also use relative paths:

background-image: url('../images/myimage.png‘);

That being said, I prefer to have all assets in META-INF/images and 
META-INF/css for example. Relative paths have the advantage that Tapestry will 
give you an error if any image isn’t where it should be if you reference it via 
relative paths. That check does not apply for absolute paths (starting with a 
slash).

Cheers,
Christian



> Am 24.02.2017 um 12:59 schrieb Jaroslav Ciml :
> 
> Hi,
> 
> I am trying to figure out what is the correct location of assets with 
> Tapestry 5.4 and Maven directory structure.
> 
> I will explain how do I understand it. Correct what is wrong please.
> 
> From logical point of view, I can think of two types of assets - global and 
> comopnent specific.
> 
> A global asset is e.g. a PNG image that is used as a background in various 
> places in the application, i.e. it is referenced in many Tapestry components. 
> Such global assets are called "context assets" in Tapestry.
> 
> A component specific asset is say a CSS file that defines style just for the 
> HTML markup generated by one specific Tapestry component. Such component 
> specific assets are called "class path assets" in Tapestry.
> 
> Suppose that I have some Tapestry component with CSS file and a global PNG 
> image.
> 
> The tml and java files for the component are located in:
> src/main/java/com/somecompany/myapp/view/components/MyComponent.java
> src/main/resources/com/somecompany/myapp/view/components/MyComponent.tml
> 
> And this is the appropriate configuration in web.xml:
> 
>  tapestry.app-package
>  com.somecompany.myapp.view
> 
> 
> The global PNG file is located in:
> src/main/webapp/images/myimage.png
> 
> The CSS file that is related just to MyComponent is located in:
> src/main/resources/META-INF/assets/MyComponent.css
> 
> and the CSS is imported in MyComponent.java:
> @Import(stylesheet = "MyComponent.css")
> 
> Do these locations make sense please?
> 
> If so, is it possible to reference the global PNG from the component specific 
> CSS?
> ul.my-component-menu {
>  background-image: url('what_should_be_here/myimage.png');
> }
> 
> Thanks.
> Jarda
> -
> 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: RadioGroup client side validation

2017-02-22 Thread Christian Riedel
Hm, I guess so. Someone should write a patch to fix this issue! :)
If I find some elegant solution I let you know!

> Am 22.02.2017 um 03:37 schrieb Bob Harner :
> 
> Christian,
> 
> I think you're hitting https://issues.apache.org/jira/browse/TAP5-2156
> 
> There is very little code to the Radio component. I think RadioGroup is
> where the support for client-side validation is missing. If you are so
> inclined, it should be easy to copy RadioGroup.tml into your project, and
> then you could add the missing functionality as an experiment. Let us all
> know what you find out.
> 
> On Feb 21, 2017 5:01 AM, "Marvin Monroe"  wrote:
> 
> Hi,
> I just looked at the source of the Radio component and it seems it's
> missing a call to FieldValidator#writer to actually support client side
> validation.
> 
> (I want to add a required validation rule to a radio group btw)
> 
> Or am I missing something?
> 
> Cheers
> Christian


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



Re: Zone update and inactive timeout

2016-11-10 Thread Christian Riedel
Hi Vavricka,

every time you poll the server the session timeout is reset.
You could track real user activity on your own in the browser using some js and 
issue a logout request after 30 minutes or so...

Cheers
Christian


> Am 10.11.2016 um 09:26 schrieb .. ... :
> 
> Hi,
> 
>  I am using tapestry 5.4.1 together with jetty 9.2.14.v20151106.
> 
>  I want to set inactive timeout. When users is doing nothing application
> should logout after some time.
>  I set timeout by setting
> webapp.getSessionHandler().getSessionManager().setMaxInactiveInterval(30)
> to 30 seconds. Zone in webpage updates every 5 seconds. With these settings
> session was unable to timeout.
> 
> When I set maxInactiveInterval to one second, session expires as expected.
> 
>  Is there any way to have larger timeout than zone update interval?
> 
>  Vavricka


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



Re: Integrating Tapstry IOC only

2016-04-22 Thread Christian Riedel
You would only need Tapestry IoC for the builders.
Many moons ago I replaced Spring with Tapestry IoC in a Wicket project: 
https://github.com/criedel/WicketTap5IOC
I bet you can find the appropriate hooks in your project to do something 
similar! APIs have changed since 5.2 though.
With what framework would you integrate Tapestry?

> Am 22.04.2016 um 09:27 schrieb Adam X :
> 
>> Why? Just curious. :)
> 
> Well, that brings me to my problem. What I'm really after is
> Tapestry's ordered configuration and its chain builder service, so I
> thought I may as well use IOC since I don't think I can split them. Or
> let me ask my question differently. Is Tapestry registry, chain
> builder and ordered configuration in all in the core module? And if
> so, can I just bring in the core module to use it?
> 
> My use case is a set of distributed plugins and chain of
> responsibility executing them within the engine of my project. I tried
> apache commons chain but it lacks several features that Tapestry's
> ordered list of chain commands.
> 
> So in short, after reading:
> https://tapestry.apache.org/chainbuilder-service.html sounds like it's
> exactly what I need. If I bring in only tapestry core jar, will I get
> this? And if I need Tapestry IOC as well, I would happily replace my
> CDI with IOC.
> 
> Adam
> 
> On Thu, Apr 21, 2016 at 7:20 PM, Cezary Biernacki  wrote:
>> I have used Tapestry-IOC in many non-gui tools including REST applications
>> based on Dropwizard, and it is very easy to do. Just in some place during
>> process initialisation build a IOC registry, retrieve some starting service
>> and call that service - later all dependencies can be handled by
>> Tapestry-IOC. I am not aware of any tutorials outside Tapestry website, so
>> ask if you need any more specific help.
>> 
>> 
>> Best regards,
>> Cezary
>> 
>> On Thu, Apr 21, 2016 at 5:20 PM, Thiago H de Paula Figueiredo <
>> thiag...@gmail.com> wrote:
>> 
>>> On Thu, 21 Apr 2016 04:18:30 -0300, Adam X  wrote:
>>> 
>>> Hi
 
>>> 
>>> Hi!
>>> 
>>> I have a rest project (no gui) with CDI backed by Weld. I would like to
 switch to Tapestry IOC instead.
 
>>> 
>>> Why? Just curious. :) I haven't used CDI so I cannot compare it to
>>> Tapestry-IoC.
>>> 
>>> Are there any good tutorials that cover this?
 
>>> 
>>> It's mostly the same. Just the way you start the Registry is different.
>>> If http://tapestry.apache.org/starting-the-ioc-registry.html isn't
>>> enough, please let us know.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: problem with jquery.DialogAjaxLink

2014-12-02 Thread Christian Riedel
François just released 3.4.1 as a bugfix release!

Download: https://github.com/got5/tapestry5-jquery/releases

Maven:


org.got5
tapestry5-jquery
3.4.1


> Am 02.12.2014 um 09:03 schrieb Ivano Luberti :
> 
> Does this affect also version 3.3.8?
> 
> Il 02/12/2014 08:38, Christian Riedel ha scritto:
>> Yes, there’s a bug in the version you use, which got fixed in 3.4.1-SNAPSHOT 
>> (3.4.1 will be released soon, I guess).
>> Use the SNAPSHOT version or a custom release based on its code. Check out 
>> the master-5.3 branch: 
>> https://github.com/got5/tapestry5-jquery/tree/master-5.3
>> 
>>> Am 02.12.2014 um 01:59 schrieb nn kk :
>>> 
>>> I have the following code:
>>> 
>>>   >> t:dialog="editDialog" t:zone="editZone" 
>>> t:context="0">
>>> 
>>> 
>>> 
>>> 
>>> I have the zone and the dialog inside it... And everything works on my 
>>> local, when I click the link I see the following request:
>>> POST 
>>> http://localhost:8080/MyPrj/mainadminpage.halfseasoneditcomponent.linkedit/2
>>> 
>>> The problem comes when I deploy the war on my prod env, and the domain is 
>>> not localhost, but it still makes the same request to localhost, so I 
>>> receive CORS.
>>> 
>>> Any ideas?!
>>> 
>>> -
>>> 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
>> 
>> 
> 
> -- 
> ==
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> web: www.archicoop.it
> ==
> 
> 
> -
> 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: problem with jquery.DialogAjaxLink

2014-12-02 Thread Christian Riedel
Yes, all versions < 3.4.1-SNAPSHOT

> Am 02.12.2014 um 09:03 schrieb Ivano Luberti :
> 
> Does this affect also version 3.3.8?
> 
> Il 02/12/2014 08:38, Christian Riedel ha scritto:
>> Yes, there’s a bug in the version you use, which got fixed in 3.4.1-SNAPSHOT 
>> (3.4.1 will be released soon, I guess).
>> Use the SNAPSHOT version or a custom release based on its code. Check out 
>> the master-5.3 branch: 
>> https://github.com/got5/tapestry5-jquery/tree/master-5.3
>> 
>>> Am 02.12.2014 um 01:59 schrieb nn kk :
>>> 
>>> I have the following code:
>>> 
>>>   >> t:dialog="editDialog" t:zone="editZone" 
>>> t:context="0">
>>> 
>>> 
>>> 
>>> 
>>> I have the zone and the dialog inside it... And everything works on my 
>>> local, when I click the link I see the following request:
>>> POST 
>>> http://localhost:8080/MyPrj/mainadminpage.halfseasoneditcomponent.linkedit/2
>>> 
>>> The problem comes when I deploy the war on my prod env, and the domain is 
>>> not localhost, but it still makes the same request to localhost, so I 
>>> receive CORS.
>>> 
>>> Any ideas?!
>>> 
>>> -
>>> 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
>> 
>> 
> 
> -- 
> ==
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> web: www.archicoop.it
> ==
> 
> 
> -
> 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: problem with jquery.DialogAjaxLink

2014-12-01 Thread Christian Riedel
Yes, there’s a bug in the version you use, which got fixed in 3.4.1-SNAPSHOT 
(3.4.1 will be released soon, I guess).
Use the SNAPSHOT version or a custom release based on its code. Check out the 
master-5.3 branch: https://github.com/got5/tapestry5-jquery/tree/master-5.3

> Am 02.12.2014 um 01:59 schrieb nn kk :
> 
> I have the following code:
> 
>   t:dialog="editDialog" t:zone="editZone" 
> t:context="0">
>   
>   
> 
> 
> I have the zone and the dialog inside it... And everything works on my local, 
> when I click the link I see the following request:
> POST 
> http://localhost:8080/MyPrj/mainadminpage.halfseasoneditcomponent.linkedit/2
> 
> The problem comes when I deploy the war on my prod env, and the domain is not 
> localhost, but it still makes the same request to localhost, so I receive 
> CORS.
> 
> Any ideas?!
> 
> -
> 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: JQuery upload issue

2014-11-27 Thread Christian Riedel
…and the exception on the server, i.e. the Internal Server Error?

> Am 27.11.2014 um 14:56 schrieb Name Surname :
> 
> NetworkError: 500 Internal Server Error I keep getting this error from 
> console once I press Submit.
> 
>> Subject: Re: JQuery upload issue
>> From: cr.ml...@googlemail.com
>> Date: Thu, 27 Nov 2014 12:16:48 +0100
>> To: users@tapestry.apache.org
>> 
>> The cause might be everything from bugs in your code, browser specific bugs 
>> to server configuration.
>> You must give us some more details about your setup, code and what you’ve 
>> tried so far as well as possible exceptions on server- and client-side.
>> 
>>> Am 27.11.2014 um 08:44 schrieb Name Surname :
>>> 
>>> I have deployed server on my local machine and would like to use TapJQuery 
>>> upload feature. However each time I try to upload something I get failed as 
>>> final output. What may be the cause of it? NOTE: I am accessing my locally 
>>> deployed server from a local web browser. Thinking this might be a reason.
>>>   
>> 
>> 
>> -
>> 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: JQuery upload issue

2014-11-27 Thread Christian Riedel
The cause might be everything from bugs in your code, browser specific bugs to 
server configuration.
You must give us some more details about your setup, code and what you’ve tried 
so far as well as possible exceptions on server- and client-side.

> Am 27.11.2014 um 08:44 schrieb Name Surname :
> 
> I have deployed server on my local machine and would like to use TapJQuery 
> upload feature. However each time I try to upload something I get failed as 
> final output. What may be the cause of it? NOTE: I am accessing my locally 
> deployed server from a local web browser. Thinking this might be a reason.
> 


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



Re: [T5.4 Alpha-15] constructAssetPath() changes

2014-06-05 Thread Christian Riedel
I’m just started the migration to T5.4. TAP5-2170 is still open and I wondered 
if there’s any non-internal interface that I could use to migrate to the new 
API.


Am 07.09.2013 um 20:23 schrieb Lenny Primak :

> It worked... Also, I may have found an easier way,
> just use Asset.toClientURL() and don't need to worry about asset path at all.
> 
> On Sep 4, 2013, at 1:45 PM, Howard Lewis Ship wrote:
> 
>> StreamableResource is a kind of wrapper around Resource that includes
>> additional information needed to generate asset URLs and a bunch of other
>> related concerns.
>> 
>> There's a StreamableResourceSource service.
>> 
>> Oops, that's unfortunate; you'll need the internal ResourceChangeTracker
>> service (which implementes ResourceDependencies) generate a
>> StreamableResource.
>> 
>> We should probably provide an override of getStreamableResource() that
>> provides the ResourceChangeTracker for you, since it is internal.  And
>> actually, one that defaults StreamableResourceProcessing for you as well.
>> 
>> 
>> On Mon, Sep 2, 2013 at 12:48 PM, Lenny Primak wrote:
>> 
>>> I am trying to migrate to T5.4, and so far I don't understand how to use
>>> constructAssetPath()
>>> It now requires a third parameter, StreamableResource.
>>> 
>>> What I am trying to do is get a path for application asset to a
>>> non-tapestry module of the app.
>>> 
>>> Does anyone have an example of how to use constructAssetPath() in T5.4?
>>> 
>>> Thanks
>>> -
>>> 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: How to pass a javascript function in tapestry mixin

2014-02-15 Thread Christian Riedel
Hi Boris,

passing the whole function code as JSONLiteral could work, I guess:

params.put("onSubmit", new JSONLiteral("function () { 
showUploadProgress(); }"));

But Thiago has a point. Passing more complex code around like this is not a 
good idea.
Instead you can alter the fileuploader’s option object directly:

$('#uploader').data('fileuploader')._options.onSubmit = 
showUploadProgress;

Didn’t test this, though. And of course this code works just as long as the 
fileuploader library isn’t replaced by a newer one.

T5-jQuery’s AjaxUpload component should provide a better interface for this.

Best
Christian


Am 16.02.2014 um 00:49 schrieb Boris Horvat :

> Sadly that doesnt really help. Same error, same issue.
> 
> I have changed the JSONLiberal call to
> 
>params.put("onSubmit", new JSONLiteral("showUploadProgress"));
> 
> My javascript that is generated at the end looks like this
> 
>  "uploadable" : [
>{
>  "elementId" : "imageUpload",
>  "onSubmit" : showUploadProgress,
>  "maxConnections" : 3,
>  "action" : "/assets.assetdata.updateassetimage.imageupload:upload",
>  "sizeLimit" : 0,
>  "showMessagesDialog" : "uploadErrorMesages",
>  "multiple" : false,
>  "messages" : {
>"cancelLabel" : "Cancel",
>"failedLabel" : "Failed",
>"uploadLabel" : "Upload Image(s)",
>"typeError" : "{file} has an invalid extension. Only {extensions}
> are allowed.",
>"sizeError" : "{file} is too large, maximum file size is
> {sizeLimit}.",
>"onLeave" : "The files are being uploaded, if you leave now the
> upload will be canceled.",
>"dropAreaLabel" : "Drag and drop images here.",
>"minSizeError" : "{file} is too small, minimum file size is
> {minSizeLimit}.",
>"emptyError" : "{file} is empty, please select files again without
> it."
>  }
>}
> 
> That's something to avoid as much as possible.
> 
> 
> Any suggestion how to avoid this? I need to pass a function that I want to
> call when a file is submitted, so how can I do that?
> 
> Thanks for help
> 
> 
> On Sat, Feb 15, 2014 at 9:37 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>> On Sat, 15 Feb 2014 16:25:27 -0200, Boris Horvat 
>> wrote:
>> 
>> Hi everyone,
>>> 
>> 
>> Hi!
>> 
>> 
>> I have a tapestr5-jquery component that to which I need to pass a
>>> function in the configuration.
>>> 
>> 
>> That's something to avoid as much as possible.
> 
> 
> Any suggestion to
> 
>> 
>> 
>> The component is
>>> http://tapestry5-jquery.com/components/docsajaxupload;jsessionid=
>>> 2CD857F51B90113A175C5B10EE09B138.57B580630AEA
>>> 
>>> My code looks like this
>>> 
>>> java
>>> 
>>> public JSONObject getUploadParams() {
>>>JSONObject params = new JSONObject();
>>>params.put("onSubmit", new
>>> JSONLiteral(String.format("showUploadProgress()")));
>>>return params;
>>>}
>>> 
>> 
>> Your code has an useless String.format() call. In addition, it's passing
>> the value resulting of calling showUploadProgress(), not passing the
>> function itself. It should have been new JSONLiteral("
>> showUploadProgress").
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Sincerely
> *Boris Horvat*


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



Re: [T 5.3] Everything annotated with @Startup called twice

2013-06-18 Thread Christian Riedel
I just created one: https://issues.apache.org/jira/browse/TAP5-2130


Am 17.06.2013 um 14:04 schrieb Muhammad Gelbana:

> Thanks a lot, this helped :)
> And it looks a lot like a bug ! Have you started a jira issue ?
> 
> 
> On Fri, Jun 14, 2013 at 10:53 AM, Christian Riedel
> wrote:
> 
>> Yes, I did.
>> 
>> The problem was that I contributed a service whose interface extended
>> "Runnable".
>> 
>> See my detailed post here:
>> 
>> 
>> http://mail-archives.apache.org/mod_mbox/tapestry-users/201211.mbox/%3cd6ae66be-0916-4a80-abdd-b899afc55...@googlemail.com%3E
>> 
>> and here:
>> 
>> 
>> http://mail-archives.apache.org/mod_mbox/tapestry-users/201211.mbox/%3c4186f80b-5a27-4f69-b22f-444093fc2...@googlemail.com%3E
>> 
>> 
>> 
>> Am 13.06.2013 um 16:33 schrieb Muhammad Gelbana:
>> 
>>> Have you resolved this ? I'm facing the same situation.
>>> 
>>> 
>>> On Mon, Sep 3, 2012 at 1:04 AM, Christian Riedel <
>> cr.ml...@googlemail.com>wrote:
>>> 
>>>> Hello,
>>>> 
>>>> I'm currently looking at a strange problem. Every module method
>> annotated
>>>> with @Startup (from all available modules, for example also
>>>> JpaModule#startupEarly) are being executed twice under certain
>>>> circumstances.
>>>> After some decent debugging I found this out:
>>>> 
>>>> The app is started, registry is up and no app specific service has been
>>>> called or realized. As soon as the first service is realized that uses
>> any
>>>> contributions there's some kind of lookup going on. The appropriate
>>>> contribute***myService*** methods are called from the modules (I've got
>> a
>>>> multi module project here). Within the same lookup process all methods
>>>> annotated with @Startup are called as well. As if they would be part of
>> the
>>>> ordered configuration or something. I'm pretty sure there's something's
>>>> wrong with the @Startup code.
>>>> 
>>>> RegistryImpl#addToOrderedConfiguration is called when realizing that one
>>>> (I think only the first) service with an ordered configuration... and
>> that
>>>> call makes the extra startup-invocations.
>>>> 
>>>> ...Or are there any known bugs that I'm not aware of and that's totally
>>>> normal?
>>>> 
>>>> Best
>>>> Christian
>>>> 
>>>> 
>>>> -
>>>> 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: [T 5.3] Everything annotated with @Startup called twice

2013-06-14 Thread Christian Riedel
Yes, I did.

The problem was that I contributed a service whose interface extended 
"Runnable".

See my detailed post here:

http://mail-archives.apache.org/mod_mbox/tapestry-users/201211.mbox/%3cd6ae66be-0916-4a80-abdd-b899afc55...@googlemail.com%3E

and here:

http://mail-archives.apache.org/mod_mbox/tapestry-users/201211.mbox/%3c4186f80b-5a27-4f69-b22f-444093fc2...@googlemail.com%3E



Am 13.06.2013 um 16:33 schrieb Muhammad Gelbana:

> Have you resolved this ? I'm facing the same situation.
> 
> 
> On Mon, Sep 3, 2012 at 1:04 AM, Christian Riedel 
> wrote:
> 
>> Hello,
>> 
>> I'm currently looking at a strange problem. Every module method annotated
>> with @Startup (from all available modules, for example also
>> JpaModule#startupEarly) are being executed twice under certain
>> circumstances.
>> After some decent debugging I found this out:
>> 
>> The app is started, registry is up and no app specific service has been
>> called or realized. As soon as the first service is realized that uses any
>> contributions there's some kind of lookup going on. The appropriate
>> contribute***myService*** methods are called from the modules (I've got a
>> multi module project here). Within the same lookup process all methods
>> annotated with @Startup are called as well. As if they would be part of the
>> ordered configuration or something. I'm pretty sure there's something's
>> wrong with the @Startup code.
>> 
>> RegistryImpl#addToOrderedConfiguration is called when realizing that one
>> (I think only the first) service with an ordered configuration... and that
>> call makes the extra startup-invocations.
>> 
>> ...Or are there any known bugs that I'm not aware of and that's totally
>> normal?
>> 
>> Best
>> Christian
>> 
>> 
>> -
>> 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.6] HTML encode text

2013-02-06 Thread Christian Riedel
Hi Kevin, 

the component you're looking for is OutputRaw:
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/OutputRaw.html

If you prefer to code your own component with MarkupWriter you'd do it like 
that:

public class PlainOutput {

@Parameter
private String text;

void beginRender(MarkupWriter writer) {
  // any string operation may be here, null-checks etc.
  writer.writeRaw(text);
}

void afterRender(MarkupWriter writer) {
  writer.write("Cheers");
  writer.writeRaw("");
  writer.write("Christian");
}

}


Am 06.02.2013 um 06:30 schrieb Kevin White:

> I have a chunk of UTF-8 text that came from a database table.  It has
> embedded CRLFs in it, so that if you grab the text out of the table, it
> breaks up into long lines of text with blank lines in between them.  The
> intention is that a program capable of word-wrapping the text would then
> display it, turning it into formatted paragraphs and leaving the blank
> lines.
> 
> I'm using Tapestry 5.3.6 to display the text.  I'm having trouble. 
> Obviously, if I just print the field, Tapestry nicely HTML encodes it,
> escaping any bad characters.  But then, of course, the CRLFs disappear,
> and I get one large chunk of text.
> 
> So, I brilliantly replaced all the CRLF characters with ...and
> Tapestry equally brilliantly encoded the < > characters in my text,
> resulting in the on-screen display of the literal .
> 
> So, here's what I think I want to do:
> 
> a) Call whatever function is in Tapestry to HTML escape/encode my text
> b) then replace CRLF with 
> c) then use OutputRaw to output it
> 
> The problem is: I can't figure out that first step: what method is
> called by Tapestry in the Output component.  Well, it appears to be in
> the MarkupWriter.
> 
> Instead of a) as written, maybe I actually need to create an instance of
> some sort of implementation of MarkupWriter that lets me write just my
> string and get the output as a string.  Is that the right path?
> 
> Anyways, thanks, and I'm open for any other/better suggestions on how to
> accomplish this.
> 
> Kevin
> 
> 
> -
> 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: [5.4-alpha-2] core_**.properties got wrong encoding?

2013-01-31 Thread Christian Riedel
Done: TAP5-2061
https://issues.apache.org/jira/browse/TAP5-2061

Thanks Bob!

Am 31.01.2013 um 19:12 schrieb Bob Harner:

> Yes to both, although it may take me a day or two to get to it.
> 
> On Thu, Jan 31, 2013 at 11:01 AM, Christian Riedel
>  wrote:
>> Hi Bob,
>> 
>> would you be able to restore the correct encoding? Should I open a JIRA?
>> 
>> Cheers
>> Christian
>> 
>> 
>> Am 31.01.2013 um 04:19 schrieb Bob Harner:
>> 
>>> No, I don't think it's just you. I see it too. I think some of the
>>> files might have got munged in the merge into the "core" property
>>> files a few weeks back. I checked the corresponding (original) files
>>> in the 5.3 branch and they look right there, in contrast.
>>> 
>>> On Wed, Jan 30, 2013 at 6:34 PM, Christian Riedel
>>>  wrote:
>>>> Hi,
>>>> 
>>>> I'm currently testing alpha-2 and it seems that the encoding of the 
>>>> translations in a few properties files got mixed up.
>>>> 
>>>> The file says it's UTF-8, my editor uses UTF-8 (and in 5.3 they were all 
>>>> ok!) and I'm reading things this:
>>>> core-palette-up-label=Aufwärts
>>>> core-palette-up-label=Вверх
>>>> 
>>>> After a quick look I found the following files looking broken:
>>>> 
>>>> tapestry-5/tapestry-core/src/main/resources/org/apache/tapestry5/
>>>> 
>>>> core_sr_RS.properties
>>>> core_ru.properties
>>>> core_pt_BR.properties
>>>> core_no_NB.properties
>>>> core_mk_MK.properties
>>>> core_it.properties
>>>> core_hr.properties
>>>> core_fr.properties
>>>> core_de.properties
>>>> core_da.properties
>>>> core_bg.properties
>>>> 
>>>> Also checked the master branch, so it should still be broken everywhere or 
>>>> just at my computer… Could anyone have a look?
>>>> 
>>>> Thanks
>>>> Christian
>>>> -
>>>> 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
> 


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



Re: [5.4-alpha-2] core_**.properties got wrong encoding?

2013-01-31 Thread Christian Riedel
Hi Bob, 

would you be able to restore the correct encoding? Should I open a JIRA?

Cheers
Christian


Am 31.01.2013 um 04:19 schrieb Bob Harner:

> No, I don't think it's just you. I see it too. I think some of the
> files might have got munged in the merge into the "core" property
> files a few weeks back. I checked the corresponding (original) files
> in the 5.3 branch and they look right there, in contrast.
> 
> On Wed, Jan 30, 2013 at 6:34 PM, Christian Riedel
>  wrote:
>> Hi,
>> 
>> I'm currently testing alpha-2 and it seems that the encoding of the 
>> translations in a few properties files got mixed up.
>> 
>> The file says it's UTF-8, my editor uses UTF-8 (and in 5.3 they were all 
>> ok!) and I'm reading things this:
>> core-palette-up-label=Aufwärts
>> core-palette-up-label=Вверх
>> 
>> After a quick look I found the following files looking broken:
>> 
>> tapestry-5/tapestry-core/src/main/resources/org/apache/tapestry5/
>> 
>> core_sr_RS.properties
>> core_ru.properties
>> core_pt_BR.properties
>> core_no_NB.properties
>> core_mk_MK.properties
>> core_it.properties
>> core_hr.properties
>> core_fr.properties
>> core_de.properties
>> core_da.properties
>> core_bg.properties
>> 
>> Also checked the master branch, so it should still be broken everywhere or 
>> just at my computer… Could anyone have a look?
>> 
>> Thanks
>> Christian
>> -
>> 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



[5.4-alpha-2] core_**.properties got wrong encoding?

2013-01-30 Thread Christian Riedel
Hi,

I'm currently testing alpha-2 and it seems that the encoding of the 
translations in a few properties files got mixed up. 

The file says it's UTF-8, my editor uses UTF-8 (and in 5.3 they were all ok!) 
and I'm reading things this:
core-palette-up-label=Aufwärts
core-palette-up-label=Вверх

After a quick look I found the following files looking broken:

tapestry-5/tapestry-core/src/main/resources/org/apache/tapestry5/

core_sr_RS.properties
core_ru.properties
core_pt_BR.properties
core_no_NB.properties
core_mk_MK.properties
core_it.properties
core_hr.properties
core_fr.properties
core_de.properties
core_da.properties
core_bg.properties

Also checked the master branch, so it should still be broken everywhere or just 
at my computer… Could anyone have a look?

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



Re: Tapestry 5 book is here

2013-01-25 Thread Christian Riedel
Thank you, Igor!

100 pages more than the early access version, good job! :-)



Am 25.01.2013 um 10:20 schrieb Igor Drobiazko:

> Dear Tapestry community,
> 
> I'm glad to announce that the long awaited Tapestry 5 book is now available
> for purchase as paperback:
> 
> http://blog.tapestry5.de/index.php/2013/01/25/tapestry-5-book-is-here/
> 
> Enjoy reading


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



Re: @Scope PerThread may cause PermGen errors?

2012-11-30 Thread Christian Riedel
Yes, as I said the annotation was just there by accident.

But thanks for making it clear.
I guess using ObjectLocator.proxy has the same effect? One has to be careful 
not to misuse this feature.

Well, Howards, thanks for taking the minute :-)

I already had a peek at the latest 5.4 code and even got a small test-app 
running without problems so far. Great job!


Am 30.11.2012 um 18:52 schrieb Howard Lewis Ship:

> Per-thread scope means to create a new implementation, via the builder
> method, once for every request: buldUserCacheSupport() is invoked the first
> time any method of UserCacheSupport is invoked.
> 
> EnvironmentalBuilder creates a proxy class and instance, and is intended to
> only be invoked once per service; that is, a singleton service.  Since it
> is being invoked multiple times, it is creating one proxy class after
> another, and these are accumulating in PermGen.
> 
> There is no need to make UserCacheSupport per-thread, since everything in
> the Environment is already per-thread.
> 
> 
> On Fri, Nov 30, 2012 at 9:48 AM, Christian Riedel
> wrote:
> 
>> Hi everone,
>> 
>> today I found the reason for a recent memory leak and I thought I'd ask
>> what you think of it:
>> 
>> Rather by accident I annotated one of the
>> EnvironmentalShadowBuilder-methods with @Scope(PERTHREAD)
>> 
>>@Scope(ScopeConstants.PERTHREAD)
>>public UserCacheSupport buildUserCacheSupport() {
>> 
>>return environmentalBuilder.build(UserCacheSupport.class);
>>}
>> 
>> (UserCacheSupport is just a custom environmental)
>> 
>> So I removed the annotation and everything is ok again.
>> 
>> But: Isn't that strange? Is that a known behavior? Using jhat I found
>> thousands of undead UserCacheSupport classes tied to a PlasticClassLoader.
>> So Plastic creates one class per request (i.e. per thread) and.. somehow
>> keeps it. Without the explicit @Scope setting there should also be one new
>> object per thread, but it does not cause a leak (since there's not a new
>> class for each request, I guess). I'm wondering if it's actually a bug in
>> Tapestry?
>> 
>> Cheers
>> Christian
>> -
>> 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



@Scope PerThread may cause PermGen errors?

2012-11-30 Thread Christian Riedel
Hi everone,

today I found the reason for a recent memory leak and I thought I'd ask what 
you think of it:

Rather by accident I annotated one of the EnvironmentalShadowBuilder-methods 
with @Scope(PERTHREAD)

@Scope(ScopeConstants.PERTHREAD)
public UserCacheSupport buildUserCacheSupport() {

return environmentalBuilder.build(UserCacheSupport.class);
}

(UserCacheSupport is just a custom environmental)

So I removed the annotation and everything is ok again. 

But: Isn't that strange? Is that a known behavior? Using jhat I found thousands 
of undead UserCacheSupport classes tied to a PlasticClassLoader. So Plastic 
creates one class per request (i.e. per thread) and.. somehow keeps it. Without 
the explicit @Scope setting there should also be one new object per thread, but 
it does not cause a leak (since there's not a new class for each request, I 
guess). I'm wondering if it's actually a bug in Tapestry?

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



Re: [Bug] [T5.3.6] @Startup service contributions executed more than once

2012-11-27 Thread Christian Riedel
I was not 100% precise: it's happening if the services interface extends 
"Runnable", rather than just implementing it.

This is ok:

public interface AnyService {

void anything();
}

public class AnyServiceImpl implements AnyService, Runnable {

 // ..
}

This will cause the bug:

public interface AnyService extends Runnable {

void anything();
}

Am 27.11.2012 um 17:30 schrieb Christian Riedel:

> Hi everyone,
> 
> I wrote about this bug a while ago already, but can't find the original post.
> After lots of debugging I found the reason for a bug in our app. The symptoms 
> were that all contributions annotated with @Startup (also the ones from 
> Tapestry internal modules) were executed a second time as soon as the app has 
> been hit by its first request, i.e. some services got realized.
> 
> Now I found the reason and I'm not sure whether it's a real bug in Tapestry 
> or if it's a less known side effect of Tapestry's design…
> 
> Custom services that implement "Runnable" and have any contributions will 
> cause Tapestry to assume all of RegistryStartup's contributions to be 
> matching as well, so they'll be executed as soon as that custom service's 
> contributions are executed. If you have some execute-one-time-only 
> startup-contributions you might get into troubles!
> 
> Debug here: 
> org.apache.tapestry5.ioc.internal.ModuleImpl#markerMatched(ServiceDef 
> serviceDef, Markable markable)
> 
> "markable" may be any contribution for RegistryStartup.
> Then "markable.getServiceInterface()" will return the "Runnable" interface, 
> which is assignable to your custom service and further down that method the 
> contribution that was supposed to be for RegistryStartup will be considered 
> as "ContributionDef".
> 
> Sure the fixing the bug is easy:
> Just NEVER let any of your services implement Runnable. Why did we do that in 
> the first place? Because we wanted to add a job to Tapestry's 
> PeriodicExecutor after our custom service got realized, to prevent some 
> timing issues. So our services wanted to be a PeriodicExecutor-job.
> 
> Another fix for the bug could be to give RegistryStartup its own interface 
> and prevent collisions with internal services altogether!
> 
> Hope to read some thoughts of committers on that issue.
> 
> 
> Cheers
> Christian


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



[Bug] [T5.3.6] @Startup service contributions executed more than once

2012-11-27 Thread Christian Riedel
Hi everyone,

I wrote about this bug a while ago already, but can't find the original post.
After lots of debugging I found the reason for a bug in our app. The symptoms 
were that all contributions annotated with @Startup (also the ones from 
Tapestry internal modules) were executed a second time as soon as the app has 
been hit by its first request, i.e. some services got realized.

Now I found the reason and I'm not sure whether it's a real bug in Tapestry or 
if it's a less known side effect of Tapestry's design…

Custom services that implement "Runnable" and have any contributions will cause 
Tapestry to assume all of RegistryStartup's contributions to be matching as 
well, so they'll be executed as soon as that custom service's contributions are 
executed. If you have some execute-one-time-only startup-contributions you 
might get into troubles!

Debug here: 
org.apache.tapestry5.ioc.internal.ModuleImpl#markerMatched(ServiceDef 
serviceDef, Markable markable)

"markable" may be any contribution for RegistryStartup.
Then "markable.getServiceInterface()" will return the "Runnable" interface, 
which is assignable to your custom service and further down that method the 
contribution that was supposed to be for RegistryStartup will be considered as 
"ContributionDef".

Sure the fixing the bug is easy:
Just NEVER let any of your services implement Runnable. Why did we do that in 
the first place? Because we wanted to add a job to Tapestry's PeriodicExecutor 
after our custom service got realized, to prevent some timing issues. So our 
services wanted to be a PeriodicExecutor-job.

Another fix for the bug could be to give RegistryStartup its own interface and 
prevent collisions with internal services altogether!

Hope to read some thoughts of committers on that issue.


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



Re: Tapestry URLs inside iFrame (Facebook canvas)

2012-10-30 Thread Christian Riedel
Just contribute a symbol called "tapestry.hostname". BaseURLSource is using it.
See 
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/SymbolConstants.html

Am 30.10.2012 um 11:19 schrieb jellevangompel:

> Here's the image I wanted to include:
> 
> 
>  
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-URLs-inside-iFrame-Facebook-canvas-tp5717408p5717412.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



[T 5.3] Everything annotated with @Startup called twice

2012-09-02 Thread Christian Riedel
Hello,

I'm currently looking at a strange problem. Every module method annotated with 
@Startup (from all available modules, for example also JpaModule#startupEarly) 
are being executed twice under certain circumstances.
After some decent debugging I found this out:

The app is started, registry is up and no app specific service has been called 
or realized. As soon as the first service is realized that uses any 
contributions there's some kind of lookup going on. The appropriate 
contribute***myService*** methods are called from the modules (I've got a multi 
module project here). Within the same lookup process all methods annotated with 
@Startup are called as well. As if they would be part of the ordered 
configuration or something. I'm pretty sure there's something's wrong with the 
@Startup code.

RegistryImpl#addToOrderedConfiguration is called when realizing that one (I 
think only the first) service with an ordered configuration... and that call 
makes the extra startup-invocations.

...Or are there any known bugs that I'm not aware of and that's totally normal?

Best
Christian


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



Re: [Documentation Errata] EventLink page

2012-09-01 Thread Christian Riedel
No, that's ok, since they are tied with the component using @Component.
You can configure components completely in your component class if you wish and 
only use t:id in the template…



Am 01.09.2012 um 16:50 schrieb Muhammad Gelbana:

> On this page:
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/EventLink.html
> 
> 
> I found the following:
> 
> **${columnModel.label}
>> **
>>  > alt="${iconLabel}"/>
>> 
> 
> 
> The tags are missing the t:type attribute.


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



Re: if/else if component

2012-08-31 Thread Christian Riedel

  

you mean this???
 
  



Am 31.08.2012 um 13:06 schrieb karthi:

> Hi everyone,
> 
> I have used if/else in tapestry, but can anyone tell me how to achieve 
> 
> if/else if/else if/else 
> 
> Thanks in advance
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/if-else-if-component-tp5715941.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: Tapestry 5.3.5

2012-08-30 Thread Christian Riedel
Yay, that would make 2 more releases before christmas! 


Am 30.08.2012 um 19:47 schrieb Howard Lewis Ship:

> Catch it while it's hot!  Yet another bug fix release for 5.3:
> 
> Apache Tapestry 5.3.5
> 
> http://tapestry.apache.org/2012/08/30/announcing-tapestry-535.html
> 
> There may be an issue with DateField inside Internet Explorer that
> will have to be addressed in 5.3.6.  Since the switch from SVN to Git
> (and from Maven to Gradle) it has become much easier to backport fixes
> and generate releases.  We've created six releases since last November
> ... that's about one every two months.
> 
> -- 
> 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: GridDataSource has been transformed and may not be directly instantiated

2012-08-22 Thread Christian Riedel
That's up to your personal taste ;-) 

Am 23.08.2012 um 02:18 schrieb William Lopes:

> Thank you so much again, it is solved.
> 
> I put in util package, is a good practice?
> 
> 2012/8/22 Christian Riedel 
> 
>> move br.cnt.aas.material.components.MaterialGridDataSource into another
>> package since it's obviously not a component class!
>> 
>> Am 23.08.2012 um 02:03 schrieb William Lopes:
>> 
>>> Thanks.
>>> 
>>> So, what do you advise?
>>> 
>>> 2012/8/22 Christian Riedel 
>>> 
>>>> Before Tapestry 5.3 it was just a recommendation, now it's a
>> requirement:
>>>> NEVER put other classes than components, mixins or pages (except
>>>> base-classes) into their corresponding packages!
>>>> You know… Tapestry is doing MAGIC a.k.a. convention over configuration
>> ;)
>>>> 
>>>> 
>>>> 
>>>> Am 23.08.2012 um 01:36 schrieb William Lopes:
>>>> 
>>>>> Hello again!
>>>>> 
>>>>> So, I'm updating my app for the last version of tapestry and by that
>>>> seems,
>>>>> this is the last thing to be done.
>>>>> 
>>>>> The system is working ok, but when I go access a page where I edited
>> the
>>>>> GridDataSource, I have problems. The grid don't be shows and this error
>>>> is
>>>>> returned:
>>>>> 
>>>>> java.lang.IllegalStateException: Class
>>>>>> br.cnt.aas.material.components.MaterialGridDataSource has been
>>>> transformed
>>>>>> and may not be directly instantiated.
>>>>>> at
>>>>>> 
>>>> 
>> br.cnt.aas.material.components.MaterialGridDataSource.(MaterialGridDataSource.java)
>>>>>> at
>>>>>> 
>>>> 
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java:191)
>>>>>> at
>>>>>> 
>>>> 
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
>>>>>> at $PageRenderQueue_566878f139e.render(Unknown Source)
>>>>>> at $PageRenderQueue_566878f1396.render(Unknown Source)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1980)
>>>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1964)
>>>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1946)
>>>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)
>>>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>>>> at
>>>>>> 
>>>> 
>> org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1917)
>>>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>>>> at
>>>>>> 
>>>>

Re: GridDataSource has been transformed and may not be directly instantiated

2012-08-22 Thread Christian Riedel
move br.cnt.aas.material.components.MaterialGridDataSource into another package 
since it's obviously not a component class!

Am 23.08.2012 um 02:03 schrieb William Lopes:

> Thanks.
> 
> So, what do you advise?
> 
> 2012/8/22 Christian Riedel 
> 
>> Before Tapestry 5.3 it was just a recommendation, now it's a requirement:
>> NEVER put other classes than components, mixins or pages (except
>> base-classes) into their corresponding packages!
>> You know… Tapestry is doing MAGIC a.k.a. convention over configuration ;)
>> 
>> 
>> 
>> Am 23.08.2012 um 01:36 schrieb William Lopes:
>> 
>>> Hello again!
>>> 
>>> So, I'm updating my app for the last version of tapestry and by that
>> seems,
>>> this is the last thing to be done.
>>> 
>>> The system is working ok, but when I go access a page where I edited the
>>> GridDataSource, I have problems. The grid don't be shows and this error
>> is
>>> returned:
>>> 
>>> java.lang.IllegalStateException: Class
>>>> br.cnt.aas.material.components.MaterialGridDataSource has been
>> transformed
>>>> and may not be directly instantiated.
>>>> at
>>>> 
>> br.cnt.aas.material.components.MaterialGridDataSource.(MaterialGridDataSource.java)
>>>> at
>>>> 
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java:191)
>>>> at
>>>> 
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
>>>> at $PageRenderQueue_566878f139e.render(Unknown Source)
>>>> at $PageRenderQueue_566878f1396.render(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1980)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1964)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1946)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1917)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1899)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1880)
>>>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>>>> at $MarkupRenderer_566878f139d.renderMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
>>>> at $PageMarkupRenderer_566878f139b.renderPageMarkup(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
>>>> at $PageResponseRenderer_566878f132d.renderPageResponse(Unknown Source)
>>>> at
>>>> 
>> org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.jav

Re: GridDataSource has been transformed and may not be directly instantiated

2012-08-22 Thread Christian Riedel
Before Tapestry 5.3 it was just a recommendation, now it's a requirement: NEVER 
put other classes than components, mixins or pages (except base-classes) into 
their corresponding packages!
You know… Tapestry is doing MAGIC a.k.a. convention over configuration ;)



Am 23.08.2012 um 01:36 schrieb William Lopes:

> Hello again!
> 
> So, I'm updating my app for the last version of tapestry and by that seems,
> this is the last thing to be done.
> 
> The system is working ok, but when I go access a page where I edited the
> GridDataSource, I have problems. The grid don't be shows and this error is
> returned:
> 
> java.lang.IllegalStateException: Class
>> br.cnt.aas.material.components.MaterialGridDataSource has been transformed
>> and may not be directly instantiated.
>> at
>> br.cnt.aas.material.components.MaterialGridDataSource.(MaterialGridDataSource.java)
>> at
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java:191)
>> at
>> br.cnt.aas.material.pages.ListarMaterial.setupRender(ListarMaterial.java)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.invokeComponent(ComponentPageElementImpl.java:174)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:133)
>> at
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$SetupRenderPhase.render(ComponentPageElementImpl.java:181)
>> at
>> org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
>> at
>> org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
>> at $PageRenderQueue_566878f139e.render(Unknown Source)
>> at $PageRenderQueue_566878f1396.render(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
>> at
>> org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1980)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1964)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1946)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1917)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1899)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:1880)
>> at $MarkupRenderer_566878f13a1.renderMarkup(Unknown Source)
>> at $MarkupRenderer_566878f139d.renderMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
>> at $PageMarkupRenderer_566878f139b.renderPageMarkup(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
>> at $PageResponseRenderer_566878f132d.renderPageResponse(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
>> at
>> org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2208)
>> at $PageRenderRequestHandler_566878f132f.handle(Unknown Source)
>> at $PageRenderRequestHandler_566878f1329.handle(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
>> at
>> org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
>> at $ComponentRequestHandler_566878f132a.handlePageRender(Unknown Source)
>> at $ComponentRequestHandler_566878f12fb.handlePageRender(Unknown Source)
>> at
>> org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
>> at $Dispatcher_566878f12fe.dispatch(Unknown Source)
>> at $Dispatcher_566878f12f8.dispatch(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
>> at
>> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>> at $RequestHandler_566878f12f9.service(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
>> at $RequestHandler_566878f12f9.service(Unknown Source)
>> at
>> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
>> at $RequestHandler_566878f12f9.service(Unknown Source)
>> at
>> org

Re: Trouble with update of the tapestry(5.1.0.5 => 5.3.4)

2012-08-22 Thread Christian Riedel
Oh great that it works, wasn't even sure if you need the exclusion for 
hibernate-jpa-2.0-api… I had it in there for that project because JPA came with 
another dependency :-)


Am 22.08.2012 um 19:38 schrieb William Lopes:

> Thank you so much Christian, with your tip I achieved fix it.
> 
> I already had searched for many hours and nothing, was paste your code and
> worked fine.
> 
> 2012/8/22 Christian Riedel 
> 
>> Try this:
>> 
>> 
>>
>>org.hibernate
>>hibernate-entitymanager
>>3.6.8.Final
>>
>>
>>org.hibernate.javax.persistence
>>hibernate-jpa-2.0-api
>>
>>
>>
>> 
>>
>>org.hibernate
>>hibernate-c3p0
>>3.6.8.Final
>>
>> 
>> The transitive dependency should load c3p0 0.9.1.
>> 
>> Am 22.08.2012 um 05:15 schrieb Thiago H de Paula Figueiredo:
>> 
>>> On Tue, 21 Aug 2012 22:49:32 -0300, William Lopes <
>> williamlopes@gmail.com> wrote:
>>> 
>>>> Can you to say me which is the version of yours Tapestry, Hibernate and
>>>> C3P0?
>>> 
>>> I'm still not using Tapestry 5.3.x (sigh), so I can't help you much
>> here. Anyway, it's a matter of figuring out the right C3P0 version to the
>> Hibernate version you're using, something which is off-topic to this
>> mailing list.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> 
>>> -
>>> 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: Trouble with update of the tapestry(5.1.0.5 => 5.3.4)

2012-08-22 Thread Christian Riedel
Try this:



org.hibernate
hibernate-entitymanager
3.6.8.Final


org.hibernate.javax.persistence
hibernate-jpa-2.0-api





org.hibernate
hibernate-c3p0
3.6.8.Final


The transitive dependency should load c3p0 0.9.1.

Am 22.08.2012 um 05:15 schrieb Thiago H de Paula Figueiredo:

> On Tue, 21 Aug 2012 22:49:32 -0300, William Lopes 
>  wrote:
> 
>> Can you to say me which is the version of yours Tapestry, Hibernate and
>> C3P0?
> 
> I'm still not using Tapestry 5.3.x (sigh), so I can't help you much here. 
> Anyway, it's a matter of figuring out the right C3P0 version to the Hibernate 
> version you're using, something which is off-topic to this mailing list.
> 
> -- 
> Thiago H. de Paula Figueiredo
> 
> -
> 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: Appropriate use of ProgressiveDisplay?

2012-08-16 Thread Christian Riedel
Hi George,

ProgressiveDisplay's initial block may be used to display a "loading" message / 
spinning icon.
But I wouldn't recommend this component to be used just as a feedback 
mechanism. Build your own component that may listen to certain events and 
show/hide itself as needed.

ProgressiveDisplay is rather useful if you have expensive server-side stuff 
going on but don't want the user to wait 10 seconds until the page can be 
loaded. The component will first show a placeholder and immediately send a 
separate request using XHR to the server to get the expensive stuff.

Best
Christian

Am 16.08.2012 um 23:05 schrieb George Ludwig:

> I want to use ProgressiveDisplay to display a message and spinner icon when
> an operation is taking place. For example, when saving changes, the message
> would be "Saving..." If the page was loading, the message would be
> "Loading...".
> 
> Is this an appropriate use of ProgressiveDisplay, or is there a better way?
> 
> Second, when using "t:initial="block:..."  what is the easiest way to get
> the spinning icon in it?
> 
> -George


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



Re: tweet buttons?

2012-08-16 Thread Christian Riedel
with great pleasure: https://gist.github.com/3373589

Am 31.07.2012 um 01:57 schrieb Angelo C.:

> cool, care to share?
> 
> 
> Christian Riedel-4 wrote
>> 
>> Yep, I've got one!
>> 
>> Am 31.07.2012 um 00:54 schrieb Angelo C.:
>> 
>>> anybody got one ? say,  then expand to :
>>> < a href="https://twitter.com/share"; class="twitter-share-button"
>>> data-url="https://dev.twitter.com"; data-via="your_screen_name"
>>> data-lang="en">Tweet< /a>
>>> < script>!func .. 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@.apache
>>> For additional commands, e-mail: users-help@.apache
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898p5714900.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: macbook retina support

2012-08-15 Thread Christian Riedel
Having all @media switches in one css file might make your mobile clients 
download a lot of useless rules. You can split the files up and include just 
those files that are applicable for the device that is loading your pages. 
Check out this project: 
https://github.com/scottjehl/eCSSential#check-out-the-demos


Am 15.08.2012 um 10:40 schrieb sommeralex:

> the window device ratio was the wrong example (due it is JS)
> 
> apple mentions two others ways, but it seems they are "CSS" solutions
> 
> header {
>background: -webkit-image-set( url(images/header.jpg)1x,
>   url(images/header_2x.jpg) 2x);
>height: 150px; /* height in CSS pixels */
>width: 800px; /* width in CSS pixels */
> }
> 
> OR
> 
> header {
>background-image: url(images/header.jpg);
>background-size: cover;
>height: 150px;
>width: 800px;
> }
> /* ... more 1x CSS rules ... */
> @media screen and (-webkit-min-device-pixel-ratio: 2) {
>header {
>background-image: url(images/header_2x.jpg);
>}
>/* ... more 2x CSS rules ... */
> }
> 
> 
> i guess the simplest hack is just to use higher resolutions images but
> forcing a fixed height and width. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/macbook-retina-support-tp5715342p5715434.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: macbook retina support

2012-08-13 Thread Christian Riedel
A few days ago I made a little tapestry-add-on to support a json-binding.
Just have a look at the sources and you'll know how to implement the equivalent 
for your use-case!

https://github.com/criedel/tapestry-json-binding

Best
Christian

Am 13.08.2012 um 18:09 schrieb sommeralex:

> Hello!
> 
> The apple doc describe 3 ways for supporting retina images. My question,
> before i start to replace everything with javascript or css, is, if there
> will be an update of tapestry supporting the automatic retina with this
> syntax: src="${context:/img/img.png}
> 
> because if not, i have to use javascript..
> 
> https://developer.apple.com/library/safari/#documentation/NetworkingInternet/Conceptual/SafariImageDeliveryBestPractices/ServingImagestoRetinaDisplays/ServingImagestoRetinaDisplays.html#//apple_ref/doc/uid/TP40012449-CH3-SW1
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/macbook-retina-support-tp5715342.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: Why should we specify t:id and id for the zone

2012-08-11 Thread Christian Riedel
Let me try…

The t:id parameter defines the component id, i.e. the "name" of the component 
in your template, which you can use for injecting the component to your 
component class:

tml:
> 

class:
> @InjectComponent
> private Zone myzone;

Mostly it's enough for you to specify just t:id. Each zone with a t:id gets a 
generated, unique "id" attribute. If your zone "myzone" is rendered only once 
the id attribute will be identical to the t:id attribute that it has been 
generated from.

I'll illustrate the render process and what gets initialized vie JavaScript. In 
the first example I'll show when and why you don't need to specify the 
additional id attribute to t:zone. In the second example I'll show when you 
absolutely need to specify both.

Example #1:

page tml:

> 
> updated content

page class:

> @Inject
> private AjaxResponseRenderer ajax;
> 
> @Inject
> private Block lazyContent;
> 
> void onActionFromMyLink() {
> 
> ajax.addRenderer("myzone", lazyContent);
> }

1. The page is called for the first time
2. The zone "myzone" is rendered, its id attribute will be also "myzone".
3. The actionLink is rendered and a Tapestry JavaScript init-method will be 
prepared with the following configuration JSON:
{
"inits": [
{
"linkZone": {
"linkId": "myLink",
"zoneId": "myzone"
}
}
]
}
   --> See the Tapestry source of ClientBehaviorSupportImpl.java "linkZone" 
method for more details.
4. The client-side JS code will look for an element with the exact id of 
"myzone" to trigger the zone update as soon as the link is clicked.
5. User clicks on the link, onActionFromMyLink is called and a zone refresh for 
the zone with the id "myzone" will be sent to the client. The id ("myzone") 
must still be equal to the id in the DOM.

Example #2:

page tml:

> 
> 
> updated content


page class:

> @Inject
> private AjaxResponseRenderer ajax;
> 
> @Inject
> private Block lazyContent;
> 
> @InjectComponent
> private Zone wrapperZone;
> 
> void onActionFromMyLink() {
> 
> ajax.addRenderer("myzone", lazyContent);
> 
> void onActionFromWrapperUpdate() {
> 
> ajax.addRenderer("wrapperZone", wrapperZone);
> }

This time "myzone" is inside another zone. And as I said earlier the id 
attribute of a zone is only equal to the t:id attribute if the zone is only 
rendered once. After you click the "update wrapper" action link the inner zone 
"myzone" will render again and its id will not be equal to "myzone" (it's going 
to be something like myzone_012312abc) unless you specify the parameter 
yourself. This way it's also your responsibility to make sure this id is only 
existing once in your DOM.

The 5 steps from the first example stay the same for the rendering of the 
wrapper zone's body. Your actionlink (or whatever component you're using, e.g 
jquery.slider) will always bind on the same client-side zoneId, which is 
"myzone", because that's what you've specified as its t:zone parameter.

So there are multiple solutions to this problem:

1. You add id="myzone" to your inner zones to make sure the client side id 
attribute is always what you expect.
2. You make the t:zone parameter value a property that is evaluated during 
rendering. So instead of t:zone="myzone" (which is a literal binding) you 
specify t:zone="prop:currentZoneId" and add a corresponding getter in the java 
code:

> @InjectComponent
> private Zone myzone;
> 
> public String getCurrentZoneId() {
> myzone.getClientId();
> }

Solution #2 brings another caveat: If the actionLink from my example would be 
specified in the template before the zone this wouldn't work. The zone's 
clientId would be "null" because the zone hasn't been rendered, yet… You could 
add some more advanced tricks with Heartbeats and @HeartbeatDeferred but… I 
guess you'll just stick with solution #1 :-)

I'm sure the upcoming refactorings (an euphemism?) in tapestry.js will make it 
better and easier!

tl;dr

Use t:id AND id on zones if it's a nested zone, since the client-side id would 
not be predictable and watch out you have no duplicate ids in you DOM, 
otherwise use only t:id

Cheers,
Christian



Am 10.08.2012 um 00:34 schrieb bhorvat:

> Well like it says in the subject, why should we specify both normal id and
> the t:id. I know that the latter is for the tapestry where the first one is
> for the client, but why is not that set by default in tapestry if it is that
> important, and I take it that it is because some of my code wont work
> without. For example 
> 
> 
>  t:zone="zonePercentage"
> t:params="sliderParams" />
>  
> 
>${percentage}% 
>  
> 
> without id="zonePercentage" the event wont be triggered. 
> 
> thanks all 
> cheers
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Why-should-we-specify-t-id-and-id-for-the-zone-tp5715208.html
> Sent from the Tapestry - User maili

Re: restrict button refresh When i click

2012-08-07 Thread Christian Riedel
So basically what you're trying to do is a zone-refresh instead of a page 
refresh?
If your button is an actionlink or eventlink just add this property:
 t:zone="yourzoneId" 

Use AjaxResponseRenderer (e.g. #addRender(ClientBodyElement zone)) in your 
corresponding eventhandler to (re-)render the zone that contains the title you 
were talking about.


Am 07.08.2012 um 08:10 schrieb Anbazhagan:

> Hi 
> 
> I using loop component to display the list of items. Each items have
> separate button. I have designed when i click the button the title of items
> will display on the same page. Here when i click that button the page was
> refreshed. so i cannot maintain the current index. Hence can't display the
> title of content for next next items. 
> 
> Any one say how  restrict the refresh when i click the button or d u have
> any possible solutions pls post.
> 
> Thank you
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/restrict-button-refresh-When-i-click-tp5715114.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: Lightweight TapestryTools update site

2012-08-07 Thread Christian Riedel
Hi Gavin,

I've been using the jump-to-file function of your plugin for a while now and I 
also noticed something that might be quite easy to fix:
When you have multiple Index pages the plugin always jumps to the first index 
page it finds, which is in my case the root Index page.  

com.tap.pages.Index.java
com.tap.pages.profile.Index.java

Jumping back and forth between those always leads me to the root Index page. 
Maybe you should also take the package into account not only the filename. 
Maybe it will also fail if other pages have the same name but different 
packages (didn't test that case).

But thanks for the plugin anyway! You did a good job! :-)

Cheers,
Christian



Am 07.08.2012 um 12:25 schrieb Gavin Lei:

> Hi,
> 
> Thanks for your feedback, TapestryTools now just look for the "same"
> filename, it does not support your situation yet.
> 
> 2012/8/6 antalk :
>> Hi,
>> 
>> I just installed the plugin in eclipse 'juno'. It works fine but it can not
>> match named translated TML pages to the correct class.
>> 
>> What i mean:
>> 
>> I have several template pages which end with a locale identifier, eg:
>> 
>> About_nl.tml
>> About_en.tml
>> About_de.tml
>> 
>> The plugin should be able to link this to the 'About.java' class,  but ( as
>> of now) it does not.  Should be great if this could be implemented.
>> 
>> Thx
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/Lightweight-TapestryTools-update-site-tp5610392p5715091.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
>> 
> 
> 
> 
> -- 
> -
> 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
> 


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



Re: tweet buttons?

2012-07-30 Thread Christian Riedel
Yep, I've got one!

Am 31.07.2012 um 00:54 schrieb Angelo C.:

> anybody got one ? say,  then expand to :
> < a href="https://twitter.com/share"; class="twitter-share-button"
> data-url="https://dev.twitter.com"; data-via="your_screen_name"
> data-lang="en">Tweet< /a>
> < script>!func .. 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/tweet-buttons-tp5714898.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: json support in template

2012-07-28 Thread Christian Riedel
I created a github repo with a complete binding module:

https://github.com/criedel/tapestry-json-binding

I tried to get all the syntax features inside that we were talking about:

${json:json.inner.inner2}
${json:jarr[1].inner.inner2}
${json:json.inner[0].inner2}

…and also with guarding '?'
${json:json.inner?.inner2}
${json:jarr[1]?.inner.inner2}
${json:json?.inner[0].inner2}

If you think the syntax is complete with that feature set you could easily put 
the whole module into tapestry with the next release.
I know the implementation is not really clean and maybe not as efficient as the 
stuff in tapestry-core but I thought if someone wants to use it and likes some 
improvements it's going to be easier if there's a github repo to start with :-)



Am 28.07.2012 um 05:25 schrieb Angelo C.:

> That's a good solution, can you have a maven entry for that?
> also, does it handle nested json objects?
> 
> Thanks,
> 
> 
> Christian Riedel-4 wrote
>> 
>> This might be solved using a custom PropertyBinding and should look like
>> ${json:property.name}…  
>> Challenge accepted!
>> 
>> https://gist.github.com/3187796
>> 
>> 
>> Am 27.07.2012 um 02:16 schrieb Angelo C.:
>> 
>>> Hi,
>>> 
>>> you have this in the code,
>>> 
>>> public JSONObject getJS() { 
>>>  JSONObject js = new JSONObject(); 
>>>  js.put("name1","123"); 
>>>  return js; 
>>> }
>>> 
>>> then in the template:
>>> ${js.get('name1')} 
>>> 
>>> considering json objects are used often nowadays, possible to have a
>>> direct
>>> support in template? maybe some other prefix like:
>>> #{js.name1}
>>> 
>>> what do you think?
>>> 
>>> Angelo
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.html
>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@.apache
>>> For additional commands, e-mail: users-help@.apache
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscribe@.apache
>> For additional commands, e-mail: users-help@.apache
>> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820p5714846.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: Rendering cache

2012-07-28 Thread Christian Riedel
Hi,

I think theres no easy way to intercept the rendered result of a single 
component (that contains a lot of other components). But you could put this 
component inside some kind of dummy-page, asynchronously call its url from an 
internal caching-service and store the output using simple I/O streams.

But that would only make sense if the rendering itself is the expensive part.
Are you sure that there's no other way of optimizing your code? Rendering a lot 
of data might also take long because you need to make queries against a 
database. Maybe you haven't cached the data itself yet?
You could also think of reducing the amount of items to be displayed on 
pageload. Is the user able to see all the rendered data without scrolling? If 
not, you could easily use a lazy loading component to load more data if it's 
really needed like these:

http://www.appelsiini.net/projects/lazyload/enabled.html

http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/

Keep the rendering as light as possible!

Best,
Christian


Am 28.07.2012 um 13:11 schrieb Jens Breitenstein:

> Hi T5'ers
> 
> we have some performance issues and started thinking about caching our pages 
> (lets say parts of them to be precise). Due to the fact we are showing user 
> related information along with "public information" on a page, we can not 
> make use of a simple web proxy caching.
> 
> Therefore we are thinking about a "component rendering result cache".
> 
> Assume we have several independent components to show an overview of items 
> (and we have a lot of items rendered in a loop) and we want to cache the 
> rendering result of one of these particular components for several seconds 
> before rendering it again (to reflect new items or changes). I am aware this 
> means we are showing stale data for some seconds, but honestly this is not an 
> issue because after rendering and displaying it in the browser data is 
> considerably old anyway :-)
> 
> What might be a good place to intercept the rendering and store the output 
> from a component and on the other hand use outputraw for sending cached data?
> Does anyone tried this before?
> 
> Any idea or comment is appreciated, thanks in advance
> 
> 
> Jens
> 
> 
> 
> 
> -
> 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: json support in template

2012-07-27 Thread Christian Riedel
A basic integration could support a few basic things like:

- Getting a value at a position in an array would be the only useful thing such 
a syntax should support, I'd say:
author.articles[0]

- Iterating over such an array would be supported without any need for array 
notation, since JSONArray is already Iterable:

${json:article.title}


- The guarding '?' could be useful. It could not only guard against missing 
members but also against missing elements in the array:
author?.articles[1]

Parsing the expression might be quite expensive if the solution is just 
string-manipulation-based. The way the regular properties are resolved (all 
this stuff around antlr) is faster than any string-tokenizing, right?


Case-insensitivity: 
I would say only the Tapestry properties. Everyone knows which case the 
properties should be, since in most cases that you need a JSON the function 
that receives it is not case-insensitive. Javascript libraries, JSON-centric 
databases… 


Regarding the "simple mapping from JSONObject to normal Object": 
We're using Jackson(http://jackson.codehaus.org) to map objects from MongoDB to 
POJOs (using a wrapping library for that 
https://github.com/vznet/mongo-jackson-mapper).
Now it's getting pretty complex. But in general: would you prefer such mapper 
over reinventing the json-mapping-wheel? It would mean another dependency but I 
think it would be worth it.



Am 27.07.2012 um 20:19 schrieb Howard Lewis Ship:

> Time allowing, an optional sub-project of Tapestry.
> 
> The hard part is coming up with a format that works well with Tapestry;
> 
> I suppose we could just treat the first key name in the property path
> as a JavaBean property, i.e.
> 
> user.address.line1
> 
> would expect there to be a
> 
> public JSONObject getUser() { ... }
> 
> on the class; the JSONObject would contain key "address", and sub-key "line1".
> 
> A proper syntax should give some option for supporting nested JSONArrays.
> 
> In addition, is only the Tapestry property case-insensitive, or do we
> make the keys inside the JSONObjects case insensitive as well?
> 
> I've also been thinking of a simple mapping from JSONObject to normal
> Object, with annotated fields and/or naming conventions. So you might
> pass a JSONObject to a service and get back an Object that you can
> then use with Tapestry.
> 
> 
> On Fri, Jul 27, 2012 at 11:13 AM, Christian Riedel
>  wrote:
>> So what do you think? Should something like that go into tapestry-core or 
>> into some 3rd party library?
>> 
>> 
>> Am 27.07.2012 um 19:35 schrieb Howard Lewis Ship:
>> 
>>> Some form of json: binding prefix will be invaluable as we move from
>>> Java-centric ORMs such as Hibernate to JSON-centric databases such as
>>> MongoDB and CouchDB (or, perhaps, even Datomic).
>>> 
>>> On Fri, Jul 27, 2012 at 5:57 AM, Christian Riedel
>>>  wrote:
>>>> This might be solved using a custom PropertyBinding and should look like 
>>>> ${json:property.name}…
>>>> Challenge accepted!
>>>> 
>>>> https://gist.github.com/3187796
>>>> 
>>>> 
>>>> Am 27.07.2012 um 02:16 schrieb Angelo C.:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> you have this in the code,
>>>>> 
>>>>> public JSONObject getJS() {
>>>>> JSONObject js = new JSONObject();
>>>>> js.put("name1","123");
>>>>> return js;
>>>>> }
>>>>> 
>>>>> then in the template:
>>>>> ${js.get('name1')}
>>>>> 
>>>>> considering json objects are used often nowadays, possible to have a 
>>>>> direct
>>>>> support in template? maybe some other prefix like:
>>>>> #{js.name1}
>>>>> 
>>>>> what do you think?
>>>>> 
>>>>> Angelo
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> View this message in context: 
>>>>> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.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: json support in template

2012-07-27 Thread Christian Riedel
So what do you think? Should something like that go into tapestry-core or into 
some 3rd party library?


Am 27.07.2012 um 19:35 schrieb Howard Lewis Ship:

> Some form of json: binding prefix will be invaluable as we move from
> Java-centric ORMs such as Hibernate to JSON-centric databases such as
> MongoDB and CouchDB (or, perhaps, even Datomic).
> 
> On Fri, Jul 27, 2012 at 5:57 AM, Christian Riedel
>  wrote:
>> This might be solved using a custom PropertyBinding and should look like 
>> ${json:property.name}…
>> Challenge accepted!
>> 
>> https://gist.github.com/3187796
>> 
>> 
>> Am 27.07.2012 um 02:16 schrieb Angelo C.:
>> 
>>> Hi,
>>> 
>>> you have this in the code,
>>> 
>>> public JSONObject getJS() {
>>>  JSONObject js = new JSONObject();
>>>  js.put("name1","123");
>>>  return js;
>>> }
>>> 
>>> then in the template:
>>> ${js.get('name1')}
>>> 
>>> considering json objects are used often nowadays, possible to have a direct
>>> support in template? maybe some other prefix like:
>>> #{js.name1}
>>> 
>>> what do you think?
>>> 
>>> Angelo
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: 
>>> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.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
>> 
> 
> 
> 
> -- 
> 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: json support in template

2012-07-27 Thread Christian Riedel
This might be solved using a custom PropertyBinding and should look like 
${json:property.name}…  
Challenge accepted!

https://gist.github.com/3187796


Am 27.07.2012 um 02:16 schrieb Angelo C.:

> Hi,
> 
> you have this in the code,
> 
> public JSONObject getJS() { 
>   JSONObject js = new JSONObject(); 
>   js.put("name1","123"); 
>   return js; 
> }
> 
> then in the template:
> ${js.get('name1')} 
> 
> considering json objects are used often nowadays, possible to have a direct
> support in template? maybe some other prefix like:
> #{js.name1}
> 
> what do you think?
> 
> Angelo
> 
> 
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/json-support-in-template-tp5714820.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: Shared @SessionState???

2012-07-26 Thread Christian Riedel
Hi,

A service is a singleton by default. If you store a session-state object as a 
singleton service's member, every user will see the session state of the user 
who triggered your service for the first time.
Either change your service to PerThread scope [1] or better yet inject your 
session state object only in pages/components/mixins. Members of components are 
always per thread scoped.

[1] http://tapestry.apache.org/defining-tapestry-ioc-services.html


Cheers,
Christian


Am 26.07.2012 um 15:10 schrieb Matías Blasi:

> Hi all,
> 
> I'm facing the following issue:
> 
> I have a @SessionState object for a custom type.
> 
> As far as I understand that would be handled individually for each "user
> session", but I am seeing that the value is shared across all my user
> sessions... It shouldn't be possible, in fact, if it works like that we
> couldn't implement a shopping cart with this mechanism and I had a
> shopping cart working fine in my application!
> 
> Do you imagine what could be wrong to get this behaiviour? I cant imagine
> how implement a cross-SessionState without external persistence...
> 
> Here is my code:
> 
> public class CalificadosMessagesServiceImpl implements
> CalificadosMessagesService {
> 
> @SessionState(create=true)
> private CalificadosMessagesBag messagesBag;
> ...
> ...
> 
> @Override
> public List getSessoinMessages() {
> return this.messagesBag.getMessages();
> }
> 
> @Override
> public void recordSessionMessage(CalificadosMessage message) {
> this.messagesBag.addMessage(message);
> }
> ...
> ...
> }
> 
> All the logged users (from different browsers), get the same messages!
> 
> Am I loosing something obvious?
> 
> 
> Regards,
> Matias.


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



Re: Is it possible to obtain page instances programmatically by name?

2012-07-26 Thread Christian Riedel
You could inject the ComponentResources into your component and call getPage():

/**
 * Returns the page that contains this component. Technically, the page 
itself is an internal object in Tapestry and
 * this returns the root component of the actual page, but from an 
application developer point of view, this is the
 * page.
 */
Component getPage();


Am 26.07.2012 um 10:27 schrieb wout86:

> Hi,
> 
> We all know Tapestry page instances can be obtained by "injecting" them in a
> variable using its type or its name, e.g., as follows:
> 
> @InjectPage private HomePage home;
> 
> or
> 
> @InjectPage("HomePage") private Object home;
> 
> However, this method only allows pages to be injected whose names are known
> at compile-time. 
> 
> I was wondering whether there's a way to obtain a page instance through some
> sort of getter method, such that the page name doesn't have to be known at
> compile-time? E.g., as follows:
> 
> Object home = Global.getPage("HomePage");
> 
> Thanks in advance, and best regards,
> Wouter
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Is-it-possible-to-obtain-page-instances-programmatically-by-name-tp5714794.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: Test if production or test mode..

2012-07-23 Thread Christian Riedel
…and if you worry about having too many annotations in the constructor, you can 
also omit the @Inject annoation for symbols in recent Tapestry versions (I 
think > 5.2). 

@Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode


Am 22.07.2012 um 15:34 schrieb Lance Java:

> You can use @Inject, @Value and @Symbol in tapestry services. @Property can
> only be used in pages and components, NOT services.
> 
> The following should work in a service:
> 
> @Inject @Symbol("tapestry.production-mode")
> private boolean productionMode;
> 
> You could also do this:
> 
> @Inject @Value("${tapestry.production-mode}")
> private boolean productionMode;
> 
> I never use private field injection in my services (@Inject) as it makes it
> difficult to test but the option is there if you want it.
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Test-if-production-or-test-mode-tp5714658p5714674.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: Tapestry 5.3.4-rc-7

2012-06-28 Thread Christian Riedel
@Howard:
Ok, I see still one problem with 2.4.7. The 'use strict'; hint is causing 
warnings/erros in the logs. The app is working fine but maybe you're right :-/

Maybe it's worth putting some into a google closure integration?




Am 28.06.2012 um 20:27 schrieb Howard Lewis Ship:

> I've been having problems with even with YUICompressor 2.4.7 in a
> production app.
> 
> On Thu, Jun 28, 2012 at 10:05 AM, Jochen Frey  wrote:
> 
>> +1 for the YUI compressor.  It really looks broken in production
>> environments, and it's an easy fix.
>> 
>> On Jun 28, 2012, at 7:51 AM, Christian Riedel wrote:
>> 
>>> Ok, one thing could also be quickly done: upgrading the yuicompressor
>> lib to 2.4.7 like suggested in TAP5-1729.
>>> Minification/Resource combination with tapestry-yuicompressor is really
>> broken without that and it's quite easy to fix.
>>> 
>>> https://issues.apache.org/jira/browse/TAP5-1729
>>> 
>>> 
>>> Am 28.06.2012 um 16:17 schrieb Luca Menegus:
>>> 
>>>> Hi,
>>>> can someone fix TAP5-1926 and have a look at the problem I reported on
>> BeanEditor and BeanValidation [1]?
>>>> And yes, Everything's stable with rc-7!
>>>> 
>>>> 
>>>> 
>>>> [1]
>> http://tapestry.1045711.n5.nabble.com/BeanEditor-should-always-provide-a-new-BeanValidationContext-JSR-303-tp5713975.html
>>>> 
>>>> 
>>>> - Original Message -
>>>>> From: "Howard Lewis Ship" 
>>>>> To: "Tapestry users" 
>>>>> Sent: Monday, 25 June, 2012 7:44:33 PM
>>>>> Subject: Tapestry 5.3.4-rc-7
>>>>> 
>>>>> I've just uploaded Tapestry 5.3.4-rc-7.  Key improvements:
>>>>> 
>>>>> * More (minor) speed improvements
>>>>> * TAP5-1873: JavaScript execution exception is not logged
>>>>> * Fixes the Hibernate dependency to match 5.3.3
>>>>> * TAP5-1880: Disable GZip compression for HTTP/1.0
>>>>> * TAP5-1938: JpaValueEncoder encodes transient value as null instead
>>>>> of
>>>>> throwing an exception
>>>>> * Upgrade to Gradle 1.0 (including the Maven archetype)
>>>>> 
>>>>> I expect to run a vote to release this as 5.3.4 in the near future,
>>>>> so
>>>>> feedback is greatly appreciated!
>>>>> 
>>>>> --
>>>>> 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
>>> 
>> 
>> ---
>> joc...@jochenfrey.com
>> +1.415.366.0450
>>  @jochen_frey
>> 
>> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com


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



Re: Tapestry 5.3.4-rc-7

2012-06-28 Thread Christian Riedel
Ok, one thing could also be quickly done: upgrading the yuicompressor lib to 
2.4.7 like suggested in TAP5-1729.
Minification/Resource combination with tapestry-yuicompressor is really broken 
without that and it's quite easy to fix.

https://issues.apache.org/jira/browse/TAP5-1729


Am 28.06.2012 um 16:17 schrieb Luca Menegus:

> Hi,
> can someone fix TAP5-1926 and have a look at the problem I reported on 
> BeanEditor and BeanValidation [1]? 
> And yes, Everything's stable with rc-7!
> 
> 
> 
> [1] 
> http://tapestry.1045711.n5.nabble.com/BeanEditor-should-always-provide-a-new-BeanValidationContext-JSR-303-tp5713975.html
> 
> 
> - Original Message -
>> From: "Howard Lewis Ship" 
>> To: "Tapestry users" 
>> Sent: Monday, 25 June, 2012 7:44:33 PM
>> Subject: Tapestry 5.3.4-rc-7
>> 
>> I've just uploaded Tapestry 5.3.4-rc-7.  Key improvements:
>> 
>> * More (minor) speed improvements
>> * TAP5-1873: JavaScript execution exception is not logged
>> * Fixes the Hibernate dependency to match 5.3.3
>> * TAP5-1880: Disable GZip compression for HTTP/1.0
>> * TAP5-1938: JpaValueEncoder encodes transient value as null instead
>> of
>> throwing an exception
>> * Upgrade to Gradle 1.0 (including the Maven archetype)
>> 
>> I expect to run a vote to release this as 5.3.4 in the near future,
>> so
>> feedback is greatly appreciated!
>> 
>> --
>> 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: Tapestry 5.3.4-rc-7

2012-06-28 Thread Christian Riedel
Everything's stable with rc-7!

I'd +1 a vote on this release.


Am 25.06.2012 um 19:44 schrieb Howard Lewis Ship:

> I've just uploaded Tapestry 5.3.4-rc-7.  Key improvements:
> 
> * More (minor) speed improvements
> * TAP5-1873: JavaScript execution exception is not logged
> * Fixes the Hibernate dependency to match 5.3.3
> * TAP5-1880: Disable GZip compression for HTTP/1.0
> * TAP5-1938: JpaValueEncoder encodes transient value as null instead of
> throwing an exception
> * Upgrade to Gradle 1.0 (including the Maven archetype)
> 
> I expect to run a vote to release this as 5.3.4 in the near future, so
> feedback is greatly appreciated!
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com


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



Re: Tapestry 5.3.4-rc-5

2012-06-11 Thread Christian Riedel
Testing Tapestry 5.3.4-rc-5 and now Tapestry 5.3.4-rc-6 without any problems!
Site looks good, page response times dropped a bit but we don't have thousands 
of concurrent users…  yet! ;-)


Am 06.06.2012 um 19:32 schrieb Howard Lewis Ship:

> For those that are interested, I just committed some further speed
> boosts to Tapestry, and generated a new preview release.
> 
> The client who I'm doing this for saw the throughput on their load
> test go from 450 req/sec to 2000 req/sec ... what will your
> application see?
> 
> -- 
> 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: Struggling to get mixin to work.

2012-06-11 Thread Christian Riedel
Hi,

you need to attach a mixin to the component that you'd like to manipulate. 
Read this: http://tapestry.apache.org/component-mixins.html

And have a look at other mixin implementations, like the Autocomplete-Mixin:

Autcomplete.java
https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/Autocomplete.java;h=737457986be53f86393b5f21e03b4b5dd8434420;hb=5.3

autocomplete.js
https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;a=blob;f=tapestry-core/src/main/resources/org/apache/tapestry5/corelib/mixins/autocomplete.js;h=ba8dd503a9bd90ba2e7e749802194fea20b94689;hb=5.3


Best,
Christian


Am 11.06.2012 um 15:08 schrieb dick.mur...@unit4.com:

> Hi all. (Tapestry newbie).
> 
> I'm struggling to understand how to get a MixIn to be called.
> 
> I have the following template.
> 
>   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";>
> 
>   Data
>   
> 
> 
> 
>   Metadata
>   
> 
> 
> 
>   
>   
>context="${getPostcode()}">As
> Triples
>   
>   
> 
> 
> 
>   
> 
> 
> I have the following mixin os.js
> 
> var OS = Class.create();
> OS.prototype = {
>   var osMap;
>   
>initialize: function(element) {
>Event.observe($(element), 'click',
> this.doOS.bindAsEventListener());
>},
> 
>doOS: function() {
>osMap = new OpenSpace.Map('map');
>osMap.setCenter(new OpenSpace.MapPoint(438760, 
> 114760), 10);
>var markers = new OpenLayers.Layer.Markers("Markers");
>osMap.addLayer(markers);
>var pos, marker;
>pos = new OpenSpace.MapPoint(438760, 114760);
>marker = new OpenLayers.Marker(pos);
>markers.addMarker(marker);
>}
> }
> 
> Where do I put the "call" to the os.js to populate the  please..?
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Struggling-to-get-mixin-to-work-tp5713764.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: Howto render a block and put it into a JSON reply?

2012-06-11 Thread Christian Riedel
Hi Nourredine,

well we gave up on jQuery's datatable and built our own searchable datatable 
solution. It's based on MongoDB, Tapestry's Grid, a GridDataSource similar to 
JpaGridDataSource and mongo-jackson-mapper[1].
It works fine in our backoffice but I think it doesn't scale well, if you plan 
to integrate it on a frequently used page (we're persisting a field in the 
session for convenience). 

I'll check out Lance's approach, maybe I can use it to improve the code at 
Tapestry5-jQuery :-)

Best,
Christian


[1] https://github.com/vznet/mongo-jackson-mapper



Am 11.06.2012 um 10:09 schrieb Nourredine:

> Hi Christian,
> 
> I'm facing  the exact same issue with the jquery datatable plugin.
> 
> Just using a RenderCommand with the RenderQueue does not solve the issue
> when blocks contain advanced components.
> 
> So, I'm interested in your implementation which I will adapt to the Tapestry
> 5.2 version
> 
> Can you share the code you've developped to render a block using a
> AjaxResponseRenderer or give me more details please ?
> 
> Regards,
> 
> Nourredine.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Howto-render-a-block-and-put-it-into-a-JSON-reply-tp5486823p5713754.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: How do you feel about requiring JRE 1.6 for Tapestry 5.4?

2012-05-02 Thread Christian Riedel
+1 


Am 02.05.2012 um 10:21 schrieb Lance Java:

> +1
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-do-you-feel-about-requiring-JRE-1-6-for-Tapestry-5-4-tp5679713p5679911.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: how to call some js AS SOON AS tapestry is finished initialising

2012-03-16 Thread Christian Riedel
...maybe not the 100% sure thing but you could add a last init script like this:

javaScriptSupport.addInitializerCall(InitializationPriority.LATE, "lastInit", 
parameters);

Wouldn't be after the init() but at least after all the other inits...

Cheers
Christian



Am 16.03.2012 um 10:34 schrieb Paul Stanton:

> What is the best way to execute some javascript as soon as tapestry is 
> finished all of its Tapestry.init() calls on initial page render?
> 
> Note, browsers that don't support DOMContentLoaded (ie6,7,8...) can fire any 
> window.load listener before Tapestry.onDOMLoaded.
> 
> -
> 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: Dynamic mixins

2012-03-09 Thread Christian Riedel
Hi,

thinking of the #1 mantra in tapestry "static structure, dynamic behavior", I 
guess you need to look for another approach.

Try adding the mixin to your component, not to the component inside of the 
component. Maybe you need to change your implementation a bit (passing some 
parameters) but it should work without an additional if clause.

Cheers
Christian


Am 09.03.2012 um 17:00 schrieb Brian Long:

> Hi all,
> 
> have a problem that seems easy to resolve but I'm making hard work of
> it, was hoping someone here can help me out. I have a simple component
> I want to use on different pages in my application, and there's a
> mixin associated with the select component in this simple component,
> but I want to use a different mixin depending on which type of page
> the component is located.
> 
> so I have in my component.tml
> 
>
> t:validate="required" t:value="residentFeeInquiry"
> t:model="senderHasIdSelectModel" t:encoder="senderHasIdValueEncoder"
> t:mixins="mixin"
>t:blankOption="always"
> t:blankLabel="message:PLEASE_SELECT" t:label="message:RESIDENT"
> tabindex="${getResidentTabIndex()}"/>
> 
> and in my component.java
> 
>public String getMixin() {
>   if (getContainer() instanceof SendMoneyTransfer) {
>   return "feefromresidentupdater";
>   }
>   return "singlesourceformfieldupdater";
>}
> 
> getting "Unable to resolve 'mixin' to a mixin class name". Have tried
> prop:mixin, ${mixin}, ${prop:mixin} etc. to no avail, would like to
> avoid having multiple select components with different mixins and an
> if else(s) if possible?
> 
> Thanks for listening! Brian.
> 
> -
> 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: How to get a page url?

2012-03-09 Thread Christian Riedel
Maybe it's appropriate to point to the excellent user guide for page navigation 
at this point? :-)

http://tapestry.apache.org/page-navigation.html



Am 09.03.2012 um 16:17 schrieb Thiago H. de Paula Figueiredo:

> On Fri, 09 Mar 2012 11:26:31 -0300, Az Madu  wrote:
> 
>> Hi Thiago,
> 
> Hi!
> 
>> The object 'SomeOtherPage' I need to be my Page 2 so:
>> 
>> public class Page1{
>> @Inject Page2 page2;
>> 
>>   Object onActionFromStart() {
>>   ...
>>   page2.setNextPage(Page2.class);  (This is what I need,
>> but is this the correct thing to do here?)
>>}
>> }
> 
> Oops, it should be Page1.class, not Page2. I'm sorry for the confusion.
> If you just want to know which page you came from, yes, it's correct to do 
> that, just pass the right Class instance. :)
> 
> Oops, I shouldn't have added the Page2 field. No need for it, as you're not 
> any information besides the page itself.
> 
>> public class Page2{
>>   @Persist(PersistenceConstants.FLASH)
>>   private Page2 page2;  --- (You used Class nextPage in your
>> example, but is my understanding correct in what I've written, we are
>> referring to the page we are on (Page2 in this instance))
> 
> You don't know what page you came from, so you cannot have this field be of 
> type Page2. It should be class, otherwise the code won't even compile.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



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

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

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

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


Am 07.03.2012 um 04:24 schrieb ayok03:

> Guys,
> 
> How to change "Drop files here to upload" with button on tapestry5-jquery
> ajaxupload multiple upload ? 
> When i try to "drop file here to upload" it doesnt work
> i try with chrome17, ff10, ie8 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry5-jquery-ajaxupload-How-to-change-Drop-files-here-to-upload-with-button-tp5543058p5543058.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: How to display special characters in tml page

2012-03-01 Thread Christian Riedel
...then something is misspelled. 
your project name doesn't matter - it must be the page name that has to be 
equal to the properties (and .tml) name.

don't forget to check out the user guide: 

http://tapestry.apache.org/user-guide.html
http://tapestry.apache.org/localization.html


Am 01.03.2012 um 12:07 schrieb karthi:

> I tried that in properties file
> 
> but it says missing key -- [[missing key: stock]] 
> 
> My project name is Registration, in that under resources - pages package
> created one Registration.properties file and in that added that key and
> value
> 
> In test.tml file when I called like this  ${message:stock}   it
> throws the above error
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-to-display-special-characters-in-tml-page-tp5527308p5527609.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: How to display special characters in tml page

2012-03-01 Thread Christian Riedel
or like this...

.properties: 
market=Börse

.tml
${message:market}

Am 01.03.2012 um 11:04 schrieb Shing Hing Man:

> 
> 
> One solution is to use the outputraw component.
> 
> 
> In .properties file  :
>  erdos=Erdö
> 
> In .tml :
> 
> 
> 
> Shing 
> 
> 
> 
> 
> From: karthi 
> To: users@tapestry.apache.org 
> Sent: Thursday, March 1, 2012 8:56 AM
> Subject: How to display special characters in tml page
> 
> How to show the special characters in tml page,
> 
> http://tapestry.apache.org/schema/tapestry_5_3.xsd";;
> xmlns:p="tapestry:parameter">
> 
>  Test 
> 
> 
>  B*ö*rse 
> 
> 
> 
> When I hit this page in browser is throws the error message because of this
> character ö
> 
> Invalid byte 2 of 4-byte UTF-8 sequence.
> 
> How to resolve this?
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/How-to-display-special-characters-in-tml-page-tp5527308p5527308.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: First mixin attempt question

2012-02-29 Thread Christian Riedel
Hi Andrew,

try mixins="venses/EventBind" 
you need to specify the namespace if the mixin is coming from another library

Cheers
Christian


Am 29.02.2012 um 09:48 schrieb Andrew Dahl:

> I am getting an error for which I can't find any documentation.
> 
> Exception assembling root component of page venses/ComponentTest: Mixin id 
> for parameter 'eventbind.event' not found. Attached mixins: DiscardBody, 
> RenderDisabled, Selector.
> 
> 
>  17value="literal:test field"
> 18mixins="eventbind"
> 19eventbind.event="click"
> 20eventbind.eventType="click"
> 21eventbind.callback="function (event,ui,url){alert('This is the call 
> back function');}">
> 22
> 23
> 
> 
> On server startup I get
> 
> [INFO] TapestryModule.ComponentClassResolver Available mixins (26):
>  .
>   venses/EventBind: us.venses.common.mixins.EventBind
> 
> so I think the mixin ix available.
> 
> I have tried numerous variations but I get this same message every time with 
> one exception
> 
> I get mixin not found when I try
>value="literal:test field"
>   t:mixins="eventbind"
>   eventbind.event="click"
>   eventbind.eventType="click"
>   eventbind.callback="function (event,ui,url){alert('This is the call 
> back function');}">
> 
> -- 
> Andrew Dahl
> Venses Software Foundation
> 614.325.4523
> 


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



Re: java.lang.ClassFormatError: Illegal field modifiers in class lxyz/web2/components/codebook/controls/Button: 0x12

2012-02-21 Thread Christian Riedel
I don't think it's a bug.
Can't find the place in the docs that describes this but I'm sure it's 
somewhere written that you shall not store anything but page classes in the 
page package.


Am 20.02.2012 um 04:05 schrieb Paul Stanton:

> Thanks Steve,
> 
> I ran into this too upgrading from t5.1 to t5.3.
> 
> IMO this is a bug, since an interface designed specifically for my tapestry 
> pages should be able to co-exist in the pages package.
> 
> https://issues.apache.org/jira/browse/TAP5-1851
> 
> p.
> 
> On 23/08/2011 12:00 PM, Steve Ragle wrote:
>> Hi folks,
>> 
>> Trying out 5.3.0.  I was running into this exception:
>> 
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - Illegal field 
>> modifiers in class lxyz/web2/components/codebook/controls/Button: 0x12
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - Operations trace:
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 1] Constructing 
>> instance of page class lxyz.web2.pages.errors.Error404Page
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 2] Assembling 
>> root component for page errors/Error404Page
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 3] Assembling 
>> component errors/Error404Page:liabase (lxyz.web2.components.desktop.LiaBase)
>> 12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 4] Assembling 
>> component errors/Error404Page:liabase.base 
>> (lxyz.web2.components.head.BaseHead)
>> 12:44:23.063 ERROR  org.apache.tapestry5.ioc.Registry  - [ 5] Creating 
>> ComponentAssembler for lxyz.web2.components.forums.LiveLinks
>> 12:44:23.063 ERROR  org.apache.tapestry5.ioc.Registry  - [ 6] Creating 
>> instantiator for component class lxyz.web2.components.codebook.controls.Link
>> 12:44:23.087 ERROR  stryModule.RequestExceptionHandler - Processing of 
>> request failed with uncaught exception: Illegal field modifiers in class 
>> lxyz/web2/components/codebook/controls/Button: 0x12  [1BE517AD] 
>> java.lang.ClassFormatError: Illegal field modifiers in class 
>> lxyz/web2/components/codebook/controls/Button: 0x12
>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:53)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:1722)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:322)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>  at java.lang.ClassLoader.defineClass1(Native Method)
>>  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>>  at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:53)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:1722)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:322)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
>>  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>  at 
>> org.apache.tapestry5.internal.plastic.PlasticClassPool.getClassInstantiator(PlasticClassPool.java:421)
>>  at 
>> org.apache.tapestry5.plastic.PlasticManager.getClassInstantiator(PlasticManager.java:189)
>>  at 
>> org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$1.invoke(ComponentInstantiatorSourceImpl.java:232)
>>  at 
>> org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$1.invoke(ComponentInstantiatorSourceImpl.java:226)
>> 
>> The Button class is:
>> public interface Button {
>>  public ButtonType getButtonType();
>>  public String getActionId();
>>  public boolean isDisabled();
>> }
>> 
>> After a lot of fiddling around, someone pointed out that an interface like 
>> this should not be in the components.xyz package to begin with.  This has 
>> been like this for 2 year

Re: Issue with Maven + Eclipse + Tapestry (slightly off-topic)

2012-02-16 Thread Christian Riedel
...but watch out if you enable maven's resource-filtering for 
src/main/resources. e.g. ${user.name} in your .tml will be replaced by your 
system user name :-)


Am 16.02.2012 um 12:05 schrieb Julien Martin:

> Thanks Lance,
> 
> Le 16 février 2012 11:15, Lance Java  a écrit :
> 
>> I would avoid putting resources (.tml and .properties) in src/main/java as
>> you are going against maven's conventions.
> 
> 
>> Only java files should go in src/main/java. Resources should go into
>> src/main/resources and test resources should go in src/test/resources.
>> 
> *Good point! Done.  *
> 
>> 
>> What you said initially about needing to copy resources into
>> src/test/resources is incorrect. Your test cases will see all classes in
>> src/main/java and all resources in src/main/resources. With the addition
>> that all of the src/test/* files are available too.
>> 
>> I use maven with the m2eclipse plugin which keeps eclipse up-to-date with
>> your pom.xml.
>> 
>> On Thursday, 16 February 2012, Julien Martin  wrote:
>>> Hello Chris,
>>> 
>>> Thanks! You pointed me to the right direction. I changed my POM as
>> follows:
>>> **
>>> * *
>>> * *
>>> * src/main/java*
>>> * *
>>> * **/*.tml*
>>> * **/*.properties*
>>> * *
>>> * *
>>> * *
>>> * src/main/resources*
>>> * *
>>> * **/**
>>> * **/*.xml*
>>> * **/*.tml*
>>> * **/*.properties*
>>> * *
>>> * *
>>> * *
>>> It now works fine.
>>> Regards,
>>> Julien.
>>> 
>>> Le 16 février 2012 09:26, Chris Mylonas  a écrit :
>>> 
 I don't know, but there's a tapestry testing module called testify that
 might be worth having a look at the docs.
 Might be some hints there
 
 http://tapestrytestify.sourceforge.net/project-layout.html
 
 I don't know the answer for you unfortunately,
 
 HTH,
 Chris
 
 On 16/02/2012, at 7:13 PM, Julien Martin wrote:
 
> Hello all,
> I am interested in getting feedback from those of you who use Maven +
> Eclipse in order to develop Tapestry applications.
> I recently realized that Tapestry templates located in
> *src/main/resources*also need to be located in
> *src/test/resources* in order to be picked up during unit tests.
> I am not sure how to configure my environment to avoid copying the
> **.tml*files from
> *src/main/resources* into *src/test/resources*.
> Can anyone please share tips or advice?
> Regards,
> J.
> P.S. This is slightly off-topic as it also relates to Eclipse and
>> Maven.
> Sorry...
 
 
 -
 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



Howto render a block and put it into a JSON reply?

2012-02-15 Thread Christian Riedel
Hi there,

I'm trying to improve the tapestry5-jquery DataTable component, which is able 
to respond paged results in JSON. Unfortunately the component is a bit limited 
in terms of what can be returned. I want to add support for the Grid-style 
p:propertyCell block-parameter-notation. 
I'm looking for the most elegant way to do it. Currently I'm trying it with 
faked zone updates (ajaxResponseRenderer.addRender) and a filter 
(ajaxResponseRenderer.addFilter) that should modify the JSON reply object. It 
feels very clumsy and I thought if someone on the list could point me to a more 
elegant solution.

More Abstract:
We've got
- an Ajax callback: void onData() { ... }
- PropertyOverrides, having block parameters
- a working data source that is able to fetch data by the current page

We need
- loop over all rows of the current page and
- render each cell's content or its override into a row-json-array and
- put each row-json-array into a data json-array

Is there another way than using ajaxResponseRenderer.addRender / addFilter?

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



Re: Implement .pdf preview

2012-02-02 Thread Christian Riedel
Hi,

you should have a look at this project:
http://wookicentral.com/

They implemented a PDF preview and it's open source!

Cheers,
Christian


Am 02.02.2012 um 09:13 schrieb Jose A. Lopez:

> Hello everybody,
> 
> I am rookie in tapestry and in programming in general. I don't know how to
> start with the implement of a pdf preview in tapestry?
> 
> I am using tapestry5, Ubuntu and Eclipse.
> 
> Thanks in advance!
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Implement-pdf-preview-tp5449962p5449962.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.1 mongodb?

2011-12-30 Thread Christian Riedel
I used morphia for some smaller projects over a year now. 
Since a few weeks we're developing larger app that's dealing with really a lot 
more data and we quickly reached the point where morphia wasn't able to do 
certain things and we ended up writing code directly against the driver API.
I won't go too much into detail now, since it would be a bit offtopic
Our conclusion was that we needed the best performing json mapper we could find 
and it seems like the jackson-based mongo-jackson-mapper is the fastest out 
there!

Integrating these mappers was very easy. Switching from one to the other was 
also very easy. I'm curious about Igor's approach :-)


Am 29.12.2011 um 15:32 schrieb angelochen:

> Hi Christian,
> 
> The two mappers you pointed out, morphia seems more Hibernate like, what's
> the reason you switch to Jacson? Thanks,
> 
> Angelo
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-3-1-mongodb-tp5106689p5107779.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.1 mongodb?

2011-12-29 Thread Christian Riedel
Hi Igor,

what mapper are you planning to integrate?
There are several mappers out there. After using morphia[1] for some time I'm 
now with mongo-jackson-mapper[2] from vz.net.

Cheers
Christian


[1] http://code.google.com/p/morphia/
[2] http://github.com/vznet/mongo-jackson-mapper


Am 29.12.2011 um 11:39 schrieb Igor Drobiazko:

> Spring Data - MongoDB is great, but I'm going to add a native
> MongoDB/Tapestry integration in 5.4. I have already an internal API which
> needs to be generalized before committing to Apache's SVN.
> 
> On Thu, Dec 29, 2011 at 4:24 AM, angelochen wrote:
> 
>> Hi,
>> 
>> hibernate and t5 really goes very well, now got a need to use mongodb,
>> seems
>> no mongodb native support for t5, found one in Spring: SPRING DATA -
>> MONGODB, anybody have tried this? thanks.
>> 
>> Angelo
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/T5-3-1-mongodb-tp5106689p5106689.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
>> 
>> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de
> http://twitter.com/drobiazko


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



Re: How to get Html Source of a Page

2011-12-22 Thread Christian Riedel
what do you want to do with the source?
whatever it is, I think it's going to be very inefficient.

except you want to use it for testing. for that case I recommend the PageTester.


Am 22.12.2011 um 11:21 schrieb Bo Gao:

> I have a page, how can I get the page's HTML source as a String in another 
> page or Service method?
> 
> 
> --
> Bo Gao
> eli...@gmail.com
> 
> 
> 
> 
> 
> 


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



Re: [ANN] Tapestry5-jQuery 3.0.0 Available !!

2011-12-13 Thread Christian Riedel
Good news :-)

I think you forgot the links that everyone should find useful:

> If this project interests you, here are 3 websites that may be of interest
> to you :
> - The demo site, where you will find examples of all components and all the
> documentation.

http://tapestry5-jquery.com/


> - Our Google Group for you questions and your feedbacks

https://groups.google.com/forum/?hl=en#!forum/tapestry5-jquery


> - Our Github repository for possible issues. If you want to contribute to
> this project, Please fork our project, and send to us all your pull
> requests. 

https://github.com/got5/tapestry5-jquery/



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



Re: Prototype and jQuery question

2011-12-05 Thread Christian Riedel
do you have tapestry-upload in your classpath?

Am 05.12.2011 um 23:26 schrieb Chris Collins:

> So when I actually include tapestry-jquery things blow up when the servlet 
> container is initialized (I use an embedded jetty).  This is with Tapestry 
> 5.3 and using the mvn dependency described on the tapestry-jquery website.  
> Any ideas what I did wrong?
> 
> java.lang.NoClassDefFoundError: 
> org/apache/tapestry5/upload/services/UploadedFile
>   at java.lang.Class.getDeclaredConstructors0(Native Method)
>   at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
>   at java.lang.Class.getConstructors(Class.java:1459)
>   at 
> org.apache.tapestry5.ioc.internal.util.InternalUtils.findAutobuildConstructor(InternalUtils.java:623)
>   at 
> org.apache.tapestry5.ioc.internal.ServiceBinderImpl.createStandardConstructorBasedObjectCreatorSource(ServiceBinderImpl.java:143)
>   at 
> org.apache.tapestry5.ioc.internal.ServiceBinderImpl.createObjectCreatorSourceFromImplementationClass(ServiceBinderImpl.java:128)
>   at 
> org.apache.tapestry5.ioc.internal.ServiceBinderImpl.flush(ServiceBinderImpl.java:95)
>   at 
> org.apache.tapestry5.ioc.internal.ServiceBinderImpl.finish(ServiceBinderImpl.java:83)
>   at 
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:539)
>   at 
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:123)
>   at 
> org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:131)
>   at 
> org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:159)
>   at 
> org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.java:137)
>   at 
> org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtilities.java:107)
>   at 
> org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.java:77)
>   at 
> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:124)
>   at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103)
>   at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>   at 
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
>   at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
>   at 
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
>   at 
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
>   at 
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>   at 
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>   at org.mortbay.jetty.Server.doStart(Server.java:224)
>   at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
> 
> On Dec 2, 2011, at 1:48 PM, François Facon wrote:
> 
>> Hi Chris,
>> 
>> Tapestry Ensure Backwards Compatibility on server side and also on client 
>> side.
>> As mention by Thiago, you can use both prototype an jQuery with Tapestry.
>> in Tapestry-jquery we use jQuery plugin structure to make sure $ is safe.
>> 
>> see 
>> https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/assets/mixins/button/button.js
>> for example with agnostic structure introduce in 5.3.
>> 
>> When we have to use both jQuery an Prototype on our projects we set
>> configuration.add(JQuerySymbolConstants.SUPPRESS_PROTOTYPE, "false");
>> jQuery is then used only inside jQuery Plugin.
>> 
>> François
>> 
>> 
>> 2011/12/2 Thiago H. de Paula Figueiredo :
>>> On Fri, 02 Dec 2011 18:52:49 -0200, Chris Collins  wrote:
>>> 
 jquery and prototype living together in perfect harmony
 ==
 I am working on a project where I am looking at a number of open source
 javascript libraries.  Some depend on jQuery and some depend on prototype. 
 I
 apologize for my ignorance here but it seems the fundamental issue is one 
 of
 namespace primarily around "$".  I know you can run jQuery in compatible
 mode but wouldn't this mean that any js library I used that depended on
 jQuery would need to be hacked up carefully to substitute all $() with
 jQuery(…)?
>>> 
>>> 
>>> In theory, all jQuery plugins should *not* use $() and use $jQuery instead:
>>> http://docs.jquery.com/Plugins/Authoring.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
>>> instructor
>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>> http://www.ar

Re: Show your Tapestry support!

2011-12-04 Thread Christian Riedel
congratulations... seems the announcement made it to #1 in dzone's top links!
hope you're satisfied with that result ;-)


Am 02.12.2011 um 01:16 schrieb Howard Lewis Ship:

> On additional note ... there's several links along the left edge of
> the page for voting up the announcement. Please do that as well!
> 
> On Thu, Dec 1, 2011 at 2:21 PM, robert baker  wrote:
>> For what it's worth, I registered and put in my $(1/50).  Thanks
>> Howard for letting us know about the announcement.
>> 
>> Les Baker
>> 
>> On Thu, Dec 1, 2011 at 4:21 PM, Howard Lewis Ship  wrote:
>>> Ok folks, time to strike while the iron's hot.  Major release
>>> announcements are a great way to get people interested in Tapestry. I
>>> can't tell you how many times I've met with people who have "heard
>>> good things about Tapestry" but "don't know what it's all about".
>>> Seeing an outpouring of support on a release announcement is one way
>>> to tip the balance towards more people looking at Tapestry ... and
>>> that's good for *everyone*. The more people using Tapestry, the easier
>>> it is for me, and the other Tapestry committers, to continue extending
>>> and improving the project.
>>> 
>>> So, if all you've ever done with Tapestry is take it, and not give
>>> back, then now's a very good time to start making a small
>>> contribution: a one line posting about Tapestry to the JavaLobby
>>> announcement!
>>> 
>>> On Wed, Nov 30, 2011 at 5:13 PM, Howard Lewis Ship  wrote:
 First five comments are nice, but I'd like to see 50, or 500, comments!
 
 On Wed, Nov 30, 2011 at 8:30 AM, Howard Lewis Ship  
 wrote:
> The Tapestry 5.3 announcement has hit JavaLobby:
> 
> http://java.dzone.com/announcements/announcing-apache-tapestry-53
> 
> Now is an excellent time to post a short comment showing your support
> for Tapestry.  It's a small thing you can do that can make a big, big
> difference in the long term.
> 
> Please don't start any flamewars, or bash other frameworks, just say
> (in your own words) "Tapestry lets me get great results".
> 
> Thanks!
> 
> --
> 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
> 
 
 
 
 --
 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
 
>>> 
>>> 
>>> 
>>> --
>>> 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
>> 
>> 
> 
> 
> 
> -- 
> 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: fault found

2011-11-28 Thread Christian Riedel
then it is caused by some portion of the code that you did not show.
I tried it out and the onSubmit method is only called once, as expected. 

jsp won't help you here.


Am 28.11.2011 um 12:18 schrieb csckid:

> I tried with smaller project that has only hibernate and spring integrated
> and no custom filters. It didn't work still. 
> 
> Is there any other way to download the file beside this procedure? Can I
> link it through jsp? If that is possible can you please show me the way.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/fault-found-tp5026068p5028554.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: fault found

2011-11-27 Thread Christian Riedel
Should be called only once if you have this code in a fresh project. 
Are you sure there are no such things like custom filters that might process 
things more than once?


Am 27.11.2011 um 12:53 schrieb csckid:

> Smaller sample:
> 
> *Contact.tml*
>   xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>  xmlns:p="tapestry:parameter">
> 
>Contact com.kids.crm ...
> 
>   
> 
> 
> 
> 
> 
> *Contact.java*
> package com.kids.crm.pages;
> 
> import java.io.BufferedWriter;
> import java.io.File;
> import java.io.FileInputStream;
> import java.io.FileWriter;
> import java.io.IOException;
> import java.io.InputStream;
> 
> import org.apache.tapestry5.StreamResponse;
> import org.apache.tapestry5.annotations.InjectPage;
> 
> import com.kids.crm.reports.pdf.PDFGenerator;
> import com.kids.crm.reports.pdf.PDFStreamResponse;
> 
> 
> 
> public class Contact
> {
>   public StreamResponse onSubmit() {  
>try {
>   System.out.println("\n\n\n\n\nContact\n\n\n\n");
>   File tmpFile = File.createTempFile("hava", null);
>   BufferedWriter br = new BufferedWriter(new 
> FileWriter(tmpFile));
>   br.append("something to test\nAnother line to test");
>   br.flush();
>   br.close();
> 
>   return new PDFStreamResponse(new
> FileInputStream(tmpFile.getAbsolutePath()), "results_file");
>} catch (IOException e) {
>e.printStackTrace();
>}
> 
>  return null; 
>   
>   
>}
> }
> 
> *
> PDFStreamResponse.java*
> package com.kids.crm.reports.pdf;
> 
> import java.io.IOException;
> import java.io.InputStream;
> 
> import javax.servlet.http.HttpServletResponse;
> 
> import org.apache.tapestry5.StreamResponse;
> import org.apache.tapestry5.services.Response;
> 
> public class PDFStreamResponse implements StreamResponse{
>   private InputStream is;
>private String filename="default";
> 
>public PDFStreamResponse(InputStream is, String args) {
>this.is = is;
>this.filename = args;
>}
> 
>public String getContentType() {
>return "application/pdf";
>}
> 
>public InputStream getStream() throws IOException {
>return is;
>}
> 
>public void prepareResponse(Response arg0) {
>arg0.setHeader("Content-Disposition", "attachment; filename="
>+ filename + ".pdf");
>}
> 
> 
> }
> 
> 
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/fault-found-tp5026068p5026316.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: fault found

2011-11-27 Thread Christian Riedel
Show us your code and we can tell you what's wrong!

Am 27.11.2011 um 08:41 schrieb csckid:

> I tried the following example to generate pdf file and return to user
> browser. 
> http://wiki.apache.org/tapestry/Tapestry5HowToCreateADynamicPDF
> 
> The problem I found is method public StreamResponse onSubmit() is called
> three times. I really couldn't understand why this was so, but it would be
> really helpful if someone could help me out with this.
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/fault-found-tp5026068p5026068.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: TAP5-1425

2011-11-24 Thread Christian Riedel
..my fix for this was to type-coerce the path into a resource and call 
.exists() on it. 
the runtime exception was thrown from the assetSource.getExpandedAsset method 
in this case.

Am 24.11.2011 um 09:04 schrieb Ville:

> Hi,
> 
> https://issues.apache.org/jira/browse/TAP5-1425 was fixed, but it breaks a
> lot of existing functionality.
> 
> Resource has method exists(), but what is the point of this method if the
> service throws RuntimeException when loading resources that doesn't exist?
> 
> This is from Tap5Jquery:
> if(this.assetSource.getExpandedAsset(path).getResource().exists()) {
>return this.assetSource.getExpandedAsset(path);
> }
> return null;
> 
> Do we now have to catch RuntimeException and return null if such is thrown?
> We should atleast have ResourceNotFoundRuntimeException?
> 
> - Ville
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/TAP5-1425-tp5019523p5019523.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: tld tapestry 5.3

2011-11-23 Thread Christian Riedel
Look, someone generated one for 5.3 already:
http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse

Am 23.11.2011 um 18:03 schrieb Pablo Borges:

> how to generate the 5.3 tld tapestry?
> 
> I'm using the maven plugin: tapestry-tldgen with eclipse 3.7
> 
> follows the settings of my pom.xml
> 
> 
>  fr.exanpe 
> -tldgen tapestry 
> VERSION 1.1.0 
> 
> 
> 
>  tld-generate 
> 
>  process-classes 
> 
>  http://tapestry.apache.org/schema/tapestry_5_3.xsd 
>  org.apache.tapestry5 
> 
> 
> 
> 
> 
> need to configure my eclipse to recognize the tag libraries
> 
> 

Re: Updating a zone on any event

2011-11-18 Thread Christian Riedel
Is the ZoneManager an officially public API? 
Just curious whether this class is still supported in 5.4, when the JS API gets 
cleaned up?



Am 18.11.2011 um 18:30 schrieb Josh Kamau:

> Thanks Thiago, I will check it out. Just wondering, is there any
> documentation of Tapestry Javascript API
> 
> Regards.
> 
> On Fri, Nov 18, 2011 at 8:07 PM, Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>> On Fri, 18 Nov 2011 14:45:40 -0200, Josh Kamau 
>> wrote:
>> 
>> Hi there ;
>>> 
>> 
>> Hi!
>> 
>> 
>> Is there plans of developing a zone updating feature that responds to any
>>> client side event. e.g i would like to execute some server side code when
>>> a textfield is changed, blurred, focused... any event that the dom
>>> supports, then update a zone. I know its possible to do it by writing some
>>> javascript.
>>> 
>> 
>> Yep. Use the ZoneManager JS class. You'll need to hook up the listeners
>> yourself.
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 


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



Re: Setup methods are called twice while requesting a page.

2011-11-08 Thread Christian Riedel
Hi,

you could add log statements to your code that print out the request url. That 
way you'll probably find out where the second request comes from.
I suspect a broken img-src attribute to be the cause. Some typo like this: 
 

Cheers
Christian


Am 08.11.2011 um 23:27 schrieb pradeepchy:

> Hi All,
> I am facing a strange problem in my application. I have observed that  page
> setup methods with annotation either @SetupRender or @BeginRender are called
> twice whenever a request is made to that page. In these methods I am calling
> the database methods to pull data from db.
> 
> @SetupRender
> void setupdata(){
> //DB Call.
> }
> 
> Is there any work around to protect the extra call, please suggest.
> 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Setup-methods-are-called-twice-while-requesting-a-page-tp4975888p4975888.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-rc-3] zone inside a form with generated ids not working

2011-11-06 Thread Christian Riedel
https://issues.apache.org/jira/browse/TAP5-1746

Am 06.11.2011 um 18:04 schrieb Lenny Primak:

> Are you doing form submit via JavaScript onsubmit()?  If yes, you need to 
> call setSubmittingElement beforehand. 
> 
> 
> 
> On Nov 6, 2011, at 11:11 AM, Christian Riedel  wrote:
> 
>> Hi,
>> 
>> I'm currently trying to fix some missing functionality about some cases of 
>> zone-updates in tapestry5-jquery. It seems the missing feature does also not 
>> work in a pure T5-app!
>> 
>> The feature I'm talking about is this: 
>> 1. There's a link/button/whatever that can trigger a zone-update.
>> 2. Before any update of the zone is done, a default block is rendered using 
>> the delegate component.
>> 3. The zone-update is triggered and the zone's delegate component will 
>> render a block with some form-components.
>> 4. The form contains a zone and a select box that may trigger another 
>> zone-update - this time it's meant to update the zone inside the form.
>> 
>> The moment you trigger the "show-me-the-form" zone-update you'll receive an 
>> alert message saying: 
>>> "Could not find zone element 'updateZone' to update on change of element 
>>> 'thisValue_1337998b0f1'."
>> 
>> ...sure because the 'updateZone' has a generated id, just like the select 
>> box. The id is in this case 'updateZone_1337998b0f1'.
>> 
>> I thought there's some magic in tapestry.js (the ZoneManager sounded so 
>> promising) that looks for a relative zone with the same id-postfix... but 
>> there is no such feature :-(
>> What do you think? Shouldn't be there such a feature? I mean, if I take the 
>> same form with the same nested zone just without the whole outer zone and 
>> block construct it just works, since there are no generated ids.
>> 
>> Here's what I thought should work (hope there's no copy-paste-error):
>> 
>> __
>> 
>> Index.tml (I used the archetype default app to test this):
>> __
>> 
>> 
>> > t:sidebarTitle="Framework Version"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
>> xmlns:p="tapestry:parameter">
>>   
>> 
>>   ${message:greeting}
>> 
>>   The current time is: ${currentTime}
>> 
>>   
>>   
>>   
>>   You have clicked the link ${clickCount} times.
>>   
>> 
>>   
>>   [
>>   increment
>>   ]
>>    
>>   [
>>   increment (via 
>> Ajax)
>>   ]
>>   
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>>   You are running Tapestry version 
>> ${tapestryVersion}.
>>   
>> 
>> 
>>   
>>   [
>>   refresh page
>>   ]
>>   
>>   
>> 
>>   
>>   empty
>>   
>> 
>>   
>>   
>> 
>>   > t:zone="updateZone" />
>> 
>>   
>>   > t:value="other" blankOption="never" />
>>   
>> 
>>   
>>   
>> 
>> 
>> 
>> __
>> 
>> Index.class
>> __
>> 
>> 
>> /**
>> * Start page of application taptest.
>> */
>> public class Index
>> {
>>   @InjectComponent
>>   private Zone zone, updateZone, outerZone;
>> 
>>   @Inject
>>   private Block emptyBlock, editBlock;
>> 
>>   private Block selectedBlock;
>> 
>>   @Persist
>>   @Property
>>   private int clickCount;
>> 
>>   @Inject
>>   private AlertManager alertManager;
>> 
>>   @Inject
>>   private AjaxResponseRenderer ajaxResponseRenderer;
>> 
>>   @Property
>>   private List selected;
>> 
>>   public ValueEncoder getEncoder() {
>> 
>>   return new ValueEncoder() {
>> 
>>   @Override
>>   public String toValue(String clientValue) {
>> 
>>   return clientValue;
>>   }
>> 
>>   @Override
>>   public String toCl

Re: [T5.3-rc-3] zone inside a form with generated ids not working

2011-11-06 Thread Christian Riedel
No, it's the plain old tapestry select-submits-onchange function.

My workaround did only work for a couple of minutes, btw.. It now seems to work 
like this:

I switched the order of the components in the template (first the zone, then 
the select)

> 
> 
> 
> 
>  t:value="other" blankOption="never" />
> 
> 
>  t:zone="prop:updateZoneId" />
> 
> 
> 

Then I stored the generated client id of the zone in a persistent field and 
altered the event handler like this:

> @Persist
> private String updateZoneId;
> 
> @OnEvent(component = "thisValue", value = EventConstants.VALUE_CHANGED)
> void onValueSelected() {
> 
> selectedBlock = editBlock;
> 
> clickCount++;
> ajaxResponseRenderer.addRender(this.updateZoneId, updateZone);
> }
> 
> public String getUpdateZoneId() {
> 
> this.updateZoneId = updateZone.getClientId();
> return this.updateZoneId;
> }

The order is now critical. If you put the select in front of the zone it won't 
work since the beginRender phase of the zone is called after the select's zone 
attribute is set ( t:zone="prop:updateZoneId" ). 
It's the only way it works and I think it's a bug that it does so.




Am 06.11.2011 um 18:04 schrieb Lenny Primak:

> Are you doing form submit via JavaScript onsubmit()?  If yes, you need to 
> call setSubmittingElement beforehand. 
> 
> 
> 
> On Nov 6, 2011, at 11:11 AM, Christian Riedel  wrote:
> 
>> Hi,
>> 
>> I'm currently trying to fix some missing functionality about some cases of 
>> zone-updates in tapestry5-jquery. It seems the missing feature does also not 
>> work in a pure T5-app!
>> 
>> The feature I'm talking about is this: 
>> 1. There's a link/button/whatever that can trigger a zone-update.
>> 2. Before any update of the zone is done, a default block is rendered using 
>> the delegate component.
>> 3. The zone-update is triggered and the zone's delegate component will 
>> render a block with some form-components.
>> 4. The form contains a zone and a select box that may trigger another 
>> zone-update - this time it's meant to update the zone inside the form.
>> 
>> The moment you trigger the "show-me-the-form" zone-update you'll receive an 
>> alert message saying: 
>>> "Could not find zone element 'updateZone' to update on change of element 
>>> 'thisValue_1337998b0f1'."
>> 
>> ...sure because the 'updateZone' has a generated id, just like the select 
>> box. The id is in this case 'updateZone_1337998b0f1'.
>> 
>> I thought there's some magic in tapestry.js (the ZoneManager sounded so 
>> promising) that looks for a relative zone with the same id-postfix... but 
>> there is no such feature :-(
>> What do you think? Shouldn't be there such a feature? I mean, if I take the 
>> same form with the same nested zone just without the whole outer zone and 
>> block construct it just works, since there are no generated ids.
>> 
>> Here's what I thought should work (hope there's no copy-paste-error):
>> 
>> __
>> 
>> Index.tml (I used the archetype default app to test this):
>> __
>> 
>> 
>> > t:sidebarTitle="Framework Version"
>> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
>> xmlns:p="tapestry:parameter">
>>   
>> 
>>   ${message:greeting}
>> 
>>   The current time is: ${currentTime}
>> 
>>   
>>   
>>   
>>   You have clicked the link ${clickCount} times.
>>   
>> 
>>   
>>   [
>>   increment
>>   ]
>>    
>>   [
>>   increment (via 
>> Ajax)
>>   ]
>>   
>> 
>>   
>> 
>>   
>>   
>>   
>> 
>>   
>>   
>>   You are running Tapestry version 
>> ${tapestryVersion}.
>>   
>> 
>> 
>>   
>>   [
>>   refresh page
>>   ]
>>   
>>   
>> 
>>   
>>   empty
>>   
>> 
>>   
>>   
>> 
>>

[T5.3-rc-3] zone inside a form with generated ids not working

2011-11-06 Thread Christian Riedel
Hi,

I'm currently trying to fix some missing functionality about some cases of 
zone-updates in tapestry5-jquery. It seems the missing feature does also not 
work in a pure T5-app!

The feature I'm talking about is this: 
1. There's a link/button/whatever that can trigger a zone-update.
2. Before any update of the zone is done, a default block is rendered using the 
delegate component.
3. The zone-update is triggered and the zone's delegate component will render a 
block with some form-components.
4. The form contains a zone and a select box that may trigger another 
zone-update - this time it's meant to update the zone inside the form.

The moment you trigger the "show-me-the-form" zone-update you'll receive an 
alert message saying: 
> "Could not find zone element 'updateZone' to update on change of element 
> 'thisValue_1337998b0f1'."

...sure because the 'updateZone' has a generated id, just like the select box. 
The id is in this case 'updateZone_1337998b0f1'.

I thought there's some magic in tapestry.js (the ZoneManager sounded so 
promising) that looks for a relative zone with the same id-postfix... but there 
is no such feature :-(
What do you think? Shouldn't be there such a feature? I mean, if I take the 
same form with the same nested zone just without the whole outer zone and block 
construct it just works, since there are no generated ids.

Here's what I thought should work (hope there's no copy-paste-error):

__

Index.tml (I used the archetype default app to test this):
__


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


${message:greeting}

The current time is: ${currentTime}




You have clicked the link ${clickCount} times.



[
increment
]
 
[
increment (via 
Ajax)
]










You are running Tapestry version 
${tapestryVersion}.




[
refresh page
]




empty
















__

Index.class
__


/**
 * Start page of application taptest.
 */
public class Index
{
@InjectComponent
private Zone zone, updateZone, outerZone;

@Inject
private Block emptyBlock, editBlock;

private Block selectedBlock;

@Persist
@Property
private int clickCount;

@Inject
private AlertManager alertManager;

@Inject
private AjaxResponseRenderer ajaxResponseRenderer;

@Property
private List selected;

public ValueEncoder getEncoder() {

return new ValueEncoder() {

@Override
public String toValue(String clientValue) {

return clientValue;
}

@Override
public String toClient(String value) {

return value;
}
};
}

public List getValues() {

return Arrays.asList(new String[] {

"asdf",
"qwer",
"dedede",
"kkk"
});
}

@Property
private String other;

public List getOtherValues() {

return Arrays.asList(new String[] {

"Count: " + clickCount
});
}

@OnEvent(component = "thisValue", value = EventConstants.SELECTED)
void onValueSelected() {

selectedBlock = editBlock;

clickCount++;
ajaxResponseRenderer.addRender(updateZone);
}

@SetupRender
void setup() {

selectedBlock = emptyBlock;

selected = new ArrayList();
selected.add("asdf");
}

public Date getCurrentTime()
{
return new Date();
}

void onActionFromIncrement()
{

selectedBlock = editBlock;

alertManager.info("Increment clicked");

clickCount++;
}

void onActionFromIncrementAjax()
{

selectedBlock = editBlock;

clickCount++;

alertManager.info("Increment (via Ajax) clicked");

ajaxResponseRenderer.addRender("outerZone", this.outerZone)
.addRender("zone", zone);
}

public Block getBlock() {

return selectedBlock;
}
}



__

Workaround:
__

Luckily, there's a workaround:
If the select's zone attribute looks like this...

>  t:zone="prop:updateZoneId" />

... and the page code like this ...
> public String getUpdateZoneId() {

[Solved] [T5.3-rc-2] incompatible with artefacts built against prior versions e.g. 5.1

2011-11-02 Thread Christian Riedel
You rock! It works fine with rc-3 :-)



Am 02.11.2011 um 19:15 schrieb Howard Lewis Ship:

> Christian has a point.
> 
> Basically, existing code (from a third party library) that call
> getService() expects to see the signature getService(Class), but that
> method not longer exists, instead its getService(Class,Class[])  (give
> or take).
> 
> I think this is serious enough to justify another RC.
> 
> 
> On Wed, Nov 2, 2011 at 9:22 AM, Thiago H. de Paula Figueiredo
>  wrote:
>> On Wed, 02 Nov 2011 14:18:12 -0200, Christian Riedel
>>  wrote:
>> 
>>> Hi
>> 
>> Hi!
>> 
>>> Can't you support both methods?
>>> 
>>> T getService(Class serviceInterface, Class>> Annotation>... markerTypes);
>>> and
>>> T getService(Class serviceInterface);
>> 
>> Isn't a getService(SomeClass.class) call valid for T getService(Class
>> serviceInterface, Class Annotation>... markerTypes)? I think so.
>> Don't you have any class implementing ObjectLocator?
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
>> instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> 
> 
> -- 
> 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.3-rc-2] incompatible with artefacts built against prior versions e.g. 5.1

2011-11-02 Thread Christian Riedel
The last version we can work with is beta-26 btw. 

See https://issues.apache.org/jira/browse/TAP5-546

Am 02.11.2011 um 17:22 schrieb Thiago H. de Paula Figueiredo:

> On Wed, 02 Nov 2011 14:18:12 -0200, Christian Riedel 
>  wrote:
> 
>> Hi
> 
> Hi!
> 
>> Can't you support both methods?
>> 
>> T getService(Class serviceInterface, Class> Annotation>... markerTypes);
>> and
>> T getService(Class serviceInterface);
> 
> Isn't a getService(SomeClass.class) call valid for T getService(Class 
> serviceInterface, Class Annotation>... markerTypes)? I think so. 
> Don't you have any class implementing ObjectLocator?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br


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



Re: [T5.3-rc-2] incompatible with artefacts built against prior versions e.g. 5.1

2011-11-02 Thread Christian Riedel
It's ok if you have one project and replace Tapestry 5.1 with 5.3. But if you 
compile your classes against 5.1 the signature in the .class file is the old 
one. 
Without recompiling the code against 5.3 it will throw the mentioned exception. 

There's no conflicting jars in the classpath and there's no custom 
implementation of ObjectLocator. It's just a simple class incompatibility, not 
a compile one. 


Am 02.11.2011 um 17:22 schrieb Thiago H. de Paula Figueiredo:

> On Wed, 02 Nov 2011 14:18:12 -0200, Christian Riedel 
>  wrote:
> 
>> Hi
> 
> Hi!
> 
>> Can't you support both methods?
>> 
>> T getService(Class serviceInterface, Class> Annotation>... markerTypes);
>> and
>> T getService(Class serviceInterface);
> 
> Isn't a getService(SomeClass.class) call valid for T getService(Class 
> serviceInterface, Class Annotation>... markerTypes)? I think so. 
> Don't you have any class implementing ObjectLocator?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
> instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br


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



[T5.3-rc-2] incompatible with artefacts built against prior versions e.g. 5.1

2011-11-02 Thread Christian Riedel
Hi 

We're using some shared libs from one project that is currently built with 
Tapestry 5.1 in a project that uses the most recent version of 5.3, i.e. 
5.3-rc-2.
Since today we encontered the following exception:

java.lang.NoSuchMethodError: 
org.apache.tapestry5.ioc.ObjectLocator.getService(Ljava/lang/Class;)Ljava/lang/Object;

This comes from the lib that uses 5.1. I had a look at the code and there was a 
change in the API: "The ability to specify marker annotation types was added in 
5.3"
As a drop-in-replacement this wouldn't cause any upgrade problems but our lib 
is now incompatible with 5.3. 

Can't you support both methods?

 T getService(Class serviceInterface, Class... 
markerTypes);
and
 T getService(Class serviceInterface);

It's causing us some trouble right now :-/

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



Re: Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' is not valid; the character ';' at position 6 is not valid.

2011-10-28 Thread Christian Riedel
I see the same exception in log files for years now. Last thing I remember is 
that it happened in T5.1 apps already. It's definitely something that tapestry 
does not always ignore.
I'd say, Leon, you should create a JIRA for this!

 
Am 28.10.2011 um 04:49 schrieb Steve Eynon:

> jsessionid's are unique id's created by the web-server (i.e. jetty or
> tomcat) when it first creates a session for a client. (In your case,
> after you login.) It is usually stored in a cookie but it is also
> equally valid to have them stored as part of refering URLs. (As you
> are seeing) Often this is only done for the first request / response
> cycle until your cookie is created.
> 
> Anyhow, the jsessionid is nothing to do with T5, T5 just has to
> happily ignore it - which (after a quick check on my sites) it does
> for T5.1 and T5.3 so I'm not sure where your error is coming from.
> 
> Steve.
> 
> 
> 
> On 28 October 2011 04:43, Muhammad Gelbana  wrote:
>> Please specify the exact scenario to reproduce this issue and state the
>> version you are using
>> 
>> On Thu, Oct 27, 2011 at 12:17 PM, Leon Derks 
>> wrote:
>> 
>>> 
>>> Hello
>>> 
>>> I see this error message a lot. Almost always after my first login
>>> attempt...
>>> 
>>> What is causing this error?
>>> 
>>> Input string 'login;jsessionid=082793EE9A197CEB7F7750090DD0423D' is not
>>> valid; the character ';' at position 6 is not valid.
>>> 
>>> regards,
>>> Leon
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> *Regards,*
>> *Muhammad Gelbana
>> Java Developer*
>> 
> 
> -
> 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: @SetupRender not called

2011-10-15 Thread Christian Riedel
Found the cause!

Tapestry5-jQuery adds, beside others, a custom Import-Worker:

@Contribute(ComponentClassTransformWorker2.class)
@Primary
public static void  
addWorker(OrderedConfiguration configuration,
[...]
configuration.addInstance("ImportJQueryUIWorker", 
ImportJQueryUIWorker.class, "before:Import");
[...]
}

See the order-constraint? It seems to happen randomly that sometimes this 
worker gets called before Tapestry's "RenderPhaseMethodWorker", which is added 
right before the "ImportWorker" in TapestryModule.
Changing the configuration to something more exact like this, fixes the problem:
configuration.addInstance("ImportJQueryUIWorker", 
ImportJQueryUIWorker.class, "before:Import", "after:RenderPhase");


The ImportJQueryUIWorker tried to advice a setupRender method that was not 
augmented/created or so by the RenderPhaseMethodWorker. Calling this before 
RenderPhaseMethodWorker does seems to break everything:

plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION);

The question now: could RenderPhaseMethodWorker throw an error, show a warning 
or something like that in case such contribution breaks the default behaviour? 
Or maybe the documentation should be updated and say how important it is not to 
add any worker before the RenderPhase-Worker that calls 
"plasticClass.introduceMethod" for a render phase method :-)

Anyway, the bug is fixed and I hope a Tapestry-Dev will have a look at this and 
improve Tapestry in a way that this may not happen so easily again!

Cheers
Christian




Am 03.10.2011 um 15:27 schrieb Christian Riedel:

> Hi there,
> 
> my application behaves not as expected. All @SetupRender methods seem to be 
> ignored, they aren't getting executed, which leads to numerous exceptions 
> within all components. 
> 
> In the last couple of days this issue randomly occurred. When I restart the 
> server a couple of time the problem goes away.
> 
> I'm using the 5.3-beta-16 (just upgraded from beta-10). I tried to debug 
> RenderPhaseMethodWorker just a minute ago but this time the application 
> starts normally and all @SetupRender methods are called as expected. I don't 
> know where to debug else or how I can reproduce this bug. It's too random at 
> the moment.
> IIRC there was a bug with platic and some race conditions, maybe that's the 
> source of the problem? 
> 
> Regards
> Christian


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



Re: An Appeal To Use the Latest Betas

2011-10-14 Thread Christian Riedel
...using beta-20 and I can't blame you for the bugs in my apps :-) 


Am 14.10.2011 um 01:16 schrieb Howard Lewis Ship:

> If you've been following the discussions here and elsewhere, you may
> be aware that Tapestry 5.3 is nearly done, with big improvements to
> every aspect of Tapestry, including speed and memory utilization. Our
> goal is to deliver an upgrade that is as seamless as possible.
> 
> The PMC would dearly like to get a final release out and available
> before December (that is, within one year of the release 5.2).
> 
> However, we can't do it without YOU:  We need people actively using
> Tapestry to upgrade to the latest betas (5.3-beta-20 is the latest,
> but we're releasing new updates almost every day). We are looking for
> broken features or problems upgrading ... all the things that will get
> in the way of a release candidate and then a final release.
> 
> Your feedback is essential ... without are community, we don't know
> for sure that Tapestry is ready to go to the next stage.  Please
> budget some time, as soon as possible, to run you application under
> 5.3 and report back here about any problems you find. Without accurate
> (and hopefully, positive) feedback, we will not be able to progress to
> a final release ... and that means we'll be delayed adding the next
> layer of amazing features in Tapestry 5.4!
> 
> Please see these notes on how to make use of the latest beta preview releases:
> 
> http://tapestry.apache.org/2011/08/27/tapestry-53-beta-preview.html
> 
> http://tapestryjava.blogspot.com/2011/10/tapestry-53-maven-archetype.html
> 
> I've been posing on twitter each time a new preview is made available:
> 
> http://twitter.com/#!/search/%23tapestry5
> 
> ... and note that by the time you do you upgreade, the exact version
> number may have changed (don't worry, beta-20 will still be available
> when beta-21 is made available).
> 
> Your support is deeply appreciated ... now get back to coding less and
> delivering more!
> 
> -- 
> 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: Tap-5.3-beta-16 tapestry-core v. tapestry-hibernate

2011-10-14 Thread Christian Riedel
...So that was the cause for my random problems in the other post: 
http://tapestry-users.832.n2.nabble.com/SetupRender-not-called-td6854976.html

I had this error for Palette, too! Haven't seen the exception for a few days 
now, so I guess your change made it into my branch :-)



Am 04.10.2011 um 15:58 schrieb Emmanuel DEMEY:

> Hi Tony
> 
> I just have a look to your issue, and I think it should work now (with the
> last version available on Github). I have forgotten to suppress a comment in
> my FormResourcesInclusionWorker.java in Tapestry5-jQuery. This worker has to
> be used just for the Form Component, but was used for all components.
> 
> BUT ... I have a question about this issue. In fact, in my worker, I add an
> advice to a SetupRender method :
> 
> PlasticMethod setupRender =
> plasticClass.introduceMethod(TransformConstants.SETUP_RENDER_DESCRIPTION);
> 
> setupRender.addAdvice(new MethodAdvice() {
>   public void advise(MethodInvocation invocation) {
> javaScriptSupport.importStack(FormSupportStack.STACK_ID);
> invocation.proceed();
>   }
> });
> 
> model.addRenderPhase(SetupRender.class);
> 
> With my previous mistake, this worker was executed also for the TextField
> component. The Texfield Class extends AbstractTextField, and this one
> extends AbstractField. I found just one SetupRender method in the
> AbstractField class.
> 
> When Tony tested his page, the SetupRender method of the AbstractField was
> never called, so the ClientId and ControlName were never initialized. So, in
> the generated HTML, both attributes are missing.
> 
> Is it normal ? Or am I missing something ?
> 
> Thanks
> 
> Emmanuel
> 
> 
> 
> 
> 
> 
> 2011/10/3 Tony Nelson 
> 
>> I have found with the latest Tap5.3 beta that the html generated from a
>> simple textfield differs significantly if you are using tapestry-core or
>> tapestry-hibernate.
>> 
>> In my .tml file I have the following simple input:
>> 
>>   Username: 
>>   
>> 
>> When this is run with tapestry-core I get the following html:
>> 
>> Username: 
>> > type="text">
>> 
>> When I run the same template with tapestry-hibernate I get the following
>> html:
>> 
>> Username: 
>> 
>> 
>> Notice the tapestry-hibernate version is missing the id attribute which is
>> causing my javascript to fail (and I think when the form is submitted, tap
>> can't seem to decode the values).
>> 
>> I've put together a small sample app that you can clone from github that
>> demonstrates the problem:
>> 
>> https://github.com/hhubris/broken
>> 
>> Simply change the tapestry dependency from tapestry-core to
>> tapestry-hibernate and restart jetty with "mvn clean jetty:run" to see the
>> problem.
>> 
>> Any help would be greatly appreciated.
>> 
>> Thanks
>> Tony Nelson
>> Starpoint Solutions


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



@SetupRender not called

2011-10-03 Thread Christian Riedel
Hi there,

my application behaves not as expected. All @SetupRender methods seem to be 
ignored, they aren't getting executed, which leads to numerous exceptions 
within all components. 

In the last couple of days this issue randomly occurred. When I restart the 
server a couple of time the problem goes away.

I'm using the 5.3-beta-16 (just upgraded from beta-10). I tried to debug 
RenderPhaseMethodWorker just a minute ago but this time the application starts 
normally and all @SetupRender methods are called as expected. I don't know 
where to debug else or how I can reproduce this bug. It's too random at the 
moment.
IIRC there was a bug with platic and some race conditions, maybe that's the 
source of the problem? 

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



Re: RE : Trying out 5.3.0

2011-06-19 Thread Christian Riedel
There's no archetype for 5.3.0, yet! You have to wait for the next alpha 
release, I think. Use the 5.2.5 archetype and change the version in the pom. 

Am 19.06.2011 um 12:33 schrieb Chris Poulsen:

> Hi,
> 
> I guess the archetype is kind of in between versions.
> 
> I guess the deprecated @IncludeStyleSheet has been removed in 5.3 and should
> he replaced with @Import(stylesheet="context:layout/layout.css")
> 
> HTH.
> 
> -- 
> Chris
> 
> On Sun, Jun 19, 2011 at 12:04 PM, Angelo C.  wrote:
> 
>> Thanks, works this time, see those 5.3.0 jar's being downloaded, but got
>> this:
>> 
>> [ERROR]
>> 
>> /Users/wcc/test_t5_3/newapp/src/main/java/com/example/newapp/components/Layout.java:[11,1]
>> cannot find symbol
>> [ERROR] symbol: class IncludeStylesheet
>> [ERROR] @IncludeStylesheet("context:layout/layout.css")
>> [ERROR] -> [Help 1]
>> 
>> I do have another question, how to create a project in 5.3.0, following is
>> not working:
>> 
>> mvn -DarchetypeVersion=5.3.0 -Darchetype.interactive=false
>> -DgroupId=com.example -DarchetypeArtifactId=quickstart
>> -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.tapestry
>> -Dpackage=com.example.newapp -DartifactId=newapp --batch-mode
>> -DarchetypeRepository=
>> https://repository.apache.org/content/repositories/orgapachetapestry-023/
>> archetype:generate
>> 
>> 
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Trying-out-5-3-0-tp4503041p4503126.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



  1   2   >