Re: datefield - no option to cancel?

2011-05-26 Thread antalk
Hi,

Interesting stuff. I've been working with the datefield on 2 projects and
stumbled on these issues also. The fact is that i've taken a copy of the
javascript and modified it to fix these 2 issues. So i have already a
datefield.js that is working and fixes issues 1408 and 1409.

I could post the code here , for the JIRA guys to have a look at ?

Antal

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/datefield-no-option-to-cancel-tp463p4431019.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: NullPointerException when using Palette

2011-05-26 Thread michael pe
problem resolved

I implement equals in a wrong way

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/NullPointerException-when-using-Palette-tp4430840p4430966.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



How to ignore @Cache annotation while calling a method?

2011-05-26 Thread Ashutosh Dash
How to ignore @Cache annotation while calling a method?
Actually I have method say "method1()" with @Cache annotated. and this method 
is calling from diffrent area from my application.

My requirement is that, while this "method1()" will call from only "method2()", 
the @cache annotation should ignored.

Is is possible in T5 ?



::DISCLAIMER::
---

The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. 
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the 
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, 
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have
received this email in error please delete it and notify the sender 
immediately. Before opening any mail and
attachments please check them for viruses and defect.

---


Re: Tapestry 4 - Need help in Select option

2011-05-26 Thread NewUser
Problem resolved :)

Thank you everyone for being there :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-4-Need-help-in-Select-option-tp4414916p4430917.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: NullPointerException when using Palette

2011-05-26 Thread michael pe
GenericSelectModel is initialised like this
if (types == null) {
types =  new 
GenericSelectModel(typeManager.findAll(), //findAll()
returns List
Type.class,
EntityDisplay.getColumn(Type.class),
EntityDisplay.CONTEXT, propertyAccess);
}


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/NullPointerException-when-using-Palette-tp4430840p4430843.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



NullPointerException when using Palette

2011-05-26 Thread michael pe
Palette NPE

I try to use Palette, but always get a NPE when set the its selected
property.
I have already tried to override equals, hashCode, toString, but still have
this exception.

Anyone have any clue what I might be doing wrong? Thanks!

Caused by: java.lang.NullPointerException
at
org.apache.tapestry5.internal.util.SelectModelRenderer.option(SelectModelRenderer.java:49)
at
org.apache.tapestry5.corelib.components.Palette$SelectedRenderer.render(Palette.java:158)
at
org.apache.tapestry5.internal.structure.RenderPhaseEventHandler$1.render(RenderPhaseEventHandler.java:89)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
... 128 more

-tml file:


-java file:
@Property
@Persist
private GenericSelectModel types; //GenericSelectModel

@Property
@Persist
private List selectedTypes;




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/NullPointerException-when-using-Palette-tp4430840p4430840.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: White Background on Zone Update

2011-05-26 Thread jackkurosaki
Ah thanks.  I had put the update="show" on the event instead of the zone.  Now 
it works.  Thank you!

Jack

-Original Message-
From: "Bob Harner" 
Sent: Thursday, May 26, 2011 8:06pm
To: "Tapestry users" 
Subject: Re: White Background on Zone Update

Jack,

I'm not seeing this happen myself in the test case I made (ok, IE
flashes a little, but FF & Chrome work fine). Have you tried changing
setting the zone's "update" parameter to "show"?

test
http://aleheads.files.wordpress.com/2011/04/free_beer_poster.jpg)">
...


On Thu, May 26, 2011 at 5:37 PM,   wrote:
> I have a zone on a page that has a image in the background.  Whenever I 
> update the zone, the background behind the zone switches to white.
>
> Is there an easy way to update a zone while allowing the background image to 
> remain the same?
>
> Jack
>
>
> -
> 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: White Background on Zone Update

2011-05-26 Thread Bob Harner
Jack,

I'm not seeing this happen myself in the test case I made (ok, IE
flashes a little, but FF & Chrome work fine). Have you tried changing
setting the zone's "update" parameter to "show"?

test
http://aleheads.files.wordpress.com/2011/04/free_beer_poster.jpg)">
...


On Thu, May 26, 2011 at 5:37 PM,   wrote:
> I have a zone on a page that has a image in the background.  Whenever I 
> update the zone, the background behind the zone switches to white.
>
> Is there an easy way to update a zone while allowing the background image to 
> remain the same?
>
> Jack
>
>
> -
> 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: property expression language intelligence

