Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread Lance Java
The page won't see the event onValidateFromActivityCode() since
activityCode is internal to the component

See the event bubbling section here
http://tapestry.apache.org/component-events.html

As an event bubbles up, the origin changes to the containing component.

So it will be onValidateFromX() where X is the id of the containing
component.
On 6 Jun 2014 22:27, "George Christman"  wrote:

> Lance, it looks as if your approach works perfectly. The only other hurdle
> left to deal with is the fact the loop exist within a component and the
> onValidate method exist within the page ;)
>
> The page can't see public void onValidateFromActivityCode(String value) but
> the component can. So the question is, how do I pass this data back to the
> page.
>
> component
>
> class HourField
>
> //Loop of activityCode fields
> @InjectComponent
> private Field activityCode;
>
> public void onValidateFromActivityCode(String value) {
> //logic
> }
>
> Page
>
> class TimeSheet
>
> @Component(id="form")
> private From form;
>
> @InjectComponent
> private HourField hourField;
>
> public void onValidateFromForm() {
>
> }
>
>
>
> On Fri, Jun 6, 2014 at 1:18 PM, Dmitry Gusev 
> wrote:
>
> > You can use SubmitNotifier + onAfterSubmit:
> >
> >
> >
> https://mail-archives.apache.org/mod_mbox/tapestry-users/201405.mbox/%3cca+v6ct9vsg+dk+jwq58cpv6b32dazmootraddk2aijp7z5d...@mail.gmail.com%3E
> >
> >
> >
> >
> > On Fri, Jun 6, 2014 at 5:20 PM, George Christman <
> gchrist...@cardaddy.com>
> > wrote:
> >
> > > Hi guys, I'm wondering if there is a way to record an error to a
> specific
> > > field within a loop and provide css markup to that field. I know this
> is
> > > really simple to do with a non looping field, just not sure if it's
> > > possible within a loop. Validate="" is not going to be an option in
> this
> > > case for me do to backend business logic being needed.
> > >
> > > Example, A loop of 14 activityCode fields and field 3, 5, 8 have
> errors.
> > Is
> > > there a way to provide markup to those specific fields? If I do
> > > recordError(activityCode, "my error"); It seems to mark up the last
> field
> > > in the array.
> > >
> > > Any thoughts?
> > >
> > > --
> > > George Christman
> > > www.CarDaddy.com
> > > P.O. Box 735
> > > Johnstown, New York
> > >
> >
> >
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>


Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread jeremias.epp...@web.de
Hi George Christman,

yes, i have followed the tapestry quickstart getting started guide, but 
it does not work.
I tried to run it from maven over 'mvn jetty:run' and also from 
netbeans, but the it run the selenium test and the selenium test goes 
wrong.

At the time I tried it, there was no Tapestry 5.4-beta 9 option.

Thanks for the information

Regards
Jeremias

On Fri 06 Jun 2014 10:20:59 PM CEST, George Christman wrote:
> Have you considered trying the Tapestry quickstart project? I haven't used
> eclipse in a while, but I think you could just create a new maven project
> in eclipse and use the following criteria.
>
>
> groupId - org.apache.tapestry
> artifactId - quickstart
> version - 5.4-beta-9
> repository - https://repository.apache.org/content/groups/staging/
>
>
>
> On Fri, Jun 6, 2014 at 11:42 AM, jeremias.epp...@web.de <
> jeremias.epp...@web.de> wrote:
>
>> Hi Daniel,
>>
>> thanks for the nice comment!
>>
>> After all the trouble tapestry works :-).
>> Only in combination with Eclipse, but this is not really a problem. I
>> have used eclipse before.
>>
>> You ask about how i can put all the jars in one war file.
>> For that i have used a stackoverflow response (
>> http://stackoverflow.com/questions/17868232/how-to-use-tomcat-8-in-eclipse
>> ). If you now add some libraries to your "dynamic web page" project.
>> Eclipse show you a hint, that the library is not in the classpath, if
>> you do an right click you get a window with two options. Select the
>> second option add jar to buildpath, it is called something like that.
>> After that you can export your project as war archive or start tomcat
>> and every library, you added before to the build path, is in your war
>> archive.
>>
>> Maven is nice and I would use it in the future, it sounds really cool a
>> package management system for java.
>>
>> Don't worry, my written and spoken English is bad, but reading English
>> isn't that hard.
>>
>> Regards
>> Jeremias
>>
>> On Fri 06 Jun 2014 03:23:29 PM CEST, Daniel Jue wrote:
>>> Hi Jeremias,
>>>
>>> I'm sorry about the difficulties you're having.  It seems to me the real
>>> issue is dependency resolution, and then making sure those dependencies
>> get
>>> seen by Tomcat.  Neither of those are a Tapestry problem -- it's just a
>>> task inherent in all Maven or Gradle based projects.  Tapestry, along
>> with
>>> thousands of other libraries, is meant to be used with dependency
>>> resolution tools like Maven or Gradle or Ant+Ivy.  You essentially MUST
>> use
>>> Maven or Gradle to avoid the pain of downloading all those jars manually.
>>>
>>> I'm also sorry that you felt you needed to switch your IDE to Eclipse.  I
>>> love Eclipse, but I didn't mean to say you couldn't use your favorite
>> IDE!
>>>  All the popular IDEs have some level of Maven support, and even if it
>> did
>>> not, there is always the command line.  Maven (or Gradle) is the key to
>>> making Tapestry projects work.  If Eclipse makes you uncomfortable, you
>>> should be able to use the IDE of your choice.  Do you have Maven
>> installed?
>>>
>>> Don't get too frustrated over this, please have faith that plenty of us
>> are
>>> using Tapestry with Tomcat--I've been doing so for over 8 years now.
>>>  Please know that it was a challenge for me as well--My first Tapestry
>>> project was the first experience with Maven, and I had to learn a little
>>> bit of Maven to get started.  I was overwhelmed on that first day (some 8
>>> years ago) but I bit the bullet and learned a little about how and why
>>> Maven works.  Let me tell you--it's a great thing to grow into a Maven
>>> expert over time--I use it in all my projects, now that I've paid my dues
>>> and I can wield it with some power.  :-)   Gradle is great too, and is
>>> often recognized as the successor to Maven.  However Maven is still very
>>> widely used and supported.
>>>
>>> What it comes down to is A depends on B, B depends on C, C depends on D
>> and
>>> E, etc.  For Maven, in your pom you just specify that you need A, and
>> Maven
>>> will seek out appropriate versions of B, C,D,E, etc.
>>>
>>> In addition to the Jars Tapestry needs for a web application, it is my
>>> experience that there are almost the same number of jars that are used
>> for
>>> the testing phase!  So not all the jars Maven uses end up in your .war
>> file.
>>>
>>> By the way, are you packaging your application into a war file?  If so,
>> how?
>>>
>>> If you use Maven or Gradle to also build your war file (recommended),
>> Maven
>>> will stick the jars you need in the appropriate place in the war file,
>> and
>>> then Tomcat will get everything it needs in the war file.  Just make sure
>>> that something you include doesn't also include a *servlet*.jar, because
>>> that will cause Tomcat to not load your app.  (That's where my first
>> email
>>> applies, using the  tag in your Maven pom to remove conflicting
>>> jars)
>>>
>>>
>>> Sometimes problems like this come about because you 

