Re: Antwort: Re: Antwort: RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Martin Grotzke
On Tue, 2007-07-03 at 08:27 +0200, Kristian Marinkovic wrote:
> 
> just remove the InjectService annotation from your service  
> method and try it again :)
Cool, really easy :)

Thanx a lot,
cheers,
Martin


> 
> 
> 
> Martin Grotzke
> <[EMAIL PROTECTED]> 
> 
> 02.07.2007 16:50 
> Bitte antworten an
>  "Tapestry users"
> 
> 
> 
> 
> 
>An
> Tapestry users
>  
> Kopie
> 
> Thema
> Re: Antwort: RE:
> T5 Decoupling a
> Template >From
> its Component
> Class
> 
> 
> 
> 
> 
> 
> 
> 
> On Mon, 2007-07-02 at 16:06 +0200, Kristian Marinkovic wrote:
> > 
> > service implementations contributed to the alias service will  
> > override the other service implementations. this is also true for 
> > implementations originally provided by tapestry 
> > 
> > the additional id is to distinguish multiple implementations of the 
> > same interface. in your case you should only need it twice: 
> > 1) to define your service 
> > 2) to contribute to the alias service then you can forget it :) 
> 
> If I understand you correctly, you say that 
> 
>   public static PageResponseRenderer decoratePageResponseRenderer(
>   @InjectService("PageMarkupRenderer")
>   final PageMarkupRenderer markupRenderer,
>   @InjectService("MarkupWriterFactory")
>   final MarkupWriterFactory markupWriterFactory,
>   final Object delegate )
> 
> should provide our custom MarkupWriterFactory?
> This is not the fact - with @InjectService("MarkupWriterFactory")
> T5 provides its MarkupWriterFactoryImpl and not our custom
> MarkupWriterFactory.
> Did I understand you wrong, or is this a "bug" in T5?
> 
> Cheers,
> Martin
> 
> 
> 
> > 
> > g, 
> > kris 
> > 
> > 
> > 
> > Martin Grotzke
> > <[EMAIL PROTECTED]> 
> > 
> > 02.07.2007 14:10 
> > Bitte antworten an
> >  "Tapestry users"
> > 
> > 
> > 
> > 
> > 
> >An
> > Tapestry users
> >  
> > Kopie
> > 
> > Thema
> > RE: T5 Decoupling
> > a Template From
> > its Component
> > Class
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Mon, 2007-07-02 at 11:03 +0200, Kristian Marinkovic wrote:
> > > 
> > > hi martin, 
> > > 
> > > if you use the ServiceBinder to contribute a class that implements
> > an
> > > already 
> > > "contributed" interface you have to assign an id for your class by
> > > invoking withId, 
> > > because the Interface is no longer sufficient to identifiy the
> > service
> > > 
> > >  binder.bind(PageTemplateLocator.class, 
> > > MyPageTemplateLocatorImpl.class).withId("myLocator"); 
> > > 
> > > furthermore you have to contribute to the aliasOverrides Service 
> > > to actually replace the old implementation: 
> > > 
> > > public static void contributeAliasOverrides( 
> > > @InjectService("myLocator") PageTemplateLocator
> > locator, 
> > > Configuration configuration) { 
> > >  
> > >configuration.add( 
> > >  AliasContribution.create( 
> > >  PageTemplateLocator.class, locator)); 
> > 
> > Great, this works - thanx a lot!
> > 
> > Just for clarification: the specified id has to be used anywhere
> else,
> > right? E.g. for us the service in question is the
> MarkupWriterFactory,
> > and previously we also had this in our AppModule:
> > 
> >public static PageResponseRenderer decoratePageResponseRenderer(
> >@InjectService("PageMarkupRenderer")
> >final PageMarkupRenderer markupRenderer,
> >@InjectService("MarkupWriterFactory")
> >final MarkupWriterFactory markupWriterFactory,
> >final Object delegate )
> > 
> > which we have to change to @InjectService("myMarkupWriterFactory")
> > then.
> > Is this the intended way? Is it guaranteed, that T5 does not
> reference
> > the MarkupWriterFactory implementation by the id
> > "MarkupWriterFactory"?
> > 
> > Thanx && cheers,
> > Martin 
> > 
> > 
> > > 
> > > 
> > > g, 
> > > kris 
> > > 
> > > 
> > > 
> > > Martin Grotzke
> > > <[EMAIL PROTECTED]> 
> > > 
> > > 02.07.2007 10:00 
> > > Bitte antworten an
> > >  "Tapestry users"
> > > 
> > > 
> > > 
> > > 
> > > 
> > >An
> > > Tapestry users
> > >  
> > > Kopie
> > > 
> > > Thema
> > > RE: T5 Decoupling
> > > a Template From
> > > its Component
> > > Class
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > > Digging through the code I notice there is a PageTemplateLocator
> > > > interface which seems like the appropriate service to override.
> > What
> > > I
> > > > have tried is to add the following method to my AppModule
> > class
> > > > 
> > > > 
> > > > public static void bind(ServiceBinder binder) {
> > > >   ServiceBindingOptions options = 
> > > >   binder.bind(
> > > >
> > >  PageTemplateLocator.class,
> > > >
> > >  MyPageTemplateLocatorImpl.class
> > > >

T4.1.2: problems with async EventListener

2007-07-02 Thread Patrick Klein
Hi!

I just tried to switch over to Tapestry 4.1.2 and use the EventListeners
and AJAX functionality. However, as soon as i add an EventListener to
any page-class file i get the following log output:

02.07.2007 15:46:00 org.apache.tapestry.asset.AssetService service
WARNUNG: Classpath resource '/tapestry/event.js' does not exist.
02.07.2007 15:46:00
org.apache.tapestry.error.RequestExceptionReporterImpl
reportRequestException
WARNUNG: Failure to export classpath resource /tapestry.js.
org.apache.hivemind.ApplicationRuntimeException: Classpath resource
'/tapestry.js' does not exist.
at
org.apache.tapestry.asset.ResourceDigestSourceImpl.computeMD5(ResourceDigestSourceImpl.java:96)
at
org.apache.tapestry.asset.ResourceDigestSourceImpl.getDigestForResource(ResourceDigestSourceImpl.java:64)
at
$ResourceDigestSource_1138787a9c0.getDigestForResource($ResourceDigestSource_1138787a9c0.java)
at
org.apache.tapestry.asset.AssetService.service(AssetService.java:221)
at
$IEngineService_1138787a8cc.service($IEngineService_1138787a8cc.java)
at
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)
at
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:237)
at
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)
at
$WebRequestServicer_1138787a891.service($WebRequestServicer_1138787a891.java)
at
$WebRequestServicer_1138787a88d.service($WebRequestServicer_1138787a88d.java)
at
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:61)
at
$ServletRequestServicer_1138787a87f.service($ServletRequestServicer_1138787a87f.java)
at
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at
$ServletRequestServicerFilter_1138787a87b.service($ServletRequestServicerFilter_1138787a87b.java)
at
$ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java)
at
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at
$ServletRequestServicerFilter_1138787a879.service($ServletRequestServicerFilter_1138787a879.java)
at
$ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java)
at
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at
$ServletRequestServicerFilter_1138787a87d.service($ServletRequestServicerFilter_1138787a87d.java)
at
$ServletRequestServicer_1138787a881.service($ServletRequestServicer_1138787a881.java)
at
$ServletRequestServicer_1138787a873.service($ServletRequestServicer_1138787a873.java)
at
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:126)
at
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:103)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.biso.tomcat.filter.PerformanceFilter.doFilter(PerformanceFilter.java:42)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
clime.messadmin.filter.MessAdminFilter.doFilter(MessAdminFilter.java:104)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 

Antwort: Re: Antwort: RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Kristian Marinkovic
just remove the InjectService annotation from your service 
method and try it again :)




Martin Grotzke <[EMAIL PROTECTED]> 
02.07.2007 16:50
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
Re: Antwort: RE: T5 Decoupling a Template From its Component Class






On Mon, 2007-07-02 at 16:06 +0200, Kristian Marinkovic wrote:
> 
> service implementations contributed to the alias service will 
> override the other service implementations. this is also true for 
> implementations originally provided by tapestry 
> 
> the additional id is to distinguish multiple implementations of the 
> same interface. in your case you should only need it twice: 
> 1) to define your service 
> 2) to contribute to the alias service then you can forget it :) 

If I understand you correctly, you say that 

   public static PageResponseRenderer decoratePageResponseRenderer(
   @InjectService("PageMarkupRenderer")
   final PageMarkupRenderer markupRenderer,
   @InjectService("MarkupWriterFactory")
   final MarkupWriterFactory markupWriterFactory,
   final Object delegate )

should provide our custom MarkupWriterFactory?
This is not the fact - with @InjectService("MarkupWriterFactory")
T5 provides its MarkupWriterFactoryImpl and not our custom
MarkupWriterFactory.
Did I understand you wrong, or is this a "bug" in T5?

Cheers,
Martin



> 
> g, 
> kris 
> 
> 
> 
> Martin Grotzke
> <[EMAIL PROTECTED]> 
> 
> 02.07.2007 14:10 
> Bitte antworten an
>  "Tapestry users"
> 
> 
> 
> 
> 
>An
> Tapestry users
>  
> Kopie
> 
> Thema
> RE: T5 Decoupling
> a Template From
> its Component
> Class
> 
> 
> 
> 
> 
> 
> 
> 
> On Mon, 2007-07-02 at 11:03 +0200, Kristian Marinkovic wrote:
> > 
> > hi martin, 
> > 
> > if you use the ServiceBinder to contribute a class that implements
> an
> > already 
> > "contributed" interface you have to assign an id for your class by
> > invoking withId, 
> > because the Interface is no longer sufficient to identifiy the
> service
> > 
> >  binder.bind(PageTemplateLocator.class, 
> > MyPageTemplateLocatorImpl.class).withId("myLocator"); 
> > 
> > furthermore you have to contribute to the aliasOverrides Service 
> > to actually replace the old implementation: 
> > 
> > public static void contributeAliasOverrides( 
> > @InjectService("myLocator") PageTemplateLocator
> locator, 
> > Configuration configuration) { 
> > 
> >configuration.add( 
> >  AliasContribution.create( 
> >  PageTemplateLocator.class, locator)); 
> 
> Great, this works - thanx a lot!
> 
> Just for clarification: the specified id has to be used anywhere else,
> right? E.g. for us the service in question is the MarkupWriterFactory,
> and previously we also had this in our AppModule:
> 
>public static PageResponseRenderer decoratePageResponseRenderer(
>@InjectService("PageMarkupRenderer")
>final PageMarkupRenderer markupRenderer,
>@InjectService("MarkupWriterFactory")
>final MarkupWriterFactory markupWriterFactory,
>final Object delegate )
> 
> which we have to change to @InjectService("myMarkupWriterFactory")
> then.
> Is this the intended way? Is it guaranteed, that T5 does not reference
> the MarkupWriterFactory implementation by the id
> "MarkupWriterFactory"?
> 
> Thanx && cheers,
> Martin 
> 
> 
> > 
> > 
> > g, 
> > kris 
> > 
> > 
> > 
> > Martin Grotzke
> > <[EMAIL PROTECTED]> 
> > 
> > 02.07.2007 10:00 
> > Bitte antworten an
> >  "Tapestry users"
> > 
> > 
> > 
> > 
> > 
> >An
> > Tapestry users
> >  
> > Kopie
> > 
> > Thema
> > RE: T5 Decoupling
> > a Template From
> > its Component
> > Class
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Digging through the code I notice there is a PageTemplateLocator
> > > interface which seems like the appropriate service to override.
> What
> > I
> > > have tried is to add the following method to my AppModule
> class
> > > 
> > > 
> > > public static void bind(ServiceBinder binder) {
> > >   ServiceBindingOptions options = 
> > >   binder.bind(
> > >
> >  PageTemplateLocator.class,
> > >
> >  MyPageTemplateLocatorImpl.class
> > >);
> > > }
> > > 
> > > 
> > > ...but I get the following exception at startup.
> > > 
> > > 
> > > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> > already
> > > been defined by
> > 
> > Did you solve this issue? I get the same exception with another
> > Service
> > that's defined in TapestryModule that I want to override in my
> > AppModule
> > with my custom implementation...
> > 
> > Thx && cheers,
> > Martin
> > 
> > 
> > On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > > > Sent: Wednesday

Re: 4.1.1 upgrade to 4.1.2 async listener no longer works

2007-07-02 Thread Jesse Kuhnert

Components implementing IFormComponent that are targeted with an
@EventListener do now have their surrounding forms submitted automatically
as part of the async request.  If there is something in your logic that
doesn't need/want this to happen you can set the autoSubmit = false
parameter in the annotation and it will do the pure async request only
without the form submission.

http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener

On 7/3/07, Paul Stanton <[EMAIL PROTECTED]> wrote:


Hi,

I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I
try to load one of my Dojo Dialogs (async).

It seems tapestry is trying to call getPage with a null page name, but
I'm not sure why formSubmit is being called at all (unless it's part of
a rewind?)

