Re: Building Trunk

2011-06-19 Thread Josh Canfield
Hmm, as a reference point can you try with the Sun JDK?
On Jun 19, 2011 4:28 AM, "martijn.list"  wrote:
> I tried to install Tapestry 5 trunk on a freshly installed Ubuntu 10.04
> server.
>
> This is what I did:
>
> 1. installed OpenJDK, Maven, Ant and Gradle, subversion
> 2. checked out Tapestry 5 Trunk
> 3. Tried to build Tapestry
>
> Step 3 wasn't successful. Whatever I tried, I always ended up with some
> vague error message that either a test failed or that there were some
> compile errors.
>
> For example:
>
> Running the install task
>
> $ gradle install
>
> resulted in:
>
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
>
expandMacros(java.util.List)
> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
> cannot be applied to (java.util.List)
> [ant:javac] List specs =
> expandMacros(newList(originalSpec));
> [ant:javac] ^
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
> incompatible types
> [ant:javac] found : java.lang.Object
> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> [ant:javac] for (MarkupWriterListener l :
> CollectionFactory.newList(listeners))
> [ant:javac]
>
> [SNIP]
>
> [ant:javac] ^
> [ant:javac] Note: Some input files use or override a deprecated API.
> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> [ant:javac] Note: Some input files use unchecked or unsafe operations.
> [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> [ant:javac] 4 errors
> [ant:javac] 1 warning
>
>
> Running the build task
>
> $ gradle build
>
> resulted in:
>
> :plastic:test
> Test org.apache.tapestry5.plastic.FieldPropertyMethodCreation FAILED
> 107 tests completed, 1 failure
>
> FAILURE: Build failed with an exception.
>
> * What went wrong:
> Execution failed for task ':plastic:test'.
> Cause: There were failing tests. See the report at
> /home/build/src/tapestry/trunk/plastic/build/reports/tests.
>
> * Try:
> Run with --stacktrace option to get the stack trace. Run with --info or
> --debug option to get more log output.
>
> BUILD FAILED
>
>
> I clearly must be doing wrong. Is there a guide on how to build Tapestry
> from source?
>
> Kind regards,
>
> Martijn Brinkers
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>


Re: Building Trunk

2011-06-19 Thread martijn.list
On 06/19/2011 02:57 PM, Josh Canfield wrote:
> Hmm, as a reference point can you try with the Sun JDK?

"gradle install" succeeds if I run in with the SUN JDK but always fails
when building on OpenJDK with the following errors:

[ant:javac]
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
expandMacros(java.util.List)
in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
cannot be applied to (java.util.List)
[ant:javac] List specs =
expandMacros(newList(originalSpec));
[ant:javac]  ^
[ant:javac]
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
incompatible types
[ant:javac] found   : java.lang.Object
[ant:javac] required: org.apache.tapestry5.MarkupWriterListener
[ant:javac] for (MarkupWriterListener l :
CollectionFactory.newList(listeners))
[ant:javac]^
[ant:javac]
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:279:
incompatible types
[ant:javac] found   : java.lang.Object
[ant:javac] required: org.apache.tapestry5.MarkupWriterListener
[ant:javac] for (MarkupWriterListener l :
CollectionFactory.newList(listeners))
[ant:javac]^
[ant:javac]
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java:78:
warning: non-varargs call of varargs method with inexact argument type
for last parameter;
[ant:javac] cast to java.lang.Object for a varargs call
[ant:javac] cast to java.lang.Object[] for a non-varargs call and to
suppress this warning
[ant:javac] spec.put("months", new JSONArray(symbols.getMonths()));
[ant:javac]   ^
[ant:javac]
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ComponentWorker.java:124:
setPublishedParameters(java.util.List) in
org.apache.tapestry5.model.MutableEmbeddedComponentModel cannot be
applied to (java.util.List)
[ant:javac]
embedded.setPublishedParameters(CollectionFactory.newList(TapestryInternalUtils.splitAtCommas(names)));
[ant:javac] ^
[ant:javac] Note: Some input files use or override a deprecated API.
[ant:javac] Note: Recompile with -Xlint:deprecation for details.
[ant:javac] Note: Some input files use unchecked or unsafe operations.
[ant:javac] Note: Recompile with -Xlint:unchecked for details.
[ant:javac] 4 errors
[ant:javac] 1 warning



"gradle build" however always fails but this seems to be caused by not
being able to start Firefox. I'm building on a headless server (i.e., no
X). Is it possible to skip this test?

