Re: page generic problem

2010-01-12 Thread DH
I think T5 doens't support generic well in page class, I got some unexpected 
exceptions too.

DH

- Original Message - 
From: "Jun Tsai" 
To: "Tapestry users" 
Sent: Monday, January 11, 2010 11:44 AM
Subject: page generic problem


> hi,all
> I had meet some problem about generic type
> PageA{
> public T getEntity(){
> }
> public T setEntity(T entity){
> }
> 
> .
> }
> PageB extends PageA{
> .
> }
> When I access ${entity.name} in tml ,PageB works fine.Then I create PageC
> 
> PageC extends PageB{
> 
> }
> 
> When I access ${entity.name} in tml of PageC,Exception was thrown:
> Class java.lang.Object does not contain a property named 'name' (within
> property expression 'entity.name). Available properties: class.
> 
>   -
>   
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyNode(PropertyConduitSourceImpl.java:942)
>   -
>   
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.infoForPropertyOrMethod(PropertyConduitSourceImpl.java:932)
>   -
>   
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createGetterAndSetter(PropertyConduitSourceImpl.java:421)
>   -
>   
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:407)
>   -
>   
> org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:260)
> 
> 
> What's wrong with it? thanks.
> -- 
> regards,
> Jun Tsai
>

Re: Loop, RadioGroup and Coercion

2010-01-12 Thread antb59

After reading the documentation for LoopFormState, I found that ITERATION is
the value I want in my case.

"When the Form is submitted, the Loop will re-acquire its source and iterate
over it"

But when I used this value in my loop component, an new error is throwed :

# java.util.AbstractList$Itr.next(AbstractList.java:350)
#
org.apache.tapestry5.corelib.components.Loop.advanceVolatile(Loop.java:363)
# org.apache.tapestry5.corelib.components.Loop.access$200(Loop.java:44)
# org.apache.tapestry5.corelib.components.Loop$3.execute(Loop.java:95)
# org.apache.tapestry5.corelib.components.Loop$3.execute(Loop.java:99)
#
org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:480)
#
org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:378)
#
org.apache.tapestry5.corelib.components.Form$onAction$invocation_126248d3e0b.invokeAdvisedMethod(Form$onAction$invocation_126248d3e0b.java)
#
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71)
#
org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
#
org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54)
#
org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80)
# org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
#
org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
#
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910)
#
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081)
#
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
#
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
#
$ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java)
#
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
#
$ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java)
#
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
#
$ComponentEventRequestHandler_126248d2fe8.handle($ComponentEventRequestHandler_126248d2fe8.java)
#
$ComponentEventRequestHandler_126248d2f4e.handle($ComponentEventRequestHandler_126248d2f4e.java)
#
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
#
com.titans.surveys.services.access.AccessComponentRequestFilter.handleComponentEvent(AccessComponentRequestFilter.java:32)
#
$ComponentRequestHandler_126248d2f4f.handleComponentEvent($ComponentRequestHandler_126248d2f4f.java)
#
$ComponentRequestHandler_126248d2f41.handleComponentEvent($ComponentRequestHandler_126248d2f41.java)
#
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
# $Dispatcher_126248d2f43.dispatch($Dispatcher_126248d2f43.java)
# $Dispatcher_126248d2f3a.dispatch($Dispatcher_126248d2f3a.java)
#
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
# com.titans.surveys.services.AppModule$1.service(AppModule.java:100)
# $RequestFilter_126248d2f39.service($RequestFilter_126248d2f39.java)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
#
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
#
org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
#
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
#
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81)
#
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
#
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
# $RequestHandler_126248d2f3b.service($RequestHandler_126248d2f3b.java)
# $RequestHandler_126248d2f30.service($RequestHandler_126248d2f30.java)
#
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197)
# org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
#
$HttpServletRequestHandler_126248d2f32.servic

RE: Accessing Tapestry Services from Spring Beans

2010-01-12 Thread Jim O'Callaghan
Juan,

Thanks for the response.  I'm back on this after being diverted on other
issues for a few days.  I'm using the latest quickstart maven archetype for
Tapestry 5.1.0.5 and cobbled some xfire services into it using annotations,
based on several examples I found on the net.  The long and short of it is
that the only explicit servlet reference in my web.xml is to
XFireSpringServlet - all the other references are to servlet filters.  I'm
using TapestrySpringFilter, and not incompatibility mode.  When I set the
logging to trace for all the packages, my startup indicates that the Spring
context is initialised outside of Tapestry (as you hinted at in your earlier
email), though I am a little lost for ideas on how to influence this, as,
being the only servlet referenced, I don't know how to set it to start after
another one using n.  I would be grateful
for info on any relevant configuration params / web.xml entries you have
used to ensure the Spring context is started by Tapestry, to fulfil the
injection requirement.  My  logging output is attached - it's
long-winded but line 18 appears to be where the Spring context is
initialised (not sure if there are any tags I can use on this to stop
wrapping) - please let me know if there is any other relevant config I can
share:

12.01.2010 21:32:27,327 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.utils.Log # [Log.debug] # logLevel set to
log4j
12.01.2010 21:32:27,331 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter # [Log.debug] # confPath
set to /WEB-INF/urlrewrite.xml
12.01.2010 21:32:27,347 [] # DEBUG # org.tuckey.web.filters.urlrewrite.Conf
# [Log.debug] # XML builder factory is:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
12.01.2010 21:32:27,349 [] # DEBUG # org.tuckey.web.filters.urlrewrite.Conf
# [Log.debug] # XML Parser:
com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl
12.01.2010 21:32:27,350 [] # DEBUG # org.tuckey.web.filters.urlrewrite.Conf
# [Log.debug] # about to parse conf
12.01.2010 21:32:27,354 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.ConfHandler # [Log.debug] # Resolving to
DTD /org/tuckey/web/filters/urlrewrite/dtds/urlrewrite3.0.dtd
12.01.2010 21:32:27,363 [] # DEBUG # org.tuckey.web.filters.urlrewrite.Conf
# [Log.debug] # use-context set to true
12.01.2010 21:32:27,368 [] # DEBUG # org.tuckey.web.filters.urlrewrite.Conf
# [Log.debug] # now initialising conf
12.01.2010 21:32:27,375 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.RuleBase # [Log.debug] # loaded rule Rule
0 (/admin/flushCache.html, /admin/flushCache.jsp 0)
12.01.2010 21:32:27,377 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.NormalRule # [Log.debug] # loaded rule
Rule 0 (/admin/flushCache.html, /admin/flushCache.jsp 0)
12.01.2010 21:32:27,378 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.RuleBase # [Log.debug] # loaded rule Rule
1 (/restart.svc, / 0)
12.01.2010 21:32:27,378 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.NormalRule # [Log.debug] # loaded rule
Rule 1 (/restart.svc, / 0)
12.01.2010 21:32:27,380 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.RuleBase # [Log.debug] # loaded rule Rule
2 (^//services/(.*)$, /services/$1 1)
12.01.2010 21:32:27,380 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.NormalRule # [Log.debug] # loaded rule
Rule 2 (^//services/(.*)$, /services/$1 1)
12.01.2010 21:32:27,381 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter # [Log.debug] # inited
with 3 rules
12.01.2010 21:32:27,381 [] # DEBUG #
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter # [Log.debug] # conf is
ok
12.01.2010 21:32:27,384 [] # INFO  #
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter # [Log.info] # loaded
(conf ok)
2010-01-12 21:32:29.958:/sample-context-root:INFO:  Initializing Spring root
WebApplicationContext
12.01.2010 21:32:30,311 [] # DEBUG #
org.codehaus.xfire.transport.DefaultTransportManager #
[DefaultTransportManager.register] # Registered transport
org.codehaus.xfire.transport.local.localtransp...@7dcf98
12.01.2010 21:32:30,314 [] # DEBUG #
org.codehaus.xfire.transport.DefaultTransportManager #
[DefaultTransportManager.register] # Registered transport
org.codehaus.xfire.transport.dead.deadlettertransp...@1654104
12.01.2010 21:32:30,320 [] # DEBUG #
org.codehaus.xfire.transport.DefaultTransportManager #
[DefaultTransportManager.register] # Registered transport
org.codehaus.xfire.transport.http.soaphttptransp...@13ecbfc
12.01.2010 21:32:30,321 [] # DEBUG #
org.codehaus.xfire.transport.DefaultTransportManager #
[DefaultTransportManager.register] # Registered transport
org.codehaus.xfire.transport.http.httptransp...@1adc122
12.01.2010 21:32:30,434 [] # INFO  # com.mchange.v2.log.MLog #
[MLog.] # MLog clients using log4j logging.
12.01.2010 21:32:30,514 [] # INFO  # com.mchange.v2.c3p0.C3P0Registry #
[C3P0Registry.banner] # Initializing c3p0-0.9.1 [built 16-January-2007
14:46:42; debug? true; trace: 10]
12.01.2010 21:32:30,566 [] # DEBUG #
com.mchange.v2.c3p0.management.DynamicPooledDataSourceManagerM

Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Piero Sartini
> Differently from JPA, it also allows one to use OODBMSs, Excel, Google
> BigTable, Amazon EC2 and so on in addition to relational databases.
>
> By selecting JPA you cut of the possibility to use e.g., db4o as persistence
> engine.

I agree that JDO is a great technology. But I don't think it is useful
to switch between RDBMSs, OODBs, GraphDBs, BigTable or other
persistence strategies. If you try to abstract them away, you loose a
lot of their power.

Take the easy to use, type safe native queries of most OODBMs for an
example. Using them through JDO would force you to use JDOQL...

Also, for each of the named persistence solutions you need to know how
they work to write performant code. Take BigTable for example, without
thinking about a good schema and keys, you end up with very bad
performance. Its not possible to just throw your objects into such a
store. Looking at JPA projects, entites are often modeled with
database in mind - tis may be good or bad, but its often neccessary to
get good performance.

Of cource, JPA does not solve any of these problems - it just solves
your relational needs. But it does it well, and my argument is that
you would end up to rewrite your repositories if you try to switch
from an RDBMs to BigTable for example.

> (IMO there are far too many systems out there that routinely use a RDBMS as
> persistence engine. In many cases an OODBMS would have done the job with
> significantly less development effort.)

I agree, but I am not sure if we need all this abstraction. One of the
main advantage of an OODB is easier development - why should we
complicate things with JDO, and end up with more complexity than we
have with JPA? ;-)

  Piero

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



Using PageTester#submitForm and FormFragment

2010-01-12 Thread Christian Riedel

Hi,

I'm trying to write a simple page test for a page with a form and 
several FormFragments (wizard-style; trying out tynamo-conversation, 
good work btw). The test should simply submit the form with one fragment 
visible.
Now I'm not getting it submitted successfully because the validation 
fails - in one of the invisible fragments! Isn't the form component 
clever enough to cut out the posted data from invisible form fragments, 
when there is not javascript doing it? Is there a workaround?