The trigger is being defined like so:


The listener being called is defined like so:
@EventListener(targets = {"myButton"}, events = "onclick", async =
true)
public void showMyDialog()

If i click my button i get the following exception wrapped in a error
dialog  (async):

Failure invoking listener method 'public org.apache.tapestry.IPage
MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not
be null.
org.apache.hivemind.ApplicationRuntimeException
Failure invoking listener method 'public org.apache.tapestry.IPage
com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on
[EMAIL PROTECTED]/Comparables]: Parameter name must not be
null.
component:
[EMAIL PROTECTED]/Comparables]
location:
context:/WEB-INF/veridical/Comparables.page, line 5, column 81
1

2
http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
4

5





[ +/- ] Exception:  Parameter name must
not be null.
java.lang.NullPointerException
Parameter name must not be null.
Stack Trace:

* org.apache.hivemind.util.Defense.notNull(Defense.java:41)
* org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java
:217)

* $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java)
* $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java)
* MyPage.formSubmit(VeridicalPage.java:65)
* sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
* sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)

* sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)

* java.lang.reflect.Method.invoke(Method.java:597)
*
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(
ListenerMethodInvokerImpl.java:276)

*
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod
(ListenerMethodInvokerImpl.java:221)

*
org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(
ListenerMethodInvokerImpl.java:157)

*
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod
(ListenerMethodInvokerImpl.java:80)

* org.apache.tapestry.listener.SyntheticListener.actionTriggered(
SyntheticListener.java:52)

*
org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(
ListenerInvokerTerminator.java:50)

*
$ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java)

* org.apache.tapestry.form.Form.renderComponent(Form.java:200)
* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java
:725)

* org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.render(
DojoAjaxResponseBuilder.java:625)

* org.apache.tapestry.form.Form.rewind(Form.java:269)
* org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java
:453)

* org.apache.tapestry.form.Form.trigger(Form.java:280)
* org.apache.tapestry.engine.DirectService.triggerComponent(
DirectService.java:166)

* org.apache.tapestry.engine.DirectService.service(DirectService.java
:142)

*
$IEngineService_1138a7ba2ba.service($IEngineService_1138a7ba2ba.java)
* org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(
EngineServiceOuterProxy.java:72)

* org.apache.tapestry.engine.AbstractEngine.service(
AbstractEngine.java:237)

* org.apache.tapestry.services.impl.InvokeEngineTerminator.service(
InvokeEngineTerminator.java:54)

*
$WebRequestServicer_1138a7ba28e.service($WebRequestServicer_1138a7ba28e.java)

* org.apache.tapestry.services.impl.DisableCachingFilter.service(
DisableCachingFilter.java:54)

*
$WebRequestServicerFilter_1138a7ba290.service($WebRequestServicerFilter_1138a7ba290.java)






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


4.1.1 upgrade to 4.1.2 async listener no longer works

2007-07-02 Thread Paul Stanton

Hi,

I've upgraded to 4.1.2 from 4.1.1 and am getting the following when I 
try to load one of my Dojo Dialogs (async).


It seems tapestry is trying to call getPage with a null page name, but 
I'm not sure why formSubmit is being called at all (unless it's part of 
a rewind?)


The trigger is being defined like so:
   

The listener being called is defined like so:
   @EventListener(targets = {"myButton"}, events = "onclick", async = true)
   public void showMyDialog()

If i click my button i get the following exception wrapped in a error 
dialog  (async):


Failure invoking listener method 'public org.apache.tapestry.IPage 
MyPage.formSubmit()' on [EMAIL PROTECTED]: Parameter name must not 
be null.

org.apache.hivemind.ApplicationRuntimeException
Failure invoking listener method 'public org.apache.tapestry.IPage 
com.pds.pdsv3.tapestry.pages.veridical.VeridicalPage.formSubmit()' on 
[EMAIL PROTECTED]/Comparables]: Parameter name must not be 
null.

component:
[EMAIL PROTECTED]/Comparables]
location:
context:/WEB-INF/veridical/Comparables.page, line 5, column 81
1

2
	Foundation//Tapestry Specification 4.0//EN"

3
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
4

5
	class="com.pds.pdsv3.tapestry.pages.veridical.Comparables"/>





[ +/- ] Exception:  Parameter name must 
not be null.

java.lang.NullPointerException
Parameter name must not be null.
Stack Trace:

   * org.apache.hivemind.util.Defense.notNull(Defense.java:41)
   * org.apache.tapestry.engine.RequestCycle.getPage(RequestCycle.java:217)

   * $IRequestCycle_1138a7ba350.getPage($IRequestCycle_1138a7ba350.java)
   * $IRequestCycle_1138a7ba25a.getPage($IRequestCycle_1138a7ba25a.java)
   * MyPage.formSubmit(VeridicalPage.java:65)
   * sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   * 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

   * 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   * java.lang.reflect.Method.invoke(Method.java:597)
   * 
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:276)

   * 
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:221)

   * 
org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:157)

   * 
org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:80)

   * 
org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:52)

   * 
org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:50)

   * 
$ListenerInvoker_1138a7ba23c.invokeListener($ListenerInvoker_1138a7ba23c.java)

   * org.apache.tapestry.form.Form.renderComponent(Form.java:200)
   * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)

   * 
org.apache.tapestry.services.impl.DojoAjaxResponseBuilder.render(DojoAjaxResponseBuilder.java:625)

   * org.apache.tapestry.form.Form.rewind(Form.java:269)
   * org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:453)

   * org.apache.tapestry.form.Form.trigger(Form.java:280)
   * 
org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:166)

   * org.apache.tapestry.engine.DirectService.service(DirectService.java:142)

   * $IEngineService_1138a7ba2ba.service($IEngineService_1138a7ba2ba.java)
   * 
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:72)

   * org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:237)

   * 
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:54)

   * 
$WebRequestServicer_1138a7ba28e.service($WebRequestServicer_1138a7ba28e.java)

   * 
org.apache.tapestry.services.impl.DisableCachingFilter.service(DisableCachingFilter.java:54)

   * 
$WebRequestServicerFilter_1138a7ba290.service($WebRequestServicerFilter_1138a7ba290.java)






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OGNL 2.7 Must use #this

2007-07-02 Thread Kalle Korhonen

The unit test doesn't succeed for me (and neither does the real world
example, which is slightly different, but I assume the unit test would cover
for it). Well, if you say the unit test should pass now, I'll double-check I
have the right version and get back to you.

Kalle


On 7/2/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:


That looks like the right one to me.   The code you provided in the test
case was re-produced / fixed.  You did mention something about
"object[linkProperty]" not working before you provided a code example but
I'm assuming the code example was what was intended to be fixed

Does the same test case not work for you?

On 7/2/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
>
> Hey Jesse - saw you had marked
> http://jira.opensymphony.com/browse/OGNL-97as resolved so I assumed
> the fix might be in the latest snapshot
> ognl-2.7.1-20070630.205921-4 posted later but there were no changes as
far
> as I could notice. Certainly don't want to sound impatient as you are
> doing
> superb job in fixing these, but how do I know in which snapshot the fix
> might be?
>
> Kalle
>
>
> On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
> >
> > Thanks. I wasn't 100% how legitimate, but filed as
> > http://jira.opensymphony.com/browse/OGNL-97
> >
> > Kalle
> >
> > On 6/26/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> > >
> > > No time to look at this right now,  but if you file a jira report
> here:
> > >
> > > http://jira.opensymphony.com/browse/OGNL
> > >
> > > it can be looked in to for the next 2.7.1 release.
> > >
> > > The forums are here:
> > >
> > > http://forums.opensymphony.com/category.jspa?categoryID=10
> > >
> > > (though I'm thinking of moving them to google groups as well)
> > >
> > > On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Hi Jesse et al,
> > > >
> > > > while trying to migrate to Tap 4.1.2 we started getting lots of
> > > > OgnlExceptions with message "source is null" from
> > > OgnlRuntime.getProperty.
> > > > The workaround was to add #this to a lot of places where we used
> more
> > > > complex OGNL expressions. I realize this is probably much more to
do
> > > with
> > > > enhanced Ognl than Tapestry, so I would have taken the discussion
to
> > > ognl
> > > > list, but subscribing to ognl-interest failed with
> lists.ognl.orgdomain
> > > > not
> > > > found. Anyway, an example of failing expression is:
> > > > ognl:object[linkProperty]
> > > >
> > > > that now only works with:
> > > > ognl:object[#this.linkProperty]
> > > >
> > > > Without knowing anything about how compiled OGNL works, just
> following
> > > the
> > > > ExpressionEvaluatorImpl.java source I tried to make a test case
that
> > > > fails:
> > > > public String getKey() {
> > > > return "key";
> > > > }
> > > >
> > > > public void testEnhancedOgnl() throws Exception {
> > > > map = new HashMap();
> > > > map.put("key", "value");
> > > > ClassResolver ognlResolver = new OgnlClassResolver();
> > > > OgnlContext context =
> > > (OgnlContext)Ognl.createDefaultContext(this,
> > > > ognlResolver);
> > > > Node expression = Ognl.compileExpression(context, map,
> "key");
> > > > assertEquals(map.get("key"), Ognl.getValue(
> > > expression.getAccessor
> > > > (),
> > > > context, map)) ;
> > > >
> > > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > > ognlResolver);
> > > > expression = Ognl.compileExpression(context, this,
> > > "#this[key]");
> > > > assertEquals("key", Ognl.getValue(expression.getAccessor
(),
> > > > context,
> > > > this)) ;
> > > >
> > > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > > ognlResolver);
> > > > expression = Ognl.compileExpression (context, this,
> > > "#this.key");
> > > > assertEquals("key", Ognl.getValue(expression.getAccessor
(),
> > > > context,
> > > > this)) ;
> > > >
> > > > // Fails
> > > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > > ognlResolver);
> > > > expression = Ognl.compileExpression(context, this, "key");
> > > > assertEquals("key", Ognl.getValue(expression.getAccessor
(),
> > > > context,
> > > > this)) ;
> > > > }
> > > >
> > > >
> > > > I might be way off here (like I said, I don't know anything about
it
> > > :),
> > > > but
> > > > the last assert fails (on CannotCompileException) even though to
me
> > > the
> > > > expression is equal to the two above it (the first one's just me
> > > figuring
> > > > out how it works).
> > > >
> > > > Since 2.7 is already released and I can see Jesse has even tagged
> > > Tap4.1.2a
> > > > few hours ago, I was mostly looking for a quick explanation, maybe
a
> > > > better
> > > > workaround if possible. If this (pun intended) is the price to pay
> for
> > >
> > > > faster OGNL, here's my check and huge thanks to Jesse for all the
> hard
> > > > work!
> > > >
> > > > Kalle
> > > >
> > >
> > >
> > >
> >

Re: OGNL 2.7 Must use #this

2007-07-02 Thread Jesse Kuhnert

That looks like the right one to me.   The code you provided in the test
case was re-produced / fixed.  You did mention something about
"object[linkProperty]" not working before you provided a code example but
I'm assuming the code example was what was intended to be fixed

Does the same test case not work for you?

On 7/2/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:


Hey Jesse - saw you had marked
http://jira.opensymphony.com/browse/OGNL-97as resolved so I assumed
the fix might be in the latest snapshot
ognl-2.7.1-20070630.205921-4 posted later but there were no changes as far
as I could notice. Certainly don't want to sound impatient as you are
doing
superb job in fixing these, but how do I know in which snapshot the fix
might be?

Kalle