2011-05-26 Thread Adam Zimowski
No prob. I'll just hire intern monkeys to do all that unnecessary
typing for me :-)

Just kidding. Thanks for your feedback.

On Thu, May 26, 2011 at 9:44 AM, Thiago H. de Paula Figueiredo
 wrote:
> On Thu, 26 May 2011 11:06:44 -0300, Geoff Callender
>  wrote:
>
>> -1 for me. I can see it causing immense confusion in normal maintenance
>> work esp. when refactoring.
>
> -1 to me. The less to understand, the better.
>
> --
> 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



White Background on Zone Update

2011-05-26 Thread jackkurosaki
I have a zone on a page that has a image in the background.  Whenever I update 
the zone, the background behind the zone switches to white.

Is there an easy way to update a zone while allowing the background image to 
remain the same?

Jack


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



Re: T5 Locale problem

2011-05-26 Thread Josh Canfield
Are you sure tapestry/jetty has anything to do with it? Can you write
a straight java (no webapp/jetty) unit test that loads the file?

On Thu, May 26, 2011 at 1:32 PM, atcach  wrote:
> Furthermore, if I open the .xml from an hex editor, I only see the < sign,
> not the BOM for any encoding.
> :  3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31   version="1
>  0010:  2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 55 54  .0"
> encoding="UT
>  0020:  46 2d 38 22 3f 3e 0a 3c  63 6f 6e 74 65 6e 74 20
> F-8"?>.
> Which is quite right, isn't it ?
> As:
>  UTF-8 BOM: ef bb bf
>  UTF-16BE BOM: fe ff
>  UTF-16LE BOM: ff fe
>  UTF-32BE BOM: 00 00 fe ff
>  UTF-32LE BOM: ff fe 00 00
>
> Regards
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4429973.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 Locale problem

2011-05-26 Thread atcach
Furthermore, if I open the .xml from an hex editor, I only see the < sign,
not the BOM for any encoding.
:  3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31  .http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4429973.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5 Locale problem