Thanks,
Christian

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Olle Hallin
Once again, I recommend that you have a look at JDO.

Just like JPA, it is a standardized specification with several providers.

Differently from JPA, it also allows one to use OODBMSs, Excel, Google
BigTable, Amazon EC2 and so on in addition to relational databases.

By selecting JPA you cut of the possibility to use e.g., db4o as persistence
engine.

(IMO there are far too many systems out there that routinely use a RDBMS as
persistence engine. In many cases an OODBMS would have done the job with
significantly less development effort.)

Olle Hallin
Senior Java Developer and Architect
olle.hal...@crisp.se
www.crisp.se
http://www.linkedin.com/in/ollehallin



2010/1/12 Piero Sartini 

> > As far as I understand, javax.persistence.EntityManager is an interface,
> so,
> > there should be any mechanism to determine which impl will be used at
> > runtime, right?
>
> Right. This is part of the JPA specification. You define the
> implementation inside your persistence.xml:
> ...
> org.eclipse.persistence.jpa.PersistenceProvider
> ...
>
>Piero
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: JavaScript inside .tml breaks ZoneUpdate for IE

2010-01-12 Thread Kalle Korhonen
Or simply with @IncludeJavaScriptLibrary annotation
(http://tapestry.apache.org/tapestry5.1/guide/ajax.html). Because
Javascript files are combined, this doesn't incur additional load time
cost.

Kalle


On Tue, Jan 12, 2010 at 8:55 AM, Thiago H. de Paula Figueiredo
 wrote:
> On Tue, 12 Jan 2010 14:53:05 -0200, Moritz Gmelin 
> wrote:
>
>> Hi,
>
> Hi!
>
>>   clickme
>
> @Inject RenderSupport and use its addScript() methods instead of adding the
> JavaScript inline inside your .tml.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and
> instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: JavaScript inside .tml breaks ZoneUpdate for IE

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 14:53:05 -0200, Moritz Gmelin   
wrote:



Hi,


Hi!


   clickme


@Inject RenderSupport and use its addScript() methods instead of adding  
the JavaScript inline inside your .tml.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



JavaScript inside .tml breaks ZoneUpdate for IE

2010-01-12 Thread Moritz Gmelin
Hi,

We're having trouble with JavaScript calls in blocks that are used for zone 
updates. They work perfectly for FIrefox, Safari, etc. but show nasty errors in 
IE.

apostrophes in javascript statements are returned as ' in the returned 
block for zone updates. This irritates IE. In the example below, the 'hello 
world' statement is the breaking point.

Any thought about fixes or workarounds?

Thanks

Moritz

Here's the example page. just open the page and click on 'action' and you'll 
see the error. And the zone is not updated. Works for the other browsers though.

Page.tml

http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>

  
   clickme
  
  
  
  
  
  
  action
  



Page.java

import org.apache.tapestry5.Block;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

public class Page
{

@Inject
@Property
private Block demoBlock;

@OnEvent(component="update")
public Block onUpdate() 
{
return demoBlock;
}

}



RE: Customize Label presentation at BeanEditForm based on it's validations

2010-01-12 Thread Jim O'Callaghan
Thanks for the quick response Thiago.  By mandatory symbol I mean just any 
arbitrary indicator for the user to tell that a field is mandatory, like an 
asterisk beside the prompt etc.  I'll work around the issue - though I'd check 
in case you had already come up with an elegant fix.

Regards,
Jim.

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
Sent: 12 January 2010 15:33
To: Tapestry users
Subject: Re: Customize Label presentation at BeanEditForm based on it's
validations


On Tue, 12 Jan 2010 13:25:32 -0200, Jim O'Callaghan  
 wrote:

> Thiago,

Hi!

> I was also looking for something to give me a mandatory symbol to  
> decorate my form fields and stumbled across your post.

I'm not following you. Mandatory symbol?

> When I try your example, and
> other variations on it I've found from other sources, I get an issue that
> has previously been raised:

That was a quick example I tried to do as a proof of concept. I use  
5.1.0.5. I'm not using it on production. I'm aware of this problem.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.
http://www.arsmachina.com.br

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


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



Re: Customize Label presentation at BeanEditForm based on it's validations

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 13:25:32 -0200, Jim O'Callaghan  
 wrote:



Thiago,


Hi!

I was also looking for something to give me a mandatory symbol to  
decorate my form fields and stumbled across your post.


I'm not following you. Mandatory symbol?


When I try your example, and
other variations on it I've found from other sources, I get an issue that
has previously been raised:


That was a quick example I tried to do as a proof of concept. I use  
5.1.0.5. I'm not using it on production. I'm aware of this problem.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



RE: Customize Label presentation at BeanEditForm based on it's validations

2010-01-12 Thread Jim O'Callaghan
Thiago,

I was also looking for something to give me a mandatory symbol to decorate
my form fields and stumbled across your post.  When I try your example, and
other variations on it I've found from other sources, I get an issue that
has previously been raised:

org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading
parameter 'validate' of component core/PropertyEditBlocks:textfield: No
object of type org.apache.tapestry5.services.PropertyEditContext is
available from the Environment.  Available types are
org.apache.tapestry5.RenderSupport,
org.apache.tapestry5.ValidationDecorator,
org.apache.tapestry5.ValidationTracker,
org.apache.tapestry5.internal.services.DocumentLinker,
org.apache.tapestry5.services.BeanEditContext,
org.apache.tapestry5.services.ClientBehaviorSupport,
org.apache.tapestry5.services.FormSupport,
org.apache.tapestry5.services.Heartbeat. [at
classpath:org/apache/tapestry5/corelib/components/BeanEditor.tml, line 1]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.invoke(Comp
onentPageElementImpl.java:948)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3(Co
mponentPageElementImpl.java:925)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPha
se.callback(ComponentPageElementImpl.java:159)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AfterRender
Phase.render(ComponentPageElementImpl.java:374)
at
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.j
ava:74)
at
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRender
QueueImpl.java:121)
at 
$PageRenderQueue_126230d6e2d.render($PageRenderQueue_126230d6e2d.java)
at 
$PageRenderQueue_126230d6e24.render($PageRenderQueue_126230d6e24.java)
at
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup
(MarkupRendererTerminator.java:37)
at
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.
java:1748)
at
$MarkupRenderer_126230d6e2f.renderMarkup($MarkupRenderer_126230d6e2f.java)
at
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.
java:1732)
at
$MarkupRenderer_126230d6e2f.renderMarkup($MarkupRenderer_126230d6e2f.java)
at
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.
java:1714)
at
$MarkupRenderer_126230d6e2f.renderMarkup($MarkupRenderer_126230d6e2f.java)
at
org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.
java:1700)
at
$MarkupRenderer_126230d6e2f.renderMarkup($MarkupRenderer_126230d6e2f.java)
at
org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.
java:1681)
at
$MarkupRenderer_126230d6e2f.renderMarkup($MarkupRenderer_126230d6e2f.java)
at
org.apache.tapestry5.services.TapestryModule$22.renderMarkup(TapestryModule.
java:1662)
.
.
.
... because cleanupEnvironment() has been called in PropertyEditor and pops
the PropertyEditContext.class from the environment stack before "if
(field.isRequired()) ..."  is called in the "insideLabel(Field field,
Element element)" of whatever custom ValidationDecorator you use.  I notice
in http://issues.apache.org/jira/browse/TAP5-328 Howard mentions this has
been fixed in 5.0.16 - are you still using this version and if not have you
found a tidy workaround, or perhaps you are not using such a decorator
recently?  I see a suggested patch/fix listed in TAP5-328 though would tend
to agree with the rejection reasons for the patch.  I'm using 5.1.0.5.
Thanks.

