Re: T5: Asset protection and 5.3.0

2011-06-23 Thread Robert Zeigler
Can you define "not working anymore"? Is the repo not functional, or is the 
dispatcher not funcitonal?

Robert

On Jun 23, 2011, at 6/232:58 AM , Angelo C. wrote:

> Hi,
> 
> do we need assetProtectionDispatcher in 5.3? seems to me following not
> working any more
> com.saiwaisolutions 
>  AssetProtectionDispatcher
>  1.0.0
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Asset-protection-and-5-3-0-tp4516645p4516645.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 IoC: EagerLoad and ApplicationGlobals

2011-06-23 Thread Erik Fäßler

 I created a small app with which the problem occurs, too.
Here the snippet from AppModule:

public class AppModule {

public static void contributeSymbolSource(
final OrderedConfiguration configuration,
@InjectService("TestSymbolProvider") SymbolProvider 
semedicoSymbolProvider) {

configuration.add("TestSymbolProvider", semedicoSymbolProvider);
}

public static void 
contributeTestSymbolProvider(Configuration conf, 
@InjectService("ApplicationGlobals")ApplicationGlobals applicationGlobals) {

Properties properties = null;
ServletContext context = applicationGlobals.getServletContext();
InputStream is = 
context.getResourceAsStream("/WEB-INF/configuration.properties"); // NPE 
(sometimes)

properties = new Properties();
try {
properties.load(is);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
properties.setProperty("my.value", "A value.");
conf.add(properties);
}

@EagerLoad
@ServiceId("TestSymbolProvider")
public static SymbolProvider buildTestSymbolProvider(
final Collection configurations) {
Properties properties = null;
Iterator it = configurations.iterator();
if (it.hasNext())
properties = it.next();
return new TestSymbolProvider(properties);
}

If you would like to have a look on my exact code, I could send this 
example to you. It's barely more than the T5 Quickstart.
I try to EagerLoad the SymbolSource (in lack of another eager loaded 
service which would simply rely on the TestSymbolProvider). 
contributeTestSymbolProvider is called and sometimes the NPE is thrown.

Stack trace:

java.lang.RuntimeException: Error invoking service contribution method 
tests.mytapestrytest.services.AppModule.contributeTestSymbolProvider(Configuration, 
ApplicationGlobals): java.lang.NullPointerException
at 
org.apache.tapestry5.ioc.internal.ContributionDefImpl.invokeMethod(ContributionDefImpl.java:139)
at 
org.apache.tapestry5.ioc.internal.ContributionDefImpl.contribute(ContributionDefImpl.java:76)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl$8.run(RegistryImpl.java:615)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:50)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:48)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:46)
at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:56)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.addToUnorderedConfiguration(RegistryImpl.java:611)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.getUnorderedConfiguration(RegistryImpl.java:475)
at 
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$1.invoke(ServiceResourcesImpl.java:88)
at 
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl$1.invoke(ServiceResourcesImpl.java:86)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
at 
org.apache.tapestry5.ioc.internal.ServiceResourcesImpl.getUnorderedConfiguration(ServiceResourcesImpl.java:82)
at 
org.apache.tapestry5.ioc.internal.AbstractServiceCreator.getUnorderedConfiguration(AbstractServiceCreator.java:132)
at 
org.apache.tapestry5.ioc.internal.AbstractServiceCreator.access$100(AbstractServiceCreator.java:35)
at 
org.apache.tapestry5.ioc.internal.AbstractServiceCreator$1.findResource(AbstractServiceCreator.java:99)
at 
org.apache.tapestry5.ioc.internal.util.DelegatingInjectionResources.findResource(DelegatingInjectionResources.java:38)
at 
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateInjection(InternalUtils.java:254)
at 
org.apache.tapestry5.ioc.internal.util.InternalUtils.access$000(InternalUtils.java:86)
at 
org.apache.tapestry5.ioc.internal.util.InternalUtils$2.invoke(InternalUtils.java:303)
at 
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at 
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at 
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1063)
at 
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:307)
at 
org.apache.tapestry5.ioc.internal.util.InternalUtils.calculateParametersForMethod(InternalUtils.java:270)
at 

Re: T5 IoC: EagerLoad and ApplicationGlobals

2011-06-23 Thread Josh Canfield
Can you provide some more stack trace?

Here is the code from TapestryFilter:

registry = appInitializer.createRegistry();

context.setAttribute(REGISTRY_CONTEXT_NAME, registry);

ServletApplicationInitializer ai =
registry.getService("ServletApplicationInitializer",
ServletApplicationInitializer.class);

// Sets request globals
ai.initializeApplication(filterConfig.getServletContext());

// collects eager load services and creates the underlying objects.
registry.performRegistryStartup();

Can you create a small example app that reproduces the problem?

On Thu, Jun 23, 2011 at 7:37 AM, Erik Fäßler  wrote:
>  Hi everyone!
>
> I build a web app using T5.2.5 and employing the T5 IoC container.
> I have a contribution to a service which gets the ApplicationGlobals service
> injected. Everything works fine - until I want to eagerload the service with
> the afore mentioned contribution.
> When I eagerload the service, sometimes everything is alright. But sometimes
> I get a NullPointerException here:
>
> ServletContext context = applicationGlobals.getServletContext();
> InputStream is = context.getResourceAsStream("/WEB-INF" +
> SemedicoSymbolProvider.CONFIG_FILE_NAME); // Here sometimes null pointer
>
> Thus, the ServletContext is null (I have tested that). I'm not sure how this
> works, it seems to me the eager load is so fast sometimes, that the servlet
> container (Jetty) has not started its services yet.
> In the stack trace there is this snippet:
>  SNIP ---
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:102)
>    at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:110)
>    at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
>    at
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:747)
>    at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:250)
>  SNAP ---
>
> This sounds like it would be tried to initialize the context. Perhaps this
> is a concurrency thing, I really don't know. Does anyone of you have some
> ideas on how to avoid this error? For me it would suffice if I could delay
> the eagerload until a later point where the ServletContext is surely
> initialized.
> But I wouldn't like to abandon the eager load at all, because then the first
> call to my web app takes quite some time (30sec or so). But again, when not
> using eager load, no errors are thrown.
>
> Best regards,
>
>    Erik
>
> -
> 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



T5: Asset protection and 5.3.0

2011-06-23 Thread Angelo C.
Hi,

do we need assetProtectionDispatcher in 5.3? seems to me following not
working any more
com.saiwaisolutions 
  AssetProtectionDispatcher
  1.0.0

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Asset-protection-and-5-3-0-tp4516645p4516645.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



T5 IoC: EagerLoad and ApplicationGlobals

2011-06-23 Thread Erik Fäßler

 Hi everyone!

I build a web app using T5.2.5 and employing the T5 IoC container.
I have a contribution to a service which gets the ApplicationGlobals 
service injected. Everything works fine - until I want to eagerload the 
service with the afore mentioned contribution.
When I eagerload the service, sometimes everything is alright. But 
sometimes I get a NullPointerException here:


ServletContext context = applicationGlobals.getServletContext();
InputStream is = context.getResourceAsStream("/WEB-INF" + 
SemedicoSymbolProvider.CONFIG_FILE_NAME); // Here sometimes null pointer


Thus, the ServletContext is null (I have tested that). I'm not sure how 
this works, it seems to me the eager load is so fast sometimes, that the 
servlet container (Jetty) has not started its services yet.

In the stack trace there is this snippet:
 SNIP ---
at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:102)
at 
org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:110)
at 
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55)
at 
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:747)
at 
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:250)

 SNAP ---

This sounds like it would be tried to initialize the context. Perhaps 
this is a concurrency thing, I really don't know. Does anyone of you 
have some ideas on how to avoid this error? For me it would suffice if I 
could delay the eagerload until a later point where the ServletContext 
is surely initialized.
But I wouldn't like to abandon the eager load at all, because then the 
first call to my web app takes quite some time (30sec or so). But again, 
when not using eager load, no errors are thrown.


Best regards,

Erik

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



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-18 Thread Nillehammer

Hi Martin,

sorry for late reply. I was busy the last two days. I have tried the 
solution you suggested and indeed it just works. That was realy easy! 
Not having found the solution myself after digging into the sources, I 
have to admit that I'm feeling a bit stupid now.


Thanks a lot, for your solution (and for making me feel stupid),
nillehammer

Am 17.06.2011 01:41, schrieb Martin Strand:
ApplicationDefaults is only one of many SymbolProviders, you don't 
need to configure that specific SymbolProvider to set the supported 
locales.
There are other options, including support for .properties files or 
system properties.



I prefer context parameters myself, everything should "just work" if 
you add it to web.xml like so:



tapestry.supported-locales
en,de


The ServletContextSymbolProvider will handle the rest for you.
I'm sure you're already doing this for other symbols, at least 
"tapestry.app-package" :)



On Fri, 17 Jun 2011 00:28:17 +0200, Nillehammer 
 wrote:



Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the 
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // 
don't like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the 
values in web.xml either as context-param or as init-param for the 
TapestryFilter was a good idea.


My first try was to inject the Context service as additional 
parameter to the contribution method to get access to the 
context-params. That did not work. The parameter is null and Tapestry 
throws an exception. Same with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I 
could implement my own filter inheriting from 
org.apache.tapestry5.TapestryFilter. So my next try was to do that 
and override the method "protected void init(Registry registry )". My 
hope was to be able to do something sensible with the 
javax.servlet.FilterConfig that is returned by getFilter(). But I 
have no clue, what to do.


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





--
http://www.winfonet.eu


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



Re: T5: Theming Support

2011-06-18 Thread Howard Lewis Ship
I'll be working on a cookbook page to describe how to hook this all up.

2011/6/18 françois facon :
> Hi Angelo,
>
> Have a look around ComponentResourceSelector.
>
> see 
> https://github.com/apache/tapestry5/commit/ae4e668c0c9778fdcfbc3938a98ec5903551ccfb
> perclient message.
>
> and 
> https://github.com/apache/tapestry5/commit/65c87cd6b11ae62459c72d4cef3eba4b05ddf2e4
> perclient template.
>
> groovy!
>
> 2011/6/18 Angelo C. :
>> Hi,
>>
>> T5.3.0 has Skin and Theming Support, any reference to these two great
>> features? Thanks,
>>
>> Angelo
>>
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/T5-Theming-Support-tp4500606p4500606.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



Re: T5: Theming Support

2011-06-18 Thread françois facon
Hi Angelo,

Have a look around ComponentResourceSelector.

see 
https://github.com/apache/tapestry5/commit/ae4e668c0c9778fdcfbc3938a98ec5903551ccfb
perclient message.

and 
https://github.com/apache/tapestry5/commit/65c87cd6b11ae62459c72d4cef3eba4b05ddf2e4
perclient template.

groovy!

2011/6/18 Angelo C. :
> Hi,
>
> T5.3.0 has Skin and Theming Support, any reference to these two great
> features? Thanks,
>
> Angelo
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/T5-Theming-Support-tp4500606p4500606.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



T5: Theming Support

2011-06-17 Thread Angelo C.
Hi,

T5.3.0 has Skin and Theming Support, any reference to these two great
features? Thanks,

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Theming-Support-tp4500606p4500606.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: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Martin Strand
ApplicationDefaults is only one of many SymbolProviders, you don't need to  
configure that specific SymbolProvider to set the supported locales.
There are other options, including support for .properties files or system  
properties.



I prefer context parameters myself, everything should "just work" if you  
add it to web.xml like so:



  tapestry.supported-locales
  en,de


