Re: Possible bug in 5.3 with Mixin parameters

2011-09-12 Thread Laurent Guerin
The following Jira has been created :
https://issues.apache.org/jira/browse/TAP5-1642
Thanks.

Laurent.


2011/9/12 Guerin Laurent 

> Thanks, i'll try to create a simplified project quickly and file a JIRA.
>
> -Message d'origine-
> De : Robert Zeigler [mailto:robert.zeig...@roxanemy.com]
> Envoyé : lundi 12 septembre 2011 17:35
> À : Tapestry users
> Objet : Re: Possible bug in 5.3 with Mixin parameters
>
> Sounds like a bug.  If you can create a simplified project (eg: 1 page, 1
> mixin) that duplicates the issue, then create a Jira and attach the project.
>
> Robert
>
> On Sep 12, 2011, at 9/1210:18 AM , Guerin Laurent wrote:
>
> > Hi all,
> >
> > In our Tapestry 5 library (exanpe-t5-lib), we provide some mixins
> containing some parameters declared as "required=true" AND with a default
> value provided.
> > These parameters are required for the operation of the mixin.
> >
> > For example, on Dialog mixin, we have :
> >
> >@Parameter(value = "confirm", required = true, allowNull = false,
> defaultPrefix = BindingConstants.LITERAL)
> >private DialogRenderModeEnum renderMode;
> >
> > If this required parameter is not explicity declared in the TML :
> > - In 5.2.6, everything is ok : the default value is used
> > - In 5.3-beta-5, we get the following Exception :
> >  Parameter(s) 'Dialog.renderMode' are required for
> org.apache.tapestry5.corelib.components.ActionLink, but have not been bound.
> >
> > The TML example looks like this :
> > link1
> >
> > With a simple type for mixin parameter (Integer or String), the same
> error occurs.
> > This behavior is only for mixins, not for components.
> >
> > Should i submit a JIRA for this issue ?
> >
> > Laurent
> >
> > -
> > 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: New user and IDE issues

2011-04-06 Thread Laurent Guerin
I have updated the content of the
http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse page but was
unable to add new attachments (not allowed to do "attachFile").
The new links (t5.2.5.tld and t5.3.0.tld) redirect to my GitHub account.

2011/4/5 Guerin Laurent 

> You're welcome,
>
> t5.2.0.tld file has been generated with tapestry-tldgen plugin applied
> directly into tapestry sources. Tomorrow i'll try to generate and upload on
> wiki fresh versions of Tld for 5.2.5 and 5.3
>
> Le 5 avr. 2011 à 22:22, "Grioni Stefano"  a écrit
> :
>
> > Hi Laurent,
> >
> > Thanks for the precision! Now I get why it didn't work :).
> > One question though: How is that file (t5.2.0.tld) generated? And how can
> I update it (for instance when Tapestry will pass to 5.3) ?
> >
> > Thanks a bunch,
> >
> > Stefano
> >
> > On Apr 5, 2011, at 9:59 PM, Guerin Laurent wrote:
> >
> >> Hi Stephano,
> >>
> >> This Maven plugin tool (tapestry-tldgen) allow you to generare a tld
> describing your own Tapestry 5 components library.
> >>
> >> If you want auto completion with the core Tapestry 5 component, you have
> to import this one in Eclipse :
> >> https://issues.apache.org/jira/secure/attachment/12468166/t5.2.0.tld
> >>
> >> Laurent.
> >>
> >> Envoyé de mon iPhone
> >>
> >> Le 5 avr. 2011 à 21:08, "Stefano Grioni"  a
> écrit :
> >>
> >>> tapestry-tldgen
> >>
> >> -
> >> 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: Eclipse IDE and TML code completion

2010-09-22 Thread Laurent Guerin
Happy to see that you could generate your TLD.

The generated XML "tldgen-components-info.xml" is a temporary file used to
collect Javadoc informations on components.
We are aware about the m2Eclipse issue, it's already referenced in the FAQ.

Thank you for your feedback. We will check the classes.jar issue.