Regards,
Jim.

-Original Message-
From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com]
Sent: 12 January 2010 00:02
To: Tapestry users
Subject: Re: Customize Label presentation at BeanEditForm based on it's
validations


Em Mon, 11 Jan 2010 21:48:05 -0200, Howard Lewis Ship 
escreveu:

> This is the function of the ValidationDecorator, look up its JavaDoc.
>
> You can override the ValidationDecorator (its' awkward but possible in
> 5.1, will be made easier in 5.2).  Look in TapestryModule, in methods
> contributeMarkupRenderer and contributePartialMarkupRenderer.

I've posted one example some time ago. The archive is here:
http://old.nabble.com/Example-of-overriding-the-default-ValidationDecorator-
td26906669s302.html#a26906669

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br

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


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additio

Re: OT: windows mobile

2010-01-12 Thread Robin Komiwes
Hi!

Maybe you cold have a look at : http://www.quirksmode.org/m/table.html

On Tue, Jan 12, 2010 at 3:29 PM, Ivano Luberti  wrote:

> Hi, I have to develop a web application for Widnows Mobile 6.1
> Anyone hear can point me to some documentation about how to configure
> properly IE Mobile ?
> It seems that Javascript is not enabled or at least that even most
> trivial javascript don't run and I cannot find a way to tweak IE
> configuration?
> I have already spent half a day on Microsoft Web site : the worst ever !
>
> --
> ==
> dott. Ivano Mario Luberti
> Archimede Informatica societa' cooperativa a r. l.
> Sede Operativa
> Via Gereschi 36 - 56126- Pisa
> tel.: +39-050- 580959
> tel/fax: +39-050-9711344
> web: www.archicoop.it
> ==
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


OT: windows mobile

2010-01-12 Thread Ivano Luberti
Hi, I have to develop a web application for Widnows Mobile 6.1
Anyone hear can point me to some documentation about how to configure
properly IE Mobile ?
It seems that Javascript is not enabled or at least that even most
trivial javascript don't run and I cannot find a way to tweak IE
configuration?
I have already spent half a day on Microsoft Web site : the worst ever !

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


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



Re: Java class reloading and Tomcat

2010-01-12 Thread Juan E. Maya
I use tomcat with tapestry and class reloading works without problems.
I don't have any special configuration. I launch tomcat from inside
eclipse using the following config file:







I hope it helps.

On Tue, Jan 12, 2010 at 3:52 AM, Baptiste Autin - Linkeo RD
 wrote:
> Hello,
>
> Really sorry to bother you with this topic, but T5 class reloading doesn't
> work for us.
> I am aware that this is not necessary related to Tapestry, but I need
> confirmation.
>
> We use Tomcat along with MyEclipse and Tapestry 5.1.0.4.
> We have tried different versions of Tomcat (the latest included).
>
> Actually, when we change the java class of a Tapestry page/component, we can
> see that the corresponding .class file is correctly deployed in the webapp
> of Tomcat, and we can check that the bytecode contains the modifications we
> made.
> But these modifications remain invisible in the page.
> If we remove this .class file and reload the page, Tapestry complains. If we
> restore the file, Tapestry stops complaining but still continues to use the
> previous version of the .class file, not the new one !
> Of course we have tried the various tips we found here and there over the
> forums (disable-caching=false, page-pool.active-window=5s,
> production-mode=false...)
> So my questions are:
> - can you confirm that there is still an issue with the "Tapestry class
> reloading feature" and Tomcat ?
> - does anyone know the magic Tomcat configuration that allows class
> reloading to work ? (we use the default configuration)
>
> Thanks,
>
> Baptiste
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Piero Sartini
> As far as I understand, javax.persistence.EntityManager is an interface, so,
> there should be any mechanism to determine which impl will be used at
> runtime, right?