2011-05-26 Thread atcach
The problem is that it is unpacked (a pentaho report is a zip file with many
xml's inside)  by the system (running in jetty in linux with utf-8), because
if I unzip it and get the encoding of the xml's I see them ok. But I think
is reencoding them in the middle or something like that. Could it be that
the configuration of the tapestry/jetty is wrong ?
How could I configure it ?
Regards

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4429959.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: Ordered MappedConfiguration

2011-05-26 Thread Kalle Korhonen
Let me ask again in more simple terms - is it currently possible to
access the contribution element ids of an OrderedConfiguration in a
service? Looking through the code but you probably know the answer
right off the bat.

Kalle


On Thu, May 26, 2011 at 12:08 AM, Kalle Korhonen
 wrote:
> On Wed, May 25, 2011 at 10:30 PM, Howard Lewis Ship  wrote:
>> Or, alternately, could you build your map from the ordered List?  I
>> really think that having a single structure be ordered and keyed and
>> expecting IoC to make sense of that is going to open up a can of
>> ambiguities  and that's in the substrate level of the IoC where
>> its hard to bring to bear some of the higher powered Tapestry features
>> to handle it. (*)
>
> Yes, of course I *can*, but the problem is that it looks cumbersome to
> a casual user and it's not necessarily obvious to the user why it has
> to be done that way. This is for the purposes of tynamo-security,
> where users are essentially contributing new request filter pipelines
> (or, pipeline "sections"). For a proof-of-concept I'm doing exactly
> that, i.e. building a map from and ordered list. If interested, see
> http://svn.codehaus.org/tynamo/trunk/tapestry-security/src/test/java/org/tynamo/security/testapp/services/AppModule.java
> and 
> http://svn.codehaus.org/tynamo/trunk/tapestry-security/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java.
>
> Yes, I understand that this might be problematic for the IoC to
> handle. Of course, there are multiple ways to skin this particular
> cat, but I'm not quite sure what's the right way to go about it at the
> moment since every option I've considered so far comes with some
> trade-offs. What I really want, is a syntax something like this:
> newChain("/somepath/***").add(anon, "config").add(authc, "config")
>
> ... and make the order in which these filter chains (pipelines) are
> configured meaningful, at least within a particular contribution
> point.
>
> I suppose I could also scrap the whole plan of contributing elements,
> and contribute it all in one big object, but if there are multiple
> security configuration contribution points, that too becomes
> problematic. Well, back to the drawing board for now.
>
> Kalle
>
>
>>
>> (*) I.e., on the same footing as why its so hard to contribute new
>> coercers to TypeCoercer without triggering recursive service
>> construction errors.
>>
>> On Wed, May 25, 2011 at 10:27 PM, Howard Lewis Ship  wrote:
>>> Could the contributed objects know their names and have space for
>>> ordering values (the "before:" and "after:" strings)?  In other words,
>>> could you simple order the map value() inside your service
>>> implementation?
>>>
>>> On Wed, May 25, 2011 at 9:42 AM, Kalle Korhonen
>>>  wrote:
 I have a use case where I'd like to contribute key-value pairs but
 preserve their ordering, i.e. I'd like to contribute elements to a
 LinkedHashMap. Now, MappedConfiguration doesn't work since it doesn't
 preserve the order (or in Tapestry terms, cannot be ordered after
 elements are contributed). OrderedConfiguration would work (at least
 for my use case) if I had an access to the ids of the contributed
 elements. Would it be a complete heresy, if instead of a List, you
 could optionally specify a LinkedHashMap (or a custom Tapestry type
 for an immutable linked map)? Any better ideas for it?

 Kalle

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

2011-05-26 Thread Josh Canfield
> The prolog is everything that comes before the  wrote:
>> My guess of a locale problem is that Caused by:
>> org.xml.sax.SAXParseException: Content is not allowed in prolog. is usually
>> because the "
> The prolog is everything that comes before the  at the xml and you can't see anything before the  probably a BOM being inserted by whatever is creating the file, and no
> BOM support in whatever is reading it.
>
> Josh
>
> On Thu, May 26, 2011 at 7:20 AM, atcach  wrote:
>> Hi,
>> I'm struggling reading a Pentaho Report.
>> The report is mainly a jar file with xml's inside.
>> If I compile it from outside tapestry it works ok.
>> But in my T5 project, I'm getting:
>> org.pentaho.reporting.libraries.resourceloader.ResourceCreationException:
>> Unable to parse the document:
>> ResourceKey{schema=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader,
>> identifier=mimetype,
>> factoryParameters={org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository}=org.pentaho.reporting.libraries.repository.zipreader.ZipReadRepository@2ef36617,
>> org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository-loader}=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader@6db38815},
>> parent=ResourceKey{schema=org.pentaho.reporting.libraries.resourceloader.loader.URLResourceLoader,
>> identifier=file:/home/ale/ale/laburo/NetBeansProjects/servir/reportes/reporte2.prpt,
>> factoryParameters={}, parent=null}}
>>        at
>> org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:249)
>>        at
>> org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.create(DefaultResourceManagerBackend.java:272)
>>        at
>> org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:408)
>>        at
>> org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:367)
>>        at
>> org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:203)
>>        at pentaho.PentahoTest.getReportDefinition(PentahoTest.java:89)
>>        at pentaho.PentahoTest$2.produceMydata(PentahoTest.java:181)
>>        at pentaho.PentahoTest$2.produce(PentahoTest.java:175)
>>        at pentaho.PentahoTest$2.produce(PentahoTest.java:165)
>>        at
>> com.gc.iotools.stream.is.InputStreamFromOutputStream$DataProducer.call(InputStreamFromOutputStream.java:109)
>>        at
>> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>        at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>        at java.lang.Thread.run(Thread.java:662)
>> Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
>>        at
>> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
>>        at
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>>        at
>> org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:236)
>>        ... 14 more
>>
>> I think it's because de locales, I'm using UTF-8 and saw that the reports
>> are utf-8 ok.
>> My guess of a locale problem is that Caused by:
>> org.xml.sax.SAXParseException: Content is not allowed in prolog. is usually
>> because the "> I have set UTF-8 in the POM.xml in:
>>
>>    
>>        UTF-8
>>
>> UTF-8
>> ...
>>
>> Any ideas ?
>> Regards
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4428763.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 Locale problem