Kind regards,

Martijn


> On Jun 19, 2011 4:28 AM, "martijn.list"  wrote:
>> I tried to install Tapestry 5 trunk on a freshly installed Ubuntu 10.04
>> server.
>>
>> This is what I did:
>>
>> 1. installed OpenJDK, Maven, Ant and Gradle, subversion
>> 2. checked out Tapestry 5 Trunk
>> 3. Tried to build Tapestry
>>
>> Step 3 wasn't successful. Whatever I tried, I always ended up with some
>> vague error message that either a test failed or that there were some
>> compile errors.
>>
>> For example:
>>
>> Running the install task
>>
>> $ gradle install
>>
>> resulted in:
>>
>> [ant:javac]
>>
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
>>
> expandMacros(java.util.List)
>> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
>> cannot be applied to (java.util.List)
>> [ant:javac] List specs =
>> expandMacros(newList(originalSpec));
>> [ant:javac] ^
>> [ant:javac]
>>
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
>> incompatible types
>> [ant:javac] found : java.lang.Object
>> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
>> [ant:javac] for (MarkupWriterListener l :
>> CollectionFactory.newList(listeners))
>> [ant:javac]
>>
>> [SNIP]
>>
>> [ant:javac] ^
>> [ant:javac] Note: Some input files use or override a deprecated API.
>> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
>> [ant:javac] Note: Some input files use unchecked or unsafe operations.
>> [ant:javac] Note: Recompile with -Xlint:unchecked for details.
>> [ant:javac] 4 errors
>> [ant:javac] 1 warning
>>
>>
>> Running the build task
>>
>> $ gradle build
>>
>> resulted in:
>>
>> :plastic:test
>> Test org.apache.tapestry5.plastic.FieldPropertyMethodCreation FAILED
>> 107 tests completed, 1 failure
>>
>> FAILURE: Build failed with an exception.
>>
>> * What went wrong:
>> Execution failed for task ':plastic:test'.
>> Cause: There were failing tests. See the repor

Re: Building Trunk

2011-06-19 Thread françois facon
Hi Martijin

gradle build –x testto skip test during build process
gradle install -x test   to skip test during build process

you can skip test on specific module with -x test:tapestry-ioc (6
tests fails on my cygwin side)

François