RE: "HTTP 500" / "Render queue error in BeginRender" for page with form.

2014-06-06 Thread Pitman, Andrew
Thiago,

Thanks for your quick response.  Here is the stack trace:

org.apache.tapestry5.internal.services.RenderQueueException: Render queue error 
in BeginRender[core/ExceptionReport:exceptiondisplay.loop_1]: Error serializing 
component action for component core/ExceptionReport:exceptiondisplay.loop_1: 
write beyond end of stream [at 
classpath:org/apache/tapestry5/corelib/components/ExceptionDisplay.tml, line 26]
at 
org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:81)
at 
org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:124)
at $PageRenderQueue_58f51091f2b2a.render(Unknown Source)
at $PageRenderQueue_58f51091f2b29.render(Unknown Source)
at 
org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at 
org.apache.tapestry5.services.TapestryModule$31.renderMarkup(TapestryModule.java:1994)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$30.renderMarkup(TapestryModule.java:1978)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:1960)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:1945)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:1931)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:1913)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:1894)
at $MarkupRenderer_58f51091f2b2d.renderMarkup(Unknown Source)
at $MarkupRenderer_58f51091f2b28.renderMarkup(Unknown Source)
at 
org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_58f51091f2b26.renderPageMarkup(Unknown Source)
at 
org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
at $PageResponseRenderer_58f51091f2ad3.renderPageResponse(Unknown 
Source)
at 
org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler.handleRequestException(DefaultRequestExceptionHandler.java:85)
at 
$RequestExceptionHandler_58f51091f2a93.handleRequestException(Unknown Source)
at 
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:42)
at $RequestHandler_58f51091f2a95.service(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
at $RequestHandler_58f51091f2a95.service(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
at $RequestHandler_58f51091f2a95.service(Unknown Source)
at 
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_58f51091f2a95.service(Unknown Source)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
at 
org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at 
org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
at $RequestHandler_58f51091f2a95.service(Unknown Source)
at $RequestHandler_58f51091f2a89.service(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
at 
org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_58f51091f2a8b.service(Unknown Source)
at 
org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_58f51091f2a87.service(Unknown Source)
at $HttpServletRequestHandler_58f51091f2a8b.service(Unknown Source)
at 
org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
at $HttpServletRequestHandler_58f51091f2a8b.service(Unknown Source)
at $HttpServletRequestHandler_58f51091f2a86.service(Unknown Source)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
at 
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1300)
at 
org.eclip

Re: "HTTP 500" / "Render queue error in BeginRender" for page with form.

2014-06-06 Thread Thiago H de Paula Figueiredo
On Fri, 06 Jun 2014 18:04:29 -0300, Pitman, Andrew   
wrote:



Hi all,


Hi!

Render queue error in  
BeginRender[core/ExceptionReport:exceptiondisplay.loop_1]: Error  
serializing component action for component  
core/ExceptionReport:exceptiondisplay.loop_1: write beyond end of stream


Full stack trace please.

A stack trace follows and is available upon request.  I'm using Tapestry  
5.3.7 with openjdk-1.6.0 on CentOS 6.5, and Eclipse 3.6.1 (Helios) for  
an IDE with RunJettyRun to build and test.


RunJettyRun runs by default with an embedded Jetty 6 instance. Sometimes I  
have some weird errors with it. Then I change my run configuration to use  
Jetty 8 and the problem vanishes.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



"HTTP 500" / "Render queue error in BeginRender" for page with form.

2014-06-06 Thread Pitman, Andrew
Hi all,

I've done some T4 development in the past, and now I'm trying to break into the 
T5 world.  I'm getting a peculiar error when I try to add a form to one of my 
pages.  I've dug around in the mailing list archives and on Google, but I 
didn't see anything that pertained to the specific error I'm seeing or my 
circumstances.  The error I'm getting is as follows:

HTTP ERROR 500

Problem accessing /pepe/login/page. Reason:

Render queue error in 
BeginRender[core/ExceptionReport:exceptiondisplay.loop_1]: Error serializing 
component action for component core/ExceptionReport:exceptiondisplay.loop_1: 
write beyond end of stream

A stack trace follows and is available upon request.  I'm using Tapestry 5.3.7 
with openjdk-1.6.0 on CentOS 6.5, and Eclipse 3.6.1 (Helios) for an IDE with 
RunJettyRun to build and test.

I've followed the form example on the tapestry.apache.org site, as well as the 
tapestry5-hotel-booking example app from GitHub (and there are some 
discrepancies between the two) with the same result.

Here is my LoginPage class:

public class LoginPage {

@Persist
@Property
private String userName;

@Property
private String password;

@Inject
private Authenticator authenticator;

@Component
private Form login;

@Inject
private CoreContext coreContext;

@SessionState
private UserSession userSession;

public Object onActivate() {
return userSession.isAuthenticated() ? 
MainPage.class : null;
}

void onValidateFromLogin() {
User user=authenticator.authUser(userName, 
password);
if (user != null){
// Set up user session with 
user info
userSession.setUser(user);

userSession.setAuthenticated(true);
} else {
// Record an error
login.recordError("Invalid 
login");
}
}

Object onSuccess() {
return MainPage.class;
}
}

The form in my .tml template is as so:



Username:


Password:





Everything else on that page and others in my app seem to work fine, but with 
the addition of the form, I get this error.  The error I'm getting appears to 
be generated by Jetty, and is not the usual Tapestry exception page.  Has 
anyone ever seen this error or know where I might look to find the cause of 
this error?

Thanks in advance,
Andy

[Compassion, Excellence, Reliability]


CONFIDENTIALITY NOTICE: This email may contain information belonging to BAYADA 
and is protected by law. Do not forward, copy, or otherwise disclose to anyone 
unless permitted by BAYADA or required by law. If you are not the intended 
recipient, please notify the sender immediately.





Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread George Christman
Have you considered trying the Tapestry quickstart project? I haven't used
eclipse in a while, but I think you could just create a new maven project
in eclipse and use the following criteria.


groupId - org.apache.tapestry
artifactId - quickstart
version - 5.4-beta-9
repository - https://repository.apache.org/content/groups/staging/



On Fri, Jun 6, 2014 at 11:42 AM, jeremias.epp...@web.de <
jeremias.epp...@web.de> wrote:

> Hi Daniel,
>
> thanks for the nice comment!
>
> After all the trouble tapestry works :-).
> Only in combination with Eclipse, but this is not really a problem. I
> have used eclipse before.
>
> You ask about how i can put all the jars in one war file.
> For that i have used a stackoverflow response (
> http://stackoverflow.com/questions/17868232/how-to-use-tomcat-8-in-eclipse
> ). If you now add some libraries to your "dynamic web page" project.
> Eclipse show you a hint, that the library is not in the classpath, if
> you do an right click you get a window with two options. Select the
> second option add jar to buildpath, it is called something like that.
> After that you can export your project as war archive or start tomcat
> and every library, you added before to the build path, is in your war
> archive.
>
> Maven is nice and I would use it in the future, it sounds really cool a
> package management system for java.
>
> Don't worry, my written and spoken English is bad, but reading English
> isn't that hard.
>
> Regards
> Jeremias
>
> On Fri 06 Jun 2014 03:23:29 PM CEST, Daniel Jue wrote:
> > Hi Jeremias,
> >
> > I'm sorry about the difficulties you're having.  It seems to me the real
> > issue is dependency resolution, and then making sure those dependencies
> get
> > seen by Tomcat.  Neither of those are a Tapestry problem -- it's just a
> > task inherent in all Maven or Gradle based projects.  Tapestry, along
> with
> > thousands of other libraries, is meant to be used with dependency
> > resolution tools like Maven or Gradle or Ant+Ivy.  You essentially MUST
> use
> > Maven or Gradle to avoid the pain of downloading all those jars manually.
> >
> > I'm also sorry that you felt you needed to switch your IDE to Eclipse.  I
> > love Eclipse, but I didn't mean to say you couldn't use your favorite
> IDE!
> >  All the popular IDEs have some level of Maven support, and even if it
> did
> > not, there is always the command line.  Maven (or Gradle) is the key to
> > making Tapestry projects work.  If Eclipse makes you uncomfortable, you
> > should be able to use the IDE of your choice.  Do you have Maven
> installed?
> >
> > Don't get too frustrated over this, please have faith that plenty of us
> are
> > using Tapestry with Tomcat--I've been doing so for over 8 years now.
> >  Please know that it was a challenge for me as well--My first Tapestry
> > project was the first experience with Maven, and I had to learn a little
> > bit of Maven to get started.  I was overwhelmed on that first day (some 8
> > years ago) but I bit the bullet and learned a little about how and why
> > Maven works.  Let me tell you--it's a great thing to grow into a Maven
> > expert over time--I use it in all my projects, now that I've paid my dues
> > and I can wield it with some power.  :-)   Gradle is great too, and is
> > often recognized as the successor to Maven.  However Maven is still very
> > widely used and supported.
> >
> > What it comes down to is A depends on B, B depends on C, C depends on D
> and
> > E, etc.  For Maven, in your pom you just specify that you need A, and
> Maven
> > will seek out appropriate versions of B, C,D,E, etc.
> >
> > In addition to the Jars Tapestry needs for a web application, it is my
> > experience that there are almost the same number of jars that are used
> for
> > the testing phase!  So not all the jars Maven uses end up in your .war
> file.
> >
> > By the way, are you packaging your application into a war file?  If so,
> how?
> >
> > If you use Maven or Gradle to also build your war file (recommended),
> Maven
> > will stick the jars you need in the appropriate place in the war file,
> and
> > then Tomcat will get everything it needs in the war file.  Just make sure
> > that something you include doesn't also include a *servlet*.jar, because
> > that will cause Tomcat to not load your app.  (That's where my first
> email
> > applies, using the  tag in your Maven pom to remove conflicting
> > jars)
> >
> >
> > Sometimes problems like this come about because you are at a point in
> life
> > where you are able to grow and overcome the obstacles.  Once you overcome
> > this problem you will gain intuition that will really help later on.
>  Just
> > face it with the right attitude: there is a solution to the problem and
> > it's within your abilities to figure it out.  :-)
> >
> > I hope you were able to understand my message here -- I'm trying to use
> > terms that would translate easily.
> >
> > I wish you success.
> >
> > Dan
> >
> >
> > On Fri, Jun 6

Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread George Christman
Figured it out, I needed to inject the page into the component rather than
the other way around and call form from the page. Thanks guys.


On Fri, Jun 6, 2014 at 3:27 PM, George Christman 
wrote:

> Lance, it looks as if your approach works perfectly. The only other hurdle
> left to deal with is the fact the loop exist within a component and the
> onValidate method exist within the page ;)
>
> The page can't see public void onValidateFromActivityCode(String value)
> but the component can. So the question is, how do I pass this data back to
> the page.
>
> component
>
> class HourField
>
> //Loop of activityCode fields
> @InjectComponent
> private Field activityCode;
>
> public void onValidateFromActivityCode(String value) {
> //logic
> }
>
> Page
>
> class TimeSheet
>
> @Component(id="form")
> private From form;
>
> @InjectComponent
> private HourField hourField;
>
> public void onValidateFromForm() {
>
> }
>
>
>
> On Fri, Jun 6, 2014 at 1:18 PM, Dmitry Gusev 
> wrote:
>
>> You can use SubmitNotifier + onAfterSubmit:
>>
>>
>> https://mail-archives.apache.org/mod_mbox/tapestry-users/201405.mbox/%3cca+v6ct9vsg+dk+jwq58cpv6b32dazmootraddk2aijp7z5d...@mail.gmail.com%3E
>>
>>
>>
>>
>> On Fri, Jun 6, 2014 at 5:20 PM, George Christman > >
>> wrote:
>>
>> > Hi guys, I'm wondering if there is a way to record an error to a
>> specific
>> > field within a loop and provide css markup to that field. I know this is
>> > really simple to do with a non looping field, just not sure if it's
>> > possible within a loop. Validate="" is not going to be an option in this
>> > case for me do to backend business logic being needed.
>> >
>> > Example, A loop of 14 activityCode fields and field 3, 5, 8 have
>> errors. Is
>> > there a way to provide markup to those specific fields? If I do
>> > recordError(activityCode, "my error"); It seems to mark up the last
>> field
>> > in the array.
>> >
>> > Any thoughts?
>> >
>> > --
>> > George Christman
>> > www.CarDaddy.com
>> > P.O. Box 735
>> > Johnstown, New York
>> >
>>
>>
>>
>> --
>> Dmitry Gusev
>>
>> AnjLab Team
>> http://anjlab.com
>>
>
>
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>
>