2011-05-26 Thread Josh Canfield
> My guess of a locale problem is that Caused by:
> org.xml.sax.SAXParseException: Content is not allowed in prolog. is usually
> because the " wrote:
> Hi,
> I'm struggling reading a Pentaho Report.
> The report is mainly a jar file with xml's inside.
> If I compile it from outside tapestry it works ok.
> But in my T5 project, I'm getting:
> org.pentaho.reporting.libraries.resourceloader.ResourceCreationException:
> Unable to parse the document:
> ResourceKey{schema=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader,
> identifier=mimetype,
> factoryParameters={org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository}=org.pentaho.reporting.libraries.repository.zipreader.ZipReadRepository@2ef36617,
> org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository-loader}=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader@6db38815},
> parent=ResourceKey{schema=org.pentaho.reporting.libraries.resourceloader.loader.URLResourceLoader,
> identifier=file:/home/ale/ale/laburo/NetBeansProjects/servir/reportes/reporte2.prpt,
> factoryParameters={}, parent=null}}
>        at
> org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:249)
>        at
> org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.create(DefaultResourceManagerBackend.java:272)
>        at
> org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:408)
>        at
> org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:367)
>        at
> org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:203)
>        at pentaho.PentahoTest.getReportDefinition(PentahoTest.java:89)
>        at pentaho.PentahoTest$2.produceMydata(PentahoTest.java:181)
>        at pentaho.PentahoTest$2.produce(PentahoTest.java:175)
>        at pentaho.PentahoTest$2.produce(PentahoTest.java:165)
>        at
> com.gc.iotools.stream.is.InputStreamFromOutputStream$DataProducer.call(InputStreamFromOutputStream.java:109)
>        at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:662)
> Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
>        at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
>        at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>        at
> org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:236)
>        ... 14 more
>
> I think it's because de locales, I'm using UTF-8 and saw that the reports
> are utf-8 ok.
> My guess of a locale problem is that Caused by:
> org.xml.sax.SAXParseException: Content is not allowed in prolog. is usually
> because the " I have set UTF-8 in the POM.xml in:
>
>    
>        UTF-8
>
> UTF-8
> ...
>
> Any ideas ?
> Regards
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4428763.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: property expression language intelligence

2011-05-26 Thread Thiago H. de Paula Figueiredo
On Thu, 26 May 2011 11:06:44 -0300, Geoff Callender  
 wrote:


-1 for me. I can see it causing immense confusion in normal maintenance  
work esp. when refactoring.


-1 to me. The less to understand, the better.

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

2011-05-26 Thread atcach
Hi,
I'm struggling reading a Pentaho Report.
The report is mainly a jar file with xml's inside.
If I compile it from outside tapestry it works ok.
But in my T5 project, I'm getting:
org.pentaho.reporting.libraries.resourceloader.ResourceCreationException:
Unable to parse the document:
ResourceKey{schema=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader,
identifier=mimetype,
factoryParameters={org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository}=org.pentaho.reporting.libraries.repository.zipreader.ZipReadRepository@2ef36617,
org.pentaho.reporting.libraries.resourceloader.FactoryParameterKey{name=repository-loader}=org.pentaho.reporting.libraries.docbundle.bundleloader.ZipResourceBundleLoader@6db38815},
parent=ResourceKey{schema=org.pentaho.reporting.libraries.resourceloader.loader.URLResourceLoader,
identifier=file:/home/ale/ale/laburo/NetBeansProjects/servir/reportes/reporte2.prpt,
factoryParameters={}, parent=null}}
at
org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:249)
at
org.pentaho.reporting.libraries.resourceloader.DefaultResourceManagerBackend.create(DefaultResourceManagerBackend.java:272)
at
org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:408)
at
org.pentaho.reporting.libraries.resourceloader.ResourceManager.create(ResourceManager.java:367)
at
org.pentaho.reporting.libraries.resourceloader.ResourceManager.createDirectly(ResourceManager.java:203)
at pentaho.PentahoTest.getReportDefinition(PentahoTest.java:89)
at pentaho.PentahoTest$2.produceMydata(PentahoTest.java:181)
at pentaho.PentahoTest$2.produce(PentahoTest.java:175)
at pentaho.PentahoTest$2.produce(PentahoTest.java:165)
at
com.gc.iotools.stream.is.InputStreamFromOutputStream$DataProducer.call(InputStreamFromOutputStream.java:109)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1231)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at
org.pentaho.reporting.libraries.xmlns.parser.AbstractXmlResourceFactory.create(AbstractXmlResourceFactory.java:236)
... 14 more