On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
>
> Thanks. I wasn't 100% how legitimate, but filed as
> http://jira.opensymphony.com/browse/OGNL-97
>
> Kalle
>
> On 6/26/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
> >
> > No time to look at this right now,  but if you file a jira report
here:
> >
> > http://jira.opensymphony.com/browse/OGNL
> >
> > it can be looked in to for the next 2.7.1 release.
> >
> > The forums are here:
> >
> > http://forums.opensymphony.com/category.jspa?categoryID=10
> >
> > (though I'm thinking of moving them to google groups as well)
> >
> > On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
> > >
> > > Hi Jesse et al,
> > >
> > > while trying to migrate to Tap 4.1.2 we started getting lots of
> > > OgnlExceptions with message "source is null" from
> > OgnlRuntime.getProperty.
> > > The workaround was to add #this to a lot of places where we used
more
> > > complex OGNL expressions. I realize this is probably much more to do
> > with
> > > enhanced Ognl than Tapestry, so I would have taken the discussion to
> > ognl
> > > list, but subscribing to ognl-interest failed with
lists.ognl.orgdomain
> > > not
> > > found. Anyway, an example of failing expression is:
> > > ognl:object[linkProperty]
> > >
> > > that now only works with:
> > > ognl:object[#this.linkProperty]
> > >
> > > Without knowing anything about how compiled OGNL works, just
following
> > the
> > > ExpressionEvaluatorImpl.java source I tried to make a test case that
> > > fails:
> > > public String getKey() {
> > > return "key";
> > > }
> > >
> > > public void testEnhancedOgnl() throws Exception {
> > > map = new HashMap();
> > > map.put("key", "value");
> > > ClassResolver ognlResolver = new OgnlClassResolver();
> > > OgnlContext context =
> > (OgnlContext)Ognl.createDefaultContext(this,
> > > ognlResolver);
> > > Node expression = Ognl.compileExpression(context, map,
"key");
> > > assertEquals(map.get("key"), Ognl.getValue(
> > expression.getAccessor
> > > (),
> > > context, map)) ;
> > >
> > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > ognlResolver);
> > > expression = Ognl.compileExpression(context, this,
> > "#this[key]");
> > > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > > context,
> > > this)) ;
> > >
> > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > ognlResolver);
> > > expression = Ognl.compileExpression (context, this,
> > "#this.key");
> > > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > > context,
> > > this)) ;
> > >
> > > // Fails
> > > context = (OgnlContext)Ognl.createDefaultContext(this,
> > > ognlResolver);
> > > expression = Ognl.compileExpression(context, this, "key");
> > > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > > context,
> > > this)) ;
> > > }
> > >
> > >
> > > I might be way off here (like I said, I don't know anything about it
> > :),
> > > but
> > > the last assert fails (on CannotCompileException) even though to me
> > the
> > > expression is equal to the two above it (the first one's just me
> > figuring
> > > out how it works).
> > >
> > > Since 2.7 is already released and I can see Jesse has even tagged
> > Tap4.1.2a
> > > few hours ago, I was mostly looking for a quick explanation, maybe a
> > > better
> > > workaround if possible. If this (pun intended) is the price to pay
for
> >
> > > faster OGNL, here's my check and huge thanks to Jesse for all the
hard
> > > work!
> > >
> > > Kalle
> > >
> >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
>
>





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: T4.1.2 - css background images not working - bug?

2007-07-02 Thread Jesse Kuhnert

Tapestry doesn't process your css files or the images it
referencesunless for some reason your relative context image path is
somehow setup to match an asset Tapestry is managing it should be handled by
your servlet container.

Is that not the case here?

On 7/2/07, Jan Vissers <[EMAIL PROTECTED]> wrote:


Apparently the images are a bit differently processed in T4.1.2
Change the url below from ../images/... to images/... makes the
page render properly again. However this means I can no longer see
these images in the wysiwyg view of the page.

Not a show stopper, but if anybody has an idea to have both (design +
runtime) that would be nice.

-J.

Jan Vissers wrote:
> Hi,
>
> Moving from 4.1.1 to 4.1.2 I noticed that css background images are
> broken.
>
> For example:
>
> #logo {
>float: left;
>padding-top: 15px;
>padding-left: 200px;
>padding-bottom: 40px;
>background: url(../images/logo.gif) no-repeat;
>background-position: 5% 50%
> }
>
> "background:url" Worked in 4.1.1, but is broken in 4.1.2.
>
> Am I missing something?
>
> Thanks,
> -J.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: T4.1.2 Question - libs that changed

2007-07-02 Thread Jesse Kuhnert

http://tapestry.apache.org/tapestry4.1/tapestry-framework/dependencies.html

On 7/2/07, Jan Vissers <[EMAIL PROTECTED]> wrote:


Hi,

In order for T4.1.1 to operate properly on OC4J, I had to 'tweak' some
hivemind stuff in 1.1.1
That's the reason why I am now asking which T4.1.2 libraries in the
distribution have actually been changed.

Only the tapestry-[]-4.1.2.jar and ognl-2.7.jar ones?

Thanks,
-J.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: Selenium problem with T4.1.2

2007-07-02 Thread Jesse Kuhnert

That's an internal error thrown by the mozilla dom implementation.
nsiDOMEventListener is the class and handleEvent is the method
NS_ERROR_XPC.blahblah is just some constant and the hex-y looking string
is probably the current op code in the current pseudo js vm context...(i
think?)

Other than that I have absolutely no idea.  I'm not sure if even a mozilla
dev could tell you what was wrong with that much information.

On 7/2/07, Geoff Callender <[EMAIL PROTECTED]> wrote:


Hi,

My Selenium tests that worked with T4.1.1 now fail with T4.1.2.  They
still work just fine with Selenium IDE but not in Selenium TestRunner
which runs the whole suite in an IFRAME.

It looks like client-side validation, which used to work, is now dead
in TestRunner.  Could this be the cause...

[Exception... "'Permission denied to get property
HTMLDocument._parentWindow' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]

Firebug shows that error whenever you arrive in a page with a form.

I found a similar report but no solution: http://forums.openqa.org/
thread.jspa?threadID=4638&tstart=111

Suggestions, anyone?

Regards,

Geoff


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


Re: Need Quick Help on else statement

2007-07-02 Thread Nick Westgate

Another option is to use the negate parameter.

Then you only need the one logic method,
and you can have the if's wherever you want:


  ...

...

  ...


Cheers,
Nick.


Erik Vullings wrote:

Hi Eko,

   
   Whatever
   Please select an object first!
   

Cheers
Erik

On 7/2/07, Eko S.W. <[EMAIL PROTECTED]> wrote:


Dear community,

Is there else clause in  construct ???
I've try (but maybe not hard), but can not find it.
That is, is there an else if you use  ???

* I imagine it to be like this :





Currently, to give the same behaviour I create a getIfSummaryActive
method and a getIfSummaryNotActive, like this:








Not perfect, but it's works...

Thanks in advance
--
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 Templates In src/main/resources Might Interfere With Resource Filtering

2007-07-02 Thread Steven Coco
Hi.

Has there been discussion about the fact that Maven can filter resources, 
located in src/main/resources, and if templates are placed there, then Maven 
may munge expansions intended for Tapestry, or maybe also vice-versa?

The tutorial says templates should be placed here. I have been using WEB-INF, 
mainly because application reloading during development is instant this way, 
but when they are in the resources directory, it doesn't pick up changes. And 
other than that there seems to be no difference. But I can easily see a 
problem with resource filtering.

In light of this comment, what then is the fate for component templates? I 
think they currently are required to appear in src/main/resources, so there 
may be real problems.

You can configure excludes in Maven's resource plugin; but that may not be a 
guaranteed solution: you may have properties bundles for components that do 
need to be filtered by Maven, and the task of configuring those excludes is 
not straightforward, and things may get too onerous to be practical.

The potential for clashes should be a pretty big concern I'd think; since 
resource filtering is common, and once a project scales up with many pages 
and components, the odds of a Tapestry expansion matching a Maven one will be 
high.

Any comments on this?

Ciao!
Steev Coco.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 How to Override the default banner message (Errors component)

2007-07-02 Thread Marcus

Hi Uli,

org/apache/tapestry/corelib/components/Errors.properties
org/apache/tapestry/internal/ValidationMessages.properties

:-)

Thank you!

Marcus


Re: [T5] Is there a working Acegi example available?

2007-07-02 Thread petros

Daniel, 

I configured using Acegi and Tapestry 5 without any problems but I am still
getting a 404 when a AccessDeniedException is thrown. I explained this
problem in more detail here
http://www.nabble.com/Moving-T4-to-T5-broke-Acegi-tf3845975.html#a10891952

My solution was documented here but I haven't updated the wiki yet
http://www.nabble.com/Tapestry-5-and-Acegi-tf3769520.html#a10886654

Petros