2011/6/19 martijn.list :
> On 06/19/2011 02:57 PM, Josh Canfield wrote:
>> Hmm, as a reference point can you try with the Sun JDK?
>
> "gradle install" succeeds if I run in with the SUN JDK but always fails
> when building on OpenJDK with the following errors:
>
> [ant:javac]
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
> expandMacros(java.util.List)
> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
> cannot be applied to (java.util.List)
> [ant:javac]         List specs =
> expandMacros(newList(originalSpec));
> [ant:javac]                                              ^
> [ant:javac]
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
> incompatible types
> [ant:javac] found   : java.lang.Object
> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> [ant:javac]         for (MarkupWriterListener l :
> CollectionFactory.newList(listeners))
> [ant:javac]                                                                ^
> [ant:javac]
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:279:
> incompatible types
> [ant:javac] found   : java.lang.Object
> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> [ant:javac]         for (MarkupWriterListener l :
> CollectionFactory.newList(listeners))
> [ant:javac]                                                                ^
> [ant:javac]
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java:78:
> warning: non-varargs call of varargs method with inexact argument type
> for last parameter;
> [ant:javac] cast to java.lang.Object for a varargs call
> [ant:javac] cast to java.lang.Object[] for a non-varargs call and to
> suppress this warning
> [ant:javac]         spec.put("months", new JSONArray(symbols.getMonths()));
> [ant:javac]                                                           ^
> [ant:javac]
> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ComponentWorker.java:124:
> setPublishedParameters(java.util.List) in
> org.apache.tapestry5.model.MutableEmbeddedComponentModel cannot be
> applied to (java.util.List)
> [ant:javac]
> embedded.setPublishedParameters(CollectionFactory.newList(TapestryInternalUtils.splitAtCommas(names)));
> [ant:javac]                     ^
> [ant:javac] Note: Some input files use or override a deprecated API.
> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> [ant:javac] Note: Some input files use unchecked or unsafe operations.
> [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> [ant:javac] 4 errors
> [ant:javac] 1 warning
>
>
>
> "gradle build" however always fails but this seems to be caused by not
> being able to start Firefox. I'm building on a headless server (i.e., no
> X). Is it possible to skip this test?
>
> Kind regards,
>
> Martijn
>
>
>> On Jun 19, 2011 4:28 AM, "martijn.list"  wrote:
>>> I tried to install Tapestry 5 trunk on a freshly installed Ubuntu 10.04
>>> server.
>>>
>>> This is what I did:
>>>
>>> 1. installed OpenJDK, Maven, Ant and Gradle, subversion
>>> 2. checked out Tapestry 5 Trunk
>>> 3. Tried to build Tapestry
>>>
>>> Step 3 wasn't successful. Whatever I tried, I always ended up with some
>>> vague error message that either a test failed or that there were some
>>> compile errors.
>>>
>>> For example:
>>>
>>> Running the install task
>>>
>>> $ gradle install
>>>
>>> resulted in:
>>>
>>> [ant:javac]
>>>
>> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
>>>
>> expandMacros(java.util.List)
>>> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
>>> cannot be applied to (java.util.List)
>>> [ant:javac] List specs =
>>> expandMacros(newList(originalSpec));
>>> [ant:javac] ^
>>> [ant:javac]
>>>
>> /home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
>>> incompatible types
>>> [ant:javac] found : java.lang.Object
>>> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
>>> [ant:javac] for (MarkupWriterListener l :
>>> CollectionFactory.newList(listeners))
>>> [ant:javac]
>>>
>>> [SNIP]
>>>
>>> [ant:javac] ^
>>> [ant:javac] Note: Some input files use or override a deprecated API.
>>> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
>>> [ant:javac] Note: Some input files use unchecked or unsafe operations.
>>> [ant:javac] Note: Recompile with -Xl

Re: Building Trunk

2011-06-19 Thread Josh Canfield
If the tests fail because of the JDK implementation, so will your app.
On Jun 19, 2011 7:31 AM, "françois facon"  wrote:
> Hi Martijin
>
> gradle build –x test to skip test during build process
> gradle install -x test to skip test during build process
>
> you can skip test on specific module with -x test:tapestry-ioc (6
> tests fails on my cygwin side)
>
> François
>
> 2011/6/19 martijn.list :
>> On 06/19/2011 02:57 PM, Josh Canfield wrote:
>>> Hmm, as a reference point can you try with the Sun JDK?
>>
>> "gradle install" succeeds if I run in with the SUN JDK but always fails
>> when building on OpenJDK with the following errors:
>>
>> [ant:javac]
>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
>>
expandMacros(java.util.List)
>> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
>> cannot be applied to (java.util.List)
>> [ant:javac] List specs =
>> expandMacros(newList(originalSpec));
>> [ant:javac]  ^
>> [ant:javac]
>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
>> incompatible types
>> [ant:javac] found   : java.lang.Object
>> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
>> [ant:javac] for (MarkupWriterListener l :
>> CollectionFactory.newList(listeners))
>> [ant:javac]
 ^
>> [ant:javac]
>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:279:
>> incompatible types
>> [ant:javac] found   : java.lang.Object
>> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
>> [ant:javac] for (MarkupWriterListener l :
>> CollectionFactory.newList(listeners))
>> [ant:javac]
 ^