The ServletContextSymbolProvider will handle the rest for you.
I'm sure you're already doing this for other symbols, at least  
"tapestry.app-package" :)



On Fri, 17 Jun 2011 00:28:17 +0200, Nillehammer  
 wrote:



Hi List,

I would like to replace the constant Strings in the method  
"contributeApplicationDefaults" in my AppModule. E.g. replace the  
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't  
like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the  
values in web.xml either as context-param or as init-param for the  
TapestryFilter was a good idea.


My first try was to inject the Context service as additional parameter  
to the contribution method to get access to the context-params. That did  
not work. The parameter is null and Tapestry throws an exception. Same  
with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I could  
implement my own filter inheriting from  
org.apache.tapestry5.TapestryFilter. So my next try was to do that and  
override the method "protected void init(Registry registry )". My hope  
was to be able to do something sensible with the  
javax.servlet.FilterConfig that is returned by getFilter(). But I have  
no clue, what to do.


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



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Nillehammer
Yeah, a possible way to go. But I'd like a more "persistent" solution 
hence the idea of using params in web.xml


Am 17.06.2011 00:36, schrieb Lenny Primak:

I use system properties.



On Jun 16, 2011, at 6:28 PM, Nillehammer  
wrote:


Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the following 
line:

configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't like the 
"en,de" here. Would like to replace it.

with something configurable in  a text file. I thought providing the values in 
web.xml either as context-param or as init-param for the TapestryFilter was a 
good idea.

My first try was to inject the Context service as additional parameter to the 
contribution method to get access to the context-params. That did not work. The 
parameter is null and Tapestry throws an exception. Same with 
ApplicationGlobals.

I then browsed through Tapestry's source code and found out that I could implement my own 
filter inheriting from org.apache.tapestry5.TapestryFilter. So my next try was to do that 
and override the method "protected void init(Registry registry )". My hope was 
to be able to do something sensible with the javax.servlet.FilterConfig that is returned 
by getFilter(). But I have no clue, what to do.

Does someone have an idea what to do?

Thanks in advance,
nillehammer

--
http://www.winfonet.eu


-
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





--
http://www.winfonet.eu


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



Re: T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Lenny Primak
I use system properties. 



On Jun 16, 2011, at 6:28 PM, Nillehammer  
wrote:

> Hi List,
> 
> I would like to replace the constant Strings in the method 
> "contributeApplicationDefaults" in my AppModule. E.g. replace the following 
> line:
> 
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't like 
> the "en,de" here. Would like to replace it.
> 
> with something configurable in  a text file. I thought providing the values 
> in web.xml either as context-param or as init-param for the TapestryFilter 
> was a good idea.
> 
> My first try was to inject the Context service as additional parameter to the 
> contribution method to get access to the context-params. That did not work. 
> The parameter is null and Tapestry throws an exception. Same with 
> ApplicationGlobals.
> 
> I then browsed through Tapestry's source code and found out that I could 
> implement my own filter inheriting from org.apache.tapestry5.TapestryFilter. 
> So my next try was to do that and override the method "protected void 
> init(Registry registry )". My hope was to be able to do something sensible 
> with the javax.servlet.FilterConfig that is returned by getFilter(). But I 
> have no clue, what to do.
> 
> Does someone have an idea what to do?
> 
> Thanks in advance,
> nillehammer
> 
> -- 
> http://www.winfonet.eu
> 
> 
> -
> 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



T5: How to use context-param or init-param from web.xml in contributeApplicationDefaults?

2011-06-16 Thread Nillehammer

Hi List,

I would like to replace the constant Strings in the method 
"contributeApplicationDefaults" in my AppModule. E.g. replace the 
following line:


configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en,de"); // don't 
like the "en,de" here. Would like to replace it.


with something configurable in  a text file. I thought providing the 
values in web.xml either as context-param or as init-param for the 
TapestryFilter was a good idea.


My first try was to inject the Context service as additional parameter 
to the contribution method to get access to the context-params. That did 
not work. The parameter is null and Tapestry throws an exception. Same 
with ApplicationGlobals.


I then browsed through Tapestry's source code and found out that I could 
implement my own filter inheriting from 
org.apache.tapestry5.TapestryFilter. So my next try was to do that and 
override the method "protected void init(Registry registry )". My hope 
was to be able to do something sensible with the 
javax.servlet.FilterConfig that is returned by getFilter(). But I have 
no clue, what to do.


Does someone have an idea what to do?

Thanks in advance,
nillehammer

--
http://www.winfonet.eu


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



Re: Escape character in T5 container element

2011-06-14 Thread Fernando Benjamin
Thank you, that was the solution!

Fernando

On 14 June 2011 23:59, Josh Canfield  wrote:

> > I get an exception because of the c cedille, can someone show me how to
> > escape characters?
>
> I believe this is because your template file is supposed to be a valid
> XML document. You need to include a declaration for your escape
> character.
>
> HTML 4 has ccedil so try including it's doctype.
>
>  "http://www.w3.org/TR/html4/loose.dtd";>
>
> Josh
>
> On Tue, Jun 14, 2011 at 2:54 PM, Fernando Benjamin
>  wrote:
> > Hi everybody, I have made a simple menu(Menu.tml) wich I am trying to use
> in
> > the Layout.tml
> >
> > My menu.tml file
> >
> > http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> > xmlns:p="tapestry:parameter"  >
> >
> >  Idade
> >
> >
> > Pais
> >
> >  > href="#">Doença/Patologia
> >
> > 
> >
> >
> > My Layout.tml imports it like this
> >
> >
> >  
> >
> >
> > I get an exception because of the c cedille, can someone show me how to
> > escape characters?
> >
> >
> > Exception assembling root component of page Index: Exception assembling
> > embedded component 'layout' (of type test.hospital.web.components.Layout,
> > within Index): Failure parsing template
> > classpath:test/hospital/web/components/Menu.tml: The entity "ccedil" was
> > referenced, but not declared.
> >
> >
> > Thank you in advance,
> >
> >
> > Fernando
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Escape character in T5 container element

2011-06-14 Thread Josh Canfield
> I get an exception because of the c cedille, can someone show me how to
> escape characters?

I believe this is because your template file is supposed to be a valid
XML document. You need to include a declaration for your escape
character.

HTML 4 has ccedil so try including it's doctype.

http://www.w3.org/TR/html4/loose.dtd";>

Josh

On Tue, Jun 14, 2011 at 2:54 PM, Fernando Benjamin
 wrote:
> Hi everybody, I have made a simple menu(Menu.tml) wich I am trying to use in
> the Layout.tml
>
> My menu.tml file
>
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> xmlns:p="tapestry:parameter"  >
>
>  Idade
>
>
> Pais
>
>  href="#">Doença/Patologia
>
> 
>
>
> My Layout.tml imports it like this
>
>
>      
>
>
> I get an exception because of the c cedille, can someone show me how to
> escape characters?
>
>
> Exception assembling root component of page Index: Exception assembling
> embedded component 'layout' (of type test.hospital.web.components.Layout,
> within Index): Failure parsing template
> classpath:test/hospital/web/components/Menu.tml: The entity "ccedil" was
> referenced, but not declared.
>
>
> Thank you in advance,
>
>
> Fernando
>

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



Escape character in T5 container element

2011-06-14 Thread Fernando Benjamin
Hi everybody, I have made a simple menu(Menu.tml) wich I am trying to use in
the Layout.tml

My menu.tml file

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

 Idade


Pais

Doença/Patologia




My Layout.tml imports it like this


  


I get an exception because of the c cedille, can someone show me how to
escape characters?


Exception assembling root component of page Index: Exception assembling
embedded component 'layout' (of type test.hospital.web.components.Layout,
within Index): Failure parsing template
classpath:test/hospital/web/components/Menu.tml: The entity "ccedil" was
referenced, but not declared.


Thank you in advance,


Fernando


Re: t5: edit a bean without beaneditform

2011-06-14 Thread Geoff Callender
The link http://jumpstart.doublenegative.com.au/jumpstart/examples/easycrud
has been replaced by:


http://jumpstart.doublenegative.com.au/jumpstart/previews/easycrud/persons

On 10/05/2011, at 3:11 AM, Josh Canfield wrote:

> You are persisting using flash.
> 
> I think you're workflow goes like this: Your page renders you store
> new Person() in the session. When you post the form it reads and
> removes it from the session. When you render after the post it's no
> longer in the session and you get another new Person() in
> onPrepareForRender.
> 
> You might start with jumpstarts crud examples.
> 
> http://jumpstart.doublenegative.com.au/jumpstart/examples/easycrud
> 
> Josh
> 
> On Mon, May 9, 2011 at 11:00 PM, Angelo C.  wrote:
>> Hi,
>> 
>> I got a bean Person with a field name, when submit, the name is always null,
>> why?
>> 
>> java class:
>> public class EditPerson {
>> 
>>@Persist("flash")
>>@Property
>>private Person person;
>> 
>>Object onActivate() {
>>if (person != null)
>>System.out.println(person.getName());
>>return null;
>>}
>> 
>>void onPrepareForRender() {
>>if (person == null)
>>person = new Person();
>>}
>> }
>> 
>> tml:
>> 
>>Name
>>
>> 
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://tapestry.1045711.n5.nabble.com/t5-edit-a-bean-without-beaneditform-tp4382074p4382074.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



T5 Upload File & View Guide/Example.

2011-06-12 Thread ael
The images will be uploaded on context - layout - images folder.

View Template

${ImagePath} 


View Page Class


public Asset getImagePath(){

return
this.assetSource.getAsset(this.resource.getBaseResource(),"context:layout/images/"
+ picfilename, null);
}


Upload Template










Upload Page Class


@Property
private UploadedFile file;

@Persist(PersistenceConstants.FLASH)
@Property
private String uploadmessage;

@Inject
private ApplicationGlobals globals;

public String getUploadError(){

return uploadmessage;
}

public Object onUploadException(FileUploadException ex)
{
uploadmessage = "Upload exception: " + ex.getMessage() + " You can
only upload file less than or equal to 500kb.";

return this;
}

public void onSuccess() {

// Set Path
String path = globals.getServletContext().getRealPath("/layout/images") +
"/";

File copied;

// Get File
copied = new File(path + file.getFileName());

// File Saved
file.write(copied);

}


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Upload-File-View-Guide-Example-tp4483459p4483459.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 Bean Validation: How to override the property name in validation message?

2011-06-12 Thread Nillehammer
Answering my own question. The solution turned out to be VERY easy. The 
validation message ist constructed by Tapestry's BeanFieldValidator. It 
reads the fields label to construct the prefix for the validation 
message. That can be customized by putting a "-label" into the 
message catalog. In my example, I put "msg-label=Message" into my 
component's message catalog and now I am satisfied.


Am 12.06.2011 14:39, schrieb Nillehammer:

Hi List,

I have switched from Tapestry's validation API to JSR 303 Bean 
Validation API. I have provided a message catalog in 
ValidationMessages.properties in the default package. It gets loaded 
and the localized error messages are displayed. Only one thing bothers 
me. The messages are prepended by the name of the property being 
validated. E.g. my bean has a property "getMsg()" that is required. 
The resulting error message would be "Msg is required". I'd like to 
override the "Msg" part with a more sensible value like "Message" in 
English or "Nachricht" in German. How could this be achieved? Would I 
have to provide a custom implementation of MessageInterpolator?


I know this question is more related to Bean Validation than to 
Tapestry. But maybe someone on this list has encountered the same 
problem and can provide a solution for this.


Thanks in advance, nillehammer

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



--
http://www.winfonet.eu


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