-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread George Christman
Lance, it looks as if your approach works perfectly. The only other hurdle
left to deal with is the fact the loop exist within a component and the
onValidate method exist within the page ;)

The page can't see public void onValidateFromActivityCode(String value) but
the component can. So the question is, how do I pass this data back to the
page.

component

class HourField

//Loop of activityCode fields
@InjectComponent
private Field activityCode;

public void onValidateFromActivityCode(String value) {
//logic
}

Page

class TimeSheet

@Component(id="form")
private From form;

@InjectComponent
private HourField hourField;

public void onValidateFromForm() {

}



On Fri, Jun 6, 2014 at 1:18 PM, Dmitry Gusev  wrote:

> You can use SubmitNotifier + onAfterSubmit:
>
>
> https://mail-archives.apache.org/mod_mbox/tapestry-users/201405.mbox/%3cca+v6ct9vsg+dk+jwq58cpv6b32dazmootraddk2aijp7z5d...@mail.gmail.com%3E
>
>
>
>
> On Fri, Jun 6, 2014 at 5:20 PM, George Christman 
> wrote:
>
> > Hi guys, I'm wondering if there is a way to record an error to a specific
> > field within a loop and provide css markup to that field. I know this is
> > really simple to do with a non looping field, just not sure if it's
> > possible within a loop. Validate="" is not going to be an option in this
> > case for me do to backend business logic being needed.
> >
> > Example, A loop of 14 activityCode fields and field 3, 5, 8 have errors.
> Is
> > there a way to provide markup to those specific fields? If I do
> > recordError(activityCode, "my error"); It seems to mark up the last field
> > in the array.
> >
> > Any thoughts?
> >
> > --
> > George Christman
> > www.CarDaddy.com
> > P.O. Box 735
> > Johnstown, New York
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>