>> [ant:javac]
>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java:78:
>> warning: non-varargs call of varargs method with inexact argument type
>> for last parameter;
>> [ant:javac] cast to java.lang.Object for a varargs call
>> [ant:javac] cast to java.lang.Object[] for a non-varargs call and to
>> suppress this warning
>> [ant:javac] spec.put("months", new
JSONArray(symbols.getMonths()));
>> [ant:javac]   ^
>> [ant:javac]
>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ComponentWorker.java:124:
>> setPublishedParameters(java.util.List) in
>> org.apache.tapestry5.model.MutableEmbeddedComponentModel cannot be
>> applied to (java.util.List)
>> [ant:javac]
>>
embedded.setPublishedParameters(CollectionFactory.newList(TapestryInternalUtils.splitAtCommas(names)));
>> [ant:javac] ^
>> [ant:javac] Note: Some input files use or override a deprecated API.
>> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
>> [ant:javac] Note: Some input files use unchecked or unsafe operations.
>> [ant:javac] Note: Recompile with -Xlint:unchecked for details.
>> [ant:javac] 4 errors
>> [ant:javac] 1 warning
>>
>>
>>
>> "gradle build" however always fails but this seems to be caused by not
>> being able to start Firefox. I'm building on a headless server (i.e., no
>> X). Is it possible to skip this test?
>>
>> Kind regards,
>>
>> Martijn
>>
>>
>>> On Jun 19, 2011 4:28 AM, "martijn.list"  wrote:
 I tried to install Tapestry 5 trunk on a freshly installed Ubuntu 10.04
 server.

 This is what I did:

 1. installed OpenJDK, Maven, Ant and Gradle, subversion
 2. checked out Tapestry 5 Trunk
 3. Tried to build Tapestry

 Step 3 wasn't successful. Whatever I tried, I always ended up with some
 vague error message that either a test failed or that there were some
 compile errors.

 For example:

 Running the install task

 $ gradle install

 resulted in:

 [ant:javac]

>>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:

>>>
expandMacros(java.util.List)
 in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
 cannot be applied to (java.util.List)
 [ant:javac] List specs =
 expandMacros(newList(originalSpec));
 [ant:javac] ^
 [ant:javac]