Daniel Jue wrote:
> 
> Dear List,
> 
> I'm sorry, I think I found my problem, and it was a stupid one.  It
> took a 3rd cup of coffee to make it appear.
> 
> I wasn't prefixing my Authority strings with "ROLE_"
> 
> i.e. my DB had "ADMIN" stored in a field instead of "ROLE_ADMIN"
> 
> This still doesn't explain why I wasn't redirected properly to the
> LoginFailure page.
> When I type in the URL for the LoginFailure manually, it works of course.
> 
> Daniel
> 
> 
> 
> On 7/2/07, Daniel Jue <[EMAIL PROTECTED]> wrote:
>> I am beating my head against a brick wall.
>>
>> I am trying to get Acegi working (using Spring to configure it).  I
>> have it working to the point where a secured page (secured in the xml
>> files, not using any annotations for securing classes) redirects me to
>> a login page.
>> If I type in a login/password that is wrong, I get sent to my "Access
>> Denied" page like I want.
>> However with a good login, I'm getting unsuccessfully forwarded to my
>> "Access Denied" page.  The url at the top displays the secure url I
>> was trying to go to, but the browser displays a 404 error indicating
>> it can't find the AccessDenied page.
>>
>> It seems like there are sooo many things that can go wrong with an
>> Acegi configuration.
>> I only want form authentication, so the Basic authentication filter
>> can probably be deleted.
>>
>> It would be nice to see a complete T5 Acegi application this on the T5
>> Wiki, first with Spring configuration, since Tapestry-Acegi is not
>> ported to T5 yet.
>>
>> 
>>
>> Here is my configuration:
>>
>>
>>
>> > class="org.acegisecurity.util.FilterChainProxy">
>> 
>> 
>>
>> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
>> PATTERN_TYPE_APACHE_ANT
>>
>> /**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,rememberMeProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor
>> 
>> 
>> 
>>
>>
>> > class="org.acegisecurity.intercept.web.FilterSecurityInterceptor">
>>   > bean="authenticationManager"/>
>>   > bean="httpRequestAccessDecisionManager"/>
>>   
>>  
>> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
>> PATTERN_TYPE_APACHE_ANT
>> /start=ROLE_ADMIN
>> /loginsuccess=ROLE_ADMIN
>> /tests/gridpage=ROLE_ADMIN
>> /tests/guess=ROLE_ADMIN
>> /tests/hilo=ROLE_ADMIN
>> /tests/imagepage=ROLE_ADMIN
>> /postlogin=ROLE_ANONYMOUS,ROLE_ADMIN
>>  
>>   
>>
>>
>>> class="org.acegisecurity.context.HttpSessionContextIntegrationFilter">
>>
>>
>>> class="org.acegisecurity.vote.AffirmativeBased">
>>   > name="allowIfAllAbstainDecisions">true
>>   
>>  
>> 
>>  
>>   
>>
>>
>>> class="org.acegisecurity.ui.logout.LogoutFilter">
>>
>>   
>>  
>>   
>>   > class="org.acegisecurity.ui.logout.SecurityContextLogoutHandler"/>
>>  
>>   
>>
>>
>> > class="org.acegisecurity.providers.rememberme.RememberMeAuthenticationProvider">
>>   springRocks
>> 
>>
>>   > class="org.acegisecurity.ui.rememberme.RememberMeProcessingFilter">
>>   
>>   > bean="rememberMeServices"/>
>> 
>>
>> > class="org.acegisecurity.ui.rememberme.TokenBasedRememberMeServices">
>>   > bean="userDetailsService"/>
>>   springRocks
>> 
>>
>> 
>> 
>> ROLE_
>> 
>> 
>>
>> > class="myapp.security.AuthenticationJdbcDaoImpl">
>> 
>> 
>> 
>> 
>> 
>> Admin
>> Standard
>> 
>> 
>> 
>>
>> > class="org.springframework.jndi.JndiObjectFactoryBean">
>> 
>> true
>> 
>> 
>> java:comp/env/jdbc/MyUserDatabase
>> 
>> 
>>
>> > class="org.acegisecurity.vote.UnanimousBased">
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> > class="org.acegisecurity.providers.ProviderManager">
>> 
>> 
>> 
>> 
>> > 

Re: T4 T4.1.2: tapestry.form.registerForm is not a function

2007-07-02 Thread andyhot

What happens if:
a) you enable friendly urls for the asset service
b) you remove the base tag from within head (there's a parameter for 
@Shell for this)


Jeremy F. Kassis wrote:

Well. No luck on this one. I rolled back to T4.1.1 and everything works.
Guess I'm waiting for T5. Thanks for your thoughts / help Jesse.



Jeremy F. Kassis wrote:
  

Just to be clear, I "broke it more" to see what would happen and eliminate
the possibility that the defaultDojoPath and related IAsset declarations
were wrong. I changed them back, assuming they are right, but I don't have
any new theories.

I'm using Firefox 2, which I know is a little bleeding edge, so I tried on
IE and get the same problem.





  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T4 T4.1.2: tapestry.form.registerForm is not a function

2007-07-02 Thread Jeremy F. Kassis

Well. No luck on this one. I rolled back to T4.1.1 and everything works.
Guess I'm waiting for T5. Thanks for your thoughts / help Jesse.



Jeremy F. Kassis wrote:
> 
> Just to be clear, I "broke it more" to see what would happen and eliminate
> the possibility that the defaultDojoPath and related IAsset declarations
> were wrong. I changed them back, assuming they are right, but I don't have
> any new theories.
> 
> I'm using Firefox 2, which I know is a little bleeding edge, so I tried on
> IE and get the same problem.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T4-T4.1.2%3A-tapestry.form.registerForm-is-not-a-function-tf3998293.html#a11403973
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hackish(?) Workaround for Entities In Templates

2007-07-02 Thread Steven Coco
Hi.

This thread is  bit old, but I've just gotten back on to this.

I implemented the mapping you showed here, and it works enough to allow Tap to 
serve the doctype to the user, and not raise any exceptions. But the entities 
still don't work. In fact, character references don't work either: character 
refs are the numerical forms ™ and such.

So for now I've just added the contribution, and the doctype in the template, 
and I'm still using the entities from my own message bundle as I mentioned. 
This does actually form a complete solution for now, to what I am trying to 
serve (I get the right doctype, and can use entities).

Thanks for the help.

Steev Coco.


On Sun June 10 2007 7:10:14 pm Robert Zeigler wrote:
> Ok, this is a touch hackish, but... you can map the HTML definitions
> to their corresponding xml definitions.  It's hackish because, a)
> it's contributing to an "internal" service, and b) You'll still have
> to write valid xml templates.  But you'll be able to use the 4.01
> DTD, and that is the DTD which will be passed on to the client.
> Anyway, the appropriate contribution looks like:
>
>  public static void contributeTemplateParser
> (MappedConfiguration map)
>  {
>  Class c = InternalModule.class;
>  map.add("-//W3C//DTD HTML 4.01 Transitional//
> EN",c.getResource("xhtml1-transitional.dtd"));
>  map.add("-//W3C//DTD HTML 4.01//EN",c.getResource("xhtml1-
> strict.dtd"));
>  map.add("-//W3C//DTD HTML 4.01 Frameset//EN",c.getResource
> ("xhtml1-frameset.dtd"));
>  }
>
>
> Robert
>
> On Jun 10, 2007, at 6/103:36 PM , Steven Coco wrote:
> > It's most definitely hackish!!! I'm considering it completely
> > temporary.
> >
> > But, I can't currently specify HTML 4 strict: Tapestry runs the XML
> > DTD parser
> > which errors on that DTD. I want to use this DTD (not XHTML).
> >
> > Actually I just stumbled over the UTF-8 encoding entry in the Wiki,
> > so that is
> > another concept, but my current plan revolved around entities and
> > HTML 4
> > strict; and I haven't come far enough to understand Tap and client
> > accept-encodings. I'll work it out in time: and probably by then
> > DTD support
> > will be implemented up a notch...
> >
> > Thanks for the help.
> >
> > -Steven Coco.
> >
> > On Sat June 9 2007 6:08:44 pm D&J Gredler wrote:
> >> If you specify a doctype in your templates (like XHTML 1.0
> >> Strict), you can
> >> use entities like ©
> >>
> >>
> >>  >> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> >>
> >> http://www.w3.org/1999/xhtml"; xmlns:t="
> >> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
> >> Copyright © Me
> >> 
> >>
> >> On 6/8/07, Steven Coco <[EMAIL PROTECTED]> wrote:
> >>> I just implemented a set of properties in WEB-INF/
> >>> Application.properties.
> >>> They
> >>> look like this:
> >>>
> >>> # HTML entities:
> >>> entity.copy: ©
> >>> entity.trade: ™
> >>> ...
> >>>
> >>> Now in templates I can "use" them like so:
> >>>
> >>> 
> >>>
> >>> Such is life.
> >>>
> >>> Ciao.
> >>> -Steven Coco.
> >>>
> >>> 
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OGNL 2.7 Must use #this

2007-07-02 Thread Kalle Korhonen

Hey Jesse - saw you had marked
http://jira.opensymphony.com/browse/OGNL-97as resolved so I assumed
the fix might be in the latest snapshot
ognl-2.7.1-20070630.205921-4 posted later but there were no changes as far
as I could notice. Certainly don't want to sound impatient as you are doing
superb job in fixing these, but how do I know in which snapshot the fix
might be?

Kalle


On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:


Thanks. I wasn't 100% how legitimate, but filed as
http://jira.opensymphony.com/browse/OGNL-97

Kalle

On 6/26/07, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>
> No time to look at this right now,  but if you file a jira report here:
>
> http://jira.opensymphony.com/browse/OGNL
>
> it can be looked in to for the next 2.7.1 release.
>
> The forums are here:
>
> http://forums.opensymphony.com/category.jspa?categoryID=10
>
> (though I'm thinking of moving them to google groups as well)
>
> On 6/26/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
> >
> > Hi Jesse et al,
> >
> > while trying to migrate to Tap 4.1.2 we started getting lots of
> > OgnlExceptions with message "source is null" from
> OgnlRuntime.getProperty.
> > The workaround was to add #this to a lot of places where we used more
> > complex OGNL expressions. I realize this is probably much more to do
> with
> > enhanced Ognl than Tapestry, so I would have taken the discussion to
> ognl
> > list, but subscribing to ognl-interest failed with lists.ognl.orgdomain
> > not
> > found. Anyway, an example of failing expression is:
> > ognl:object[linkProperty]
> >
> > that now only works with:
> > ognl:object[#this.linkProperty]
> >
> > Without knowing anything about how compiled OGNL works, just following
> the
> > ExpressionEvaluatorImpl.java source I tried to make a test case that
> > fails:
> > public String getKey() {
> > return "key";
> > }
> >
> > public void testEnhancedOgnl() throws Exception {
> > map = new HashMap();
> > map.put("key", "value");
> > ClassResolver ognlResolver = new OgnlClassResolver();
> > OgnlContext context =
> (OgnlContext)Ognl.createDefaultContext(this,
> > ognlResolver);
> > Node expression = Ognl.compileExpression(context, map, "key");
> > assertEquals(map.get("key"), Ognl.getValue(
> expression.getAccessor
> > (),
> > context, map)) ;
> >
> > context = (OgnlContext)Ognl.createDefaultContext(this,
> > ognlResolver);
> > expression = Ognl.compileExpression(context, this,
> "#this[key]");
> > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > context,
> > this)) ;
> >
> > context = (OgnlContext)Ognl.createDefaultContext(this,
> > ognlResolver);
> > expression = Ognl.compileExpression (context, this,
> "#this.key");
> > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > context,
> > this)) ;
> >
> > // Fails
> > context = (OgnlContext)Ognl.createDefaultContext(this,
> > ognlResolver);
> > expression = Ognl.compileExpression(context, this, "key");
> > assertEquals("key", Ognl.getValue(expression.getAccessor(),
> > context,
> > this)) ;
> > }
> >
> >
> > I might be way off here (like I said, I don't know anything about it
> :),
> > but
> > the last assert fails (on CannotCompileException) even though to me
> the
> > expression is equal to the two above it (the first one's just me
> figuring
> > out how it works).
> >
> > Since 2.7 is already released and I can see Jesse has even tagged
> Tap4.1.2a
> > few hours ago, I was mostly looking for a quick explanation, maybe a
> > better
> > workaround if possible. If this (pun intended) is the price to pay for
>
> > faster OGNL, here's my check and huge thanks to Jesse for all the hard
> > work!
> >
> > Kalle
> >
>
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>




Re: [T5] Is there a working Acegi example available?

2007-07-02 Thread Daniel Jue

Dear List,

I'm sorry, I think I found my problem, and it was a stupid one.  It
took a 3rd cup of coffee to make it appear.

I wasn't prefixing my Authority strings with "ROLE_"

i.e. my DB had "ADMIN" stored in a field instead of "ROLE_ADMIN"

This still doesn't explain why I wasn't redirected properly to the
LoginFailure page.
When I type in the URL for the LoginFailure manually, it works of course.

Daniel



On 7/2/07, Daniel Jue <[EMAIL PROTECTED]> wrote:

I am beating my head against a brick wall.

I am trying to get Acegi working (using Spring to configure it).  I
have it working to the point where a secured page (secured in the xml
files, not using any annotations for securing classes) redirects me to
a login page.
If I type in a login/password that is wrong, I get sent to my "Access
Denied" page like I want.
However with a good login, I'm getting unsuccessfully forwarded to my
"Access Denied" page.  The url at the top displays the secure url I
was trying to go to, but the browser displays a 404 error indicating
it can't find the AccessDenied page.

It seems like there are sooo many things that can go wrong with an
Acegi configuration.
I only want form authentication, so the Basic authentication filter
can probably be deleted.

It would be nice to see a complete T5 Acegi application this on the T5
Wiki, first with Spring configuration, since Tapestry-Acegi is not
ported to T5 yet.



Here is my configuration:






CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT

/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,rememberMeProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor






  
  
  
 
CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/start=ROLE_ADMIN
/loginsuccess=ROLE_ADMIN
/tests/gridpage=ROLE_ADMIN
/tests/guess=ROLE_ADMIN
/tests/hilo=ROLE_ADMIN
/tests/imagepage=ROLE_ADMIN
/postlogin=ROLE_ANONYMOUS,ROLE_ADMIN
 
  
   

   
   

   
  true
  
 

 
  
   

   
   
  
 
  
  
 
  
   


  springRocks


  
  
  



  
  springRocks




ROLE_









Admin
Standard






true


java:comp/env/jdbc/MyUserDatabase



























   






   
  
  
   


   
  Contacts Realm
   




















-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4.1.2] Honeycomb or Tapernate ?

2007-07-02 Thread #Cyrille37#

#Cyrille37# a écrit :

Hi,
After hard work and neuronal sport, I come to the moment where I to 
implement a real database access and replace my fake data objects.

So I can see there is 2 Hibernate/Tapestry4 integration project.

Have you got some comments to help me make the choice ?

Sorry to have posted to quickly.
The answer is on the list's archive.
http://www.mail-archive.com/[EMAIL PROTECTED]/msg17803.html

Cheers
Cyrille



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4.1.2] Honeycomb or Tapernate ?

2007-07-02 Thread #Cyrille37#

Hi,
After hard work and neuronal sport, I come to the moment where I to 
implement a real database access and replace my fake data objects.

So I can see there is 2 Hibernate/Tapestry4 integration project.

Have you got some comments to help me make the choice ?
Thanks
Cyrille.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T5] Is there a working Acegi example available?

2007-07-02 Thread Daniel Jue

I am beating my head against a brick wall.

I am trying to get Acegi working (using Spring to configure it).  I
have it working to the point where a secured page (secured in the xml
files, not using any annotations for securing classes) redirects me to
a login page.
If I type in a login/password that is wrong, I get sent to my "Access
Denied" page like I want.
However with a good login, I'm getting unsuccessfully forwarded to my
"Access Denied" page.  The url at the top displays the secure url I
was trying to go to, but the browser displays a 404 error indicating
it can't find the AccessDenied page.

It seems like there are sooo many things that can go wrong with an
Acegi configuration.
I only want form authentication, so the Basic authentication filter
can probably be deleted.

It would be nice to see a complete T5 Acegi application this on the T5
Wiki, first with Spring configuration, since Tapestry-Acegi is not
ported to T5 yet.



Here is my configuration:






CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT

/**=httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,basicProcessingFilter,rememberMeProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor






 
 
 

CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
PATTERN_TYPE_APACHE_ANT
/start=ROLE_ADMIN
/loginsuccess=ROLE_ADMIN
/tests/gridpage=ROLE_ADMIN
/tests/guess=ROLE_ADMIN
/tests/hilo=ROLE_ADMIN
/tests/imagepage=ROLE_ADMIN
/postlogin=ROLE_ANONYMOUS,ROLE_ADMIN

 
  

  
  

  
 true
 

   

 
  

  
  
 

 
 

 
  


 springRocks


 
 
 



 
 springRocks


   
   
   ROLE_
   
   

   
   
   
   
   
   
   Admin
   Standard
   
   
   



true


java:comp/env/jdbc/MyUserDatabase



   
   
   
   
   
   
   

















  






  
 
 
  


  
 Contacts Realm
  


















-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5: form context not invoking onActivate with matching parameters

2007-07-02 Thread Ben Tomasini

Now that I read the manual I see that all I needed to track the id was this:

   BigDecimal id = null;

   void onActivate(BigDecimal id) {
   this.id = id;
   }

   BigDecimal onPassivate() {
   return id;
   }

Very elegant... Thank you, Tapestry!

Ben


On 6/28/07, Ben Tomasini <[EMAIL PROTECTED]> wrote:


I was using the following code:

Start.html




Start.java

void onActivate() {
System.out.println ("No args");
}

void onActivate(String value) {
System.out.println("String arg");
}

On a form submit,  the console shows:

No args

I expected the form tag above to invoke the onActivate method with
matching arguments, it only invokes the noargs method.  Is this a bug, by
design, or am I missing something?

Ben







Re: T4.1.2 - css background images not working - bug?

2007-07-02 Thread Jan Vissers

Apparently the images are a bit differently processed in T4.1.2
Change the url below from ../images/... to images/... makes the
page render properly again. However this means I can no longer see
these images in the wysiwyg view of the page.

Not a show stopper, but if anybody has an idea to have both (design + 
runtime) that would be nice.


-J.

Jan Vissers wrote:

Hi,

Moving from 4.1.1 to 4.1.2 I noticed that css background images are 
broken.


For example:

#logo {
   float: left;
   padding-top: 15px;
   padding-left: 200px;
   padding-bottom: 40px;
   background: url(../images/logo.gif) no-repeat;
   background-position: 5% 50%
}

"background:url" Worked in 4.1.1, but is broken in 4.1.2.

Am I missing something?

Thanks,
-J.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5 XHTML strict conformance

2007-07-02 Thread Michael Gottschalk
Hi,

I have some questions in addition to the issue with non-well-formed XML 
generation. In order to be XHTML strict compliant, some standard components 
also need to be changed in tapestry 5, I think. 
Should I open bug reports for all problems I find? Or is XHTML strict 
conformance not currently an issue in the development?

Until now, I found the following problems:
 - form-tags always have a "name"-attribute when generated with t:form. The 
name attribute is not allowed for forms in xhtml strict.
 - tapestry sometimes places the attribute space="preserve" in script-tags
 - In the error message generated above a form ("You must correct the 
following errors before you may continue"), there is a  tag without 
items if there are no errors in the form. This is not allowed in XHTML.
 - There are several components that place tags incorrectly according to XHTML 
strict.

Regards,
Michael

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5.0.5: How to display rows conditionally in the Grid component?

2007-07-02 Thread Daniel Jue

Is the Grid component really an appropriate choice for this?  I
imagine you want the questions going one per row, with an answer
column.

When a condition is met so that a new question should be shown, your
page could rebuild the list of questions (append new question to the
end) .
The complexities go up if the questions are dependent on each other.

The grid component gives you paging and sorting, are you sure you need that?

I had a similar problem that I solved by using  and parameter
tags, because lots of my "questions" were dependent on each other.
Each question has its own form, and using the if/then approach allowed
me to escape the impossibility of nested forms.

Since I am not using AJAX (I am waiting for the official solution for
that), the if/then tree rebuilds itself on each page refresh.  I broke
the problem up into smaller components, each with their relative
dependencies.

On 7/2/07, Erik Vullings <[EMAIL PROTECTED]> wrote:

Hi all,

I want to use the Grid component to display a list of questions and answers:
since there are many questions, I don't want the user to see them all at
once, but instead show them conditionally as needed. For example, when
clicking yes (answer), it will show some subsequent questions (opens another
set/category of questions). How should I do this?

Related to this: is it easy to display a boolean parameter in the Grid
component not as a checkbox but as two radio buttons (yes/no) instead? Or do
I need to implement my own block editor for that.

Thanks
Erik

PS Sorry about the many Wiki messages that were caused by me: as it happens,
I'm currently between houses, and wanted to have an off line copy of the
Wiki. I used the freeware program Webreaper to download all pages
automatically, but unfortunately, it follows all links, including the links
that say edit. And since I have an account and can automatically login, it
uses my authN cookie to access those edit pages too, and subsequently saves
them by following the save link, thereby generating all the update messages.
I'm really sorry about this, but this is also partially a limitation of this
particular Wiki (if the save/edit links would have been submit buttons, it
probably wouldn't have occurred).



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set component parameters from page class

2007-07-02 Thread Martin Dietze
On Mon, July 02, 2007, Francois Armand wrote:

>@Component(parameters="disabled=prop:isdisabled")
>private TextField textField;
>   
>public boolean getIsdisabled() {
>return disabled;
>}
>@SetupRender
>void setup() {
>   if(should de disabled) {
>disabled = true;
>   } else {
>  disabled = false;
>   }
>}

This helped, thank you! 

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Steht ein Bratscher vor 'ner Kneipe.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4.1.2 - css background images not working - bug?

2007-07-02 Thread Jan Vissers

Hi,

Moving from 4.1.1 to 4.1.2 I noticed that css background images are broken.

For example:

#logo {
   float: left;
   padding-top: 15px;
   padding-left: 200px;
   padding-bottom: 40px;
   background: url(../images/logo.gif) no-repeat;
   background-position: 5% 50%
}

"background:url" Worked in 4.1.1, but is broken in 4.1.2.

Am I missing something?

Thanks,
-J.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Martin Grotzke
On Mon, 2007-07-02 at 16:06 +0200, Kristian Marinkovic wrote:
> 
> service implementations contributed to the alias service will  
> override the other service implementations. this is also true for 
> implementations originally provided by tapestry 
> 
> the additional id is to distinguish multiple implementations of the 
> same interface. in your case you should only need it twice: 
> 1) to define your service 
> 2) to contribute to the alias service then you can forget it :) 

If I understand you correctly, you say that 

   public static PageResponseRenderer decoratePageResponseRenderer(
   @InjectService("PageMarkupRenderer")
   final PageMarkupRenderer markupRenderer,
   @InjectService("MarkupWriterFactory")
   final MarkupWriterFactory markupWriterFactory,
   final Object delegate )

should provide our custom MarkupWriterFactory?
This is not the fact - with @InjectService("MarkupWriterFactory")
T5 provides its MarkupWriterFactoryImpl and not our custom
MarkupWriterFactory.
Did I understand you wrong, or is this a "bug" in T5?

Cheers,
Martin



> 
> g, 
> kris 
> 
> 
> 
> Martin Grotzke
> <[EMAIL PROTECTED]> 
> 
> 02.07.2007 14:10 
> Bitte antworten an
>  "Tapestry users"
> 
> 
> 
> 
> 
>An
> Tapestry users
>  
> Kopie
> 
> Thema
> RE: T5 Decoupling
> a Template From
> its Component
> Class
> 
> 
> 
> 
> 
> 
> 
> 
> On Mon, 2007-07-02 at 11:03 +0200, Kristian Marinkovic wrote:
> > 
> > hi martin, 
> > 
> > if you use the ServiceBinder to contribute a class that implements
> an
> > already 
> > "contributed" interface you have to assign an id for your class by
> > invoking withId, 
> > because the Interface is no longer sufficient to identifiy the
> service
> > 
> >  binder.bind(PageTemplateLocator.class, 
> > MyPageTemplateLocatorImpl.class).withId("myLocator"); 
> > 
> > furthermore you have to contribute to the aliasOverrides Service 
> > to actually replace the old implementation: 
> > 
> > public static void contributeAliasOverrides( 
> > @InjectService("myLocator") PageTemplateLocator
> locator, 
> > Configuration configuration) { 
> >  
> >configuration.add( 
> >  AliasContribution.create( 
> >  PageTemplateLocator.class, locator)); 
> 
> Great, this works - thanx a lot!
> 
> Just for clarification: the specified id has to be used anywhere else,
> right? E.g. for us the service in question is the MarkupWriterFactory,
> and previously we also had this in our AppModule:
> 
>public static PageResponseRenderer decoratePageResponseRenderer(
>@InjectService("PageMarkupRenderer")
>final PageMarkupRenderer markupRenderer,
>@InjectService("MarkupWriterFactory")
>final MarkupWriterFactory markupWriterFactory,
>final Object delegate )
> 
> which we have to change to @InjectService("myMarkupWriterFactory")
> then.
> Is this the intended way? Is it guaranteed, that T5 does not reference
> the MarkupWriterFactory implementation by the id
> "MarkupWriterFactory"?
> 
> Thanx && cheers,
> Martin 
> 
> 
> > 
> > 
> > g, 
> > kris 
> > 
> > 
> > 
> > Martin Grotzke
> > <[EMAIL PROTECTED]> 
> > 
> > 02.07.2007 10:00 
> > Bitte antworten an
> >  "Tapestry users"
> > 
> > 
> > 
> > 
> > 
> >An
> > Tapestry users
> >  
> > Kopie
> > 
> > Thema
> > RE: T5 Decoupling
> > a Template From
> > its Component
> > Class
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > Digging through the code I notice there is a PageTemplateLocator
> > > interface which seems like the appropriate service to override.
> What
> > I
> > > have tried is to add the following method to my AppModule
> class
> > > 
> > > 
> > > public static void bind(ServiceBinder binder) {
> > >   ServiceBindingOptions options = 
> > >   binder.bind(
> > >
> >  PageTemplateLocator.class,
> > >
> >  MyPageTemplateLocatorImpl.class
> > >);
> > > }
> > > 
> > > 
> > > ...but I get the following exception at startup.
> > > 
> > > 
> > > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> > already
> > > been defined by
> > 
> > Did you solve this issue? I get the same exception with another
> > Service
> > that's defined in TapestryModule that I want to override in my
> > AppModule
> > with my custom implementation...
> > 
> > Thx && cheers,
> > Martin
> > 
> > 
> > On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > > > Sent: Wednesday, May 30, 2007 5:15 PM
> > > > There are internal services that can be overridden to handle
> > those 
> > > > kinds of situations.
> > > > The goal is to create something that works amazingly well for
> all 
> > > > the more typical cases, then start going after these othe

Re: Set component parameters from page class

2007-07-02 Thread Francois Armand

Martin Dietze wrote:

Yes, this is how I found it in the documentation. However I'd
like to be able to do something like:

| @Component(id="myInput")
| private TextField _myInput;

[...]

| _myInput.setDisabled(true);
  

You can use parameter expansion in Java code :

8<---
   @Component(parameters="disabled=prop:isdisabled")
   private TextField textField;
  
   public boolean getIsdisabled() {

   return disabled;
   }
   @SetupRender
   void setup() {
  if(should de disabled) {
   disabled = true;
  } else {
 disabled = false;
  }
   }
  
8<-


Francois

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Kristian Marinkovic
service implementations contributed to the alias service will 
override the other service implementations. this is also true for
implementations originally provided by tapestry

the additional id is to distinguish multiple implementations of the
same interface. in your case you should only need it twice:
1) to define your service
2) to contribute to the alias service then you can forget it :)

g,
kris




Martin Grotzke <[EMAIL PROTECTED]> 
02.07.2007 14:10
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
RE: T5 Decoupling a Template From its Component Class






On Mon, 2007-07-02 at 11:03 +0200, Kristian Marinkovic wrote:
> 
> hi martin, 
> 
> if you use the ServiceBinder to contribute a class that implements an
> already 
> "contributed" interface you have to assign an id for your class by
> invoking withId, 
> because the Interface is no longer sufficient to identifiy the service
> 
>  binder.bind(PageTemplateLocator.class, 
> MyPageTemplateLocatorImpl.class).withId("myLocator"); 
> 
> furthermore you have to contribute to the aliasOverrides Service 
> to actually replace the old implementation: 
> 
> public static void contributeAliasOverrides( 
> @InjectService("myLocator") PageTemplateLocator locator, 
> Configuration configuration) { 
> 
>configuration.add( 
>  AliasContribution.create( 
>  PageTemplateLocator.class, locator)); 

Great, this works - thanx a lot!

Just for clarification: the specified id has to be used anywhere else,
right? E.g. for us the service in question is the MarkupWriterFactory,
and previously we also had this in our AppModule:

public static PageResponseRenderer decoratePageResponseRenderer(
@InjectService("PageMarkupRenderer")
final PageMarkupRenderer markupRenderer,
@InjectService("MarkupWriterFactory")
final MarkupWriterFactory markupWriterFactory,
final Object delegate )

which we have to change to @InjectService("myMarkupWriterFactory") then.
Is this the intended way? Is it guaranteed, that T5 does not reference
the MarkupWriterFactory implementation by the id "MarkupWriterFactory"?

Thanx && cheers,
Martin 


> 
> 
> g, 
> kris 
> 
> 
> 
> Martin Grotzke
> <[EMAIL PROTECTED]> 
> 
> 02.07.2007 10:00 
> Bitte antworten an
>  "Tapestry users"
> 
> 
> 
> 
> 
>An
> Tapestry users
>  
> Kopie
> 
> Thema
> RE: T5 Decoupling
> a Template From
> its Component
> Class
> 
> 
> 
> 
> 
> 
> 
> 
> > Digging through the code I notice there is a PageTemplateLocator
> > interface which seems like the appropriate service to override. What
> I
> > have tried is to add the following method to my AppModule class
> > 
> > 
> > public static void bind(ServiceBinder binder) {
> >   ServiceBindingOptions options = 
> >   binder.bind(
> >
>  PageTemplateLocator.class,
> >
>  MyPageTemplateLocatorImpl.class
> >);
> > }
> > 
> > 
> > ...but I get the following exception at startup.
> > 
> > 
> > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> already
> > been defined by
> 
> Did you solve this issue? I get the same exception with another
> Service
> that's defined in TapestryModule that I want to override in my
> AppModule
> with my custom implementation...
> 
> Thx && cheers,
> Martin
> 
> 
> On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, May 30, 2007 5:15 PM
> > > There are internal services that can be overridden to handle
> those 
> > > kinds of situations.
> > > The goal is to create something that works amazingly well for all 
> > > the more typical cases, then start going after these others.
>  Often 
> > > it will involve moving a private interface out into the public
> space
> > ..
> > 
> > 
> > 
> > 
> > Thanks Howard - I appreciate your prompt response.  However - I am
> not
> > clear if you are saying it cannot be done currently - or if you mean
> > that it can be done - but that I would be treading on somewhat
> unstable
> > ground given that the internal interfaces are subject to change.
> > 
> > Digging through the code I notice there is a PageTemplateLocator
> > interface which seems like the appropriate service to override. What
> I
> > have tried is to add the following method to my AppModule class
> > 
> > 
> > public static void bind(ServiceBinder binder) {
> >   ServiceBindingOptions options = 
> >   binder.bind(
> >
>  PageTemplateLocator.class,
> >
>  MyPageTemplateLocatorImpl.class
> >);
> > }
> > 
> > 
> > ...but I get the following exception at startup.
> > 
> > 
> > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> already
> > been defined by
> >
> org.apache

Re: [t5] no support for block parameters?

2007-07-02 Thread Dan Adams
hmm. This seems like a very clean way of doing it for more well-defined
instances but I think it might be a little too much overhead other
situations. For instance, I'll often want to define a block within a
template and then just get the values from within the block but having
to define an interface for that seems like too much. Perhaps if there
was a way of having a standard context interface which could be created
by block containing it's informal parameters. But this would require the
ability to use OGNL map access.

On Fri, 2007-06-29 at 16:07 -0700, Howard Lewis Ship wrote:
> 
> 
> 
>   ...
> 
> 
> What's missing is a way of providing context in the caller (the
> Delegate component) that is accessible inside the block.
> 
> What I've been doing is using a more indirect, but also more typesafe,
> approach of storing the data inside an Environmental service; the
> caller uses Environment.push(), and the block uses the @Environmental
> annotation to retrieve the value.  You can see this in action inside
> BeanEditForm.
> 
> On 6/29/07, Dan Adams <[EMAIL PROTECTED]> wrote:
> > In t4 you could this:
> >
> > 
> >
> > 
> >> value="ognl:components.block.getParameter('foo')" />
> > 
> >
> > Does such a thing exist in T5?
> >
> > --
> > Dan Adams
> > Senior Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set component parameters from page class

2007-07-02 Thread Martin Dietze
On Mon, July 02, 2007, Francois Armand wrote:

> I'm not sure I have correctly understood your concern, so excuse me if I 
> answer to something else ;)
> When you have a component with parameter, you have two way to specify it 
> the actual parameter value :
> - in the template, with "paramname=bindingtype:value" ;
> - in the java code, thanks to "@Component(parameters =..." tag.

Yes, this is how I found it in the documentation. However I'd
like to be able to do something like:

| @Component(id="myInput")
| private TextField _myInput;

[...]

| _myInput.setDisabled(true);

Why this? I try to create encapsulate frequently-needed units
from my templates as components. E.g. you may want to use the
same HTML template (plus page class) for creating a user as
well as for modifying a user. Depending on the application
there may be some differences between the two applications of
the component, i.e. when modifying a user some properties are
read-only. 

Of course I can accomplish this with the code you posted, but 
this requires me to add the appropriate "parameters" annotation,
"paramname=bindingtype:value" plus a getter and setter for each
input I want to handle. Since the code already is pretty lengthy
anyway this will make it even messier.  

Doing this by a single setter per input at beginRender() would
be much simpler and readable.

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Was ist der Unterschied zwischen einer Bratsche und einer Waschmaschine?
Die Waschmaschine vibriert, kommt erst am Ende ins Schleudern, und was 
rauskommt, ist sauber.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set component parameters from page class

2007-07-02 Thread Martin Dietze
On Mon, July 02, 2007, Massimo Lusetti wrote:

> > I'd like to set some component paramameters ("disabled" for
> >inputs) from within my page classes. As far as I've seen so far
> >the usual way to do this would be to put a "name=${prop:value}"
> >attribute into my template. Can this also be done by using a
> >simple setter in my Java code? This would improv the templates'
> >readability a lot!
> 
> Search through the archives for and old thread from the early days of
> T5, maybe you will find some hints.

Have you got any hint regarding title / keywords? I did a
search before I posted, but I did not find anyting appropriate,
maybe I just did not look for the right thing...

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Albert Camus wrote that the only serious question is whether to kill yourself
or not.  Tom Robbins wrote that the only serious question is whether time has
a beginning and an end.  Camus clearly got up on the wrong side of bed, and
Robbins must have forgotten to set the alarm.  -- Tom Robbins

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set component parameters from page class

2007-07-02 Thread Francois Armand

Martin Dietze wrote:

Hi,

 I'd like to set some component paramameters ("disabled" for
inputs) from within my page classes. As far as I've seen so far
the usual way to do this would be to put a "name=${prop:value}"
attribute into my template. Can this also be done by using a
simple setter in my Java code? This would improv the templates'
readability a lot!
I'm not sure I have correctly understood your concern, so excuse me if I 
answer to something else ;)
When you have a component with parameter, you have two way to specify it 
the actual parameter value :

- in the template, with "paramname=bindingtype:value" ;
- in the java code, thanks to "@Component(parameters =..." tag.

You can find documentation here :
http://tapestry.apache.org/tapestry5/tapestry-core/guide/component-classes.html
http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html

Francois

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Accessing ThreadLocale in BaseEngine

2007-07-02 Thread munich
Does anyone know how to access ThreadLocale (in order to change it)
inside a BaseEngine class (a class extending BaseEngine) ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T4.1.2 Question - libs that changed

2007-07-02 Thread Jan Vissers

Hi,

In order for T4.1.1 to operate properly on OC4J, I had to 'tweak' some 
hivemind stuff in 1.1.1
That's the reason why I am now asking which T4.1.2 libraries in the 
distribution have actually been changed.


Only the tapestry-[]-4.1.2.jar and ognl-2.7.jar ones?

Thanks,
-J.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Selenium problem with T4.1.2

2007-07-02 Thread Geoff Callender

Hi,

My Selenium tests that worked with T4.1.1 now fail with T4.1.2.  They  
still work just fine with Selenium IDE but not in Selenium TestRunner  
which runs the whole suite in an IFRAME.


It looks like client-side validation, which used to work, is now dead  
in TestRunner.  Could this be the cause...


[Exception... "'Permission denied to get property  
HTMLDocument._parentWindow' when calling method:  
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e  
(NS_ERROR_XPC_JS_THREW_STRING)" location: "" data: no]


Firebug shows that error whenever you arrive in a page with a form.

I found a similar report but no solution: http://forums.openqa.org/ 
thread.jspa?threadID=4638&tstart=111


Suggestions, anyone?

Regards,

Geoff


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Set component parameters from page class

2007-07-02 Thread Massimo Lusetti

On 7/2/07, Martin Dietze <[EMAIL PROTECTED]> wrote:


Hi,

 I'd like to set some component paramameters ("disabled" for
inputs) from within my page classes. As far as I've seen so far
the usual way to do this would be to put a "name=${prop:value}"
attribute into my template. Can this also be done by using a
simple setter in my Java code? This would improv the templates'
readability a lot!


Search through the archives for and old thread from the early days of
T5, maybe you will find some hints.

--
Massimo
http://meridio.blogspot.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 optional css for component

2007-07-02 Thread Kristian Marinkovic
you can add additional HTML nodes to your document whenever you 
want. all you need is the MarkupWriter:

Element e = writer.getDocument().getRootElement().find("head");
e.element("link",) // adds new element

you could also contribute a css helper class that implements 
PageRenderCommand
to the contributePageRenderInitializer service. any component could then 
reference
this object through

@Enviromental
CSSHelper css;

...
css.addCss("");

when the cleanup method is invoked you could use the first code snippet to 
generate
a link node for every contributed css file. 

g,
kris





"Janko Muzykant" <[EMAIL PROTECTED]> 
02.07.2007 14:41
Bitte antworten an
"Tapestry users" 


An
"Tapestry users" 
Kopie

Thema
Re: T5 optional css for component






hi Marcus,
this solution is perfect provided i have a 
template defined separately for each page. but usually this is written 
once
in some "Border" or "Layout" component's template. In such a case I cannot
predict how many css links will be placed inside  section because 
many
pages will use the same layout component.

I would need something like this:

(Layout.html)


   
  
   


(Layout.java)

class Layout {
  private List cssCollection;
  ...
}

but the question is: how to fill up the cssCollection array with css links
of all components of given page before the page starts rendering?

On 7/2/07, Marcus <[EMAIL PROTECTED]> wrote:
>
> Hi Janko,
>
> You could try:
>
> @Inject
> @Path("context:assets/css/layout.css")
> private Asset _layoutCss;
>
> public Asset getLayoutCss() {
>if (yourCondition)
>   return _layoutCss;
>else
>   return "";
> }
>
>
> 
>
> 
>
>
> Marcus
>



Re: T5 How to Override the default banner message (Errors component)

2007-07-02 Thread Ulrich Stärk
Create a directory org/apache/tapestry/corelib/components/ in your 
source directory and place an Errors.properties file there. If you also 
want to override the default validation messages place a 
ValidationMessages.properties file in org/apache/tapestry/corelib/internal/.


Uli

Marcus schrieb:

Hi,

Is there any way to override the banner message displayed above the errors?
( component)
The default value is "You must correct the following errors before you may
continue.".
I have tried in Application Message Catalog (WEB-INF/app.properties), but
:-(
default-banner=Other Message

Thanks in advance,

Marcus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 optional css for component

2007-07-02 Thread Janko Muzykant

hi Marcus,
this solution is perfect provided i have a 
template defined separately for each page. but usually this is written once
in some "Border" or "Layout" component's template. In such a case I cannot
predict how many css links will be placed inside  section because many
pages will use the same layout component.

I would need something like this:

(Layout.html)


  
 
  


(Layout.java)

class Layout {
 private List cssCollection;
 ...
}

but the question is: how to fill up the cssCollection array with css links
of all components of given page before the page starts rendering?

On 7/2/07, Marcus <[EMAIL PROTECTED]> wrote:


Hi Janko,

You could try:

@Inject
@Path("context:assets/css/layout.css")
private Asset _layoutCss;

public Asset getLayoutCss() {
   if (yourCondition)
  return _layoutCss;
   else
  return "";
}



   



Marcus



T5 How to Override the default banner message (Errors component)

2007-07-02 Thread Marcus

Hi,

Is there any way to override the banner message displayed above the errors?
( component)
The default value is "You must correct the following errors before you may
continue.".
I have tried in Application Message Catalog (WEB-INF/app.properties), but
:-(
default-banner=Other Message

Thanks in advance,

Marcus


RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Martin Grotzke
On Mon, 2007-07-02 at 11:03 +0200, Kristian Marinkovic wrote:
> 
> hi martin, 
> 
> if you use the ServiceBinder to contribute a class that implements an
> already 
> "contributed" interface you have to assign an id for your class by
> invoking withId, 
> because the Interface is no longer sufficient to identifiy the service
> 
>  binder.bind(PageTemplateLocator.class, 
> MyPageTemplateLocatorImpl.class).withId("myLocator"); 
> 
> furthermore you have to contribute to the aliasOverrides Service 
> to actually replace the old implementation: 
> 
> public static void contributeAliasOverrides( 
> @InjectService("myLocator") PageTemplateLocator locator, 
> Configuration configuration) { 
>  
>configuration.add( 
>  AliasContribution.create( 
>  PageTemplateLocator.class, locator)); 

Great, this works - thanx a lot!

Just for clarification: the specified id has to be used anywhere else,
right? E.g. for us the service in question is the MarkupWriterFactory,
and previously we also had this in our AppModule:

public static PageResponseRenderer decoratePageResponseRenderer(
@InjectService("PageMarkupRenderer")
final PageMarkupRenderer markupRenderer,
@InjectService("MarkupWriterFactory")
final MarkupWriterFactory markupWriterFactory,
final Object delegate )

which we have to change to @InjectService("myMarkupWriterFactory") then.
Is this the intended way? Is it guaranteed, that T5 does not reference
the MarkupWriterFactory implementation by the id "MarkupWriterFactory"?

Thanx && cheers,
Martin 


> 
> 
> g, 
> kris 
> 
> 
> 
> Martin Grotzke
> <[EMAIL PROTECTED]> 
> 
> 02.07.2007 10:00 
> Bitte antworten an
>  "Tapestry users"
> 
> 
> 
> 
> 
>An
> Tapestry users
>  
> Kopie
> 
> Thema
> RE: T5 Decoupling
> a Template From
> its Component
> Class
> 
> 
> 
> 
> 
> 
> 
> 
> > Digging through the code I notice there is a PageTemplateLocator
> > interface which seems like the appropriate service to override. What
> I
> > have tried is to add the following method to my AppModule class
> > 
> > 
> > public static void bind(ServiceBinder binder) {
> >   ServiceBindingOptions options = 
> >   binder.bind(
> >
>  PageTemplateLocator.class,
> >
>  MyPageTemplateLocatorImpl.class
> >);
> > }
> > 
> > 
> > ...but I get the following exception at startup.
> > 
> > 
> > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> already
> > been defined by
> 
> Did you solve this issue? I get the same exception with another
> Service
> that's defined in TapestryModule that I want to override in my
> AppModule
> with my custom implementation...
> 
> Thx && cheers,
> Martin
> 
> 
> On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > > Sent: Wednesday, May 30, 2007 5:15 PM
> > > There are internal services that can be overridden to handle
> those 
> > > kinds of situations.
> > > The goal is to create something that works amazingly well for all 
> > > the more typical cases, then start going after these others.
>  Often 
> > > it will involve moving a private interface out into the public
> space
> > ..
> > 
> > 
> > 
> > 
> > Thanks Howard - I appreciate your prompt response.  However - I am
> not
> > clear if you are saying it cannot be done currently - or if you mean
> > that it can be done - but that I would be treading on somewhat
> unstable
> > ground given that the internal interfaces are subject to change.
> > 
> > Digging through the code I notice there is a PageTemplateLocator
> > interface which seems like the appropriate service to override. What
> I
> > have tried is to add the following method to my AppModule class
> > 
> > 
> > public static void bind(ServiceBinder binder) {
> >   ServiceBindingOptions options = 
> >   binder.bind(
> >
>  PageTemplateLocator.class,
> >
>  MyPageTemplateLocatorImpl.class
> >);
> > }
> > 
> > 
> > ...but I get the following exception at startup.
> > 
> > 
> > java.lang.RuntimeException: Service id 'PageTemplateLocator' has
> already
> > been defined by
> >
> org.apache.tapestry.internal.services.InternalModule.build(AssetFactory,
> > ComponentClassResolver) (at InternalModule.java:231) and may not be
> > redefined by
> > org.example.myapp.services.AppModule$MyPageTemplateLocatorImpl() (at
> > AppModule.java:159). You should rename one of the service builder
> > methods.
> > 
> > 
> > 
> > 
> > Am I wasting my time trying this? I can tolerate a certain amount of
> > instability when pulling in subsequent revisions of Tap5 - however -
> I
> > would like to get a proof of concept up and running if at all
> possible.
> > 
> > Any thoughts on thi

Re: T5 optional css for component

2007-07-02 Thread Marcus

Hi Janko,

You could try:

@Inject
@Path("context:assets/css/layout.css")
private Asset _layoutCss;

public Asset getLayoutCss() {
  if (yourCondition)
 return _layoutCss;
  else
 return "";
}



  



Marcus


Re: how to overwrite the Locale in BaseEngine

2007-07-02 Thread Hans Drexler
On Mon, 02 Jul 2007 13:05:39 +0200, munich wrote
> What would be the most reliable way to overwrite the Locale for the 
> Component  and Page messages inside an extended BaseEngine?
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Our code:

private static final Locale NL = new Locale("nl","NL");
public final void setLocale(Locale locale) {
if (getLocale() == null ) {
super.setlocale(NL);
} else {
super.setLocale(locale);
} 



Hans Drexler
GeoTax en WOZ-Support b.v.
e: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to overwrite the Locale in BaseEngine

2007-07-02 Thread munich
What would be the most reliable way to overwrite the Locale for the Component  
and Page messages inside an extended BaseEngine?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 optional css for component

2007-07-02 Thread Janko Muzykant

hi Erik,
thank you for your answer, but it seems not to be so easy. all style links
should be placed in the  section and if i try to use following:


 <*link* rel="stylesheet" href="arkusz.*css* " type="text/*css*" />


css link will be printed out exactly in place where component is used on the
page, not inside 


On 7/2/07, Erik Vullings <[EMAIL PROTECTED]> wrote:


Hi Janko,

In your html template, you could use:

Include css file

do something else



Cheers
Erik

On 7/2/07, Janko Muzykant <[EMAIL PROTECTED]> wrote:
>
> hi all,
> i would like to have an optional css for each of my components.
optional,
> because depending on component's parameter i would like/wouldn't like to
> include its css link. Lets imagine edit box with calendar for example -
> depending on parameter provided in template file, calendar's css file
> should
> or shouldn't be included in generated page.
>
> How may achieve something like this using T5?
>
> regards,
> m.
>



tapestry.InfrastructureOverrides example?

2007-07-02 Thread munich
Has anyone got an example of how to use the tapestry.InfrastructureOverrides 
hook? 

I would like to overwrite the Locale and in order to do so also inject the 
tapestry.globals.WebContext to such a service (and then overwrite the Locale 
depending on the WebContext).


Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 optional css for component

2007-07-02 Thread Erik Vullings

Hi Janko,

In your html template, you could use:
   
   Include css file
   
   do something else
   
   

Cheers
Erik

On 7/2/07, Janko Muzykant <[EMAIL PROTECTED]> wrote:


hi all,
i would like to have an optional css for each of my components. optional,
because depending on component's parameter i would like/wouldn't like to
include its css link. Lets imagine edit box with calendar for example -
depending on parameter provided in template file, calendar's css file
should
or shouldn't be included in generated page.

How may achieve something like this using T5?

regards,
m.



Re: Need Quick Help on else statement

2007-07-02 Thread Erik Vullings

Hi Eko,

   
   Whatever
   Please select an object first!
   

Cheers
Erik

On 7/2/07, Eko S.W. <[EMAIL PROTECTED]> wrote:


Dear community,

Is there else clause in  construct ???
I've try (but maybe not hard), but can not find it.
That is, is there an else if you use  ???

* I imagine it to be like this :





Currently, to give the same behaviour I create a getIfSummaryActive
method and a getIfSummaryNotActive, like this:








Not perfect, but it's works...

Thanks in advance
--
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Set component parameters from page class

2007-07-02 Thread Martin Dietze
Hi,

 I'd like to set some component paramameters ("disabled" for
inputs) from within my page classes. As far as I've seen so far
the usual way to do this would be to put a "name=${prop:value}"
attribute into my template. Can this also be done by using a
simple setter in my Java code? This would improv the templates'
readability a lot!

Cheers,

Martin

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Perl ist der gegl�ckte Versuch, einen braindump direkt ausf�hrbar zu
machen.  -- Lutz Donnerhacke in dasr

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Need Quick Help on else statement

2007-07-02 Thread Eko S.W.

Dear community,

Is there else clause in  construct ???
I've try (but maybe not hard), but can not find it.
That is, is there an else if you use  ???

* I imagine it to be like this :

   



Currently, to give the same behaviour I create a getIfSummaryActive
method and a getIfSummaryNotActive, like this:








Not perfect, but it's works...

Thanks in advance
--
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 XHTML compliant markup

2007-07-02 Thread Martin Grotzke
On Fri, 2007-06-29 at 11:57 -0700, Howard Lewis Ship wrote:
> This is an unimplemented feature; currently Tapestry isn't smart
> enough to output well-formed markup just because the template
> specified an XML doctype. Please check JIRA and add an issue if not
> present.
I couldn't find an appropriate issue, so I created
https://issues.apache.org/jira/browse/TAPESTRY-1621

Cheers,
Martin


> 
> On 6/19/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > On Mon, 2007-06-18 at 20:21 +0200, Martin Grotzke wrote:
> > > Our template uses the following DOCTYPE definition:
> > >
> > >  > >  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > >  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> > >
> > > What's wrong with this to get well-formed XML?
> > Or is the doctype correct and s.th. else might be the reason
> > for the not well-formed xml?
> >
> > Cheers,
> > Martin
> >
> >
> > >
> > > Thx && cheers,
> > > Martin
> > >
> > >
> > >
> > >
> > > On Mon, 2007-06-18 at 10:29 -0700, Howard Lewis Ship wrote:
> > > > To elaborate; Tapestry uses the  of the component template
> > > > to determine the type of markup it will send; when the !DOCTYPE is
> > > > omitted, it is assumed to be legacy HTML as defined by SGML, where
> > > > many element are unclosed.  When you provide an explicit !DOCTYPE,
> > > > Tapestry switches over to rendering out well-formed XML.
> > > >
> > > > On 6/18/07, Robin Ericsson <[EMAIL PROTECTED]> wrote:
> > > > > On 6/18/07, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > T5 currently renders markup that is not XHTML compliant.
> > > > >
> > > > > Yes and no.
> > > > >
> > > > > > E.g. the element ' > > > > > content="text/html;
> > > > > > charset=utf-8" />' is rendered as '' - the tag is not closed
> > > > > > properly.
> > > > > >
> > > > > > Is there any way to force T5 to generate XHTML compliant markup?
> > > > >
> > > > > If your template uses HTML (SGML) markup, T5 generates HTML markup, if
> > > > > your template uses XHTML, T5 generates XHTML. See previous posts on
> > > > > this list.
> > > > >
> > > > > --
> > > > > regards,
> > > > > Robin
> > > > >
> > > > > -
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > --
> > Martin Grotzke
> > http://www.javakaffee.de/blog/
> >
> >
> 
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/


signature.asc
Description: This is a digitally signed message part


T5 optional css for component

2007-07-02 Thread Janko Muzykant

hi all,
i would like to have an optional css for each of my components. optional,
because depending on component's parameter i would like/wouldn't like to
include its css link. Lets imagine edit box with calendar for example -
depending on parameter provided in template file, calendar's css file should
or shouldn't be included in generated page.

How may achieve something like this using T5?

regards,
m.


Re: Why suddenly all my pages in Tapestry seems to be missing?

2007-07-02 Thread Eko S.W.

Yes!!!
That was true.
I have relocated all my HTML pages in src/main/webapp/WEB-INF, but not
in main/resources (somehow there are still weird behaviour if put them
here)

And all *.html were saved... I use local SVN server :p

Thanks for your reply,
Love u very much,
Eko SW

http://swdev.blogs.friendster.com/my_blog/

2007/6/26, Daniel Jue <[EMAIL PROTECTED]>:

> I put all html pages in the same directory as java class.
>
> What am I doing wrong?

That's what's wrong!

I hope you have backups.
mvn clean will delete the target directory, where your class files go.

your templates are supposed to go in

main/resources

Please see how the Tapestry Archetype samples set up the project's
directory structure.  When you go to compile the application, mvn (or
Eclipse) will combine your templates and your class files in the
Target directory.

I wish I had better news for you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Best wishes,
Eko SW
http://swdev.blogs.friendster.com/my_blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Kristian Marinkovic
hi martin,

if you use the ServiceBinder to contribute a class that implements an 
already
"contributed" interface you have to assign an id for your class by 
invoking withId,
because the Interface is no longer sufficient to identifiy the service

 binder.bind(PageTemplateLocator.class,
MyPageTemplateLocatorImpl.class).withId("myLocator");

furthermore you have to contribute to the aliasOverrides Service
to actually replace the old implementation:

public static void contributeAliasOverrides(
@InjectService("myLocator") PageTemplateLocator locator,
Configuration configuration) {
 
   configuration.add(
 AliasContribution.create(
 PageTemplateLocator.class, locator));


g,
kris




Martin Grotzke <[EMAIL PROTECTED]> 
02.07.2007 10:00
Bitte antworten an
"Tapestry users" 


An
Tapestry users 
Kopie

Thema
RE: T5 Decoupling a Template From its Component Class






> Digging through the code I notice there is a PageTemplateLocator
> interface which seems like the appropriate service to override. What I
> have tried is to add the following method to my AppModule class
> 
> 
> public static void bind(ServiceBinder binder) {
>   ServiceBindingOptions options = 
>binder.bind(
> PageTemplateLocator.class,
> MyPageTemplateLocatorImpl.class
>);
> }
> 
> 
> ...but I get the following exception at startup.
> 
> 
> java.lang.RuntimeException: Service id 'PageTemplateLocator' has already
> been defined by

Did you solve this issue? I get the same exception with another Service
that's defined in TapestryModule that I want to override in my AppModule
with my custom implementation...

Thx && cheers,
Martin


On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, May 30, 2007 5:15 PM
> > There are internal services that can be overridden to handle those 
> > kinds of situations.
> > The goal is to create something that works amazingly well for all 
> > the more typical cases, then start going after these others.  Often 
> > it will involve moving a private interface out into the public space
> ..
> 
> 
> 
> 
> Thanks Howard - I appreciate your prompt response.  However - I am not
> clear if you are saying it cannot be done currently - or if you mean
> that it can be done - but that I would be treading on somewhat unstable
> ground given that the internal interfaces are subject to change.
> 
> Digging through the code I notice there is a PageTemplateLocator
> interface which seems like the appropriate service to override. What I
> have tried is to add the following method to my AppModule class
> 
> 
> public static void bind(ServiceBinder binder) {
>   ServiceBindingOptions options = 
>binder.bind(
> PageTemplateLocator.class,
> MyPageTemplateLocatorImpl.class
>);
> }
> 
> 
> ...but I get the following exception at startup.
> 
> 
> java.lang.RuntimeException: Service id 'PageTemplateLocator' has already
> been defined by
> org.apache.tapestry.internal.services.InternalModule.build(AssetFactory,
> ComponentClassResolver) (at InternalModule.java:231) and may not be
> redefined by
> org.example.myapp.services.AppModule$MyPageTemplateLocatorImpl() (at
> AppModule.java:159). You should rename one of the service builder
> methods.
> 
> 
> 
> 
> Am I wasting my time trying this? I can tolerate a certain amount of
> instability when pulling in subsequent revisions of Tap5 - however - I
> would like to get a proof of concept up and running if at all possible.
> 
> Any thoughts on this?
> 
> Thanks again.
> 
> David Kendall
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: T5 Decoupling a Template From its Component Class

2007-07-02 Thread Martin Grotzke
> Digging through the code I notice there is a PageTemplateLocator
> interface which seems like the appropriate service to override. What I
> have tried is to add the following method to my AppModule class
> 
> 
> public static void bind(ServiceBinder binder) {
>   ServiceBindingOptions options = 
>   binder.bind(
>   PageTemplateLocator.class,
>   MyPageTemplateLocatorImpl.class
>   );
> }
> 
> 
> ...but I get the following exception at startup.
> 
> 
> java.lang.RuntimeException: Service id 'PageTemplateLocator' has already
> been defined by

Did you solve this issue? I get the same exception with another Service
that's defined in TapestryModule that I want to override in my AppModule
with my custom implementation...

Thx && cheers,
Martin


On Wed, 2007-05-30 at 19:17 -0700, David Kendall wrote:
> > From: Howard Lewis Ship [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, May 30, 2007 5:15 PM
> > There are internal services that can be overridden to handle those 
> > kinds of situations.
> > The goal is to create something that works amazingly well for all 
> > the more typical cases, then start going after these others.  Often 
> > it will involve moving a private interface out into the public space
> ..
> 
> 
> 
> 
> Thanks Howard - I appreciate your prompt response.  However - I am not
> clear if you are saying it cannot be done currently - or if you mean
> that it can be done - but that I would be treading on somewhat unstable
> ground given that the internal interfaces are subject to change.
> 
> Digging through the code I notice there is a PageTemplateLocator
> interface which seems like the appropriate service to override. What I
> have tried is to add the following method to my AppModule class
> 
> 
> public static void bind(ServiceBinder binder) {
>   ServiceBindingOptions options = 
>   binder.bind(
>   PageTemplateLocator.class,
>   MyPageTemplateLocatorImpl.class
>   );
> }
> 
> 
> ...but I get the following exception at startup.
> 
> 
> java.lang.RuntimeException: Service id 'PageTemplateLocator' has already
> been defined by
> org.apache.tapestry.internal.services.InternalModule.build(AssetFactory,
> ComponentClassResolver) (at InternalModule.java:231) and may not be
> redefined by
> org.example.myapp.services.AppModule$MyPageTemplateLocatorImpl() (at
> AppModule.java:159). You should rename one of the service builder
> methods.
> 
> 
> 
> 
> Am I wasting my time trying this? I can tolerate a certain amount of
> instability when pulling in subsequent revisions of Tap5 - however - I
> would like to get a proof of concept up and running if at all possible.
> 
> Any thoughts on this?
> 
> Thanks again.
> 
> David Kendall
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/


signature.asc
Description: This is a digitally signed message part


Re: getInfrastructure() is null

2007-07-02 Thread munich
Yes. BaseEngine is extended and the methods are overwritten.

en.domain.com should be English and fr.domain.com should be French for example. 
However, as getInfrastructur() sometimes returns null, this is not working that 
way.

 Original-Nachricht 
Datum: Mon, 2 Jul 2007 08:51:55 +0200
Von: "Igor Drobiazko" <[EMAIL PROTECTED]>
An: "Tapestry users" 
Betreff: Re: getInfrastructure() is null

> Hi,
> 
> I'm not sure I understand what you want to do.
> What do you mean by "Inside BaseEngine's setLocale method".
> Do you have your own implementation of the IEngine interface or do you
> extend BaseEngine?
> 
> In both cases you have to tell tapestry to use your class. For that
> purpose
> you have the attribute 'engine-class' of your application specification.
> Is it the case?
> 
> On 7/1/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Inside BaseEngine's setLocale method, I want to overwrite the Locale,
> > depending on the domain name. However, getInfrastructure() returns null.
> >
> > How can I access the domain name alternatively?
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] documentation about @Radio and @FieldLabel in a @For loop

2007-07-02 Thread #Cyrille37#

#Cyrille37# a écrit :

Hi,

I think it miss some documentation about @Radio and @FieldLabel in a 
@For loop.
While reading the T4 documentation I could not make working those 
component together.

I've finally found the solution here :

   "Radio button labels"
   http://www.nabble.com/forum/ViewPost.jtp?post=8570558&framed=y

I've added a Jira entry :
https://issues.apache.org/jira/browse/TAPESTRY-1620



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[T4] documentation about @Radio and @FieldLabel in a @For loop

2007-07-02 Thread #Cyrille37#

Hi,

I think it miss some documentation about @Radio and @FieldLabel in a 
@For loop.
While reading the T4 documentation I could not make working those 
component together.

I've finally found the solution here :

   "Radio button labels"
   http://www.nabble.com/forum/ViewPost.jtp?post=8570558&framed=y

Perhaps someone can add this Tips in the FieldLabel documentation page.

Cheers
cyrille.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



T5.0.5: How to display rows conditionally in the Grid component?

2007-07-02 Thread Erik Vullings

Hi all,

I want to use the Grid component to display a list of questions and answers:
since there are many questions, I don't want the user to see them all at
once, but instead show them conditionally as needed. For example, when
clicking yes (answer), it will show some subsequent questions (opens another
set/category of questions). How should I do this?

Related to this: is it easy to display a boolean parameter in the Grid
component not as a checkbox but as two radio buttons (yes/no) instead? Or do
I need to implement my own block editor for that.

Thanks
Erik

PS Sorry about the many Wiki messages that were caused by me: as it happens,
I'm currently between houses, and wanted to have an off line copy of the
Wiki. I used the freeware program Webreaper to download all pages
automatically, but unfortunately, it follows all links, including the links
that say edit. And since I have an account and can automatically login, it
uses my authN cookie to access those edit pages too, and subsequently saves
them by following the save link, thereby generating all the update messages.
I'm really sorry about this, but this is also partially a limitation of this
particular Wiki (if the save/edit links would have been submit buttons, it
probably wouldn't have occurred).


Re: [T4] about JSON in Tapestry

2007-07-02 Thread #Cyrille37#

Igor Drobiazko a écrit :

Hi,

in tapestry JSON is used to render the asynchronous response to the 
client.

Lets say you have an ajax component which has some javascript.
The component provides needed data for its javascript via JSON.

I'm not sure whether it is your scenario but you could have a look at:
http://tapestry.apache.org/tapestry4.1/ajax/json.html

Thanks,

I'll try to make a page/component which live like those ajax enabled 
components.


cyrille.



br, Igor

On 7/2/07, #Cyrille37# <[EMAIL PROTECTED]> wrote:


Hi,
I can see that JSon is implemented in Tapestry4.1.x
(IJSONRender,ResponseBuilder)

Today I use JSon for communicate between Java Applet and WebApp, I've go
a Servlet that make the bridge from JSon call to the WebApp via some
Spring Beans.

Perhaps I can stop to use this Servlet and manage JSon exchanges
directly with Tapestry but I do not know where to start.

Can you give me some points please ?
Thanks
cyrille






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [T4] about JSON in Tapestry

2007-07-02 Thread Igor Drobiazko

Hi,

in tapestry JSON is used to render the asynchronous response to the client.
Lets say you have an ajax component which has some javascript.
The component provides needed data for its javascript via JSON.

I'm not sure whether it is your scenario but you could have a look at:
http://tapestry.apache.org/tapestry4.1/ajax/json.html

br, Igor

On 7/2/07, #Cyrille37# <[EMAIL PROTECTED]> wrote:


Hi,
I can see that JSon is implemented in Tapestry4.1.x
(IJSONRender,ResponseBuilder)

Today I use JSon for communicate between Java Applet and WebApp, I've go
a Servlet that make the bridge from JSon call to the WebApp via some
Spring Beans.

Perhaps I can stop to use this Servlet and manage JSon exchanges
directly with Tapestry but I do not know where to start.

Can you give me some points please ?
Thanks
cyrille




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]