Right. This is part of the JPA specification. You define the
implementation inside your persistence.xml:
...
org.eclipse.persistence.jpa.PersistenceProvider
...

Piero

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread matias.blasi

Exactly that! I am seeing the code of
src/test/java/com/kenai/tapestryjpa/example/app0/services/UserDAOImpl.java

Here you inject:

package com.kenai.tapestryjpa.example.app0.services;

import javax.persistence.EntityManager;

public class UserDAOImpl implements UserDAO {   
   
private final EntityManager entityManager;
public UserDAOImpl(EntityManager value) {
this.entityManager = value;
}
public void add(User user) {
entityManager.persist(user);
}

As far as I understand, javax.persistence.EntityManager is an interface, so,
there should be any mechanism to determine which impl will be used at
runtime, right?

Regards,
Matías.


Piero Sartini-3 wrote:
> 
>> My only question now, is "what about tapestry-jpa?" isn't it an
>> abstraction
>> for my scenario?
>> It hasn't documentation yet, but Piero, correct me if I am wrong, if I
>> use
>> the tapestry-jpa interfaces into my DAO implementation, I would be
>> de-coupled from the JPA implementation that I will be using at runtime,
>> right?
>>
>> Anyway, I don't know how I could inject a org.hibernate.EntityManager in
>> the
>> javax.persistence.EntityManager, since they don't share any interface.
> 
> You don't need the hibernate EntityManager... just inject the JPA
> EntityManager.
> I've created a demo webapp using JPA2 yesterday. You can find it
> inside the subversion repository:
> https://svn.kenai.com/svn/tapestry-jpa~main
> 
> Also I've wrote some quick notes on how to get started with tapestry-jpa:
> http://kenai.com/projects/tapestry-jpa/pages/Quickstart
> 
> They are work in progress, but maybe its still helpful.
> 
> To make everything easier, there is now also a maven2 repository for
> tapestry-jpa:
> http://tapestry-jpa.kenai.com/maven-snapshot-repository/
> 
> Hope this helps.
> 
> Piero
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-tapestry-coupled-with-Hibernate-API--tp27111015p27127798.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Piero Sartini
> My only question now, is "what about tapestry-jpa?" isn't it an abstraction
> for my scenario?
> It hasn't documentation yet, but Piero, correct me if I am wrong, if I use
> the tapestry-jpa interfaces into my DAO implementation, I would be
> de-coupled from the JPA implementation that I will be using at runtime,
> right?
>
> Anyway, I don't know how I could inject a org.hibernate.EntityManager in the
> javax.persistence.EntityManager, since they don't share any interface.

You don't need the hibernate EntityManager... just inject the JPA EntityManager.
I've created a demo webapp using JPA2 yesterday. You can find it
inside the subversion repository:
https://svn.kenai.com/svn/tapestry-jpa~main

Also I've wrote some quick notes on how to get started with tapestry-jpa:
http://kenai.com/projects/tapestry-jpa/pages/Quickstart

They are work in progress, but maybe its still helpful.

To make everything easier, there is now also a maven2 repository for
tapestry-jpa:
http://tapestry-jpa.kenai.com/maven-snapshot-repository/

Hope this helps.

Piero

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 11:32:31 -0200, matias.blasi   
wrote:



You catched me perfectly.
I'm just researching if something like I described here exists.
I'm doubting about being exagerating, perhaps this is the problem. :)


:)

My only question now, is "what about tapestry-jpa?" isn't it an  
abstraction for my scenario?


JPA is specification that defines how many things must be implemented.  
Changing implementations shouldn't make any difference to your code that  
uses JPA.
I don't consider it as an abstraction in this case because your DAO code  
that uses JPA doesn't change when the JPA implementation is changed. So  
what you need, if I'm got it right now, is already done by JPA being an  
specification.
Even when changing JPA implementatinos, I don't think you're changing  
technologies, as your code doesn't need to be changed.


It hasn't documentation yet, but Piero, correct me if I am wrong, if I  
use the tapestry-jpa interfaces into my DAO implementation, I would be

de-coupled from the JPA implementation that I will be using at runtime,
right?


I was talking about JPA vs Hibernate vs Bigtable vs DB4O vs JDO vs. etc.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Piero Sartini
> I would need some mechanism, which knows about the current data layer
> implementation I want to use (i.e. hibernate or any ohter else), then my DAO
> impl will not need to be re-written for multiples technologies.
> Anyway, that mechanism should know about the "supported" technologies and
> how to build their services (like the hibernate session)... I am not pretty
> sure, but I think this like the dom parser api (?) I remember it has a
> runtime mechanism to identify the implementation to be used, am I right?

For me, this sounds like what Hibernate, or JPA is all about -
abstract the database away from your business logic.
Now you want to abstract the database abstraction away... this does
not sound like a good idea.

  Piero

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread matias.blasi

You catched me perfectly.

I'm just researching if something like I described here exists.
I'm doubting about being exagerating, perhaps this is the problem. :)

My only question now, is "what about tapestry-jpa?" isn't it an abstraction
for my scenario?
It hasn't documentation yet, but Piero, correct me if I am wrong, if I use
the tapestry-jpa interfaces into my DAO implementation, I would be
de-coupled from the JPA implementation that I will be using at runtime,
right?