-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread Dmitry Gusev
You can use SubmitNotifier + onAfterSubmit:

https://mail-archives.apache.org/mod_mbox/tapestry-users/201405.mbox/%3cca+v6ct9vsg+dk+jwq58cpv6b32dazmootraddk2aijp7z5d...@mail.gmail.com%3E




On Fri, Jun 6, 2014 at 5:20 PM, George Christman 
wrote:

> Hi guys, I'm wondering if there is a way to record an error to a specific
> field within a loop and provide css markup to that field. I know this is
> really simple to do with a non looping field, just not sure if it's
> possible within a loop. Validate="" is not going to be an option in this
> case for me do to backend business logic being needed.
>
> Example, A loop of 14 activityCode fields and field 3, 5, 8 have errors. Is
> there a way to provide markup to those specific fields? If I do
> recordError(activityCode, "my error"); It seems to mark up the last field
> in the array.
>
> Any thoughts?
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread jeremias.epp...@web.de
Hi Daniel,

thanks for the nice comment!

After all the trouble tapestry works :-).
Only in combination with Eclipse, but this is not really a problem. I 
have used eclipse before.

You ask about how i can put all the jars in one war file.
For that i have used a stackoverflow response ( 
http://stackoverflow.com/questions/17868232/how-to-use-tomcat-8-in-eclipse 
). If you now add some libraries to your "dynamic web page" project. 
Eclipse show you a hint, that the library is not in the classpath, if 
you do an right click you get a window with two options. Select the 
second option add jar to buildpath, it is called something like that. 
After that you can export your project as war archive or start tomcat 
and every library, you added before to the build path, is in your war 
archive.