Re: [Snippet] T5: A mixin to rewrite the markup of element

2011-06-12 Thread Michael Gentry
In the past, I had trouble with IE6 and multiple buttons in a FORM.  You
couldn't distinguish which button was clicked on.  I don't know if this
issue still exists in IE7+ because I just stopped using BUTTON.  Just
something you may want to keep in mind if you have to support older versions
of IE and have multiple buttons.

mrg


On Sat, Jun 11, 2011 at 3:05 PM, Nillehammer <
tapestry.nilleham...@winfonet.eu> wrote:

> Tapestry's Submit component renders out as . Since
> HTML 4.0 a submit button can be written as . I prefer
> this approach, because it makes it easier to distinguish between real input
> elements (especially textfields) and buttons. I have created a JIRA request
> for this: https://issues.apache.org/jira/browse/TAP5-1545
> Hopefully it will get implemented in future Tapestry versions.
>
> In the meanwhile I have helped myself out with a mixin that is able to
> change the markup of the element (element name and attributes) it is
> attached to. In case someone else finds this usefull this is the code:
>
> import java.util.Collection;
> import java.util.List;
>
> import org.apache.tapestry5.BindingConstants;
> import org.apache.tapestry5.MarkupWriter;
> import org.apache.tapestry5.annotations.AfterRender;
> import org.apache.tapestry5.annotations.BeforeRenderTemplate;
> import org.apache.tapestry5.annotations.Parameter;
> import org.apache.tapestry5.dom.Attribute;
> import org.apache.tapestry5.dom.Element;
> import org.apache.tapestry5.dom.Node;
>
> /**
>  * Mixin that changes the markup of an element to desired values.
>  */
> public final class MarkupChanger {
>
>/**
> * The desired new name for the element.
> */
>@Parameter(required = true, allowNull = false, defaultPrefix =
> BindingConstants.LITERAL)
>private String newElemName;
>
>/**
> * A string containing pairs of attribute names and values separated by
> ",".
> */
>@Parameter(allowNull = false, defaultPrefix = BindingConstants.LITERAL)
>private String newAttribs;
>
>/**
> * The {@link Element} to change the markup.
> */
>private Element originalElem;
>
>/**
> * In this render phase we can easily get the element that this mixin is
> * placed into by calling writer.getElement.
> *
> * @param writer
> *  {@link MarkupWriter} injected by Tapestry.
> */
>@BeforeRenderTemplate
>final void determineOriginalElem(final MarkupWriter writer ) {
>
>this.originalElem = writer.getElement();
>}
>
>/**
> * We do all the rewriting of markup in the final phase not to interfere
> with
> * the render phases of the original element.
> *
> * @param writer
> *  {@link MarkupWriter} injected by Tapestry.
> */
>@AfterRender
>final void changeMarkup(final MarkupWriter writer ) {
>
>// Create a new element with the desired new name.
>final Element newElem = writer.element(this.newElemName);
>
>// Add all original attributes to the newly created element.
>final Collection attribs =
> this.originalElem.getAttributes();
>
>for (final Attribute attrib : attribs) {
>
>newElem.attribute(attrib.getName(), attrib.getValue());
>}
>
>// Add new attributes to the new element, possibly overwriting
> original ones.
>if (this.newAttribs != null && !this.newAttribs.isEmpty()) {
>
>final String[] attribArr = this.newAttribs.split(",");
>
>// parse null-String to null.
>for (int i = 0; i < attribArr.length; i++) {
>
>if ("null".equals(attribArr[i])) {
>
>attribArr[i] = null;
>}
>}
>
>newElem.forceAttributes(attribArr);
>}
>
>// Get children from the original element and add them to the new
> one.
>final List children = this.originalElem.getChildren();
>
>for (final Node node : children) {
>
>node.moveToBottom(newElem);
>}
>
>// End tag for new element.
>writer.end();
>
>// Remove the original element from DOM.
>this.originalElem.remove();
>}
> }
>
> Cheers nillehammer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


T5 Bean Validation: How to override the property name in validation message?

2011-06-12 Thread Nillehammer

Hi List,

I have switched from Tapestry's validation API to JSR 303 Bean 
Validation API. I have provided a message catalog in 
ValidationMessages.properties in the default package. It gets loaded and 
the localized error messages are displayed. Only one thing bothers me. 
The messages are prepended by the name of the property being validated. 
E.g. my bean has a property "getMsg()" that is required. The resulting 
error message would be "Msg is required". I'd like to override the "Msg" 
part with a more sensible value like "Message" in English or "Nachricht" 
in German. How could this be achieved? Would I have to provide a custom 
implementation of MessageInterpolator?


I know this question is more related to Bean Validation than to 
Tapestry. But maybe someone on this list has encountered the same 
problem and can provide a solution for this.


Thanks in advance, nillehammer

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



[Snippet] T5: A mixin to rewrite the markup of element

2011-06-11 Thread Nillehammer
Tapestry's Submit component renders out as . Since 
HTML 4.0 a submit button can be written as . I 
prefer this approach, because it makes it easier to distinguish between 
real input elements (especially textfields) and buttons. I have created 
a JIRA request for this: https://issues.apache.org/jira/browse/TAP5-1545

Hopefully it will get implemented in future Tapestry versions.

In the meanwhile I have helped myself out with a mixin that is able to 
change the markup of the element (element name and attributes) it is 
attached to. In case someone else finds this usefull this is the code:


import java.util.Collection;
import java.util.List;

import org.apache.tapestry5.BindingConstants;
import org.apache.tapestry5.MarkupWriter;
import org.apache.tapestry5.annotations.AfterRender;
import org.apache.tapestry5.annotations.BeforeRenderTemplate;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.dom.Attribute;
import org.apache.tapestry5.dom.Element;
import org.apache.tapestry5.dom.Node;

/**
 * Mixin that changes the markup of an element to desired values.
 */
public final class MarkupChanger {

/**
 * The desired new name for the element.
 */
@Parameter(required = true, allowNull = false, defaultPrefix = 
BindingConstants.LITERAL)

private String newElemName;

/**
 * A string containing pairs of attribute names and values 
separated by ",".

 */
@Parameter(allowNull = false, defaultPrefix = BindingConstants.LITERAL)
private String newAttribs;

/**
 * The {@link Element} to change the markup.
 */
private Element originalElem;

/**
 * In this render phase we can easily get the element that this 
mixin is

 * placed into by calling writer.getElement.
 *
 * @param writer
 *  {@link MarkupWriter} injected by Tapestry.
 */
@BeforeRenderTemplate
final void determineOriginalElem(final MarkupWriter writer ) {

this.originalElem = writer.getElement();
}

/**
 * We do all the rewriting of markup in the final phase not to 
interfere with

 * the render phases of the original element.
 *
 * @param writer
 *  {@link MarkupWriter} injected by Tapestry.
 */
@AfterRender
final void changeMarkup(final MarkupWriter writer ) {

// Create a new element with the desired new name.
final Element newElem = writer.element(this.newElemName);

// Add all original attributes to the newly created element.
final Collection attribs = 
this.originalElem.getAttributes();


for (final Attribute attrib : attribs) {

newElem.attribute(attrib.getName(), attrib.getValue());
}

// Add new attributes to the new element, possibly overwriting 
original ones.

if (this.newAttribs != null && !this.newAttribs.isEmpty()) {

final String[] attribArr = this.newAttribs.split(",");

// parse null-String to null.
for (int i = 0; i < attribArr.length; i++) {

if ("null".equals(attribArr[i])) {

attribArr[i] = null;
}
}

newElem.forceAttributes(attribArr);
}

// Get children from the original element and add them to the 
new one.

final List children = this.originalElem.getChildren();

for (final Node node : children) {

node.moveToBottom(newElem);
}

// End tag for new element.
writer.end();

// Remove the original element from DOM.
this.originalElem.remove();
}
}

Cheers nillehammer

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



t5 friendly e commerce framework?

2011-06-11 Thread Angelo C.
Hi,

I'm looking for a java based ecommerce software which should have been
easier to include some modules written in T5, any suggestions? anybody tried
jadasite.com?

Thanks,

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-friendly-e-commerce-framework-tp4478915p4478915.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-06-09 Thread Howard Lewis Ship
I understand where you are coming from, but I can't see this in the core.
Robert identified my thinking at the time I introduced the naming aliases,
and even that's a bit controversial.

On Thu, May 26, 2011 at 3:58 PM, Adam Zimowski  wrote:
> 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
>
>

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


Re: T5 Using DAO within a DAO causes NPE.

2011-06-09 Thread kristian marinkovic
i also prefer constructor injection over anything else :)

On Thu, Jun 9, 2011 at 8:05 AM, Taha Hafeez wrote:

> Yes, but wherever possible I find it a better option as using constructor
> injection ensures the bean is created properly even if you yourself create
> it, so minimal NPEs,  just like the above case.
>
> regards
> Taha
>
> On Thu, Jun 9, 2011 at 10:36 AM, kristian marinkovic <
> kristian.marinko...@gmail.com> wrote:
>
> > Constructor injection does not work on pages, components and mixins.
> Works
> > only on services.
> > G,
> > Kris
> > Am 2011 6 9 01:49 schrieb "ael" :
> > > I always make life complicated.
> > >
> > > Well just inject the DAO within pages. problem solved.
> > > But still i want to make my page class neat though.
> > >
> > > Also contructor injection is another solution.
> > >
> > > Thanks :)
> > >
> > > --
> > > View this message in context:
> >
> >
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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 Using DAO within a DAO causes NPE.

2011-06-08 Thread Taha Hafeez
Yes, but wherever possible I find it a better option as using constructor
injection ensures the bean is created properly even if you yourself create
it, so minimal NPEs,  just like the above case.

regards
Taha

On Thu, Jun 9, 2011 at 10:36 AM, kristian marinkovic <
kristian.marinko...@gmail.com> wrote:

> Constructor injection does not work on pages, components and mixins. Works
> only on services.
> G,
> Kris
> Am 2011 6 9 01:49 schrieb "ael" :
> > I always make life complicated.
> >
> > Well just inject the DAO within pages. problem solved.
> > But still i want to make my page class neat though.
> >
> > Also contructor injection is another solution.
> >
> > Thanks :)
> >
> > --
> > View this message in context:
>
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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
> >
>


T5 XSL component

2011-06-08 Thread Greg Pagendam-Turner
Has anyone written a component to render by transforming a passed in 
stylesheet and xml document?


Regards,

Greg.


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



Re: T5 Using DAO within a DAO causes NPE.

2011-06-08 Thread kristian marinkovic
Constructor injection does not work on pages, components and mixins. Works
only on services.
G,
Kris
Am 2011 6 9 01:49 schrieb "ael" :
> I always make life complicated.
>
> Well just inject the DAO within pages. problem solved.
> But still i want to make my page class neat though.
>
> Also contructor injection is another solution.
>
> Thanks :)
>
> --
> View this message in context:
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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 Using DAO within a DAO causes NPE.

2011-06-08 Thread ael
I always make life complicated. 

Well just inject the DAO within pages. problem solved.
But still i want to make my page class neat though.

Also contructor injection is another solution.

Thanks :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4471238.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 Using DAO within a DAO causes NPE.

2011-06-08 Thread Thiago H. de Paula Figueiredo

On Wed, 08 Jun 2011 04:20:02 -0300, ael  wrote:


public static AuthenticationDAO buildAuthenticationDAO(
@InjectService("HibernateSessionManager") HibernateSessionManager
sessionManager)
{
AuthenticationDAOHibernate dao = new  
AuthenticationDAOHibernate();

dao.setSessionManager(sessionManager);
return dao;
}