>>>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
 incompatible types
 [ant:javac] found : java.lang.Object
 [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
 [ant:javac] for (MarkupWriterListener l :
 CollectionFactory.newList(listeners))
 [ant:javac]

 [SNIP]

 [ant:javac] ^
 [ant:javac] Note: Some input files use or override a deprecated API.
 [ant:javac] Note: Recompile with -Xlint:deprecation for details.
>

Re: UploadFile

2011-06-19 Thread tompeter
Uuups,
sorry Taha and thanks for your mail!

All best,
Tom

2011/6/19 Taha Hafeez [via Tapestry] <
ml-node+4502405-1877883370-199...@n5.nabble.com>

> Hi Tom,
>
> You have asked the question in the dev list and your question is meant for
> users list, so kindly ask this question there. Also, include the relevant
> source-code so that it is easy for somebody to help you.
>
> regards
> Taha
>
> On Sun, Jun 19, 2011 at 5:05 AM, tompeter <[hidden 
> email]>
> wrote:
>
> > Hi everyone,
> > I am using the UploadFile Component and it is not showing the upload
> > buttons
> > in IE < 9.
> > I can also not trigger the file browser.
> > I have not found any issues concerning this matter.
> > Can anybody guide me with what might be the problem with this component?
> >
> > Thanks in advance,
> > Tom
> >
> > --
> > View this message in context:
> > http://tapestry.1045711.n5.nabble.com/UploadFile-tp4502322p4502322.html
> > Sent from the Tapestry - Dev mailing list archive at Nabble.com.
> >
> > -
> > To unsubscribe, e-mail: [hidden 
> > email]
> > For additional commands, e-mail: [hidden 
> > email]
> >
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
> http://tapestry.1045711.n5.nabble.com/UploadFile-tp4502322p4502405.html
>  To unsubscribe from UploadFile, click 
> here.
>
>



-- 


Tom Krause
SONGDADDY

phone: +491791324407
mail: tom.kra...@songdaddy.com
twitter: @songdaddy_
www.songdaddy.com


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/UploadFile-tp4502322p4503677.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.

Re: Building Trunk

2011-06-19 Thread Josh Canfield
> "gradle install" succeeds if I run in with the SUN JDK but always fails
> when building on OpenJDK with the following errors:

Great, that's a place to start. I've had a problem running in openjdk as
well also due to generic support. I'm planning to spend some time
investigating this week.

Josh

On Jun 19, 2011 6:50 AM, "martijn.list"  wrote:
>
> On 06/19/2011 02:57 PM, Josh Canfield wrote:
> > Hmm, as a reference point can you try with the Sun JDK?
>
> "gradle install" succeeds if I run in with the SUN JDK but always fails
> when building on OpenJDK with the following errors:
>
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
>
expandMacros(java.util.List)
> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
> cannot be applied to (java.util.List)
> [ant:javac] List specs =
> expandMacros(newList(originalSpec));
> [ant:javac]  ^
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
> incompatible types
> [ant:javac] found   : java.lang.Object
> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> [ant:javac] for (MarkupWriterListener l :
> CollectionFactory.newList(listeners))
> [ant:javac]
 ^
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:279:
> incompatible types
> [ant:javac] found   : java.lang.Object
> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> [ant:javac] for (MarkupWriterListener l :
> CollectionFactory.newList(listeners))
> [ant:javac]
 ^
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/DateFieldStack.java:78:
> warning: non-varargs call of varargs method with inexact argument type
> for last parameter;
> [ant:javac] cast to java.lang.Object for a varargs call
> [ant:javac] cast to java.lang.Object[] for a non-varargs call and to
> suppress this warning
> [ant:javac] spec.put("months", new
JSONArray(symbols.getMonths()));
> [ant:javac]   ^
> [ant:javac]
>
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/ComponentWorker.java:124:
> setPublishedParameters(java.util.List) in
> org.apache.tapestry5.model.MutableEmbeddedComponentModel cannot be
> applied to (java.util.List)
> [ant:javac]
>
embedded.setPublishedParameters(CollectionFactory.newList(TapestryInternalUtils.splitAtCommas(names)));
> [ant:javac] ^
> [ant:javac] Note: Some input files use or override a deprecated API.
> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> [ant:javac] Note: Some input files use unchecked or unsafe operations.
> [ant:javac] Note: Recompile with -Xlint:unchecked for details.
> [ant:javac] 4 errors
> [ant:javac] 1 warning
>
>
>
> "gradle build" however always fails but this seems to be caused by not
> being able to start Firefox. I'm building on a headless server (i.e., no
> X). Is it possible to skip this test?
>
> Kind regards,
>
> Martijn
>
>
> > On Jun 19, 2011 4:28 AM, "martijn.list"  wrote:
> >> I tried to install Tapestry 5 trunk on a freshly installed Ubuntu 10.04
> >> server.
> >>
> >> This is what I did:
> >>
> >> 1. installed OpenJDK, Maven, Ant and Gradle, subversion
> >> 2. checked out Tapestry 5 Trunk
> >> 3. Tried to build Tapestry
> >>
> >> Step 3 wasn't successful. Whatever I tried, I always ended up with some
> >> vague error message that either a test failed or that there were some
> >> compile errors.
> >>
> >> For example:
> >>
> >> Running the install task
> >>
> >> $ gradle install
> >>
> >> resulted in:
> >>
> >> [ant:javac]
> >>
> >
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/FieldValidatorSourceImpl.java:81:
> >>
> >
expandMacros(java.util.List)
> >> in org.apache.tapestry5.internal.services.FieldValidatorSourceImpl
> >> cannot be applied to (java.util.List)
> >> [ant:javac] List specs =
> >> expandMacros(newList(originalSpec));
> >> [ant:javac] ^
> >> [ant:javac]
> >>
> >
/home/build/src/tapestry/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MarkupWriterImpl.java:264:
> >> incompatible types
> >> [ant:javac] found : java.lang.Object
> >> [ant:javac] required: org.apache.tapestry5.MarkupWriterListener
> >> [ant:javac] for (MarkupWriterListener l :
> >> CollectionFactory.newList(listeners))
> >> [ant:javac]
> >>
> >> [SNIP]
> >>
> >> [ant:javac] ^
> >> [ant:javac] Note: Some input files use or override a deprecated API.
> >> [ant:javac] Note: Recompile with -Xlint:deprecation for details.
> >> [ant:javac] Note: Some input files use unchecked or unsafe operations.
> >> [ant:javac] Note: Recompile with