Anyway, I don't know how I could inject a org.hibernate.EntityManager in the
javax.persistence.EntityManager, since they don't share any interface.

Am I crazy? or it is something interesting? :)

Regards,
Matías.


Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, 12 Jan 2010 11:11:12 -0200, matias.blasi   
> wrote:
> 
>> public class UserDAOImpl {
>>
>> @Inject
>> private some.standard.persistence.api.Session sessionManager;
>>
>> @some.new.annotation.not.coupled.with.any.technology.CommitAfter  //  
>> <-
>> I knwo, it should be in the interface
>> @Override
>> public void createUser(User user) {
>> this.sessionManager.persist(user); // I want this code to  
>> work
>> with any persistence technology, I know that it is a very small
>> 'reutilization' but, I am thinking in all my business modules, present in
>> many applications.
>> }
>> }
> 
> I'm sorry, but it still doesn't make sense to me. A DAO is a way to  
> decouple the rest of the application of the details of the persistence,  
> but you're trying to decoulbe the DAO from the details of the persistence.  
> This looks like overengineering to me.
> 
>> I would need some mechanism, which knows about the current data layer
>> implementation I want to use (i.e. hibernate or any ohter else),
> 
> That's exactly the description of what a DAO does. What you want is a DAO  
> for your DAOs. I'm concerned with reuse and flexibility as much as you,  
> but I think you're exagerating here.
> 
>> then my DAO impl will not need to be re-written for multiples  
>> technologies.
> 
> You want an abstraction layer over and around persistence frameworks. I  
> don't know of any.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-tapestry-coupled-with-Hibernate-API--tp27111015p27127590.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Loop, RadioGroup and Coercion

2010-01-12 Thread Thiago H. de Paula Figueiredo

On Tue, 12 Jan 2010 11:18:03 -0200, antb59  wrote:


When you say "never use expansions in
component parameters", you mean this syntax

is better ?


Yes, because everytime you use an expansion to value is transformed in a  
String.



About the LoopFormState, I'm going to check this feature, I didn't know
it...
Do I have to change the LoopFormState of the loop of forms or the loop of
radio buttons ?


The ones inside Forms, I guess.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 11:11:12 -0200, matias.blasi   
wrote:



public class UserDAOImpl {

@Inject
private some.standard.persistence.api.Session sessionManager;

@some.new.annotation.not.coupled.with.any.technology.CommitAfter  //  
<-

I knwo, it should be in the interface
@Override
public void createUser(User user) {
this.sessionManager.persist(user); // I want this code to  
work

with any persistence technology, I know that it is a very small
'reutilization' but, I am thinking in all my business modules, present in
many applications.
}
}


I'm sorry, but it still doesn't make sense to me. A DAO is a way to  
decouple the rest of the application of the details of the persistence,  
but you're trying to decoulbe the DAO from the details of the persistence.  
This looks like overengineering to me.



I would need some mechanism, which knows about the current data layer
implementation I want to use (i.e. hibernate or any ohter else),


That's exactly the description of what a DAO does. What you want is a DAO  
for your DAOs. I'm concerned with reuse and flexibility as much as you,  
but I think you're exagerating here.


then my DAO impl will not need to be re-written for multiples  
technologies.


You want an abstraction layer over and around persistence frameworks. I  
don't know of any.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Loop, RadioGroup and Coercion

2010-01-12 Thread antb59

Thanks for your fast answer !

When you say "never use expansions in  
component parameters", you mean this syntax 
 
is better ?


About the LoopFormState, I'm going to check this feature, I didn't know
it...
Do I have to change the LoopFormState of the loop of forms or the loop of
radio buttons ?

regards,
Antoine.


Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, 12 Jan 2010 10:33:11 -0200, antb59  wrote:
> 
>> Hello again,
> 
> Hi again! :)
> 
>> 
>>   
>> 
> 
> It probably isn't the source of your problem, but never use expansions in  
> component parameters.
> 
>> In this case, when a form is submited, the related surveySuggestionsForm
>> didn't seem to receive the correct value for the list named  
>> "suggestions",
>> and an exception is throwed :
> 
> Try using some value of Loop's formState parameter.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Loop%2C-RadioGroup-and-Coercion-tp26944581p27127401.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread matias.blasi

Thank you again Thiago,

It would have sense in the following scenario:

public class UserDAOImpl {

@Inject
private some.standard.persistence.api.Session sessionManager;

@some.new.annotation.not.coupled.with.any.technology.CommitAfter  // <-
I knwo, it should be in the interface
@Override
public void createUser(User user) {
this.sessionManager.persist(user); // I want this code to work
with any persistence technology, I know that it is a very small
'reutilization' but, I am thinking in all my business modules, present in
many applications.
}
}

I would need some mechanism, which knows about the current data layer
implementation I want to use (i.e. hibernate or any ohter else), then my DAO
impl will not need to be re-written for multiples technologies.
Anyway, that mechanism should know about the "supported" technologies and
how to build their services (like the hibernate session)... I am not pretty
sure, but I think this like the dom parser api (?) I remember it has a
runtime mechanism to identify the implementation to be used, am I right?