When you instatiate the object itself Tapestry-IoC doesn't do injection  
automatically. ;)


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5 Using DAO within a DAO causes NPE.

2011-06-08 Thread Taha Hafeez
>// The responsibility of a filter is to invoke the
> corresponding method
>// in the handler. When you chain multiple filters
> together, each filter
>// received a handler that is a bridge to the next
> filter.
>
>return handler.service(request, response);
>}
>finally
>{
>long elapsed = System.currentTimeMillis() - startTime;
>
>log.info(String.format("Request time: %d ms",
> elapsed));
>}
>}
>};
>}
>
>/**
> * This is a contribution to the RequestHandler service configuration.
> This is how we extend
> * Tapestry using the timing filter. A common use for this kind of
> filter is transaction
> * management or security. The @Local annotation selects the desired
> service by type, but only
> * from the same module.  Without @Local, there would be an error due to
> the other service(s)
> * that implement RequestFilter (defined in other modules).
> */
>public void contributeRequestHandler(OrderedConfiguration
> configuration,
>@Local
>RequestFilter filter)
>{
>// Each contribution to an ordered configuration has a name, When
> necessary, you may
>// set constraints to precisely control the invocation order of the
> contributed filter
>// within the pipeline.
>
>configuration.add("Timing", filter);
>}
>
>
> DAO HIBERNATE
> //
>public static AuthenticationDAO buildAuthenticationDAO(
>@InjectService("HibernateSessionManager") HibernateSessionManager
> sessionManager)
>{
>AuthenticationDAOHibernate dao = new AuthenticationDAOHibernate();
>dao.setSessionManager(sessionManager);
>return dao;
>}
>
>public static TbSetupDAO buildTbSetupDAO(
>@InjectService("HibernateSessionManager") HibernateSessionManager
> sessionManager)
>{
>TbSetupDAOHibernate dao = new TbSetupDAOHibernate();
>dao.setSessionManager(sessionManager);
>return dao;
>}
>
>public static TbAdminsDAO buildTbAdminsDAO(
>@InjectService("HibernateSessionManager") HibernateSessionManager
> sessionManager)
>{
>TbAdminsDAOHibernate dao = new TbAdminsDAOHibernate();
>dao.setSessionManager(sessionManager);
>return dao;
>}
>
>public static TbGuestDAO buildTbGuestDAO(
>@InjectService("HibernateSessionManager") HibernateSessionManager
> sessionManager)
>{
>TbGuestDAOHibernate dao = new TbGuestDAOHibernate();
>dao.setSessionManager(sessionManager);
>return dao;
>}
> }
>
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4468053.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 Using DAO within a DAO causes NPE.

2011-06-08 Thread ael
   }

/**
 * This is a contribution to the RequestHandler service configuration.
This is how we extend
 * Tapestry using the timing filter. A common use for this kind of
filter is transaction
 * management or security. The @Local annotation selects the desired
service by type, but only
 * from the same module.  Without @Local, there would be an error due to
the other service(s)
 * that implement RequestFilter (defined in other modules).
 */
public void contributeRequestHandler(OrderedConfiguration
configuration,
@Local
RequestFilter filter)
{
// Each contribution to an ordered configuration has a name, When
necessary, you may
// set constraints to precisely control the invocation order of the
contributed filter
// within the pipeline.

configuration.add("Timing", filter);
}


 DAO HIBERNATE
//
public static AuthenticationDAO buildAuthenticationDAO(
@InjectService("HibernateSessionManager") HibernateSessionManager
sessionManager)
{
AuthenticationDAOHibernate dao = new AuthenticationDAOHibernate();
dao.setSessionManager(sessionManager);
return dao;
}

public static TbSetupDAO buildTbSetupDAO(
@InjectService("HibernateSessionManager") HibernateSessionManager
sessionManager)
{
TbSetupDAOHibernate dao = new TbSetupDAOHibernate();
dao.setSessionManager(sessionManager);
return dao;
}

public static TbAdminsDAO buildTbAdminsDAO(
@InjectService("HibernateSessionManager") HibernateSessionManager
sessionManager)
{
TbAdminsDAOHibernate dao = new TbAdminsDAOHibernate();
dao.setSessionManager(sessionManager);
return dao;
}

public static TbGuestDAO buildTbGuestDAO(
@InjectService("HibernateSessionManager") HibernateSessionManager
sessionManager)
{
TbGuestDAOHibernate dao = new TbGuestDAOHibernate();
dao.setSessionManager(sessionManager);
return dao;
}
}




--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4468053.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 Using DAO within a DAO causes NPE.

2011-06-07 Thread kristian marinkovic
did you configure AuthenticationDAOHibernate as Tapestry Service (bind via
bind method or build method)?

On Wed, Jun 8, 2011 at 8:35 AM, ael  wrote:

> No, i did not use javax.
>
> Its
> import org.apache.tapestry5.ioc.annotations.Inject;
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4467432.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 Using DAO within a DAO causes NPE.

2011-06-07 Thread ael
No, i did not use javax.

Its 
import org.apache.tapestry5.ioc.annotations.Inject;


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4467432.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 Using DAO within a DAO causes NPE.

2011-06-07 Thread kristian marinkovic
Hi,
Which inject annotation are you using? Chances are that you use the javax
annotation that will be supported in 5.3

G, Kris
Am 2011 6 8 08:06 schrieb "ael" :


Re: T5 Using DAO within a DAO causes NPE.

2011-06-07 Thread ael
:562) 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394) 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243) 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
java.lang.Thread.run(Thread.java:662) 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4467047.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



T5 Using DAO within a DAO causes NPE.

2011-06-07 Thread ael
Hi I don't understand why injecting a DAO within a DAO cause NPE. 

tbadminsdao.getUserInfo will result to NPE.

Any idea why?


class AuthenticationDAOHibernate
public class AuthenticationDAOHibernate implements AuthenticationDAO{

private HibernateSessionManager sessionMananger;

@Inject
private TbAdminsDAO tbadminsdao;

public boolean getUserAuthentication(String username, String
userpassword){

 // Encypt nPasswordTemp..
String encpassword = "";
try {
encpassword = PasswordEncryption.encryptByte(userpassword);
userpassword = "";
} catch (Exception ex) {

}

// Get User form Database..
TbAdmins results = tbadminsdao.getUserInfo(username.trim());

if(results != null){



class TbAdminsDAOHibernate
public TbAdmins getUserInfo(String username){

Session session = getSessionManager().getSession();
Criteria crit = session.createCriteria(TbAdmins.class);
crit.add(Restrictions.eq("username",
username.trim().toLowerCase()));
return (TbAdmins) crit.uniqueResult();
}


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Using-DAO-within-a-DAO-causes-NPE-tp4467009p4467009.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 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread ael
I will try this one... Thanks :)

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4460300.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 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread Taha Hafeez
Sorry wrong link. This is the correct one

http://tapestry.1045711.n5.nabble.com/Tapestry-FileUploader-Integration-tp4268987p4269518.html

regards
Taha


On Mon, Jun 6, 2011 at 7:46 PM, Taha Hafeez wrote:

> For ajax you can try this
>
>
> http://tapestry.1045711.n5.nabble.com/Modalbox-Integration-Example-tp4248936p4369409.html
>
> regards
> Taha
>
>
> On Mon, Jun 6, 2011 at 4:46 PM, Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Mon, 06 Jun 2011 05:55:44 -0300, ael  wrote:
>>
>>  SIGH...
>>> This is a limitation of Tapestry you cannot use AJAX in Uploading Files.
>>> How SAD!!!
>>>
>>> http://tapestry.1045711.n5.nabble.com/tapestry-upload-and-zones-td3425668.html
>>> Why?
>>>
>>
>> Repeating what I wrote in the thread you linked:
>>
>> File uploading doesn't work with AJAX without faking it using iframes or
>> using Flash. It doesn't matter if you're using Tapestry or not, this is a
>> limitation of AJAX itself. See this:
>>
>> http://stackoverflow.com/questions/543926/is-it-possible-to-use-ajax-to-do-file-upload
>> .
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: T5 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread Taha Hafeez
For ajax you can try this

http://tapestry.1045711.n5.nabble.com/Modalbox-Integration-Example-tp4248936p4369409.html

regards
Taha


On Mon, Jun 6, 2011 at 4:46 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Mon, 06 Jun 2011 05:55:44 -0300, ael  wrote:
>
>  SIGH...
>> This is a limitation of Tapestry you cannot use AJAX in Uploading Files.
>> How SAD!!!
>>
>> http://tapestry.1045711.n5.nabble.com/tapestry-upload-and-zones-td3425668.html
>> Why?
>>
>
> Repeating what I wrote in the thread you linked:
>
> File uploading doesn't work with AJAX without faking it using iframes or
> using Flash. It doesn't matter if you're using Tapestry or not, this is a
> limitation of AJAX itself. See this:
>
> http://stackoverflow.com/questions/543926/is-it-possible-to-use-ajax-to-do-file-upload
> .
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread Thiago H. de Paula Figueiredo

On Mon, 06 Jun 2011 05:55:44 -0300, ael  wrote:


SIGH...
This is a limitation of Tapestry you cannot use AJAX in Uploading Files.
How SAD!!!
http://tapestry.1045711.n5.nabble.com/tapestry-upload-and-zones-td3425668.html
Why?


Repeating what I wrote in the thread you linked:

File uploading doesn't work with AJAX without faking it using iframes or
using Flash. It doesn't matter if you're using Tapestry or not, this is a
limitation of AJAX itself. See this:
http://stackoverflow.com/questions/543926/is-it-possible-to-use-ajax-to-do-file-upload.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread ael
SIGH...

This is a limitation of Tapestry you cannot use AJAX in Uploading Files.

How SAD!!!

http://tapestry.1045711.n5.nabble.com/tapestry-upload-and-zones-td3425668.html
http://tapestry.1045711.n5.nabble.com/tapestry-upload-and-zones-td3425668.html 

Why?

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4458032.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 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-06-06 Thread ael
Already found the problem.


I don't understand why file variable is null?

Any idea's?


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4458015.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 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-05-30 Thread ael
icture
Category
Name
Option




 # 
${CategoryList}
tbguest.guestname
 Edit   Delete 











Add New Guest






Guest Name:




Expired Date:




Image:



PNG 500KB max image
size
 



 













${UploadError}









Employees Block





Activities Block





Events Block







Change Password






Current Password:




New Password:




Confirm Password:




 


    












History Block









--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4440500.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-30 Thread atcach
Yes, If I run it from outside Tapestry/Jetty/etc, it runs ok.
I mean, It comes with some sample .java to show how to load a report. I used
them to load my reports and it worked ok. 
The order of the pentaho's method calls is the same in my app.
Regards !

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Locale-problem-tp4428763p4439485.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 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-05-30 Thread Taha Hafeez
rnal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
>
> $RequestHandler_1303fae9884.service($RequestHandler_1303fae9884.java)
>
> $RequestHandler_1303fae9879.service($RequestHandler_1303fae9879.java)
>
>
> org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
>
>
> org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
>
>
> $HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
>
> org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
>
>
> $HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
>
>
> org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>
>
> $HttpServletRequestFilter_1303fae9877.service($HttpServletRequestFilter_1303fae9877.java)
>
>
> $HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
>
>
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
>
>
> $HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
>
>
> $HttpServletRequestHandler_1303fae9875.service($HttpServletRequestHandler_1303fae9875.java)
>
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
>
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>
>
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
>
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
>
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
>
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
>
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
>
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
>
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
>
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
>
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
>
>
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
>
>
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>java.lang.Thread.run(Thread.java:662)
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4438497.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
>
>


T5 5.2.4 NPE org.apache.tapestry5.runtime.ComponentEventException

2011-05-30 Thread ael
p.GZipFilter.service(GZipFilter.java:53)
   
$HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
   
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
   
$HttpServletRequestFilter_1303fae9877.service($HttpServletRequestFilter_1303fae9877.java)
   
$HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
   
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
   
$HttpServletRequestHandler_1303fae987b.service($HttpServletRequestHandler_1303fae987b.java)
   
$HttpServletRequestHandler_1303fae9875.service($HttpServletRequestHandler_1303fae9875.java)
   
org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
   
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
   
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
   
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
   
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
   
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
   
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
   
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
   
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:562)
   
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
   
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:394)
   
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
   
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
   
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
   
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
java.lang.Thread.run(Thread.java:662) 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-5-2-4-NPE-org-apache-tapestry5-runtime-ComponentEventException-tp4438497p4438497.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 Prevent user from multiple login

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