2010/9/22 Alessio Gambi 

> Hi,
>
> I am using maven from eclipse (It did not worked) but apparently launching
> it from is fine.
>
> This is the printout of the tld file:
> http://java.sun.com/xml/ns/javaee"; xmlns:xsi="
> http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="
> http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd";
> version="2.1">
>  1.0
>  t
>
>  http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>  
>
>Dialog
>
>  se.pmdit.tutorial.t5gwt.tapestry.components.Dialog
>JSP
>
>  
>  entryPoint
>  true
>  
>java.lang.String
>  
>
>
>  
>  componentType
>  true
>  
>java.lang.String
>  
>
>  
>  
>
>GwtEntryPoint
>
>  
> se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint
>JSP
>
>  
>  className
>  true
>  
>java.lang.String
>  
>
>  
>  
>
>GwtComponent
>
>  
> se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent
>JSP
>
>  
>  entryPoint
>  true
>  
>java.lang.String
>  
>
>
>  
>  componentType
>  true
>  
>java.lang.String
>  
>
>  
>  
>
>GwtSupport
>
>  se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport
>JSP
>  
> 
>
>
> This is the tldgen-components-info.xml file:
> 
> 
>  className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtSupport"
> superClassName="java.lang.Object">
> 
> 
> 
>  className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtEntryPoint"
> superClassName="java.lang.Object">
> 
> 
> 
> 
> 
> 
> 
>  className="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent"
> superClassName="java.lang.Object">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>  superClassName="se.pmdit.tutorial.t5gwt.tapestry.components.GwtComponent">
> 
> 
> 
> 
>
>
>  Hi Alessio,
>>
>> Thanks for your tests.
>>
>> which Maven version did you use ?
>>
>
> mvn -version
> Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
>
> Java version: 1.6.0_20
> Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> Default locale: en_US, platform encoding: MacRoman
> OS name: "mac os x" version: "10.5.8" arch: "x86_64" Family: "mac"
>
>
> Additionally,
> I noticed also a strange behavior using m2eclipse:
>
> I downloaded the source code for the plugin that you provide
> Modified the pom.xml to remove the dependency on tools.jar
> The build fails because of a failing test:
>
>
> --
> Test set: fr.exanpe.tapestry.tldgen.taglib.builder.StructureBuilderTest
>
> ---
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.065 sec
> <<< FAILURE!
> testHeritage(fr.exanpe.tapestry.tldgen.taglib.builder.StructureBuilderTest)
>  Time elapsed: 0.048 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: expected:<3> but was:<0>
>at junit.framework.Assert.fail(Assert.java:47)
>at junit.framework.Assert.failNotEquals(Assert.java:282)
>at junit.framework.Assert.assertEquals(Assert.java:64)
>at junit.framework.Assert.assertEquals(Assert.java:201)
>at junit.framework.Assert.assertEquals(Assert.java:207)
>at
> fr.exanpe.tapestry.tldgen.taglib.builder.StructureBuilderTest.testHeritage(StructureBuilderTest.java:49)
>
> It seems that attributes of class SubSubComponent are not present.
>
> However,  THE SAME TEST CLASS passes THE SAME TEST when launched using
> JUnit.
>
> I think one of the problem could be the fact that classes.jar (that is a
> super set, i.e. contains more classes, of tools.jar) has
> "AccessRestrictions" ... unfortunately, I do not know how to deal with this.


Re: Eclipse IDE and TML code completion