Maven is nice and I would use it in the future, it sounds really cool a 
package management system for java.

Don't worry, my written and spoken English is bad, but reading English 
isn't that hard.

Regards
Jeremias

On Fri 06 Jun 2014 03:23:29 PM CEST, Daniel Jue wrote:
> Hi Jeremias,
>
> I'm sorry about the difficulties you're having.  It seems to me the real
> issue is dependency resolution, and then making sure those dependencies get
> seen by Tomcat.  Neither of those are a Tapestry problem -- it's just a
> task inherent in all Maven or Gradle based projects.  Tapestry, along with
> thousands of other libraries, is meant to be used with dependency
> resolution tools like Maven or Gradle or Ant+Ivy.  You essentially MUST use
> Maven or Gradle to avoid the pain of downloading all those jars manually.
>
> I'm also sorry that you felt you needed to switch your IDE to Eclipse.  I
> love Eclipse, but I didn't mean to say you couldn't use your favorite IDE!
>  All the popular IDEs have some level of Maven support, and even if it did
> not, there is always the command line.  Maven (or Gradle) is the key to
> making Tapestry projects work.  If Eclipse makes you uncomfortable, you
> should be able to use the IDE of your choice.  Do you have Maven installed?
>
> Don't get too frustrated over this, please have faith that plenty of us are
> using Tapestry with Tomcat--I've been doing so for over 8 years now.
>  Please know that it was a challenge for me as well--My first Tapestry
> project was the first experience with Maven, and I had to learn a little
> bit of Maven to get started.  I was overwhelmed on that first day (some 8
> years ago) but I bit the bullet and learned a little about how and why
> Maven works.  Let me tell you--it's a great thing to grow into a Maven
> expert over time--I use it in all my projects, now that I've paid my dues
> and I can wield it with some power.  :-)   Gradle is great too, and is
> often recognized as the successor to Maven.  However Maven is still very
> widely used and supported.
>
> What it comes down to is A depends on B, B depends on C, C depends on D and
> E, etc.  For Maven, in your pom you just specify that you need A, and Maven
> will seek out appropriate versions of B, C,D,E, etc.
>
> In addition to the Jars Tapestry needs for a web application, it is my
> experience that there are almost the same number of jars that are used for
> the testing phase!  So not all the jars Maven uses end up in your .war file.
>
> By the way, are you packaging your application into a war file?  If so, how?
>
> If you use Maven or Gradle to also build your war file (recommended), Maven
> will stick the jars you need in the appropriate place in the war file, and
> then Tomcat will get everything it needs in the war file.  Just make sure
> that something you include doesn't also include a *servlet*.jar, because
> that will cause Tomcat to not load your app.  (That's where my first email
> applies, using the  tag in your Maven pom to remove conflicting
> jars)
>
>
> Sometimes problems like this come about because you are at a point in life
> where you are able to grow and overcome the obstacles.  Once you overcome
> this problem you will gain intuition that will really help later on.  Just
> face it with the right attitude: there is a solution to the problem and
> it's within your abilities to figure it out.  :-)
>
> I hope you were able to understand my message here -- I'm trying to use
> terms that would translate easily.
>
> I wish you success.
>
> Dan
>
>
> On Fri, Jun 6, 2014 at 8:05 AM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
>> On Fri, 06 Jun 2014 05:51:08 -0300, jeremias.epp...@web.de <
>> jeremias.epp...@web.de> wrote:
>>
>>java.lang.ClassNotFoundException: org.apache.tapestry5.TapestryFilter
>>>
>>> That error Message is absolutly bullshit, it  totally missleading me.
>>> The real problem is that tapestry depends on a lot of jars and some of
>>> jars from tapestry have dependencies to some other libraries like
>>> hibernate, mongodb and spring and are not needed for the helloworld
>>> example.
>>>
>>
>> I'm sorry, but you're the one saying BS here. :P The error message, w

Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread Lance Java
Take a look here where I use a FieldSnapshot to record an error against a
field in a loop

http://tapestry-stitch.uklance.cloudbees.net/mapbindingdemo

Using the field directly doesn't work since it changes during loop
iteration.
On 6 Jun 2014 16:20, "George Christman"  wrote:

> Hi guys, I'm wondering if there is a way to record an error to a specific
> field within a loop and provide css markup to that field. I know this is
> really simple to do with a non looping field, just not sure if it's
> possible within a loop. Validate="" is not going to be an option in this
> case for me do to backend business logic being needed.
>
> Example, A loop of 14 activityCode fields and field 3, 5, 8 have errors. Is
> there a way to provide markup to those specific fields? If I do
> recordError(activityCode, "my error"); It seems to mark up the last field
> in the array.
>
> Any thoughts?
>
> --
> George Christman
> www.CarDaddy.com
> P.O. Box 735
> Johnstown, New York
>


Re: How to customize the Tree component

2014-06-06 Thread Lance Java
Another tree example here:
http://tapestry-stitch.uklance.cloudbees.net/databasetreedemo
On 5 Jun 2014 14:43, "Erich Gormann"  wrote:

> Dear all,
>
> I stuck in customizing the tree component for my project.
> We have a two level structure in our tree source, whihc contains at first
> level an entity "A" and a collection of type entity "B" as subentities of
> "A". They are type compatible.
>
> The problem is: only the second level links are clickable and can be
> overwritten with a link to open a page showing the details of the clicked
> entity "B". We want, that even the first level nodes of the tree show this
> behavior. We want to be able to render them as page links open pages to
> show the detail of the selected entity "A".
>
> How to override the first level nodes in the same manner than the second
> leven nodes?
>
> Any help is appreciated.
>
> Regards
> Eric
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread Thiago H de Paula Figueiredo
On Fri, 06 Jun 2014 10:20:28 -0300, George Christman  
 wrote:



Hi guys, I'm wondering if there is a way to record an error to a specific
field within a loop and provide css markup to that field. I know this is
really simple to do with a non looping field, just not sure if it's
possible within a loop. Validate="" is not going to be an option in this
case for me do to backend business logic being needed.


Actually, depending on what the logic is, you can. You need to write your  
own org.apache.tapestry5.Validator and contribute it to  
FieldValidatorSource, so you can use it in validate="". You'll probably  
need to have your validator receive some parameter containing the context  
for the validation.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread Daniel Jue
Hi Jeremias,

I'm sorry about the difficulties you're having.  It seems to me the real
issue is dependency resolution, and then making sure those dependencies get
seen by Tomcat.  Neither of those are a Tapestry problem -- it's just a
task inherent in all Maven or Gradle based projects.  Tapestry, along with
thousands of other libraries, is meant to be used with dependency
resolution tools like Maven or Gradle or Ant+Ivy.  You essentially MUST use
Maven or Gradle to avoid the pain of downloading all those jars manually.

I'm also sorry that you felt you needed to switch your IDE to Eclipse.  I
love Eclipse, but I didn't mean to say you couldn't use your favorite IDE!
 All the popular IDEs have some level of Maven support, and even if it did
not, there is always the command line.  Maven (or Gradle) is the key to
making Tapestry projects work.  If Eclipse makes you uncomfortable, you
should be able to use the IDE of your choice.  Do you have Maven installed?

Don't get too frustrated over this, please have faith that plenty of us are
using Tapestry with Tomcat--I've been doing so for over 8 years now.
 Please know that it was a challenge for me as well--My first Tapestry
project was the first experience with Maven, and I had to learn a little
bit of Maven to get started.  I was overwhelmed on that first day (some 8
years ago) but I bit the bullet and learned a little about how and why
Maven works.  Let me tell you--it's a great thing to grow into a Maven
expert over time--I use it in all my projects, now that I've paid my dues
and I can wield it with some power.  :-)   Gradle is great too, and is
often recognized as the successor to Maven.  However Maven is still very
widely used and supported.

What it comes down to is A depends on B, B depends on C, C depends on D and
E, etc.  For Maven, in your pom you just specify that you need A, and Maven
will seek out appropriate versions of B, C,D,E, etc.

In addition to the Jars Tapestry needs for a web application, it is my
experience that there are almost the same number of jars that are used for
the testing phase!  So not all the jars Maven uses end up in your .war file.

By the way, are you packaging your application into a war file?  If so, how?

If you use Maven or Gradle to also build your war file (recommended), Maven
will stick the jars you need in the appropriate place in the war file, and
then Tomcat will get everything it needs in the war file.  Just make sure
that something you include doesn't also include a *servlet*.jar, because
that will cause Tomcat to not load your app.  (That's where my first email
applies, using the  tag in your Maven pom to remove conflicting
jars)


Sometimes problems like this come about because you are at a point in life
where you are able to grow and overcome the obstacles.  Once you overcome
this problem you will gain intuition that will really help later on.  Just
face it with the right attitude: there is a solution to the problem and
it's within your abilities to figure it out.  :-)

I hope you were able to understand my message here -- I'm trying to use
terms that would translate easily.

I wish you success.

Dan


On Fri, Jun 6, 2014 at 8:05 AM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 06 Jun 2014 05:51:08 -0300, jeremias.epp...@web.de <
> jeremias.epp...@web.de> wrote:
>
>java.lang.ClassNotFoundException: org.apache.tapestry5.TapestryFilter
>>
>> That error Message is absolutly bullshit, it  totally missleading me.
>> The real problem is that tapestry depends on a lot of jars and some of
>> jars from tapestry have dependencies to some other libraries like
>> hibernate, mongodb and spring and are not needed for the helloworld
>> example.
>>
>
> I'm sorry, but you're the one saying BS here. :P The error message, which
> isn't from Tapestry, but from Tomcat, is absolutely clear: you mentioned a
> class in your web.xml which isn't in the webapp classpath. Tapestry-core
> (the web framework) doesn't not depend on Hibernate, MongoDB nor Spring.
> Some optional stuff do. tapestry-core has exactly 5 runtime dependencies,
> including transitive ones which don't come from the Tapestry project
> itself: commons-codec, Antlr, SLF4J (which is also used by an awful lot of
> other libraries), javax.inject (a Java SSR), Servlet API (which will
> actually be provided by your servlet container).
>
> You were having a dependency problem and that's exactly why you should
> some tool to handle it. Maven and Gradle are quite good for that and have
> support from IDEs. Just use one of them.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Provide validation markup on a specific field(s) within a loop using serverside recorderror

2014-06-06 Thread George Christman
Hi guys, I'm wondering if there is a way to record an error to a specific
field within a loop and provide css markup to that field. I know this is
really simple to do with a non looping field, just not sure if it's
possible within a loop. Validate="" is not going to be an option in this
case for me do to backend business logic being needed.

Example, A loop of 14 activityCode fields and field 3, 5, 8 have errors. Is
there a way to provide markup to those specific fields? If I do
recordError(activityCode, "my error"); It seems to mark up the last field
in the array.

Any thoughts?

-- 
George Christman
www.CarDaddy.com
P.O. Box 735
Johnstown, New York


Re: File upload zone not working

2014-06-06 Thread Ilya Obshadko
There's more general question actually.