On Sat, 28 May 2011 10:16:38 -0300, Denoite  wrote:


Hi!


Hi!


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


Nothing specific to Tapestry itself, as this is a business rule, not a web  
tier one. Just have a boolean loggedIn field and table column and set it  
to true when the user authenticates and to false when it logs out.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor

Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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



Re: T5 Prevent user from multiple login

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


Cheers,
Joost

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

Hi!

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

Thanks a lot.

Jo

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




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



T5 Prevent user from multiple login

2011-05-28 Thread Denoite
Hi!

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

Thanks a lot.

Jo

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



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



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: 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: T5: property expression language intelligence

2011-05-25 Thread Bob Harner
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:
>
>> Since Tapestry already does tricks to clean up URL naming
>> redundancy,
>> it would be nice if it did the same with the expression language.
>> For
>> example:
>>
>> // Bean
>> class Order {
>> public String getOrderDescription() {...}
>> }
>>
>> // Page

Re: T5: property expression language intelligence

2011-05-25 Thread Adam Zimowski
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 
>> 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:

> Since Tapestry already does tricks to clean up URL naming
> redundancy,
> it would be nice if it did the same with the expression language.
> For
> example:
>
> // Bean
> class Order {
> public String getOrderDescription() {...}
> }
>
> // Page
> public Order getOrder() {
> //...
> }
>
> // TML
> Instead of having to say this: ${order.orderDescription}
>
> Perhaps this: ${order.description}
>
> Yes? No?
>
> Adam
>
> 

Re: T5: property expression language intelligence

2011-05-25 Thread Martin Strand

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

Since Tapestry already does tricks to clean up URL naming  
redundancy,
it would be nice if it did the same with the expression language.  
For

example:

// Bean
class Order {
public String getOrderDescription() {...}
}

// Page
public Order getOrder() {
//...
}

// TML
Instead of having to say this: ${order.orderDescription}

Perhaps this: ${order.description}

Yes? No?

Adam


-
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-25 Thread Lenny Primak
The bean can be proxies or wrapped in an extreme case. I am all for 99% 
solution and like my baby but not the bath water. 


 
On May 25, 2011, at 5:09  PM, 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  
> 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:
>>> 
 Since Tapestry already does tricks to clean up URL naming redundancy,
 it would be nice if it did the same with the expression language. For
 example:
 
 // Bean
 class Order {
 public String getOrderDescription() {...}
 }
 
 // Page
 public Order getOrder() {
 //...
 }
 
 // TML
 Instead of having to say this: ${order.orderDescription}
 
 Perhaps this: ${order.description}
 
 Yes? No?
 
 Adam
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
>>> 
>>> --

Re: T5: property expression language intelligence

2011-05-25 Thread Robert Zeigler
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  
 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:
>> 
>>> Since Tapestry already does tricks to clean up URL naming redundancy,
>>> it would be nice if it did the same with the expression language. For
>>> example:
>>> 
>>> // Bean
>>> class Order {
>>> public String getOrderDescription() {...}
>>> }
>>> 
>>> // Page
>>> public Order getOrder() {
>>> //...
>>> }
>>> 
>>> // TML
>>> Instead of having to say this: ${order.orderDescription}
>>> 
>>> Perhaps this: ${order.description}
>>> 
>>> Yes? No?
>>> 
>>> Adam
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>> 
>> -
>> 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

Re: T5: property expression language intelligence

2011-05-25 Thread Lenny Primak
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  
>>> 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:
> 
>> Since Tapestry already does tricks to clean up URL naming redundancy,
>> it would be nice if it did the same with the expression language. For
>> example:
>> 
>> // Bean
>> class Order {
>> public String getOrderDescription() {...}
>> }
>> 
>> // Page
>> public Order getOrder() {
>> //...
>> }
>> 
>> // TML
>> Instead of having to say this: ${order.orderDescription}
>> 
>> Perhaps this: ${order.description}
>> 
>> Yes? No?
>> 
>> Adam
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> 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-25 Thread Josh Canfield
> 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  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:

> Since Tapestry already does tricks to clean up URL naming redundancy,
> it would be nice if it did the same with the expression language. For
> example:
>
> // Bean
> class Order {
> public String getOrderDescription() {...}
> }
>
> // Page
> public Order getOrder() {
> //...
> }
>
> // TML
> Instead of having to say this: ${order.orderDescription}
>
> Perhaps this: ${order.description}
>
> Yes? No?
>
> Adam
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>


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


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

-
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-25 Thread Lenny Primak
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  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:
>>> 
 Since Tapestry already does tricks to clean up URL naming redundancy,
 it would be nice if it did the same with the expression language. For
 example:
 
 // Bean
 class Order {
 public String getOrderDescription() {...}
 }
 
 // Page
 public Order getOrder() {
 //...
 }
 
 // TML
 Instead of having to say this: ${order.orderDescription}
 
 Perhaps this: ${order.description}
 
 Yes? No?
 
 Adam
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 

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



Re: T5: property expression language intelligence

2011-05-25 Thread Josh Canfield
> 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  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:
>>
>>> Since Tapestry already does tricks to clean up URL naming redundancy,
>>> it would be nice if it did the same with the expression language. For
>>> example:
>>>
>>> // Bean
>>> class Order {
>>> public String getOrderDescription() {...}
>>> }
>>>
>>> // Page
>>> public Order getOrder() {
>>> //...
>>> }
>>>
>>> // TML
>>> Instead of having to say this: ${order.orderDescription}
>>>
>>> Perhaps this: ${order.description}
>>>
>>> Yes? No?
>>>
>>> Adam
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: T5: property expression language intelligence

2011-05-25 Thread Taha Hafeez
Hi

Seems like a good idea.

These are side-effects of tapestry. It makes you very lazy :)

regards
Taha

On Wed, May 25, 2011 at 10:59 PM, Adam Zimowski 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:
> >
> >> Since Tapestry already does tricks to clean up URL naming redundancy,
> >> it would be nice if it did the same with the expression language. For
> >> example:
> >>
> >> // Bean
> >> class Order {
> >> public String getOrderDescription() {...}
> >> }
> >>
> >> // Page
> >> public Order getOrder() {
> >> //...
> >> }
> >>
> >> // TML
> >> Instead of having to say this: ${order.orderDescription}
> >>
> >> Perhaps this: ${order.description}
> >>
> >> Yes? No?
> >>
> >> Adam
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: property expression language intelligence

2011-05-25 Thread Adam Zimowski
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:
>
>> Since Tapestry already does tricks to clean up URL naming redundancy,
>> it would be nice if it did the same with the expression language. For
>> example:
>>
>> // Bean
>> class Order {
>> public String getOrderDescription() {...}
>> }
>>
>> // Page
>> public Order getOrder() {
>> //...
>> }
>>
>> // TML
>> Instead of having to say this: ${order.orderDescription}
>>
>> Perhaps this: ${order.description}
>>
>> Yes? No?
>>
>> Adam
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: T5: property expression language intelligence

2011-05-25 Thread Lenny Primak
At first glance, seems like a fantastic idea!

On May 25, 2011, at 1:19 PM, Adam Zimowski wrote:

> Since Tapestry already does tricks to clean up URL naming redundancy,
> it would be nice if it did the same with the expression language. For
> example:
> 
> // Bean
> class Order {
> public String getOrderDescription() {...}
> }
> 
> // Page
> public Order getOrder() {
> //...
> }
> 
> // TML
> Instead of having to say this: ${order.orderDescription}
> 
> Perhaps this: ${order.description}
> 
> Yes? No?
> 
> Adam
> 
> -
> 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



T5: property expression language intelligence

2011-05-25 Thread Adam Zimowski
Since Tapestry already does tricks to clean up URL naming redundancy,
it would be nice if it did the same with the expression language. For
example:

// Bean
class Order {
 public String getOrderDescription() {...}
}

// Page
public Order getOrder() {
//...
}

// TML
Instead of having to say this: ${order.orderDescription}

Perhaps this: ${order.description}

Yes? No?

Adam

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



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

2011-05-25 Thread 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: A new T5 site! www.bookmarkerpro.com

2011-05-25 Thread Richard Hill

Yes, exactly :) Sorry we not too clear.

R.



On Wed, 2011-05-25 at 06:52 -0400, Bob Harner wrote:
> By back end I think Joel means the part you see after you create an account.
> 
> Bob Harner
> On May 25, 2011 5:48 AM, "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! :-)
> >
> > On Tue, May 24, 2011 at 5:59 PM, Joel Halbert 
> wrote:
> >
> > > The front of site www.bookmarkerpro.com is wordpress, but this is only a
> > > few pages.
> > >
> > > ALL of the backend, on the app sub-domain, app.bookmarkerpro.com is T5.
> > >
> > > It also integrates with Lucene, HBase, OpenJPA & our crawler.
> > >
> > > If you want to have a play you just need an email/passwd to register.
> > >
> > >
> > >
> > >
> > > On Tue, 2011-05-24 at 08:53 -0700, Howard Lewis Ship wrote:
> > > > How far do you have to get into it to see the T5 part ... or are you
> > > > just using tapestry-ioc for back end processing?  Just curious.
> > > >
> > > > On Tue, May 24, 2011 at 7:34 AM, Joel Halbert 
> > > wrote:
> > > > > Hi Folks,
> > > > >
> > > > > We've just released (another) Tapestry5 based site!
> > > > >
> > > > > www.bookmarkerpro.com
> > > > >
> > > > > This one's a bookmarking app, as the name suggests.
> > > > >
> > > > > Features include:
> > > > >
> > > > > * Search the content of your bookmarks: page content, title & url
> > > > > * Monitor your bookmarked pages, or even just part(s) of each page
> > > > > * Alerts (including optional email) when content you are monitoring
> > > > > changes
> > > > > * Import bookmarks from your browser. Export at any time.
> > > > > * One click search of your bookmarks from your browsers
> > > > > * Page archival and page change history
> > > > >
> > > > > We'll also be integrating with Readability in the near future, for
> > > > > sending bookmarked pages to kindle/ipad/iphone for offline viewing.
> > > > >
> > > > > The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> > > > > goodness .
> > > > >
> > > > > If you'd like to try it out you can sign up in less than 10 seconds,
> > > all
> > > > > you need is an email/password. We'd love to get your feedback.
> > > > > http://www.bookmarkerpro.com/beta-trial
> > > > >
> > > > > Once again, thanks to everyone on the mailing list for any help, and
> to
> > > > > the core T5 developers!
> > > > >
> > > > > Joel
> > > > >
> > > > > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> > > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > > For additional commands, e-mail: users-h...@tapestry.apache.org
> > >
> > >



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



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