Re: [VOTE] Tapestry 5.3.0 [REVISED]

2011-06-19 Thread Igor Drobiazko
Igor Drobiazko: +1 (binding)

On Sat, Jun 18, 2011 at 1:47 AM, Howard Lewis Ship  wrote:

> I've created and uploaded a REVISED release of Tapestry 5.3.0, ready to be
> voted upon. This is an alpha release. It replaces the earlier vote for
> 5.3.0 that failed
> due to the JDK 1.6 dependency (since resolved).
>
> The source and JavaDoc archives have been uploaded to:
>
> http://people.apache.org/~hlship/tapestry-releases/
>
> and the Maven artifacts staged to:
>
> https://repository.apache.org/content/repositories/orgapachetapestry-023/
>
> Please examine these files to determine if the new release, 5.3.0, is
> sufficiently ready
> for an alpha release.
>
> I've also created a 5.3.0 tag in Subversion:
>
> http://svn.apache.org/viewvc/tapestry/tapestry5/tags/releases/5.3.0/
>
> On a successful vote, I'll move the files from these directories to
> the proper distribution directories and update the Tapestry site
> documentation.
>
> Vote will run for three days; on success I'll move the voted artifacts
> into place and send out appropriate notifications.
>
> Only PMC members may cast binding votes.
>
> Howard M. Lewis Ship: +1 (binding)
>
> --
> 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: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Client-side Pub/Sub vs. Memory Leaks

2011-06-19 Thread Howard Lewis Ship
I've been, effectively, prototyping a client-side pub/sub solution for
Tapestry with one of my client projects.

The goal is to reduce the abuse of DOM events or other complicated
structure.  If two components need to work together when they are both
present in the page, it can be difficult to orchestrate when those
components render at different times (due to Ajax) or are nested
within other components (making it hard to obtain a client-side id to
work with). Having behaviors loosely coupled, using well-known topic
names, is a major part of the solution for this.

Topics names are of the form "tapestry:zone-updated/myZoneId" or
"app:master-category-changed".  The convention I'm coming up with is
that topic names start with a prefix ("tapestry:" for the framework,
or "app:" for the application), then a name, then optionally a
client-element id.

Message publication is by topic name, and there's a bubbling system: a
message published to "foo/bar" can be subscribed to with "foo/bar" or
"foo".  This will allow, for example, code to be aware of any form
that's about to submit, or any Zone that's about to update, etc.

The topic message payload (or just "message") is any JavaScript
object, defined by the code that publishes to the topic.  It is passed
to any listener functions listening to the topic.

Part of the code is in 5.3.0, part of it is evolving inside my client
project and will be merged into 5.3.x.

In any case, lots of it is working out nicely. I have some very
sophisticated logic on the client side and the pubsub system makes
things possible that otherwise would not be.

However, I do have a concern.  Although its easy for a listener to
unsubscribe itself, what I'm struggling with is when a topic is
associated with a DOM element (which is often the case).  I would like
to have a means of recognizing that a DOM element (or tree of DOM
elements) has been removed from the DOM, and to automatically destroy
topic publishers and listeners related to that DOM element.

Failure to do this will likely result in memory leaks inside
long-running pages, and potentially to client-side exceptions as
listeners perform updates to DOM elements that are no longer attached
to the document.

One option I'm considering is to make topic names simple strings, but
to always associate them with a DOM element.  I.e.:

var publisher = T5.createPublisher("tapestry:form-validate", myForm);
// createPublisher() returns a publisher function.
// The return value of the publisher is an array of the return values
of all listener functions.

T5.sub({ topic: "tapestry:form-validate", element: myForm}, function()
{ ... }); // to match message published for myForm
// The return value of sub() is a function used to unsubscribe the
listener function from the topic. This can be used for
// "listen once" scenarios.

T5.sub("tapestry:form-validate", function() { ... }); // to match
messages published for any form

var result = publisher({ foo:bar, biff:baz}); // Send the object to
listener functions
// Get back an array of return values.

This would replace and formalize the "foo/client-id" pattern I discuss above.

The pub/sub approach above could combine with some code that would
iterate over elements being removed form the DOM and cleanup the
publishers/listeners mappings.  Part of this code already exists, to
clean things up for IE (breaking apart the DOM and JS to prevent
memory leaks).

As I write this, I'm really liking the idea of always linking topics
to elements; listener functions could receive two parameters: the
payload message, and (second & optional) an event object that would
include, among other things, a reference to the element for the
message.

In the larger scheme of things, appling this pub/sub structure will
have a lot of benefits.  It effectively provides more "seams" on the
client-side where logic can be injected, which should lead to less
monkey-patching. I also see it as a great mechanism for dealing with
Cometd/Websockets, where the server-side can publish events to the
client-side.

My personal plan is to start introducing the T5 namespace and pub/sub
features in 5.3 and go a bit more whole-hog in 5.4.  In fact, the
"theme" of 5.4 could be JavaScript: breaking the ties on Prototype,
pub/sub, and Websocket support.

So, I'm interested in general thoughts on the approach, and also some
insight into the memory leak issue.  It would be great if there was a
bubbling DOM event that we could use for this purpose. I don't think
there is.

-- 
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: dev-unsubscr...@tapestry.apache.org
For additional commands, e-mail: dev-h...@tapestry.apache.org



TAP5-1527

2011-06-19 Thread Igor Drobiazko
I had a look into TAP5-1527. The issue in short: using BeanEditForm
component on a page, your handler method for the prepare event is invoked
twice during rendering.

For more details see:https://issues.apache.org/jira/browse/TAP5-1527

As you can see in the following example, BeanEditForm re-triggers Form's
prepare event without to abort the original event. The consequence is that
onPrepare() method on the page is called twice as both Form's and
BeanEditForm's events are handled.


void onPrepareFromForm()
{
resources.triggerEvent(EventConstants.PREPARE, null, null);

if (model == null)
{
Class beanType = resources.getBoundType("object");

model = beanModelSource.createEditModel(beanType,
resources.getContainerMessages());

BeanModelUtils.modify(model, add, include, exclude, reorder);
}
}

Honestly I'm puzzled how this ever worked before 5.2. According to how
BeanEditForm handles the prepare event, the described behavior is expected.
I don't what changed the behavior in 5.2, but now it works as expected.

In order to make onPrepare() handler to be invoked only once, we should
abort the original prepare event triggered by Form.

boolean onPrepareFromForm()
{
resources.triggerEvent(EventConstants.PREPARE, null, null);

if (model == null)
{
Class beanType = resources.getBoundType("object");

model = beanModelSource.createEditModel(beanType,
resources.getContainerMessages());

BeanModelUtils.modify(model, add, include, exclude, reorder);
}

return true;
}

Am I missing something?

-- 
Best regards,

Igor Drobiazko
http://tapestry5.de


Re: Client-side Pub/Sub vs. Memory Leaks

2011-06-19 Thread Kalle Korhonen
Tying to dom elements sounds reasonable to me. You mean
DOMNodeRemoved? There's such as a thing in the spec but do the
browsers, especially everybody's favorite trouble maker, IE, support
it?  See http://en.wikipedia.org/wiki/DOM_events,
http://stackoverflow.com/questions/3750546/event-observe-domnoderemoved-does-not-work-in-ie
and 
http://www.bennadel.com/blog/1623-Ask-Ben-Detecting-When-DOM-Elements-Have-Been-Removed-With-jQuery.htm.