After migrating my project from T5.3 / Bootstrap 2 to T5.4 / Bootstrap 3
during last 2 weeks I could say that T5.4 is currently missing a lot of
essential client-side integration features.

A few examples include:

- fully configurable Typeahead support (I've already posted my solution for
it several days ago)
- AJAX upload support (there's a number of 3rd party solutions)
- modern date picker component (similarly, a number of 3rd party components
do exist)
- radio button groups of checkbox groups based on Bootstrap button groups
(I had to create my own solution)
- client-side modals, popovers, tooltips (same)

etc etc etc

Maybe it's a good idea to consider creating some project like
tapestry-ui-extensions on GitHub, so people could contribute their work to
make those UI features more available?




On Fri, Jun 6, 2014 at 4:10 PM, Thiago H de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Fri, 06 Jun 2014 08:39:29 -0300, srikaanth <
> srikaanth.k@snovabits.com> wrote:
>
>  Hi all,
>>
>>  I have tried the tapestry fileupload it working well.  But when
>> add zone to it . It throws exception.  Can anybody help how to added zone
>> for fileupload.
>>
>
> tapestry-fileupload doesn't work with zones. Try
> http://tapestry5-jquery.com/components/docsajaxupload or
> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Ilya Obshadko


Re: File upload zone not working

2014-06-06 Thread Thiago H de Paula Figueiredo
On Fri, 06 Jun 2014 08:39:29 -0300, srikaanth  
 wrote:



Hi all,

 I have tried the tapestry fileupload it working well.  But when  
add zone to it . It throws exception.  Can anybody help how to added  
zone for fileupload.


tapestry-fileupload doesn't work with zones. Try  
http://tapestry5-jquery.com/components/docsajaxupload or  
http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: How to Use Image as Form Submit Button That Has OnSelectedFrom Handler in Page Class

2014-06-06 Thread Thiago H de Paula Figueiredo
On Fri, 06 Jun 2014 03:17:15 -0300, Net Dawg   
wrote:


/>

which would be great if it worked!  But gives error:

Failure reading parameter 'image' of component ...: Could not find a  
coercion from type java.lang.String to type org.apache.tapestry5.Asset.


Never, never, never ever use ${} expansions when passing parameters. In  
100% of the time, it's either useless (when the parameter is a String) or  
wrong (when it's not). It should have been  
t:image="context:layout/images/pdf_download.jpg".


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread Thiago H de Paula Figueiredo
On Fri, 06 Jun 2014 05:51:08 -0300, jeremias.epp...@web.de  
 wrote:



  java.lang.ClassNotFoundException: org.apache.tapestry5.TapestryFilter

That error Message is absolutly bullshit, it  totally missleading me.
The real problem is that tapestry depends on a lot of jars and some of
jars from tapestry have dependencies to some other libraries like
hibernate, mongodb and spring and are not needed for the helloworld
example.


I'm sorry, but you're the one saying BS here. :P The error message, which  
isn't from Tapestry, but from Tomcat, is absolutely clear: you mentioned a  
class in your web.xml which isn't in the webapp classpath. Tapestry-core  
(the web framework) doesn't not depend on Hibernate, MongoDB nor Spring.  
Some optional stuff do. tapestry-core has exactly 5 runtime dependencies,  
including transitive ones which don't come from the Tapestry project  
itself: commons-codec, Antlr, SLF4J (which is also used by an awful lot of  
other libraries), javax.inject (a Java SSR), Servlet API (which will  
actually be provided by your servlet container).


You were having a dependency problem and that's exactly why you should  
some tool to handle it. Maven and Gradle are quite good for that and have  
support from IDEs. Just use one of them.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



File upload zone not working

2014-06-06 Thread srikaanth

Hi all,

I have tried the tapestry fileupload it working well.  But when 
add zone to it . It throws exception.  Can anybody help how to added 
zone for fileupload.


--
Regards
Srikaanth.K


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



Re: How to Use Image as Form Submit Button That Has OnSelectedFrom Handler in Page Class

2014-06-06 Thread Net Dawg
Thanks!



On Thursday, June 5, 2014 10:18 PM, Geoff Callender 
 wrote:
 


Here are some more examples:

T5.4: 
http://jumpstart.doublenegative.com.au/jumpstart7/examples/styling/linksandsubmits1

T5.3: 
http://jumpstart.doublenegative.com.au/jumpstart/examples/styling/linksandsubmits1


On 6 Jun 2014, at 4:55 pm, Nathan Quirynen  wrote:

> Hi,
> 
> As you can see in the Tapestry documentation of the Submit component:
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html
> and what your stacktrace is teeling you is that the "image" parameter
> expects an object of the type " org.apache.tapestry5.Asset" and not just
> a String.
> 
> You can add to your page class the following:
> 
> @Property
> @Inject
> @Path("context:layout/images/pdf_download.jpg")
> private Asset pdfDownloadImage;
> 
> and in your .tml file:
> 
> 
> 
> 
> On 06/06/14 08:17, Net Dawg wrote:
>> I have the following submit button that works great:
>> 
>>  
>> 
>> with an onSelectedFromPdf() method in page class that references component 
>> id "pdf". 
>> 
>> Question:  How can this submit button be changed from just "Run Report" to 
>> an image?  
>> 
>> I tried: 
>> 
>> > />
>> 
>> which gives the error that "id Pdf does not exist".
>> 
>> And also: 
>> 
>>  
>> 
>> which would be great if it worked!  But gives error:
>> 
>> Failure reading parameter 'image' of component ...: Could not find a 
>> coercion from type java.lang.String to type org.apache.tapestry5.Asset.
> 


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

Re: Does Tapestry and Tomcat work together?

2014-06-06 Thread jeremias.epp...@web.de
Thanks Daniel and Kalle,

your solution helps me to resolve the problem.

Previously I work with Netbeans and setup the tapestry Framwork their. 
I downloaded the Tapestry 5.4 archive and use the HelloWorldExplained 
Example from jumpstart and try to run the application with different 
java environments (Java 7 & 8 ) and webcontainer (Glassfish 4, Apache 
Tomcat 8.0.3 and 8.0.8). But allways I get the error message:
 org.apache.catalina.core.StandardContext.filterStart Exception 
starting filter app
  java.lang.ClassNotFoundException: org.apache.tapestry5.TapestryFilter

That error Message is absolutly bullshit, it  totally missleading me. 
The real problem is that tapestry depends on a lot of jars and some of 
jars from tapestry have dependencies to some other libraries like 
hibernate, mongodb and spring and are not needed for the helloworld 
example.

So to get Tapestry work I have done following:
- changed from netbeans 8 to eclipse kepler ide
- added all tapestry jars to the project library
- added the apache tomcat 8.0.8 server to my project run configuration
- created the three tapestry files from the HelloWorldExplained 
jumpstart example
- run the server

after that I get an error message that a jar is missing, I have 
searched for the jar downloaded it an added the jar to my project. I 
have repeated that action several times.
Missing jars:

- JPA
- apache commons fileupload
- apache commons io
- mozilla rhino
- validation api (validation-api-1.0.0.GA.jar)
- less4j
- clojoure (http://dl.google.com/closure-compiler/compiler-latest.zip)
- compiler-latest

But the important thing was, that apache tomcat in combination with 
eclipse gave me better error messages.

After that, I could load the helloworld example. I think this was the 
most difficult helloworld example I have ever done ;-)

Sorry, for my bad English.

Regards
  Jeremias

On Fri 06 Jun 2014 06:19:10 AM CEST, Daniel Jue wrote:
> Kalle is right, and this can be a stumbling block to those who are new to
> web application development in general.  It really has nothing to do with
> Tapestry in and of itself, but little problems can cause newcomers to be
> discouraged, for the wrong reasons.
>
> Assuming you are using Maven:
>
> If you are using Maven as your build tool, it can help to use an IDE that
> supports Maven (I use Eclipse Kepler EE version)  Using the IDE it is
> easier to find out what other dependencies are causing the extra servlet
> jar to seen by Tomcat.  By opening your pom.xml in Eclipse and looking at
> the dependency hierarchy tab, you can type in the word 'servlet' to see any
> jars with that String in it.  Then you'll want to exclude those extra
> servlet jars in your pom, using the  tag in the appropriate
> dependency.  I hope this helps.
>
> A similar problem occurs when your 3rd party dependencies includes extra
> SLF4J/Log4J implementations, or when you have Log4J and something else
> include Logback.  Fixing these kinds of dependency issues is just part of
> the job, and it's not bad once you expect to have to do it.  :-)
>
>
>
>
>
> On Thu, Jun 5, 2014 at 10:08 PM, Kalle Korhonen 
> wrote:
>
>> Yes, Tapestry most certainly works well with Tomcat. Very likely, you have
>> an additional servlet-api in your classpath, remove it and it should work.
>>
>> Kalle
>>
>>
>> On Thu, Jun 5, 2014 at 4:49 PM, jeremias.epp...@web.de <
>> jeremias.epp...@web.de> wrote:
>>
>>> Hi,
>>>
>>> does Tapestry and Tomcat work together?
>>> Because I get that error message:
>>>
>>> rg.apache.catalina.core.StandardContext.filterStart Exception starting
>>> filter app
>>>  java.lang.ClassNotFoundException: org.apache.tapestry5.TapestryFilter
>>> at
>>>
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1333)
>>> at
>>>
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1180)
>>> at
>>>
>>>
>> org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:549)
>>> at
>>>
>>>
>> org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:530)
>>> at
>>>
>>>
>> org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
>>> at
>>>
>>>
>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
>>> at
>>>
>>>
>> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
>>> at
>>>
>>>
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4586)
>>> at
>>>
>>>
>> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196)
>>> at
>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
>>> at
>>>
>>>
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
>>> at
>>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
>>> at
>>> org.apache.catalina.core.StandardHost.addCh