2011-05-25 Thread Thiago H. de Paula Figueiredo
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. :)

--
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: A new T5 site! www.bookmarkerpro.com

2011-05-25 Thread Bob Harner
By back end I think Joel means the part you see after you create an account.

Bob Harner
On May 25, 2011 5:48 AM, "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! :-)
>
> On Tue, May 24, 2011 at 5:59 PM, Joel Halbert 
wrote:
>
> > The front of site www.bookmarkerpro.com is wordpress, but this is only a
> > few pages.
> >
> > ALL of the backend, on the app sub-domain, app.bookmarkerpro.com is T5.
> >
> > It also integrates with Lucene, HBase, OpenJPA & our crawler.
> >
> > If you want to have a play you just need an email/passwd to register.
> >
> >
> >
> >
> > On Tue, 2011-05-24 at 08:53 -0700, Howard Lewis Ship wrote:
> > > How far do you have to get into it to see the T5 part ... or are you
> > > just using tapestry-ioc for back end processing?  Just curious.
> > >
> > > On Tue, May 24, 2011 at 7:34 AM, Joel Halbert 
> > wrote:
> > > > Hi Folks,
> > > >
> > > > We've just released (another) Tapestry5 based site!
> > > >
> > > > www.bookmarkerpro.com
> > > >
> > > > This one's a bookmarking app, as the name suggests.
> > > >
> > > > Features include:
> > > >
> > > > * Search the content of your bookmarks: page content, title & url
> > > > * Monitor your bookmarked pages, or even just part(s) of each page
> > > > * Alerts (including optional email) when content you are monitoring
> > > > changes
> > > > * Import bookmarks from your browser. Export at any time.
> > > > * One click search of your bookmarks from your browsers
> > > > * Page archival and page change history
> > > >
> > > > We'll also be integrating with Readability in the near future, for
> > > > sending bookmarked pages to kindle/ipad/iphone for offline viewing.
> > > >
> > > > The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> > > > goodness .
> > > >
> > > > If you'd like to try it out you can sign up in less than 10 seconds,
> > all
> > > > you need is an email/password. We'd love to get your feedback.
> > > > http://www.bookmarkerpro.com/beta-trial
> > > >
> > > > Once again, thanks to everyone on the mailing list for any help, and
to
> > > > the core T5 developers!
> > > >
> > > > Joel
> > > >
> > > > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> > > >
> > >
> > >
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >


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

2011-05-25 Thread Richard Hill
Hi George,

Yes sorry, slight mis-use of "backend" there. What we mean is that
Tapestry is powering the client application, as opposed to the publicly
visible static website.

Richard. 


On Wed, 2011-05-25 at 11:47 +0200, 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! :-)
> 
> On Tue, May 24, 2011 at 5:59 PM, Joel Halbert  wrote:
> 
> > The front of site www.bookmarkerpro.com is wordpress, but this is only a
> > few pages.
> >
> > ALL of the backend, on the app sub-domain, app.bookmarkerpro.com is T5.
> >
> > It also integrates with Lucene, HBase, OpenJPA & our crawler.
> >
> > If you want to have a play you just need an email/passwd to register.
> >
> >
> >
> >
> > On Tue, 2011-05-24 at 08:53 -0700, Howard Lewis Ship wrote:
> > > How far do you have to get into it to see the T5 part ... or are you
> > > just using tapestry-ioc for back end processing?  Just curious.
> > >
> > > On Tue, May 24, 2011 at 7:34 AM, Joel Halbert 
> > wrote:
> > > > Hi Folks,
> > > >
> > > > We've just released (another) Tapestry5 based site!
> > > >
> > > > www.bookmarkerpro.com
> > > >
> > > > This one's a bookmarking app, as the name suggests.
> > > >
> > > > Features include:
> > > >
> > > > * Search the content of your bookmarks: page content, title & url
> > > > * Monitor your bookmarked pages, or even just part(s) of each page
> > > > * Alerts (including optional email) when content you are monitoring
> > > > changes
> > > > * Import bookmarks from your browser. Export at any time.
> > > > * One click search of your bookmarks from your browsers
> > > > * Page archival and page change history
> > > >
> > > > We'll also be integrating with Readability in the near future, for
> > > > sending bookmarked pages to kindle/ipad/iphone for offline viewing.
> > > >
> > > > The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> > > > goodness .
> > > >
> > > > If you'd like to try it out you can sign up in less than 10 seconds,
> > all
> > > > you need is an email/password. We'd love to get your feedback.
> > > > http://www.bookmarkerpro.com/beta-trial
> > > >
> > > > Once again, thanks to everyone on the mailing list for any help, and to
> > > > the core T5 developers!
> > > >
> > > > Joel
> > > >
> > > > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> > > >
> > >
> > >
> > >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >



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



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

2011-05-25 Thread George Banus
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! :-)

On Tue, May 24, 2011 at 5:59 PM, Joel Halbert  wrote:

> The front of site www.bookmarkerpro.com is wordpress, but this is only a
> few pages.
>
> ALL of the backend, on the app sub-domain, app.bookmarkerpro.com is T5.
>
> It also integrates with Lucene, HBase, OpenJPA & our crawler.
>
> If you want to have a play you just need an email/passwd to register.
>
>
>
>
> On Tue, 2011-05-24 at 08:53 -0700, Howard Lewis Ship wrote:
> > How far do you have to get into it to see the T5 part ... or are you
> > just using tapestry-ioc for back end processing?  Just curious.
> >
> > On Tue, May 24, 2011 at 7:34 AM, Joel Halbert 
> wrote:
> > > Hi Folks,
> > >
> > > We've just released (another) Tapestry5 based site!
> > >
> > > www.bookmarkerpro.com
> > >
> > > This one's a bookmarking app, as the name suggests.
> > >
> > > Features include:
> > >
> > > * Search the content of your bookmarks: page content, title & url
> > > * Monitor your bookmarked pages, or even just part(s) of each page
> > > * Alerts (including optional email) when content you are monitoring
> > > changes
> > > * Import bookmarks from your browser. Export at any time.
> > > * One click search of your bookmarks from your browsers
> > > * Page archival and page change history
> > >
> > > We'll also be integrating with Readability in the near future, for
> > > sending bookmarked pages to kindle/ipad/iphone for offline viewing.
> > >
> > > The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> > > goodness .
> > >
> > > If you'd like to try it out you can sign up in less than 10 seconds,
> all
> > > you need is an email/password. We'd love to get your feedback.
> > > http://www.bookmarkerpro.com/beta-trial
> > >
> > > Once again, thanks to everyone on the mailing list for any help, and to
> > > the core T5 developers!
> > >
> > > Joel
> > >
> > > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> > >
> >
> >
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


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

2011-05-24 Thread Joel Halbert
The front of site www.bookmarkerpro.com is wordpress, but this is only a
few pages.

ALL of the backend, on the app sub-domain, app.bookmarkerpro.com is T5.

It also integrates with Lucene, HBase, OpenJPA & our crawler.

If you want to have a play you just need an email/passwd to register.




On Tue, 2011-05-24 at 08:53 -0700, Howard Lewis Ship wrote:
> How far do you have to get into it to see the T5 part ... or are you
> just using tapestry-ioc for back end processing?  Just curious.
> 
> On Tue, May 24, 2011 at 7:34 AM, Joel Halbert  wrote:
> > Hi Folks,
> >
> > We've just released (another) Tapestry5 based site!
> >
> > www.bookmarkerpro.com
> >
> > This one's a bookmarking app, as the name suggests.
> >
> > Features include:
> >
> > * Search the content of your bookmarks: page content, title & url
> > * Monitor your bookmarked pages, or even just part(s) of each page
> > * Alerts (including optional email) when content you are monitoring
> > changes
> > * Import bookmarks from your browser. Export at any time.
> > * One click search of your bookmarks from your browsers
> > * Page archival and page change history
> >
> > We'll also be integrating with Readability in the near future, for
> > sending bookmarked pages to kindle/ipad/iphone for offline viewing.
> >
> > The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> > goodness .
> >
> > If you'd like to try it out you can sign up in less than 10 seconds, all
> > you need is an email/password. We'd love to get your feedback.
> > http://www.bookmarkerpro.com/beta-trial
> >
> > Once again, thanks to everyone on the mailing list for any help, and to
> > the core T5 developers!
> >
> > Joel
> >
> > (p.s. Thiago - should be OK in Opera too, but let me know if not!)
> >
> 
> 
> 



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



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

2011-05-24 Thread Howard Lewis Ship
How far do you have to get into it to see the T5 part ... or are you
just using tapestry-ioc for back end processing?  Just curious.

On Tue, May 24, 2011 at 7:34 AM, Joel Halbert  wrote:
> Hi Folks,
>
> We've just released (another) Tapestry5 based site!
>
> www.bookmarkerpro.com
>
> This one's a bookmarking app, as the name suggests.
>
> Features include:
>
> * Search the content of your bookmarks: page content, title & url
> * Monitor your bookmarked pages, or even just part(s) of each page
> * Alerts (including optional email) when content you are monitoring
> changes
> * Import bookmarks from your browser. Export at any time.
> * One click search of your bookmarks from your browsers
> * Page archival and page change history
>
> We'll also be integrating with Readability in the near future, for
> sending bookmarked pages to kindle/ipad/iphone for offline viewing.
>
> The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
> goodness .
>
> If you'd like to try it out you can sign up in less than 10 seconds, all
> you need is an email/password. We'd love to get your feedback.
> http://www.bookmarkerpro.com/beta-trial
>
> Once again, thanks to everyone on the mailing list for any help, and to
> the core T5 developers!
>
> Joel
>
> (p.s. Thiago - should be OK in Opera too, but let me know if not!)
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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



A new T5 site! www.bookmarkerpro.com

2011-05-24 Thread Joel Halbert
Hi Folks,

We've just released (another) Tapestry5 based site!

www.bookmarkerpro.com

This one's a bookmarking app, as the name suggests.  

Features include:

* Search the content of your bookmarks: page content, title & url
* Monitor your bookmarked pages, or even just part(s) of each page
* Alerts (including optional email) when content you are monitoring
changes
* Import bookmarks from your browser. Export at any time.
* One click search of your bookmarks from your browsers
* Page archival and page change history

We'll also be integrating with Readability in the near future, for
sending bookmarked pages to kindle/ipad/iphone for offline viewing.

The front end is wordpress (yawn) buy the back-end is all T5 (yay!)
goodness .

If you'd like to try it out you can sign up in less than 10 seconds, all
you need is an email/password. We'd love to get your feedback.
http://www.bookmarkerpro.com/beta-trial

Once again, thanks to everyone on the mailing list for any help, and to
the core T5 developers!

Joel

(p.s. Thiago - should be OK in Opera too, but let me know if not!)


Re: T5: Deploy to tomcat 6 from Eclipse 3 IDE for Java Developers

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

On Sun, 22 May 2011 10:07:33 -0300, Denoite  wrote:


Hi,


Hi!

i'm pretty new to T5 and i've created my first app with the tutorial,  
everything is running fine with jetty and Eclipse.

Now i want to deploy my app to tomcat 6 as a WAR.


I suggest using Jetty (through the RunJettyRun plugin or some other way)  
while developing. No need to deploy, just run the exploded (non-packaged)  
WAR directly.