Kalle


On Sun, Jun 19, 2011 at 12:03 PM, Howard Lewis Ship  wrote:
> I've been, effectively, prototyping a client-side pub/sub solution for
> Tapestry with one of my client projects.
>
> The goal is to reduce the abuse of DOM events or other complicated
> structure.  If two components need to work together when they are both
> present in the page, it can be difficult to orchestrate when those
> components render at different times (due to Ajax) or are nested
> within other components (making it hard to obtain a client-side id to
> work with). Having behaviors loosely coupled, using well-known topic
> names, is a major part of the solution for this.
>
> Topics names are of the form "tapestry:zone-updated/myZoneId" or
> "app:master-category-changed".  The convention I'm coming up with is
> that topic names start with a prefix ("tapestry:" for the framework,
> or "app:" for the application), then a name, then optionally a
> client-element id.
>
> Message publication is by topic name, and there's a bubbling system: a
> message published to "foo/bar" can be subscribed to with "foo/bar" or
> "foo".  This will allow, for example, code to be aware of any form
> that's about to submit, or any Zone that's about to update, etc.
>
> The topic message payload (or just "message") is any JavaScript
> object, defined by the code that publishes to the topic.  It is passed
> to any listener functions listening to the topic.
>
> Part of the code is in 5.3.0, part of it is evolving inside my client
> project and will be merged into 5.3.x.
>
> In any case, lots of it is working out nicely. I have some very
> sophisticated logic on the client side and the pubsub system makes
> things possible that otherwise would not be.
>
> However, I do have a concern.  Although its easy for a listener to
> unsubscribe itself, what I'm struggling with is when a topic is
> associated with a DOM element (which is often the case).  I would like
> to have a means of recognizing that a DOM element (or tree of DOM
> elements) has been removed from the DOM, and to automatically destroy
> topic publishers and listeners related to that DOM element.
>
> Failure to do this will likely result in memory leaks inside
> long-running pages, and potentially to client-side exceptions as
> listeners perform updates to DOM elements that are no longer attached
> to the document.
>
> One option I'm considering is to make topic names simple strings, but
> to always associate them with a DOM element.  I.e.:
>
> var publisher = T5.createPublisher("tapestry:form-validate", myForm);
> // createPublisher() returns a publisher function.
> // The return value of the publisher is an array of the return values
> of all listener functions.
>
> T5.sub({ topic: "tapestry:form-validate", element: myForm}, function()
> { ... }); // to match message published for myForm
> // The return value of sub() is a function used to unsubscribe the
> listener function from the topic. This can be used for
> // "listen once" scenarios.
>
> T5.sub("tapestry:form-validate", function() { ... }); // to match
> messages published for any form
>
> var result = publisher({ foo:bar, biff:baz}); // Send the object to
> listener functions
> // Get back an array of return values.
>
> This would replace and formalize the "foo/client-id" pattern I discuss above.
>
> The pub/sub approach above could combine with some code that would
> iterate over elements being removed form the DOM and cleanup the
> publishers/listeners mappings.  Part of this code already exists, to
> clean things up for IE (breaking apart the DOM and JS to prevent
> memory leaks).
>
> As I write this, I'm really liking the idea of always linking topics
> to elements; listener functions could receive two parameters: the
> payload message, and (second & optional) an event object that would
> include, among other things, a reference to the element for the
> message.
>
> In the larger scheme of things, appling this pub/sub structure will
> have a lot of benefits.  It effectively provides more "seams" on the
> client-side where logic can be injected, which should lead to less
> monkey-patching. I also see it as a great mechanism for dealing with
> Cometd/Websockets, where the server-side can publish events to the
> client-side.
>
> My personal plan is to start introducing the T5 namespace and pub/sub
> features in 5.3 and go a bit more whole-hog in 5.4.  In fact, the
> "theme" of 5.4 could be JavaScript: breaking the ties on Prototype,
> pub/sub, and Websocket support.
>
> So, I'm interested in general thoug