2010-09-22 Thread Laurent Guerin
endencies configurator -->
>
> this is repeated almost 1000 times ;)
>
>
> java.lang.reflect.InvocationTargetExceptionjava.lang.reflect.InvocationTargetExceptionjava.lang.reflect.InvocationTargetException
>at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
>at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:592)
>at
> org.codehaus.plexus.component.configurator.AbstractComponentConfigurator.configureComponent(AbstractComponentConfigurator.java:88)
>at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
>
>
> DEBUG] -- end configuration --
> [WARNING] encoding parameter has not been set. Using plateform encoding for
> source file javadoc processing (MacRoman)
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
> [INFO] Total time: 9.413s
> [INFO] Finished at: Wed Sep 22 12:37:36 CEST 2010
> [INFO] Final Memory: 3M/12M
> [INFO]
> 
> [ERROR] Failed to execute goal fr.exanpe:tapestry-tldgen:1.0.0:tld-generate
> (default) on project t5gwt: Execution default of goal
> fr.exanpe:tapestry-tldgen:1.0.0:tld-generate failed. NullPointerException ->
> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
> goal fr.exanpe:tapestry-tldgen:1.0.0:tld-generate (default) on project
> t5gwt: Execution default of goal
> fr.exanpe:tapestry-tldgen:1.0.0:tld-generate failed.
>at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:593)
>at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
>at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
>at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
>at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
>at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
>at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
>at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>at java.lang.reflect.Method.invoke(Method.java:592)
>at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
> default of goal fr.exanpe:tapestry-tldgen:1.0.0:tld-generate failed.
>at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:114)
>    at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
>... 14 more
> Caused by: java.lang.NullPointerException
>at
> fr.exanpe.tapestry.tldgen.mojo.TapestryTldGenMojo.loadCustomClassLoader(TapestryTldGenMojo.java:183)
>at
> fr.exanpe.tapestry.tldgen.mojo.TapestryTldGenMojo.execute(TapestryTldGenMojo.java:137)
>at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
>... 15 more
> [ERROR]
>
>
> On Sep 22, 2010, at 10:50 AM, Laurent Guerin wrote:
>
>  For those interested in using Eclipse code completion with tml files,
>> EXANPE Team (Julien Maupoux, Katia Aresti and myself) has developped a
>> Maven plugin that allow you to generate a tld describing any Tapestry 5
>> components library.
>>
>> The plugin uses both Javadoc and @Parameter annotation to perform the
>> generation.
>>
>> Once you have generated your TLD, just to configure Eclipse as described
>> in the Wiki :
>> http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse
>>
>> This plugin has been tested on Tapestry 5.2 itself (see result TLD
>> attachment for test completion with core components).
>>
>> The source code of this plugin is available here :
>> http://github.com/exanpe/tapestry-tldgen
>>
>> Informations, usage and notes available here :
>> http://exanpe.free.fr/tapestry-tldgen/
>>
>>
>> The plugin has been released as alpha version 1.0.0 and promoting into
>> Maven central repository.
>> So, all feedbacks are appreciated (directly on GitHub) !
>>
>> Best regards,
>>
>> Laurent Guerin
>>
>> -
>> 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
>
>


Eclipse IDE and TML code completion

2010-09-22 Thread Laurent Guerin
For those interested in using Eclipse code completion with tml files,
EXANPE Team (Julien Maupoux, Katia Aresti and myself) has developped a Maven
plugin that allow you to generate a tld describing any Tapestry 5 components
library.

The plugin uses both Javadoc and @Parameter annotation to perform the
generation.

Once you have generated your TLD, just to configure Eclipse as described in
the Wiki :
http://wiki.apache.org/tapestry/Tapestry5JSPEditorEclipse

This plugin has been tested on Tapestry 5.2 itself (see result TLD
attachment for test completion with core components).

The source code of this plugin is available here :
http://github.com/exanpe/tapestry-tldgen

Informations, usage and notes available here :
http://exanpe.free.fr/tapestry-tldgen/


The plugin has been released as alpha version 1.0.0 and promoting into Maven
central repository.
So, all feedbacks are appreciated (directly on GitHub) !

Best regards,

Laurent Guerin

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

Re: URL to file

2010-09-02 Thread Laurent Guerin
Hi,

As Thiago has told you, Tapestry is a Web framework and has no need to
provide a such feature into the T5 API.
Perhaps, i don't understand your need, but java.io.File.toURI() followed by
java.net.URI.toURL() should be a good candidate.

2010/9/2 Charith Madusanka 

> Hi!
>
> Is there any simple way to get URL to file in T5 API? Like smiler to
> "URLConnection con = url.openConnection();"
>
> charith
>