But like in the tutorial, i'm running Eclipse 3 IDE for Java Developers.
There is no option to export a WAR.


You can use Ant, Maven (through the m2eclipse or q4e plugins), Gradle or  
some other tool to do that. Anyway, the Maven folder structure is  
recommended even by people who don't like Maven.


--
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: Deploy to tomcat 6 from Eclipse 3 IDE for Java Developers

2011-05-22 Thread Denoite
Hi,

i'm pretty new to T5 and i've created my first app with the tutorial, 
everything is running fine with jetty and Eclipse.
Now i want to deploy my app to tomcat 6 as a WAR.
But like in the tutorial, i'm running Eclipse 3 IDE for Java Developers.
There is no option to export a WAR.

How is that done from Eclipse 3 IDE for Java Developers?
How would the example be deployed to tomcat?

Sorry for the newbie question, but maybe somebody can me point to the right 
direction...


Thx
Joseph




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



T5 Deletion of the uploaded file?

2011-05-17 Thread ael
Any guide on how to delete the uploaded file?

Any best practice?

Or I will just use the java io?

 Java Delete using io 

String fileName = "file.txt";
// A File object to represent the filename
File f = new File(fileName);

// Make sure the file or directory exists and isn't write protected
if (!f.exists())
  throw new IllegalArgumentException(
  "Delete: no such file or directory: " + fileName);

if (!f.canWrite())
  throw new IllegalArgumentException("Delete: write protected: "
  + fileName);

// If it is a directory, make sure it is empty
if (f.isDirectory()) {
  String[] files = f.list();
  if (files.length > 0)
throw new IllegalArgumentException(
"Delete: directory not empty: " + fileName);
}

// Attempt to delete it
boolean success = f.delete();

if (!success)
  throw new IllegalArgumentException("Delete: deletion failed");


// Upload File //

Java Class

public class Index
{
@Property
private UploadedFile file;

public void onSuccess()
{
File copied = new File("C:/temp/" + file.getFileName());

file.write(copied);
}

@Persist(PersistenceConstants.FLASH)
@Property
private String message;


Object onUploadException(FileUploadException ex)
{
message = "Upload exception: " + ex.getMessage();

return this;
}
}


Template






    


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-Deletion-of-the-uploaded-file-tp4405584p4405584.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: T5 friendly e commerce software?

2011-05-12 Thread Adam Zimowski
We also have been discussing open-sourcing our eCommerce platform. Our
company is porting current Struts/Spring implementation to Tapestry 5.
Our current sites, which are being ported are:

www.chdist.com
www.avenuesupply.ca
www.industrialsupplies.com

All three run on the same platform, customized deployment. We are
planning on launching T5 version early 2012 of these sites, after
which we may open source it due to small internal team.

Our T5 ported platform is designed from scratch with possibility of
open sourcing in mind.

Open Source: T5 (application) - API (business logic)

Keep closed source: our EJB implementation of the API

So initially, unless community implements API, the system would not
run. The management here has no interest of sponsoring public API
implementation, so community would have to pick that up...

Adam



On Thu, May 12, 2011 at 5:22 AM, Ben Gidley  wrote:
> If you are after billing and subscriptions you should consider something
> like Zuora. They offer eCommerce as a SaaS and it is basically just a
> webservices API to let you get the data to render.
>
>
> On Wed, May 11, 2011 at 5:57 PM, Erol Akarsu  wrote:
>
>> Hi Lutz,
>>
>> Do you have plan to share surce code of your web site
>> ,http://www.toplicht.de/, written with Tapestry?
>>
>> I would be interested in researching to build my own web site.
>>
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/t5-T5-friendly-e-commerce-software-tp2432523p4387910.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
>>
>>
>
>
> --
> Ben Gidley
>
> www.gidley.co.uk
> b...@gidley.co.uk
>

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



Re: t5: T5 friendly e commerce software?

2011-05-12 Thread Ben Gidley
If you are after billing and subscriptions you should consider something
like Zuora. They offer eCommerce as a SaaS and it is basically just a
webservices API to let you get the data to render.


On Wed, May 11, 2011 at 5:57 PM, Erol Akarsu  wrote:

> Hi Lutz,
>
> Do you have plan to share surce code of your web site
> ,http://www.toplicht.de/, written with Tapestry?
>
> I would be interested in researching to build my own web site.
>
> Thanks
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/t5-T5-friendly-e-commerce-software-tp2432523p4387910.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
>
>


-- 
Ben Gidley

www.gidley.co.uk
b...@gidley.co.uk


Re: t5: T5 friendly e commerce software?

2011-05-11 Thread Erol Akarsu
Hi Lutz,

Do you have plan to share surce code of your web site
,http://www.toplicht.de/, written with Tapestry?

I would be interested in researching to build my own web site.

Thanks


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-T5-friendly-e-commerce-software-tp2432523p4387910.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: edit a bean without beaneditform

2011-05-09 Thread Josh Canfield
You are persisting using flash.

I think you're workflow goes like this: Your page renders you store
new Person() in the session. When you post the form it reads and
removes it from the session. When you render after the post it's no
longer in the session and you get another new Person() in
onPrepareForRender.

You might start with jumpstarts crud examples.

http://jumpstart.doublenegative.com.au/jumpstart/examples/easycrud

Josh

On Mon, May 9, 2011 at 11:00 PM, Angelo C.  wrote:
> Hi,
>
> I got a bean Person with a field name, when submit, the name is always null,
> why?
>
> java class:
> public class EditPerson {
>
>    @Persist("flash")
>    @Property
>    private Person person;
>
>    Object onActivate() {
>        if (person != null)
>            System.out.println(person.getName());
>        return null;
>    }
>
>    void onPrepareForRender() {
>        if (person == null)
>            person = new Person();
>    }
> }
>
> tml:
> 
>        Name
>    
>     
> 
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/t5-edit-a-bean-without-beaneditform-tp4382074p4382074.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



t5: edit a bean without beaneditform

2011-05-09 Thread Angelo C.
Hi,

I got a bean Person with a field name, when submit, the name is always null,
why?
 
java class:
public class EditPerson {

@Persist("flash")
@Property
private Person person;

Object onActivate() {
if (person != null)
System.out.println(person.getName());
return null;
}

void onPrepareForRender() {
if (person == null)
person = new Person();
}
}

tml:

Name

 



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-edit-a-bean-without-beaneditform-tp4382074p4382074.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: Using iframe to include a T5 page

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


Cheers,
Joost

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

Hi,

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

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

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

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Using-iframe-to-include-a-T5-page-tp4380972p4380972.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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




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



Using iframe to include a T5 page

2011-05-08 Thread Angelo C.
Hi,

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

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

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

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Using-iframe-to-include-a-T5-page-tp4380972p4380972.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: T5: this is cool - composition over inheritance

2011-05-04 Thread Howard Lewis Ship
On Wed, May 4, 2011 at 11:42 AM, Thiago H. de Paula Figueiredo
 wrote:
> I wouldn't call this composition (IMHO it's a class transformation), but
> this is really cool and shows how flexible, reusable and all-around awesome
> Tapestry is. :)

Semantics.  The class transformation, informed by the annotation,
drives the composition, just as the Java extends keyword drives
inheritance.

>
> On Wed, 04 May 2011 15:34:48 -0300, Adam Zimowski 
> wrote:
>
>> Another lovely day with Tapestry! Inspired by Taha's blog entry on
>> Tapestry Magic, our app instead of this mess:
>>
>> public class OrderHistoryPage extends AuthenticatedPage
>>
>> looks sexy like never before with this:
>>
>> @RequiresLogin(ssoClass= UserUiBean.class, pageClass= Login.class)
>> public class OrderHistoryPage extends BasePage
>>
>> Here are the pieces:
>>
>> Custom Annotation
>> /**
>>  * Tells Tapestry that a page requires authenticated user. If a page is
>>  * annotated with this, and user is not logged in, that page shall
>> redirect
>>  * to a login screen instead of rendering itself.
>>  *
>>  * @author Adam Zimowski
>>  */
>> @Target({ElementType.TYPE})
>> @Retention(RetentionPolicy.RUNTIME)
>> @Documented
>> public @interface RequiresLogin {
>>
>>        /**
>>         * Class whose instance lives in session and represents
>> authenticated user.
>>         */
>>        Class ssoClass();
>>
>>        /**
>>         * Page class to which Tapestry should redirect guests instead of
>>         * displaying secured page
>>         */
>>        Class pageClass();
>> }
>>
>> Annotation Worker
>> /**
>>  * Transforms page classes annotated with {@link RequiresLogin} adding
>> advice
>>  * which tests if the user is logged in, then redirects to login page if
>> user
>>  * is guest.
>>  *
>>  * @author Adam Zimowski
>>  */
>> public class RequiresLoginAnnotationWorker implements
>> ComponentClassTransformWorker {
>>
>>        private final TransformMethodSignature ONACTIVATE_SIGNATURE =
>>                new TransformMethodSignature(
>>                        0, "java.lang.Object", "onActivate", null, null);
>>
>>        private Logger log =
>>
>>  LoggerFactory.getLogger(RequiresLoginAnnotationWorker.class);
>>
>>        private ApplicationStateManager asm;
>>
>>
>>        public RequiresLoginAnnotationWorker(ApplicationStateManager aAsm)
>> {
>>                asm = aAsm;
>>        }
>>
>>        @Override
>>        public void transform(ClassTransformation aTransformation,
>>                        MutableComponentModel aModel) {
>>
>>                RequiresLogin annotation = aTransformation
>>                                .getAnnotation(RequiresLogin.class);
>>
>>                if (annotation == null) {
>>                        return;
>>                }
>>
>>                final Class ssoClass = annotation.ssoClass();
>>                final Class pageClass = annotation.pageClass();
>>
>>                if(log.isDebugEnabled()) {
>>                        log.debug(".. transforming {} ..",
>> aTransformation.getClassName());
>>                }
>>
>>                TransformMethod methodTransformer = null;
>>                try {
>>                        methodTransformer =
>>
>>  aTransformation.getOrCreateMethod(ONACTIVATE_SIGNATURE);
>>                }
>>                catch(Throwable t) {
>>                        throw new
>> RuntimeException(RequiresLogin.class.getSimpleName() +
>>                                " annotation requires package scope " +
>>                                "[ Object onActivate() ] method.", t);
>>                }
>>
>>                methodTransformer.addAdvice(
>>                                new ComponentMethodAdvice() {
>>                                        public void
>> advise(ComponentMethodInvocation invocation) {
>>                                                invocation.proceed();
>>                                                if(!asm.exists(ssoClass)) {
>>
>>  if(log.isDebugEnabled()) {
>>                                                                log.debug(
>>
>>      "redirecting to {} page ...",
>>
>>      pageClass.getSimpleName());
>>                                                        }
>>
>>  invocation.overrideResult(pageClass);
>>                                                }
>>                                        }
>>                                }
>>                );
>>        }
>> }
>>
>> Service Contribution
>>        @Contribute(ComponentClassTransformWorker.class)
>>        public void contributeComponentClassTransformWorker(
>>                        OrderedConfiguration
>> aWorkers) {
>>
>>                aWorkers.addInstance(
>>                                RequiresLogin.class.getSimpleName(),
>>                                RequiresLoginAnnotationWorker.class,
>>                                "before:OnEvent");
>>        }
>>
>> Page class usage:
>>
>> @RequiresLogin(ssoClass = UserUiBean.class, pageClass = Login.class)
>> public clas

Re: T5: this is cool - composition over inheritance