I think it's because de locales, I'm using UTF-8 and saw that the reports
are utf-8 ok.
My guess of a locale problem is that Caused by:
org.xml.sax.SAXParseException: Content is not allowed in prolog. is usually
because the "
UTF-8
   
UTF-8
...

Any ideas ?
Regards 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4428763.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5: property expression language intelligence

2011-05-26 Thread Lenny Primak
Exactly the same can be said for URL de-duping. 



On May 26, 2011, at 10:06 AM, Geoff Callender 
 wrote:

> -1 for me. I can see it causing immense confusion in normal maintenance work 
> esp. when refactoring.
> 
> Geoff
> 
> On 26/05/2011, at 8:26 AM, Bob Harner wrote:
> 
>> Seems like unnecessary complexity to me.
>> 
>> Bob Harner
>> On May 25, 2011 5:51 PM, "Adam Zimowski"  wrote:
>>> Guys - it is interesting to see your perspectives, I appreciate this.
>>> What if this could be a configurable setting?
>>> 
>>> I have several beans like this and a very large app. Quite frankly,
>>> it's become more than annoyance at this point. Besides, the TML code
>>> is loaded with unnecessary prefixes and expressions do look redundant.
>>> Even my designer CSS guru pointed this out, and he is clueless about
>>> Tapestry :)
>>> 
>>> I think if this was a configurable setting, turned off by default, the
>>> fact that developer would go through the effort to turn it ON would
>>> indicate he/she knows what he is doing and be aware of collision
>>> pitfalls.
>>> 
>>> Adam
>>> 
>>> 
>>> 
>>> On Wed, May 25, 2011 at 4:27 PM, Martin Strand
>>>  wrote:
 I agree with Robert.
 
 Also, the purpose of page-name stripping (as I understand it) was never
>> to
 save a few characters when typing.
 It was to let page classes have unique and explicit names but still give
 them "pretty" URLs (where words are not repeated)
 
 /edit/user--> pages.edit.EditUser
 /edit/group   --> pages.edit.EditGroup
 /edit/entity  --> pages.edit.EditEntity
 
 or perhaps:
 
 /user/create  --> pages.user.CreateUser
 /user/edit--> pages.user.EditUser
 /user/delete  --> pages.user.DeleteUser
 
 
 On Wed, 25 May 2011 23:09:37 +0200, Robert Zeigler
  wrote:
 
> And if you can't modify the bean to resolve the ambiguity? :)
> 
> It's an interesting idea, but I think it has too much potential for
> confusion + backwards-compatibility issues.  Frankly, I'm not super keen
>> on
> the page-name stripping, but I can tolerate that because they are
>> tapestry
> pages behaving in tapestry ways.  "Property" has a very specific
>> definition
> in the java language and spec, and I think it's a bad idea for Tapestry
>> to
> change that definition for the sake of a few characters.
> 
> Robert
> 
> On May 25, 2011, at 5/253:46 PM , Lenny Primak wrote:
> 
>> I think in this particular case the bean should fail as being ambiguous
>> ie multiply defined property.
>> 
>> 
>> 
>> On May 25, 2011, at 4:35 PM, Josh Canfield 
>> wrote:
>> 
 This is such an extreme example and can be easily caught - I.e.
 Tapestry can say ambiguous/duplicate property' or some such.
>>> 
>>> :) I'm all about the edge cases. In this case the OP doesn't get to
>>> define his beans so he's going to have to fall back to some other
>>> method of accessing that field. You can do ${order.getDescription()}
>>> or define  a component property for instance. An error is required
>>> though, ${order.description} needs to fail if
>>> ${order.orderDescription} is valid.
>>> 
>>> Josh
>>> 
>>> On Wed, May 25, 2011 at 12:54 PM, Lenny Primak >> 
>>> wrote:
 
 This is such an extreme example and can be easily caught - I.e.
 Tapestry can say ambiguous/duplicate property' or some such.
 
 
 
 On May 25, 2011, at 2:27 PM, Josh Canfield 
 wrote:
 