Thiago H. de Paula Figueiredo wrote:
> 
> On Tue, 12 Jan 2010 10:33:33 -0200, matias.blasi   
> wrote:
> 
>> Thank you Thiago,
> 
> :)
> 
>> I use that too, but I am trying to de-couple the DAO implementation from  
>> the underlaying database access. Then I would be able to re-use my  
>> module (with its DAOs) with any other data access technology.
> 
> The DAO implementation is the exactly the one which is tied to a given  
> data access technology (so everything else is independent), so you're  
> trying to create a two-layer persistence layer. ;) I'm sorry, but it  
> doesn't make sense to me.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-tapestry-coupled-with-Hibernate-API--tp27111015p27127315.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Loop, RadioGroup and Coercion

2010-01-12 Thread Thiago H. de Paula Figueiredo

On Tue, 12 Jan 2010 10:33:11 -0200, antb59  wrote:


Hello again,


Hi again! :)



  



It probably isn't the source of your problem, but never use expansions in  
component parameters.



In this case, when a form is submited, the related surveySuggestionsForm
didn't seem to receive the correct value for the list named  
"suggestions",

and an exception is throwed :


Try using some value of Loop's formState parameter.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Res: Customize Label presentation at BeanEditForm based on it's validations

2010-01-12 Thread Everton Agner
Thank you guys, it's perfect! I knew there was a right way to do it :)

I'll implement it here...

Everton





De: Thiago H. de Paula Figueiredo 
Para: Tapestry users 
Enviadas: Segunda-feira, 11 de Janeiro de 2010 22:01:48
Assunto: Re: Customize Label presentation at BeanEditForm based on it's 
validations

Em Mon, 11 Jan 2010 21:48:05 -0200, Howard Lewis Ship  
escreveu:

> This is the function of the ValidationDecorator, look up its JavaDoc.
> 
> You can override the ValidationDecorator (its' awkward but possible in
> 5.1, will be made easier in 5.2).  Look in TapestryModule, in methods
> contributeMarkupRenderer and contributePartialMarkupRenderer.

I've posted one example some time ago. The archive is here: 
http://old.nabble.com/Example-of-overriding-the-default-ValidationDecorator-td26906669s302.html#a26906669

--Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and 
instructor
Owner, software architect and developer, Ars Machina Tecnologia da Informação 
Ltda.
http://www.arsmachina.com.br

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


  

Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com

Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 10:33:33 -0200, matias.blasi   
wrote:



Thank you Thiago,


:)

I use that too, but I am trying to de-couple the DAO implementation from  
the underlaying database access. Then I would be able to re-use my  
module (with its DAOs) with any other data access technology.


The DAO implementation is the exactly the one which is tied to a given  
data access technology (so everything else is independent), so you're  
trying to create a two-layer persistence layer. ;) I'm sorry, but it  
doesn't make sense to me.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Is tapestry coupled with Hibernate API?

2010-01-12 Thread matias.blasi

Thank you Thiago,

I use that too, but I am trying to de-couple the DAO implementation from the
underlaying database access. Then I would be able to re-use my module (with
its DAOs) with any other data access technology.

Regards,
Matías.


Thiago H. de Paula Figueiredo wrote:
> 
> Em Mon, 11 Jan 2010 17:20:46 -0200, matias.blasi   
> escreveu:
> 
>> Anyway, I am thinking on developing some business components, as tapestry
>> modules, which should interact with the underlying database, but I don't
>> want to couple them with neither hibernate nor anyone database  
>> technology, so, I am thinking which is the most standard way to make it  
>> abstract.
> 
> There is one and its widely used: the Data Access Object design pattern  
> (DAO). I use and recommend.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da  
> Informação Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Is-tapestry-coupled-with-Hibernate-API--tp27111015p27126916.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Loop, RadioGroup and Coercion

2010-01-12 Thread antb59

Hello again,

I have a new problem related to this loop of radio buttons :

I want to make a list of forms, with each form containing a list of radio
buttons.
I can easily do that in a "static" way, with an index.tml file containing
the following lines :

...



...

And the SurveySuggestionsForm.tml :


  


  ${suggestionLoopValue.label}  

  
  



Here is the code of SurveySuggestionsForm.java


public class SurveySuggestionsForm {

private static final Logger sLogger = Logger.getLogger
(SurveyResults.class);  

@Parameter(required=true)
private int surveyId;

@Inject
private ApplicationStateManager applicationStateManager;

@Inject
private ISurveyManager mSurveyManager;

@Property(write=false)
@Persist
private User userInSession;

@Property
@Persist("SESSION")
private com.titans.surveys.model.Survey survey;

@Persist
@Property  
private Suggestion selectedSuggestion;  

@SuppressWarnings("unused")
@Property
private Suggestion suggestionLoopValue;

@Property
@Persist
private List suggestions;

@SuppressWarnings("unused")
@Property
private ValueEncoder suggestionEncoder = new
ValueEncoder () {
public String toClient (Suggestion pSuggestion) {
return (String.valueOf (suggestions.indexOf 
(pSuggestion)));
}
public Suggestion toValue (String pId) {
return (suggestions.get (Integer.parseInt (pId)));
}
};

public void beginRender() {
this.survey = mSurveyManager.findById(surveyId);
if (this.survey == null) {
sLogger.error("Survey in parameter is null");
}
else {
userInSession =
applicationStateManager.get(SessionContent.class).getUser();
this.suggestions = new 
ArrayList(survey.getSuggestions());
}
}

public String onSuccess () {
boolean resultOfVote = mSurveyManager.vote(survey, 
userInSession,
selectedSuggestion);
return null;
}

public boolean isSurveyNotNull() {
return (survey != null);
}

public boolean isUserLoggedIn() {
return (userInSession != null);
}

}


The problem is when the surveyId in parameter of the surveySuggestionsForm
component is filled in a dynamic way :


  