2011-05-04 Thread Thiago H. de Paula Figueiredo
I wouldn't call this composition (IMHO it's a class transformation), but  
this is really cool and shows how flexible, reusable and all-around  
awesome Tapestry is. :)


On Wed, 04 May 2011 15:34:48 -0300, Adam Zimowski   
wrote:



Another lovely day with Tapestry! Inspired by Taha's blog entry on
Tapestry Magic, our app instead of this mess:

public class OrderHistoryPage extends AuthenticatedPage

looks sexy like never before with this:

@RequiresLogin(ssoClass= UserUiBean.class, pageClass= Login.class)
public class OrderHistoryPage extends BasePage

Here are the pieces:

Custom Annotation
/**
 * Tells Tapestry that a page requires authenticated user. If a page is
 * annotated with this, and user is not logged in, that page shall  
redirect

 * to a login screen instead of rendering itself.
 *
 * @author Adam Zimowski
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RequiresLogin {

/**
	 * Class whose instance lives in session and represents authenticated  
user.

 */
Class ssoClass();

/**
 * Page class to which Tapestry should redirect guests instead of
 * displaying secured page
 */
Class pageClass();
}

Annotation Worker
/**
 * Transforms page classes annotated with {@link RequiresLogin} adding  
advice
 * which tests if the user is logged in, then redirects to login page if  
user

 * is guest.
 *
 * @author Adam Zimowski
 */
public class RequiresLoginAnnotationWorker implements
ComponentClassTransformWorker {

private final TransformMethodSignature ONACTIVATE_SIGNATURE =
new TransformMethodSignature(
0, "java.lang.Object", "onActivate", null, null);

private Logger log =
LoggerFactory.getLogger(RequiresLoginAnnotationWorker.class);

private ApplicationStateManager asm;


public RequiresLoginAnnotationWorker(ApplicationStateManager aAsm) {
asm = aAsm;
}

@Override
public void transform(ClassTransformation aTransformation,
MutableComponentModel aModel) {

RequiresLogin annotation = aTransformation
.getAnnotation(RequiresLogin.class);

if (annotation == null) {
return;
}

final Class ssoClass = annotation.ssoClass();
final Class pageClass = annotation.pageClass();

if(log.isDebugEnabled()) {
log.debug(".. transforming {} ..", 
aTransformation.getClassName());
}

TransformMethod methodTransformer = null;
try {
methodTransformer =

aTransformation.getOrCreateMethod(ONACTIVATE_SIGNATURE);
}
catch(Throwable t) {
throw new 
RuntimeException(RequiresLogin.class.getSimpleName() +
" annotation requires package scope " +
"[ Object onActivate() ] method.", t);
}

methodTransformer.addAdvice(
new ComponentMethodAdvice() {
public void 
advise(ComponentMethodInvocation invocation) {
invocation.proceed();
if(!asm.exists(ssoClass)) {

if(log.isDebugEnabled()) {
log.debug(

"redirecting to {} page ...",

pageClass.getSimpleName());
}

invocation.overrideResult(pageClass);
}
}
}
);
}
}

Service Contribution
@Contribute(ComponentClassTransformWorker.class)
public void contributeComponentClassTransformWorker(
OrderedConfiguration 
aWorkers) {

aWorkers.addInstance(
RequiresLogin.class.getSimpleName(),
RequiresLoginAnnotationWorker.class,
"before:OnEvent");
}

Page class usage:

@RequiresLogin(ssoClass = UserUiBean.class, pageClass = Login.class)
public class UserProfilePage extends BasePage { ...


Feel free to re-use! Para-Ta-Ta-Ta ... I'M LOVIN' IT !

Adam

-

T5: this is cool - composition over inheritance

2011-05-04 Thread Adam Zimowski
Another lovely day with Tapestry! Inspired by Taha's blog entry on
Tapestry Magic, our app instead of this mess:

public class OrderHistoryPage extends AuthenticatedPage

looks sexy like never before with this:

@RequiresLogin(ssoClass= UserUiBean.class, pageClass= Login.class)
public class OrderHistoryPage extends BasePage

Here are the pieces:

Custom Annotation
/**
 * Tells Tapestry that a page requires authenticated user. If a page is
 * annotated with this, and user is not logged in, that page shall redirect
 * to a login screen instead of rendering itself.
 *
 * @author Adam Zimowski
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface RequiresLogin {

/**
 * Class whose instance lives in session and represents authenticated 
user.
 */
Class ssoClass();

/**
 * Page class to which Tapestry should redirect guests instead of
 * displaying secured page
 */
Class pageClass();
}

Annotation Worker
/**
 * Transforms page classes annotated with {@link RequiresLogin} adding advice
 * which tests if the user is logged in, then redirects to login page if user
 * is guest.
 *
 * @author Adam Zimowski
 */
public class RequiresLoginAnnotationWorker implements
ComponentClassTransformWorker {

private final TransformMethodSignature ONACTIVATE_SIGNATURE =
new TransformMethodSignature(
0, "java.lang.Object", "onActivate", null, null);

private Logger log =
LoggerFactory.getLogger(RequiresLoginAnnotationWorker.class);

private ApplicationStateManager asm;


public RequiresLoginAnnotationWorker(ApplicationStateManager aAsm) {
asm = aAsm;
}

@Override
public void transform(ClassTransformation aTransformation,
MutableComponentModel aModel) {

RequiresLogin annotation = aTransformation
.getAnnotation(RequiresLogin.class);

if (annotation == null) {
return;
}

final Class ssoClass = annotation.ssoClass();
final Class pageClass = annotation.pageClass();

if(log.isDebugEnabled()) {
log.debug(".. transforming {} ..", 
aTransformation.getClassName());
}

TransformMethod methodTransformer = null;
try {
methodTransformer =

aTransformation.getOrCreateMethod(ONACTIVATE_SIGNATURE);
}
catch(Throwable t) {
throw new 
RuntimeException(RequiresLogin.class.getSimpleName() +
" annotation requires package scope " +
"[ Object onActivate() ] method.", t);
}

methodTransformer.addAdvice(
new ComponentMethodAdvice() {
public void 
advise(ComponentMethodInvocation invocation) {
invocation.proceed();
if(!asm.exists(ssoClass)) {

if(log.isDebugEnabled()) {
log.debug(

"redirecting to {} page ...",

pageClass.getSimpleName());
}

invocation.overrideResult(pageClass);
}
}
}
);
}
}

Service Contribution
@Contribute(ComponentClassTransformWorker.class)
public void contributeComponentClassTransformWorker(
OrderedConfiguration 
aWorkers) {

aWorkers.addInstance(
RequiresLogin.class.getSimpleName(),
RequiresLoginAnnotationWorker.class,
"before:OnEvent");
}

Page class usage:

@RequiresLogin(ssoClass = UserUiBean.class, pageClass = Login.class)
public class UserProfilePage extends BasePage { ...


Feel free to re-use! Para-Ta-Ta-Ta ... I'M LOVIN' IT !

Adam

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



Re: Insight: T5 is a compiler

2011-04-28 Thread Thiago H. de Paula Figueiredo
On Thu, 28 Apr 2011 18:16:51 -0300, Andreas Andreou   
wrote:



of course JSP templates are not interpreted character by character
but *just* converted to servlets, javac'ed and finally executed


This is compilation in my dictionary, as JSP (a language) is compiled into  
a servlet (Java language). :)


--
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: Insight: T5 is a compiler

2011-04-28 Thread Thiago H. de Paula Figueiredo
On Thu, 28 Apr 2011 18:03:09 -0300, Pierce T. Wetter III  
 wrote:




I think we're saying the same thing in different ways.

"Tapestry compiles the template into a program to generate the content"  
is a shorter way of saying what you just said. As opposed to JSP which  
interprets the template character by character.


Other systems (WebObjects is one) convert templates into data  
structures, but I think Tapestry is unique in the way that it builds  
property accessors into those structures. To me that smacks much more of  
compilation than interpretation.



IMHO, both scenarios (templates into objects and property accessors) are  
not compilation because they doesn't involve translating from one language  
into another. Tapestry does a lot of bytecode generation, but this also  
isn't compilation.



--
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: Insight: T5 is a compiler

2011-04-28 Thread Andreas Andreou
of course JSP templates are not interpreted character by character
but *just* converted to servlets, javac'ed and finally executed

On Fri, Apr 29, 2011 at 00:03, Pierce T. Wetter III
 wrote:
>
> I think we're saying the same thing in different ways.
>
> "Tapestry compiles the template into a program to generate the content" is a 
> shorter way of saying what you just said. As opposed to JSP which interprets 
> the template character by character.
>
> Other systems (WebObjects is one) convert templates into data structures, but 
> I think Tapestry is unique in the way that it builds property accessors into 
> those structures. To me that smacks much more of compilation than 
> interpretation.
>
> Pierce
>
>> I think the biggest insight I attempt to inject into people is the
>> component template:  It's easy to think about it the way a JSP
>> operates: working character-by-character.  But for Tapestry, the
>> template is actually a blueprint for building a structure in memory,
>> and that structure is a program for generating a server-side DOM, and
>> only at the end is that DOM emitted character-by-character.
>>
>> "The string is a stark data structure and everywhere it is passed
>> there is much duplication of process. It is a perfect vehicle for
>> hiding information.
>> -- Alan Perlis
>>
>> I interpret this as "strings are bad", they hide information, or make
>> it more difficult to manipulate. Treating the template as a structure
>> of objects lets Tapestry do things implicitly that are complex in
>> other environments.
>>
>>
>> On Thu, Apr 28, 2011 at 9:23 AM, Pierce T. Wetter III
>>  wrote:
>>>
>>>  I'm job hunting right now which means I sometimes have to explain why I
>>> chose Tapestry for a web application platform. (
>>> http://www.linkedin.com/in/pwetter if your company needs a new Director of
>>> Web Development ).
>>>  I had an insight yesterday that I thought I would share. Tapestry is a
>>> compiler.
>>> That is, Tapestry considers your .tml files and your .java files as just a
>>> starting point. From that starting point it builds data structures, new
>>> classes, bytecodes and a host of other cool stuff behind the scenes. That's
>>> one of the reasons its so fast and efficient as an application framework
>>> while running. Unlike a lot of other frameworks that are essentially running
>>> as interpreters, Tapestry runs as compiled code.
>>>   The key insight here is something I've known about T5 for a while: Your
>>> .java files and .tml files are just the starting point; they're essentially
>>> declarations that are re-interpreted by T5 to produce a lot of stuff behind
>>> the scenes. You may think that you have Component.java, which declares a
>>> class called Component with one or 2 methods, but by the time Tapestry is
>>> finished with it numerous additional methods and instance variables have
>>> been added, certain things in your class have been rewired, all kinds of
>>> cool stuff. Just as a few lines of declaration code imply a whole bunch of
>>> work by the java compiler behind the scenes, so does a few lines of Tapestry
>>> code imply a whole bunch of work by the "Tapestry compiler".
>>>    I hope this insight helps people.
>>>  Pierce
>>>
>>
>>
>>
>> --
>> 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
>>
>
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JEE Consulting

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



Re: T5: @Cached(watch) parameter requires public property

2011-04-28 Thread Thiago H. de Paula Figueiredo
On Thu, 28 Apr 2011 17:38:01 -0300, Adam Zimowski   
wrote:



Hi Again -


Hi!


Is there a specific reason why watch parameter for @Cached annotation
requires public property when using default prop binding?


I'd guess the JVM bytecode verifier would complain about invalid access,  
as the prop binding generates its classes outside the page class.


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



<    1   2   3   4   5   6   7   8   9   10   >