>> class Order {
>> public String getOrderDescription();
>> public String getDescription();
>> }
>> 
>> Tapestry could simply work as it does today and not apply property
>> prefix stripping.
> 
> This example is exactly why you would not want tapestry to do this.
>> If
> someone changes your bean definition now all of your templates are
> broken, but not broken in a way that tapestry can tell you about but
> in a way where the template is now getting data from the wrong
> field...
> 
> I suppose you have the same problem if you have an
> app.pages.order.OrderPage and an app.pages.order.Page, but that
>> seems
> less scary to me.
> 
> Josh
> 
> On Wed, May 25, 2011 at 10:29 AM, Adam Zimowski <
>> zimowsk...@gmail.com>
> wrote:
>> 
>> In the project I'm working on, I don't have control over Bean
>> design,
>> so this would be nice to have.
>> 
>> Also, for beans like this one:
>> 
>> class Order {
>> public String getOrderDescription();
>> public String getDescription();
>> }
>> 
>> Tapestry could simply work as it does today and not apply property
>> prefix stripping.
>> 
>> Adam

Re: A new T5 site! www.bookmarkerpro.com

2011-05-26 Thread David Canteros
Thanks! I'm working with Tapestry about a year ago and I agree that it is a
very nice framework, but my collegues are not pretty convinced of that and
prefer traditional frameworks. This real sites help a lot, it should be more
shown in tapestry main website or in the wiki. I'm from Argentina.

Best regards!
David


2011/5/25 Joel Halbert 

> Exactly (what Thiago and Bob said!).
>
> I'm aware that Tapestry isn't as widely adopted as it should be, despite
> being a great framework that we've enjoyed using, and (I think) it's
> always nice to see what others have been doing with the technology (I
> would post it to  the Tapestry wiki, but this requires an ICLA which
> requires me to print out and post a form so haven't quite managed to get
> around to that yet...!)
>
> For what it's worth this is now our 3'rd T5 based site, dating back to
> 2008.
>
>
> On Wed, 2011-05-25 at 08:46 -0300, Thiago H. de Paula Figueiredo wrote:
> > On Wed, 25 May 2011 06:47:57 -0300, George Banus 
> > wrote:
> >
> > > Wao, what a brilliant idea to gain some popularity for your site. What
> do
> > > you mean by you use Tapestry for the backend? Tapestry is a front end
> > > technology. I think people doing their site with PHP can also come here
> > > in the future and mention just the "Tapestry" keyword and qualify for
> > > free
> > > advert for their site. That's easy and free as in beer! :-)
> >
> > Actually, this kind of post is welcome. Tapestry is a very nice Java web
> > framework, but unfortunately it isn't very popular. Many times we had
> > people posting a message asking for live websites using Tapestry so they
> > can convince their bosses to use it.
> >
> > >> > > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> >
> > Cool! I'll test it. :)
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: property expression language intelligence

2011-05-26 Thread Geoff Callender
-1 for me. I can see it causing immense confusion in normal maintenance work 
esp. when refactoring.

Geoff

On 26/05/2011, at 8:26 AM, Bob Harner wrote:

> Seems like unnecessary complexity to me.
> 
> Bob Harner
> On May 25, 2011 5:51 PM, "Adam Zimowski"  wrote:
>> Guys - it is interesting to see your perspectives, I appreciate this.
>> What if this could be a configurable setting?
>> 
>> I have several beans like this and a very large app. Quite frankly,
>> it's become more than annoyance at this point. Besides, the TML code
>> is loaded with unnecessary prefixes and expressions do look redundant.
>> Even my designer CSS guru pointed this out, and he is clueless about
>> Tapestry :)
>> 
>> I think if this was a configurable setting, turned off by default, the
>> fact that developer would go through the effort to turn it ON would
>> indicate he/she knows what he is doing and be aware of collision
>> pitfalls.
>> 
>> Adam
>> 
>> 
>> 
>> On Wed, May 25, 2011 at 4:27 PM, Martin Strand
>>  wrote:
>>> I agree with Robert.
>>> 
>>> Also, the purpose of page-name stripping (as I understand it) was never
> to
>>> save a few characters when typing.
>>> It was to let page classes have unique and explicit names but still give
>>> them "pretty" URLs (where words are not repeated)
>>> 
>>> /edit/user--> pages.edit.EditUser
>>> /edit/group   --> pages.edit.EditGroup
>>> /edit/entity  --> pages.edit.EditEntity
>>> 
>>> or perhaps:
>>> 
>>> /user/create  --> pages.user.CreateUser
>>> /user/edit--> pages.user.EditUser
>>> /user/delete  --> pages.user.DeleteUser
>>> 
>>> 
>>> On Wed, 25 May 2011 23:09:37 +0200, Robert Zeigler
>>>  wrote:
>>> 
 And if you can't modify the bean to resolve the ambiguity? :)
 
 It's an interesting idea, but I think it has too much potential for
 confusion + backwards-compatibility issues.  Frankly, I'm not super keen