In this case, when a form is submited, the related surveySuggestionsForm
didn't seem to receive the correct value for the list named "suggestions",
and an exception is throwed :


org.apache.tapestry5.runtime.ComponentEventException: Index: 3, Size: 3 [at
classpath:com/titans/surveys/components/surveys/SurveySuggestionsForm.tml,
line 4]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098)
at
org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
at
org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
at
$ComponentEventRequestHandler_126227efea9.handle($ComponentEventRequestHandler_126227efea9.java)
at
org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
at
$ComponentEventRequestHandler_126227efea9.handle($ComponentEventRequestHandler_126227efea9.java)
at
org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
at
$ComponentEventRequestHandler_126227efea9.handle($ComponentEventRequestHandler_126227efea9.java)
at
$ComponentEventRequestHandler_126227efe20.handle($ComponentEventRequestHandler_126227efe20.java)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
at
com.titans.surveys.services.access.AccessComponentRequestFilter.handleComponentEvent(AccessComponentRequestFilter.java:32)
at
$ComponentRequestHandler_126227efe21.handleComponentEvent($ComponentRequestHandler_126227efe21.java)
at
$ComponentRequestHandler_126227efe13.handleComponentEvent($ComponentRequestHandler_126227efe13.java)
at
org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
at $Dispatcher_126227efe15.dispatch($Dispatcher_126227efe15.java)
at $Dispatcher_126227efe0c.dispatch($Dispatcher_126227efe0c.java)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245

Re: Does anyone deploy on Tomca6 (ubuntu)

2010-01-12 Thread Massimo Lusetti
On Tue, Jan 12, 2010 at 12:04 PM, Thiago H. de Paula Figueiredo
 wrote:

> I've chosen Ubuntu for my web hosting and I'm quite happy with it. I don't
> use the Jetty package: I dowloaded and configured it myself. The only thing
> I didn't manage to set up was a mail server, but I'd never tried it before.

This is going to go off topic but... maybe it's a matter of taste ;)

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

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



Re: Does anyone deploy on Tomca6 (ubuntu)

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 08:59:14 -0200, Massimo Lusetti   
wrote:



Ubuntu was a forced choice and I've then decided (tried) to stick with
its way of doing things, if i will have to repeat that experience
certainly i'll do something different...


I've chosen Ubuntu for my web hosting and I'm quite happy with it. I don't  
use the Jetty package: I dowloaded and configured it myself. The only  
thing I didn't manage to set up was a mail server, but I'd never tried it  
before.


--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: Does anyone deploy on Tomca6 (ubuntu)

2010-01-12 Thread Massimo Lusetti
On Tue, Jan 12, 2010 at 11:53 AM, Thiago H. de Paula Figueiredo
 wrote:

> Why don't you keep Ubuntu and install Tomcat yourself?

Ubuntu was a forced choice and I've then decided (tried) to stick with
its way of doing things, if i will have to repeat that experience
certainly i'll do something different...

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

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



Re: Does anyone deploy on Tomca6 (ubuntu)

2010-01-12 Thread Thiago H. de Paula Figueiredo
On Tue, 12 Jan 2010 07:38:43 -0200, Massimo Lusetti   
wrote:



Yep i think you're right, fortunately this is my first deploy on
ubuntu and will be the last one.


Why don't you keep Ubuntu and install Tomcat yourself?

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da  
Informação Ltda.

http://www.arsmachina.com.br

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



Re: How to handle @CommitAfter failure?

2010-01-12 Thread Massimo Lusetti
On Mon, Jan 11, 2010 at 11:58 PM, Howard Lewis Ship  wrote:

> Though to be honest, you should probable not use @CommitAfter, but
> inject the HibernateSessionManager service directly, and invoke
> commit() on it, with your own try ... finally.

And never use it on onSuccess...

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

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



Re: Does anyone deploy on Tomca6 (ubuntu)

2010-01-12 Thread Massimo Lusetti
On Mon, Jan 11, 2010 at 7:00 PM, Richard Hill  wrote:

>
> Hi Massimo,
>
> I've found that some of the packages for java-related software from
> Ubuntu might be a bit dubious. For example the default JDK is open-jdk
> and not the sun one. It's probably best to install the sun jdk and get
> tomcat from the Apache repository and not rely on Ubuntu packages.
>

Yep i think you're right, fortunately this is my first deploy on
ubuntu and will be the last one.

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

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



Java class reloading and Tomcat

2010-01-12 Thread Baptiste Autin - Linkeo RD

Hello,

Really sorry to bother you with this topic, but T5 class reloading 
doesn't work for us.
I am aware that this is not necessary related to Tapestry, but I need 
confirmation.


We use Tomcat along with MyEclipse and Tapestry 5.1.0.4.
We have tried different versions of Tomcat (the latest included).

Actually, when we change the java class of a Tapestry page/component, we 
can see that the corresponding .class file is correctly deployed in the 
webapp of Tomcat, and we can check that the bytecode contains the 
modifications we made.

But these modifications remain invisible in the page.
If we remove this .class file and reload the page, Tapestry complains. 
If we restore the file, Tapestry stops complaining but still continues 
to use the previous version of the .class file, not the new one !
Of course we have tried the various tips we found here and there over 
the forums (disable-caching=false, page-pool.active-window=5s, 
production-mode=false...)

So my questions are:
- can you confirm that there is still an issue with the "Tapestry class 
reloading feature" and Tomcat ?
- does anyone know the magic Tomcat configuration that allows class 
reloading to work ? (we use the default configuration)


Thanks,

Baptiste


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