Re: Call function periodically

2010-08-31 Thread Laurent Guerin
Hi,

you should look at quartz integration provided by ChenilleKit :
http://www.chenillekit.org/chenillekit-quartz/index.html


2010/9/1, Mite :
>
> I need to have a function called every one minute from the moment the
> application is deployed on the server, that does some database row updates.
> This has to be done independently of the activity of the users on the web
> application. Even if there are no users using the application, this call has
> to be done.
> Is there any way of doing this in Tapestry5?
>
> Thank you
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Call-function-periodically-tp2798762p2798762.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: Upgrading from 5.1 to 5.2

2010-08-07 Thread Laurent Guerin

Hi Andreas,

Thank you for your random choice :-)

With Katia (co-author) we are planning to upgrade this little Tapestry  
demo to 5.2 version soon and add some enhanced components.

Thank you for your advices and your pull request.

Regards,

Laurent Guerin

Envoyé de mon iPhone

Le 7 août 2010 à 04:26, "Andreas Andreou"  a  
écrit :



So, i picked a random 5.1 project from github (
http://github.com/lguerin/tapestwitter )
forked it, upgraded it to 5.2 and fixed all deprecation warnings...
take a look /comment at the
change logs at [1] and [2]

I've found 2 small things worth noticing:
1) the project was building a JSONObject and outputting it INSIDE a js
string - because by default
the json is now pretty-printed, the newlines where causing js errors.
The fix was to use json.toString(true)
2) The old renderSupport.addInit could accept a JSONArray and map the
elements to the function's arguments
Now you should build a JSONObject which will become the only argument
of the function and use javaScriptSupport...
Of course that's already documented and explained at [3] but i'm
thinking the old way will appear more straightforward
to some (i did spend some minutes trying to find how to send that
second parameter before understanding that i should
just bundle it along with the first inside a json)


[1] 
http://github.com/andyhot/tapestwitter/commit/2dd797629cd0506a9fc5625e71100170c0cde300
[2] 
http://github.com/andyhot/tapestwitter/commit/b815eb395d9e820833ebf875a310b6d440f65f46
[3] 
http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/RenderSupport.html#addInit%28java.lang.String,%20org.apache.tapestry5.json.JSONArray%29


--
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

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



RE : Upgrading from 5.1 to 5.2

2010-08-07 Thread Laurent Guerin
Hi Andreas,

With Katia (co-author) we are planning to upgrade this little Tapestry demo
to 5.2 version soon and add some enhanced components.
Thank you for your advices.

Regards,

Laurent Guerin

 Message d'origine
De: Andreas Andreou [mailto:andre...@gmail.com]
Date: sam. 07/08/2010 04:26
À: Tapestry users
Objet : Upgrading from 5.1 to 5.2

So, i picked a random 5.1 project from github (
http://github.com/lguerin/tapestwitter )
forked it, upgraded it to 5.2 and fixed all deprecation warnings...
take a look /comment at the
change logs at [1] and [2]

I've found 2 small things worth noticing:
1) the project was building a JSONObject and outputting it INSIDE a js
string - because by default
the json is now pretty-printed, the newlines where causing js errors.
The fix was to use json.toString(true)
2) The old renderSupport.addInit could accept a JSONArray and map the
elements to the function's arguments
Now you should build a JSONObject which will become the only argument
of the function and use javaScriptSupport...
Of course that's already documented and explained at [3] but i'm
thinking the old way will appear more straightforward
to some (i did spend some minutes trying to find how to send that
second parameter before understanding that i should
just bundle it along with the first inside a json)


[1]
http://github.com/andyhot/tapestwitter/commit/2dd797629cd0506a9fc5625e71100170c0cde300
[2]
http://github.com/andyhot/tapestwitter/commit/b815eb395d9e820833ebf875a310b6d440f65f46
[3]
http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/RenderSupport.html#addInit%28java.lang.String,%20org.apache.tapestry5.json.JSONArray%29


-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Tapestry PMC / Tacos developer
Open Source / JEE Consulting

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