> on
 the page-name stripping, but I can tolerate that because they are
> tapestry
 pages behaving in tapestry ways.  "Property" has a very specific
> definition
 in the java language and spec, and I think it's a bad idea for Tapestry
> to
 change that definition for the sake of a few characters.
 
 Robert
 
 On May 25, 2011, at 5/253:46 PM , Lenny Primak wrote:
 
> I think in this particular case the bean should fail as being ambiguous
> ie multiply defined property.
> 
> 
> 
> On May 25, 2011, at 4:35 PM, Josh Canfield 
> wrote:
> 
>>> This is such an extreme example and can be easily caught - I.e.
>>> Tapestry can say ambiguous/duplicate property' or some such.
>> 
>> :) I'm all about the edge cases. In this case the OP doesn't get to
>> define his beans so he's going to have to fall back to some other
>> method of accessing that field. You can do ${order.getDescription()}
>> or define  a component property for instance. An error is required
>> though, ${order.description} needs to fail if
>> ${order.orderDescription} is valid.
>> 
>> Josh
>> 
>> On Wed, May 25, 2011 at 12:54 PM, Lenny Primak > 
>> wrote:
>>> 
>>> This is such an extreme example and can be easily caught - I.e.
>>> Tapestry can say ambiguous/duplicate property' or some such.
>>> 
>>> 
>>> 
>>> On May 25, 2011, at 2:27 PM, Josh Canfield 
>>> wrote:
>>> 
> class Order {
> public String getOrderDescription();
> public String getDescription();
> }
> 
> Tapestry could simply work as it does today and not apply property
> prefix stripping.
 
 This example is exactly why you would not want tapestry to do this.
> If
 someone changes your bean definition now all of your templates are
 broken, but not broken in a way that tapestry can tell you about but
 in a way where the template is now getting data from the wrong
 field...
 
 I suppose you have the same problem if you have an
 app.pages.order.OrderPage and an app.pages.order.Page, but that
> seems
 less scary to me.
 
 Josh
 
 On Wed, May 25, 2011 at 10:29 AM, Adam Zimowski <
> zimowsk...@gmail.com>
 wrote:
> 
> In the project I'm working on, I don't have control over Bean
> design,
> so this would be nice to have.
> 
> Also, for beans like this one:
> 
> class Order {
> public String getOrderDescription();
> public String getDescription();
> }
> 
> Tapestry could simply work as it does today and not apply property
> prefix stripping.
> 
> Adam
> 
> 
> 
> On Wed, May 25, 2011 at 12:20 PM, Lenny Primak
>  wrote:
>> 
>> At first glance, seems like a fantastic idea!
>> 
>> On May 25, 2011, at 1:19 PM, Adam Zimowski wrote:
>>>

Re: Rendering components from a mixin?

2011-05-26 Thread Thiago H. de Paula Figueiredo

On Wed, 25 May 2011 22:10:02 -0300, wkm  wrote:


Ah, thanks.


:)

Although it looks like you can do something vaguely related by returning  
a RenderCommand from, eg, startRender()?


A RenderCommand is not a component but yes, you can return one in any  
render event phase listener and get it rendered.


--
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: Actionlink + action

2011-05-26 Thread degressor
Thank you very much, ael! I works!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4427908.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: loops, zones and encoders

2011-05-26 Thread Alexander Rosemann
The (imo) odd behaviour I encounter is that the loop encoder gets 
executed ie. 10 times and *after* that the setter method of the textarea 
gets called.


I would expect the encoder gets called for textarea1 and then 
*immediately* after, the textarea-setter. This works if I remove the 
surrounding zone of the textarea but in that case I can't use the 
actionlink to update it.


Regards,
Alex

On 25.05.2011 18:28, Taha Hafeez wrote:

Sorry, defer = false, default is true

regards
Taha