Re: How to Use Image as Form Submit Button That Has OnSelectedFrom Handler in Page Class

2014-06-06 Thread Geoff Callender
Here are some more examples:

T5.4: 
http://jumpstart.doublenegative.com.au/jumpstart7/examples/styling/linksandsubmits1

T5.3: 
http://jumpstart.doublenegative.com.au/jumpstart/examples/styling/linksandsubmits1


On 6 Jun 2014, at 4:55 pm, Nathan Quirynen  wrote:

> Hi,
> 
> As you can see in the Tapestry documentation of the Submit component:
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html
> and what your stacktrace is teeling you is that the "image" parameter
> expects an object of the type " org.apache.tapestry5.Asset" and not just
> a String.
> 
> You can add to your page class the following:
> 
> @Property
> @Inject
> @Path("context:layout/images/pdf_download.jpg")
> private Asset pdfDownloadImage;
> 
> and in your .tml file:
> 
> 
> 
> 
> On 06/06/14 08:17, Net Dawg wrote:
>> I have the following submit button that works great:
>> 
>>  
>> 
>> with an onSelectedFromPdf() method in page class that references component 
>> id "pdf". 
>> 
>> Question:  How can this submit button be changed from just "Run Report" to 
>> an image?  
>> 
>> I tried: 
>> 
>> > />
>> 
>> which gives the error that "id Pdf does not exist".
>> 
>> And also: 
>> 
>>  
>> 
>> which would be great if it worked!  But gives error:
>> 
>> Failure reading parameter 'image' of component ...: Could not find a 
>> coercion from type java.lang.String to type org.apache.tapestry5.Asset.
> 


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