On Wed, May 25, 2011 at 9:57 PM, Taha Hafeezwrote:


Hi

Try setting defer = true

Check out the defer attribute of submit component.

There is a good explaination by Josh here


http://tapestry.1045711.n5.nabble.com/submit-context-in-loop-td4398848.html#a4401092



regards
Taha


On Wed, May 25, 2011 at 9:48 PM, Alexander Rosemann<
alexander.rosem...@gmail.com>  wrote:


Hi,

since I am relatively new to zones and all the great stuff that can be
done with them I am stuck with a rather (imho) simple problem.

I render textareas (using a loop) where each of them comes with some
actionlinks. The actionlinks are rendered, again, in a loop. When a user
clicks an action link the related textarea (wrapped in a zone) gets updated
(see the code sample below). So far so good.




some
text








At the bottom of the page I have a save button which, once clicked, should
save all the data entered/altered in the textareas. The odd thing is that my
encoder for the loop gets called n times before the setter of my
currentCriteria field gets called n times.

Removing the zone brings back the normal behaviour of calling first the
encoder and second, the setter of the corresponding field. Could somebody
shed some light on how to force Tapestry to call the encoder and setter
alternating when the component is in a zone?

I am using Tapestry 5.2.5.

Many thanks,
Alex

-
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: Ordered MappedConfiguration

2011-05-26 Thread Kalle Korhonen
On Wed, May 25, 2011 at 10:30 PM, Howard Lewis Ship  wrote:
> Or, alternately, could you build your map from the ordered List?  I
> really think that having a single structure be ordered and keyed and
> expecting IoC to make sense of that is going to open up a can of
> ambiguities  and that's in the substrate level of the IoC where
> its hard to bring to bear some of the higher powered Tapestry features
> to handle it. (*)

Yes, of course I *can*, but the problem is that it looks cumbersome to
a casual user and it's not necessarily obvious to the user why it has
to be done that way. This is for the purposes of tynamo-security,
where users are essentially contributing new request filter pipelines
(or, pipeline "sections"). For a proof-of-concept I'm doing exactly
that, i.e. building a map from and ordered list. If interested, see
http://svn.codehaus.org/tynamo/trunk/tapestry-security/src/test/java/org/tynamo/security/testapp/services/AppModule.java
and 
http://svn.codehaus.org/tynamo/trunk/tapestry-security/src/main/java/org/tynamo/security/services/impl/SecurityConfiguration.java.

Yes, I understand that this might be problematic for the IoC to
handle. Of course, there are multiple ways to skin this particular
cat, but I'm not quite sure what's the right way to go about it at the
moment since every option I've considered so far comes with some
trade-offs. What I really want, is a syntax something like this:
newChain("/somepath/***").add(anon, "config").add(authc, "config")

... and make the order in which these filter chains (pipelines) are
configured meaningful, at least within a particular contribution
point.

I suppose I could also scrap the whole plan of contributing elements,
and contribute it all in one big object, but if there are multiple
security configuration contribution points, that too becomes
problematic. Well, back to the drawing board for now.

Kalle


>
> (*) I.e., on the same footing as why its so hard to contribute new
> coercers to TypeCoercer without triggering recursive service
> construction errors.
>
> On Wed, May 25, 2011 at 10:27 PM, Howard Lewis Ship  wrote:
>> Could the contributed objects know their names and have space for
>> ordering values (the "before:" and "after:" strings)?  In other words,
>> could you simple order the map value() inside your service
>> implementation?
>>
>> On Wed, May 25, 2011 at 9:42 AM, Kalle Korhonen
>>  wrote:
>>> I have a use case where I'd like to contribute key-value pairs but
>>> preserve their ordering, i.e. I'd like to contribute elements to a
>>> LinkedHashMap. Now, MappedConfiguration doesn't work since it doesn't
>>> preserve the order (or in Tapestry terms, cannot be ordered after
>>> elements are contributed). OrderedConfiguration would work (at least
>>> for my use case) if I had an access to the ids of the contributed
>>> elements. Would it be a complete heresy, if instead of a List, you
>>> could optionally specify a LinkedHashMap (or a custom Tapestry type
>>> for an immutable linked map)? Any better ideas for it?
>>>
>>> Kalle
>>>
>>> -
>>> 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
>>
>
>
>
> --
> 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