Re: dynamic forms concept & possible solutions

2014-04-14 Thread Ville Virtanen

I think Thiago means onSubmit()

(If there are errors, it will never reach on success, right?)

This also means that client side validation must be disabled, or then a 
bit of JS must be used to disable it for the hidden button. (Js 
interface also exists to submit the form iirc, but for these bits 
someone else knows better than me probably.)


Ville

14.4.2014 15:19, Thiago H de Paula Figueiredo kirjoitti:
On Mon, 14 Apr 2014 07:36:27 -0300, Ilya Obshadko 
 wrote:



- if we trigger form submission (it's possible to do that using hidden
submit, it's not very elegant, but it works), we have to go through form
validation which fails in most cases because at this point form is 
not yet completed; user receives non-relevant validation errors


Please try this:

@Environmental
private ValidationTracker validationTracker;

public void onSuccess() {
if (notReallyValidationNow) { // submission from autocomplete
validationTracker.clear(); // all validation errors are dropped
}
}




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



VS: tapestry + maven + jboss tools + hot deploying ?

2014-03-14 Thread Ville Virtanen
Live class reloading works in JBoss too, at least the last time I used it.
(7.x.x) You have to make your IDE to compile directly to the web container
exploded directory structure. This is specific to your IDE / web container,
and not really Tapestry. 

First of all read this: https://tapestry.apache.org/class-reloading.html
especially "Troubleshooting Live Class Reloading" and "If Live Class
Reloading doesn't work". 

https://www.google.fi/search?q=eclipse+compile+on+save 
https://www.google.fi/search?q=eclipse+change+output+directory 

If you want full code-refresh-view cycle, you should look at
http://zeroturnaround.com/software/jrebel/ Tapestry only changes the classes
on the fly that it manages, but not the others. I've seen that Tapestry's
offering is enough for most setups, but I've always struggled a bit with
large multiproject setups, as only the main project is easy to get refreshed
on the fly. If someone knows a way to do it, please let me know.

I don't think the question was about HA, but here goes nothing: if you're
going to have high availability site, you should have multiple backend
servers that you can bounce one by one. Have your load balancer(s) to
automaticly ping back end servers and drop dead ones and add resurrecting
back, remember to replicate session or go stateless. The services behind the
web application servers must also be ofcourse clustered and accessed through
LB ip address for an example.

In that setup you can freely stop and start nodes, provided that the
remaining ones have enough power to serve incoming requests. Script you
deployment so that it automaticly stops a node, redeploys, starts it back
up, moves to next node after your monitoring tells the node is back online,
otherwise retries. The tools to make this happen may include nagios
(http://www.nagios.org/), new relic (http://newrelic.com/), chef
(http://www.getchef.com/chef/) / puppet (http://puppetlabs.com/)

Ville

-Alkuperäinen viesti-
Lähettäjä: Geoff Callender [mailto:geoff.callender.jumpst...@gmail.com] 
Lähetetty: 14. maaliskuuta 2014 2:30
Vastaanottaja: Tapestry users
Aihe: Re: tapestry + maven + jboss tools + hot deploying ?

I've never had to operate a high-availability site, so I've not needed to
deal with this. I've always had a maintenance window available.

Some years ago I used to develop in JBoss with an expanded EAR, and hot
deploy worked fine, with the usual caveat that eventually you'll get PermGen
errors.

Cheers,

Geoff

On 14/03/2014, at 5:32 AM, leandroaisp...@gmail.com wrote:

> Hi all,
> 
> I got the following scenario,
> 
> - A Tapestry 5.3 web application called project A (contains tml files, 
> java pages files, and common web files)
> - A Business logic project called B (Business services)
> - A Model project called C (pojos with hibernate annotations and daos)
> 
> - I manage project dependencies with Maven 2.
> 
> - I deploy project from eclipse(Juno) using Jboss Tools(1.4.0) and 
> Jboss Tools Maven Integration(1.4.0) to a Wildfly 8.0.1 server .
> 
> In order to deploy web application i have created a new server (jboss 
> server type).
> I run my A project into the mentioned server.
> 
> All is working fine except i want tml files changes to be taken on the 
> fly without the automatically  re deploying of the application.
> 
> Questions:
> 1) Is there a way to change tml and java files on project A  without 
> the need of redeploying the whole app??
> 
> The server configuration has an option to publish  the project 
> (re-deploy) when a resource has changed. But it redeploys the whole 
> application also when i change tml files from project A. The worst 
> part is that session data get lost and i have to re login to application
and complete forms again.
> 
> If i chose "Never publish automatically" none of my changes are seen 
> by server.
> 
> 2) If answer to question 1 is positive now i want to know if is there 
> a way to change and compile project B and C classes and see the 
> changes without redeployng web application?
> 
> 
> 3) I know Tapestry's Jumpstart application works on JBoss/Wildfly does 
> anyone knows if T5's class reloading works in JBoss?
> At least it's not working for me,  Geoff do you have any thoughts on 
> this topic?
> 
> cheers and thanks in advance!
> 
> Leandro.


-
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



VS: Persist object fails

2014-03-07 Thread Ville Virtanen
I can also report 4 production systems running on Server Java 7 (The new
option, server jdk) and tomcats.

Ville

-Alkuperäinen viesti-
Lähettäjä: Bob Harner [mailto:bobhar...@gmail.com] 
Lähetetty: 7. maaliskuuta 2014 15:34
Vastaanottaja: Tapestry users
Aihe: Re: Persist object fails

I know of many cases of Tapestry 5.3.x web apps running on Java 1.7 and
Tomcat in production. No problems, as long as the version of Tomcat chosen
is Java 1.7-compatible.
On Mar 6, 2014 5:28 PM, "Cezary Biernacki"  wrote:

> Tapestry uses Servlet API to persist data, so if they are not 
> persisted, something wrong is with your Tomcat configuration. I would 
> first check if JSESSIONID cookies are generated properly and they stay 
> unchanged in a single session (or alternatively ';jsessionid=' is 
> added to URLs). Then I would check Tomcat configuration and Tomcat 
> logs. See how your Tomcat is configured to store sessions.  If you use 
> load balancing or put the Tomcat instance behind a reverse proxy, I 
> would recommend checking how they are configured.
>
> If you would still could not solve your problem, I recommend writing a 
> very simple servlet without Tapestry or any other framework, with 
> simple session related test, and see if it works correctly on your new 
> installation. If it would not work too, try to get help on some Tomcat
related forum.
>
> I migrated a Tapestry 5.3 application from Java 6 to Java 7 without 
> any changes, though I have not used Tomcat.
>
> Best regards,
> Cezary
>
>
>
>
> On Wed, Mar 5, 2014 at 5:05 PM, Trimech, Fethi 
>  >wrote:
>
> > Hi Tapestry users,
> >
> >
> >
> > We are currently migrating our tapestry application to a new server 
> > using java 1.7. the application was running smoothly until this 
> > migration where most the features in the application broke down. 
> > After analysis we found out that all objects annotated with @Persist 
> > and @SessionState are no longer persisted.
> >
> >
> >
> > btw:
> >
> > same Tomcat version
> >
> > same OS
> >
> > using tapetsry 5.3.6 and related jars.
> >
> > (gave a try to 5.3.7 but also failed)
> >
> >
> >
> > does it have todo with the java version or something else? any hint 
> > would be of great help!
> >
> >
> >
> > Thanks!
> >
> >
>


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



VS: How to use grid with large data sets.

2014-01-17 Thread Ville Virtanen
The griddatasource is natural fit for sql databases, but
lucene/solr/elasticsearch etc. may not fit it 100% 

That said, you can access the current page of the grid that is selected
(grid. getCurrentPage()) and rowsPerPage (grid. getRowsPerPage())  and do
the math yourself to be able to pull in correct content in the first place.

Tapestry uses the total amount of rows available to only make sure, that the
selected page is not out of the range of possible pages, and that the end
index is never more than there actually are rows. (The last page may not be
full.)

Ville

-Alkuperäinen viesti-
Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] 
Lähetetty: 17. tammikuuta 2014 15:49
Vastaanottaja: Tapestry users
Aihe: Re: How to use grid with large data sets.

I wouldn't say it's premature optimization when I'm essentially performing
two of the exact same free text queries, it's twice the work ;-) My company
is hosting our dev database remotely on awful hardware to help us to find
performance issues. They believe if we can make something fast on dev, it
will be lighting fast in production, so everything counts lol.

Now if I understand GridDataSource correctly, you need to return the count
in availableRows() before the prepare() method can be called, is this
correct? If that is the case, I'm not sure how to go about combining this
into a single query do to the fact I would first need to get the count
before prepare is called to pass in the start / end index.

hibernate-search, which is based on the lucene free text search engine will
return the total filtered result count while only returning the pagination
results. When using the Tap5 loop component, I typically just return an
object containing the total count and an array list of the results, but
seeing the prepare is called secondly, I'm not sure how to do this. I guess
worse case I can just do two queries.



On Thu, Jan 16, 2014 at 5:51 PM, Lance Java
wrote:

> If there's a concept in lucene that allows you to bring back the total 
> rowcount and a page of data in a single query then the GridDataSource 
> interface can support that.
>
>
> On 16 January 2014 22:36, Lance Java  wrote:
>
> > One query is for the rowcount, the other is for the results (for a 
> > single page).
> > The only way to do it with one query is to add an extra column to 
> > the result set for the row count. This value will be exactly the 
> > same for
> every
> > row in the result set.
> >
> > I personally don't see an issue with 2 queries... premature 
> > optimisation perhaps ;)
> >
> >
> > On 16 January 2014 20:23, George Christman  >wrote:
> >
> >> I found the following documentation
> >>
> >> http://wiki.apache.org/tapestry/Tapestry5HibernateGridDatasource2
> >>
> >> However I'm still a little confused, I'm seeing two queries needed 
> >> to
> get
> >> this to work, one containing the filtered results to get the
> availableRow
> >> count
> >> and the second one to get the prepare filtered result set 
> >> containing startindex / endindex for get getRowValue();
> >>
> >> With my hibernate search service, I'm able to get everything in a 
> >> single query, is there anyway to do this in a single query?
> >>
> >>
> >> On Thu, Jan 16, 2014 at 2:48 PM, George Christman
> >> wrote:
> >>
> >> > So I'm playing with the GridDateSource and was wondering how you 
> >> > are suppose to get the filtered result count for availableRows()? 
> >> > With hibernate search you get this count after the results have 
> >> > been
> >> filtered,
> >> > but the way the methods are called in GridDataSource, the
> availableRows
> >> > method is called before prepare.
> >> >
> >> > The next question is how do you get your filters back to 
> >> > GridDataSouce prepare? I'm wondering if I'm going about this the
right way.
> >> >
> >> > Example I'm working from
> >> >
> >> >
> >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/gridd
> atasources
> >> >
> >> >
> >> > On Thu, Jan 16, 2014 at 12:26 PM, George Christman < 
> >> > gchrist...@cardaddy.com> wrote:
> >> >
> >> >> I guys, thanks for the help, I'm using hibernate-search with lucene.
> >> >>
> >> >>
> >> >> On Thu, Jan 16, 2014 at 12:10 PM, Ville Virtanen < 
> >> >> ville.virta...@orientimport.fi> wrote:
> >> >>
> >> >&

VS: How to use grid with large data sets.

2014-01-16 Thread Ville Virtanen
Hi,

here is one example:

http://jumpstart.doublenegative.com.au/jumpstart7/examples/tables/griddataso
urces 

Ville

-Alkuperäinen viesti-
Lähettäjä: George Christman [mailto:gchrist...@cardaddy.com] 
Lähetetty: 16. tammikuuta 2014 18:34
Vastaanottaja: Tapestry users
Aihe: How to use grid with large data sets.

Hello, I'm wondering how to use the grid component with large data sets.
Currently the grid is grabbing the entire data set rather than a sub set.
How do I pass back the current page and row count as well as the sorts? Can
this be done with the grid component, or would I need to builds something
custom with a loop?

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


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



VS: BaseURLSource with access to current request

2013-09-23 Thread Ville Virtanen
Thanks!

Multiple simple an efficient options, just what Tapestry is all about ;)

Ville

-Alkuperäinen viesti-
Lähettäjä: Lance Java [mailto:lance.j...@googlemail.com] 
Lähetetty: 23. syyskuuta 2013 12:21
Vastaanottaja: Tapestry users
Aihe: Re: BaseURLSource with access to current request

Your ClassCastException is caused by using configuration.add(…, …) instead
of configuration.addInstance(…, …)

If you find that contribution to ServiceOverride fails causes circular
dependency you can decorate instead of override:

static BaseURLSource decorateBaseURLSource(BaseUrlSource default, @Autobuild
MyBaseURLSource override) {
   return override;
}

Another option is to @Inject RequestGlobals instead of Request and call
getRequest(). This might eliminate the circular dependency too.


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



VS: BaseURLSource with access to current request

2013-09-23 Thread Ville Virtanen
Hi,

this is unfortunate and I have a fix for it, but a hackish one. The injected
Request is a proxy, so you can do this:

create empty container service, and inject it to the baseurlresource (just
like the request earlier.) Add setter to your container service for the
request, and contribute startupservice with a code piece that injects the
request and your container service, and then just putthe request to your
container service's setter, and then it will be there when the first request
comes in. This works because the injected request is actually a proxy, and
not an actual request. Haven't tried that though, so no guarantees. Note
that the container service must NOT declare the request in the constructor.

Docs to add startup code: http://tapestry.apache.org/registry-startup.html 

Ville
Ps. If anyone has better fix for this, please share as I'm interested too.

-Alkuperäinen viesti-
Lähettäjä: Andy Pahne [mailto:li...@bodenkurier.de] 
Lähetetty: 22. syyskuuta 2013 21:43
Vastaanottaja: Tapestry users
Aihe: Re: BaseURLSource with access to current request


No, that does not work. When I try to inject the Request object as a method
parameter, the application won't start. An Exception is thrown on startup:
2013-09-22 20:40:30,689 ERROR ServiceOverride:64 - Construction of service
ServiceOverride failed: Error invoking service contribution method
de.bodenkurier.web.site.services.AppModule.contributeServiceOverride(MappedC
onfiguration, Request): Exception constructing service 'ServiceOverride':
Construction of service 'ServiceOverride' has failed due to recursion: the
service depends on itself in some way. Please check
org.apache.tapestry5.ioc.internal.services.ServiceOverrideImpl(Map) (at
ServiceOverrideImpl.java:31) via
org.apache.tapestry5.ioc.services.TapestryIOCModule.bind(ServiceBinder) (at
TapestryIOCModule.java:49) for references to another service that is itself
dependent on service 'ServiceOverride'.
…
...


Am 22.09.2013 um 20:05 schrieb "Ville Virtanen"
:

> 
>public static void contributeServiceOverride(final 
> MappedConfiguration configuration, final Request request) {
>BaseURLSource source = new  BaseURLSource()
>{
> ...
>
>configuration.add(BaseURLSource.class, source);
>}
> 
> Ville


-
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



VS: BaseURLSource with access to current request

2013-09-22 Thread Ville Virtanen
If that is not enough, you can also inject the request and us it in the
contributed BaseUrlSource to sniff the host.

public static void contributeServiceOverride(final
MappedConfiguration configuration, final Request request) {
BaseURLSource source = new  BaseURLSource()
{

  public String getBaseURL(boolean secure)
{

   String protocol = secure ? "https" : "http";
   int  port = secure ? 8443 : 8080;
  request... instead the line below.
   return String.format("%s://localhost:%d" , protocol,
port);

}
};
configuration.add(BaseURLSource.class, source);
}

Ville

-Alkuperäinen viesti-
Lähettäjä: Nicolas Bouillon [mailto:nico...@bouil.org] 
Lähetetty: 22. syyskuuta 2013 19:49
Vastaanottaja: Tapestry users
Aihe: Re: BaseURLSource with access to current request

Hi,

You can try starting you application server with this JVM options :

-Dtapestry.hostport-secure=443 -Dtapestry.hostport=80

Nicolas.


2013/9/22 Andy Pahne :
> Hi there,
>
> I have a T5 app, that
>  - is party protected with SSL (fronted with Apache)
>  - also has some unprotected content not using SSL
>  - is used to run more than one domain   ( www.example.com,
www.example.co.uk )
>  - can be completely browsed using https scheme, even the unprotected
pages
>
> I have this mostly working, but there is one problem when https browsing
the site's pages which are not @Secure annotated: the links constructed have
the form
>http://www.example.com:443/page1
>
> I tried to resolve this problem by contributing a service override for
BaseURLSource, as described in http://tapestry.apache.org/https.html
>
> However, the given implementation does not fit my needs, because I need
access to the current Request, because I need to extract the hostname from
it. I just cannot use a constant for the hostname, like in the example in
the docs:
>
> public static void
contributeServiceOverride(MappedConfiguration configuration) {
> BaseURLSource source = new  BaseURLSource()
> {
>
>   public String getBaseURL(boolean secure)
> {
>
>String protocol = secure ? "https" : "http";
>int  port = secure ? 8443 : 8080;
>
>return String.format("%s://localhost:%d" , protocol,
port);
>
> }
> };
> configuration.add(BaseURLSource.class, source);
> }
>
>
>
> So here is my question: how do I construct an implementation of
BaseURLSource that has access to the current Request?
>
> I guess that's possible, but I am not familiar with Tapestry-IOC and
googling for approaches only, I only found solutions that are somewhat
"static" and do not depend on the current request.
>
> Andy
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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



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



VS: Eclipse Tapestry5 Plugin update

2013-09-12 Thread Ville Virtanen
Got the chance to try now, but I still get the same error?

 

Could someone else try so that I know if it's something in my setup?

 

Ville

Ps. See the error I get in http://i40.tinypic.com/s629mp.png

Pps. Running Kepler with latest updates.

 

-Alkuperäinen viesti-
Lähettäjä: Dmitry Gusev [mailto:dmitry.gu...@gmail.com] 
Lähetetty: 9. syyskuuta 2013 22:08
Vastaanottaja: Tapestry users
Aihe: Re: Eclipse Tapestry5 Plugin update

 

I have changed update site URL. Can you try with new one?

 

 <https://dl.bintray.com/anjlab/eclipse-tapestry5-plugin>
https://dl.bintray.com/anjlab/eclipse-tapestry5-plugin

 

 

 

On Mon, Sep 9, 2013 at 4:55 PM, Ville Virtanen <
<mailto:ville.virta...@orientimport.fi> ville.virta...@orientimport.fi>
wrote:

 

> Hi,

> 

> ** **

> 

> confirmed here too, I get 

> 

> ** **

> 

> ”Unable to read repository at

>  <https://dl.bintray.com/anjlab/eclipse/content.xml>
https://dl.bintray.com/anjlab/eclipse/content.xml. Caused by:

> javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated”

> 

> ** **

> 

> Can’t wait to try this out though!

> 

> ** **

> 

> Ville

> 

> ** **

> 

> *Lähettäjä:* Nathan Quirynen [ <mailto:nat...@pensionarchitects.be>
mailto:nat...@pensionarchitects.be]

> *Lähetetty:* 9. syyskuuta 2013 15:35

> *Vastaanottaja:*  <mailto:users@tapestry.apache.org>
users@tapestry.apache.org

> *Aihe:* Re: Eclipse Tapestry5 Plugin update

> 

> ** **

> 

> Hey this looks great!

> I'm having some problem though, when I tried to update the plugin I 

> always get a popup like following:

> 

> *Please provide login details for dl.bintray.com:*

> username:

> password:

> 

> I don't know if this is a problem on my end or not, because I have not 

> had this before (also not when I installed the first version of your 

> plugin) So yeah not sure what is going on here, but others don't have this
problem?

> 

> Nathan

> 

> 

> On 09/09/13 10:49, Dmitry Gusev wrote:

> 

> On Mon, Sep 9, 2013 at 11:46 AM, Dmitry Gusev <
<mailto:dmitry.gu...@gmail.com> dmitry.gu...@gmail.com> 

> < <mailto:dmitry.gu...@gmail.com> dmitry.gu...@gmail.com>wrote:

> 

> ** **

> 

> Thanks,

> 

> ** **

> 

> this is on my todo-list already, will try to work on this next 

> weekend:

> 

> ** **

> 

> ** **

> 

>  <https://github.com/anjlab/eclipse-tapestry5-plugin/blob/master/com.anj>
https://github.com/anjlab/eclipse-tapestry5-plugin/blob/master/com.anj

> lab.eclipse.tapestry5/src/com/anjlab/eclipse/tapestry5/views/TapestryC

> ontextView.java#L65-L80

> 

> ** **

> 

> Just found few bugs when assets couldn't be resolved but they are 

> present,

> 

> will fix this in next release also.

> 

> ** **

> 

> ** **

> 

> Fixed in version 1.1.2, available for update now.

> 

> ** **

> 

> ** **

> 

> As you understand this is a (always) beta release and is not well 

> tested,

> 

> so install it, use it and post your feedback and bug reports to the 

> project

> 

> issue list on GitHub:

> 

>  <https://github.com/anjlab/eclipse-tapestry5-plugin/issues>
https://github.com/anjlab/eclipse-tapestry5-plugin/issues

> 

> ** **

> 

> ** **

> 

> On Mon, Sep 9, 2013 at 11:39 AM, Lance Java 

> < <mailto:lance.j...@googlemail.com> lance.j...@googlemail.com> <
<mailto:lance.j...@googlemail.com> lance.j...@googlemail.com>wrote:

> 

> ** **

> 

> This looks excellent!!!

> 

> ** **

> 

> It would be great if there was a simple way to create a .tml file for 

> a

> 

> .java file… perhaps right click -> new component template?

> 

> ** **

> 

> ** **

> 

> ** **

> 

> ** **

> 

> --

> 

> Dmitry Gusev

> 

> ** **

> 

> AnjLab Team

> 

>  <http://anjlab.com> http://anjlab.com

> 

> ** **

> 

> ** **

> 

> ** **

> 

> ** **

> 

> ** **

> 

> --

> 

> Een klare kijk op aanvullende pensioenen

> 

> *Nathan Quirynen*

> 03 340 04 60 | 0494 28 45 15

>  <mailto:nat...@pensionarchitects.be> nat...@pensionarchitects.be

> 

> Follow us on Web < <http://www.pensionarchitects.be>
http://www.pensionarchitects.be> | 

> Twitter< <http://www.twitter.com/pen_arch>
http://www.twitter.com/pen_arch>|

> LinkedIn < <http://www.linkedin.com/company/pension-architects>
http://www.linkedin.com/company/pension-architects> | 

> RSS< <http://feeds.feedburner.com/pensionarchitects>
http://feeds.feedburner.com/pensionarchitects>|

> YouTube < <http://www.youtube.com/pensionarchitects>
http://www.youtube.com/pensionarchitects>

> 

 

 

 

--

Dmitry Gusev

 

AnjLab Team

 <http://anjlab.com> http://anjlab.com



VS: Eclipse Tapestry5 Plugin update

2013-09-09 Thread Ville Virtanen
Hi,

 

confirmed here too, I get 

 

”Unable to read repository at
https://dl.bintray.com/anjlab/eclipse/content.xml. Caused by:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated”

 

Can’t wait to try this out though!

 

Ville

 

Lähettäjä: Nathan Quirynen [mailto:nat...@pensionarchitects.be] 
Lähetetty: 9. syyskuuta 2013 15:35
Vastaanottaja: users@tapestry.apache.org
Aihe: Re: Eclipse Tapestry5 Plugin update

 

Hey this looks great!
I'm having some problem though, when I tried to update the plugin I always
get a popup like following:

Please provide login details for dl.bintray.com:
username:
password:

I don't know if this is a problem on my end or not, because I have not had
this before (also not when I installed the first version of your plugin)
So yeah not sure what is going on here, but others don't have this problem?

Nathan


On 09/09/13 10:49, Dmitry Gusev wrote:

On Mon, Sep 9, 2013 at 11:46 AM, Dmitry Gusev
 wrote:
 

Thanks,
 
this is on my todo-list already, will try to work on this next weekend:
 
 
https://github.com/anjlab/eclipse-tapestry5-plugin/blob/master/com.anjlab.ec
lipse.tapestry5/src/com/anjlab/eclipse/tapestry5/views/TapestryContextView.j
ava#L65-L80
 
Just found few bugs when assets couldn't be resolved but they are present,
will fix this in next release also.
 
 

Fixed in version 1.1.2, available for update now.
 
 

As you understand this is a (always) beta release and is not well tested,
so install it, use it and post your feedback and bug reports to the project
issue list on GitHub:
https://github.com/anjlab/eclipse-tapestry5-plugin/issues
 
 
On Mon, Sep 9, 2013 at 11:39 AM, Lance Java
 wrote:
 

This looks excellent!!!
 
It would be great if there was a simple way to create a .tml file for a
.java file… perhaps right click -> new component template?
 

 
 
 
--
Dmitry Gusev
 
AnjLab Team
http://anjlab.com
 

 
 
 

 

-- 

Een klare kijk op aanvullende pensioenen

Nathan Quirynen
03 340 04 60 | 0494 28 45 15
nat...@pensionarchitects.be

Follow us on Web   | Twitter
  | LinkedIn
  | RSS
  | YouTube
 



VS: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Ville Virtanen
Hi,

created https://issues.apache.org/jira/browse/TAP5-2165 to address this.

Ville

-Alkuperäinen viesti-
Lähettäjä: Massimo Lusetti [mailto:mluse...@gmail.com] 
Lähetetty: 30. elokuuta 2013 11:29
Vastaanottaja: Tapestry users
Aihe: Re: 5.4-alpha-15 resource exceptions

Please open a new one


On Fri, Aug 30, 2013 at 10:28 AM, Ville Virtanen <
ville.virta...@orientimport.fi> wrote:

> Hi,
>
> thanks for the info. Should I reopen ticket
> https://issues.apache.org/jira/browse/TAP5-1007 or create new one?
>
> (And thanks for all the hard work, 5.4 is proving to be awesome!)
>
> Ville
>
> -Alkuperäinen viesti-
> Lähettäjä: Howard Lewis Ship [mailto:hls...@gmail.com]
> Lähetetty: 30. elokuuta 2013 11:04
> Vastaanottaja: Tapestry users
> Aihe: Re: 5.4-alpha-15 resource exceptions
>
> Looks like the code that checks for case mismatch is broken when the 
> path separator is different.  It must be hard coded to look for "/", 
> which is a problem on Windows.
>
>
> On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen < 
> ville.virta...@orientimport.fi> wrote:
>
> > Dear list,
> >
> >
> >
> > just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log 
> > is littered with exceptions like this:
> >
> >
> >
> > Caused by: java.lang.IllegalStateException: Resource 
> > classpath:com/orient/web/customer/base/SecureBasePage.class does not 
> > match the case of the actual file name,
> >
> > 'E:\projects\Orient\customer\target\classes\com\orient\web\customer\
> > ba
> > se\Sec
> > ureBasePage.class'.
> >
> >
> >
> > java.lang.IllegalStateException: Resource 
> > context:WEB-INF/customerclient.properties does not match the case of 
> > the actual file name,
> >
> > E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.p
> > ro
> > pertie
> > s'.
> >
> >
> >
> > I'm running a maven build with jetty:run. What should I change to 
> > get up & running?
> >
> >
> >
> > Ville
> >
> >
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to 
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


--
Massimo Lusetti


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



VS: 5.4-alpha-15 resource exceptions

2013-08-30 Thread Ville Virtanen
Hi,

thanks for the info. Should I reopen ticket
https://issues.apache.org/jira/browse/TAP5-1007 or create new one?

(And thanks for all the hard work, 5.4 is proving to be awesome!)

Ville

-Alkuperäinen viesti-
Lähettäjä: Howard Lewis Ship [mailto:hls...@gmail.com] 
Lähetetty: 30. elokuuta 2013 11:04
Vastaanottaja: Tapestry users
Aihe: Re: 5.4-alpha-15 resource exceptions

Looks like the code that checks for case mismatch is broken when the path
separator is different.  It must be hard coded to look for "/", which is a
problem on Windows.


On Fri, Aug 30, 2013 at 6:55 AM, Ville Virtanen <
ville.virta...@orientimport.fi> wrote:

> Dear list,
>
>
>
> just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log 
> is littered with exceptions like this:
>
>
>
> Caused by: java.lang.IllegalStateException: Resource 
> classpath:com/orient/web/customer/base/SecureBasePage.class does not 
> match the case of the actual file name,
>
> 'E:\projects\Orient\customer\target\classes\com\orient\web\customer\ba
> se\Sec
> ureBasePage.class'.
>
>
>
> java.lang.IllegalStateException: Resource 
> context:WEB-INF/customerclient.properties does not match the case of 
> the actual file name,
>
> E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.pro
> pertie
> s'.
>
>
>
> I'm running a maven build with jetty:run. What should I change to get 
> up & running?
>
>
>
> Ville
>
>


--
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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


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



5.4-alpha-15 resource exceptions

2013-08-29 Thread Ville Virtanen
Dear list,

 

just tried to upgrade from 5.4-alpha-14 to 5.4-alpha-15, but the log is
littered with exceptions like this:

 

Caused by: java.lang.IllegalStateException: Resource
classpath:com/orient/web/customer/base/SecureBasePage.class does not match
the case of the actual file name,
'E:\projects\Orient\customer\target\classes\com\orient\web\customer\base\Sec
ureBasePage.class'.

 

java.lang.IllegalStateException: Resource
context:WEB-INF/customerclient.properties does not match the case of the
actual file name,
E:\projects\Orient\customer\src\main\webapp\WEB-INF\customerclient.propertie
s'.

 

I'm running a maven build with jetty:run. What should I change to get up &
running?

 

Ville



Re: Why would I choose JQuery?

2010-08-09 Thread Ville Virtanen

Portlet support and this Js fix are the most important new features.
Especially the no-portlet support part stopped T5 in recent evaluation to
build SAP front end and handling portal for multinational customer running
Oracle's weblogics.

 - Ville


Howard Lewis Ship wrote:
> 
> jQuery and Prototype have similar capabilities implemented in
> extremely different ways.
> 
> My intention is to factor out what T5 and the standard components use
> into a thin wrapper library around either Prototype or jQuery, or
> others (such as Ext, YUI, etc.).  Name you favorite JS library and
> you'll hear people call out their favorites you've never even heard
> of!
> 
> At this point, Tapestry has had enough JS exposure for me to identify
> a minimum set of common operations.
> 
> On Mon, Aug 9, 2010 at 9:12 AM, Pierce Wetter  wrote:
>>
>> On Aug 9, 2010, at 5:50 AM, Michael Gentry wrote:
>>
>>> A downside to Tapestry adopting JQuery at this point is it hurts those
>>> of us who bit the bullet and used Prototype (since it comes with T5
>>> for "free").  It would make upgrading more time consuming.
>>> Personally, I would prefer JQuery, but there is a cost involved in
>>> using it now (additional bandwidth + memory footprint) or in the
>>> future (conversion).
>>
>>  Doesn't JQuery support a superset of Prototype? Does anyone know what
>> the incompatibilities are?
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Why-would-I-choose-JQuery--tp29360084p29390075.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: Why would I choose JQuery?

2010-08-09 Thread Ville Virtanen

Hi,

there are several reasons:

1. It's widely in use and actively developed. Even endorsed by Microsoft.
 ("Microsoft now fully supports jQuery and distributes it with the ASP.NET
Model-View Controller (MVC) framework. Furthermore, extensions have been
deve..." source: http://msdn.microsoft.com/en-us/magazine/dd453033.aspx)
2. It is released much more frequently than Prototype - the fear that we're
using dying js stack is enough to convert..
3. Easier to find help (Bigger community, more books etc.)
4. More advanced

The last part of course is debatable. Strong commitment from big players
make it safe bet.

 - Ville




Kalle Korhonen-2 wrote:
> 
> I have an older T4 app that I'm going to upgrade to T5. It's not a
> full RIA but nevertheless a fairly fancy, interactive web app with
> drag & drop, ajax file uploads etc. The UI of the app was based on
> Prototype and Dojo 0.4.3 which served me well at the time despite of
> being a bit on the heavy side. I haven't really used JQuery in
> production apps yet but I wouldn't mind switching but if I do, I don't
> want to drag Prototype around with it. There are T5 integration libs
> available both for a newer version of Dojo and for JQuery. It might be
> marginally easier to adjust the existing Javascript for Dojo than
> having to rewrite everything with JQuery but as said, I'm fine with
> the cost. Performance always matters, so load times, execution
> performance, ability to use CDN etc. all matter. I don't mind filing
> an occasional issue, but I don't want to get sucked into seriously
> having to debug and maintain another add-on library so I'd prefer
> something relatively stable even if it didn't have all the latest
> bells and whistles. Of ready-made components, only a good, skinnable,
> customizable and extensible tab component is relevant to me. Now, why
> would I choose JQuery over the other choices? I'd really love to hear
> comments from people who've had experience of multiple Javascript
> libraries and have made a switch to JQuery or perhaps gone the other
> way.
> 
> Kalle
> 
> -
> 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/Why-would-I-choose-JQuery--tp29360084p29390012.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: How to have .tml/.properties files in the same directory as the .java files

2010-08-08 Thread Ville Virtanen

T5 application works ok as is if the files are in the same directory. 

If you use maven, then the maven default structure layout dictates that the
non-java files must be in resources or webapp folders. (The build process
copies the resources to the same directory structure from java and
resources.) 

Now you want to tell maven to also copy the tml and properties files from
the java side. One way to do this is to alter your pom.xml: add this inside
the build tag: (This is not tested, just something I typed on the fly. There
are better ways to do it.)



src/main/java
false

**/*.*


**/*.java
**/*.class




On the other hand, there is support for IDE:s. We are using Netbeans
support, which let's users change (and open if not already open) between
.tml, .java and .properties files. 

https://nbtapestrysupport.dev.java.net/

 - Ville

Tapestry 5 actually 

Patrick Moore-6 wrote:
> 
> Hi there --
> 
> I am working to move our project from T4 to T5. In T4 we are using the
> tacos
> component resolver that allows the templates and properties files to be in
> the same directory.  In T5 how can we do the same thing?
> 
> In T4, I have found that having all 3 files .java, .properties, .tml in
> the
> same directory makes editing enormously easier. So this is really, really
> important to me. Switching between template and .java when the files are
> scattered is a pain.
> 
> If there is no existing way, does anyone have some suggestions on how to
> gracefully add this in. In T4 it wasn't that hard and it seems like it
> should be even easier in T5.
> 
> -Pat
> 
> 

-- 
View this message in context: 
http://old.nabble.com/T5%3A-How-to-have-.tml-.properties-files-in-the-same-directory-as-the--.java-files-tp29377569p29379502.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: for IE

2010-08-04 Thread Ville Virtanen

On a side note:

you can use the onAction(possible_context) to catch any action made by any
link. Also, you can construct the context for the pagelink (or actionlink)
in the java file, just return new Object[]{value1, value2...} from the java
method. ()

 - Ville


Jim O'Callaghan wrote:
> 
> Can anyone advise on a good approach for IE's handling of the 
> tag?
> I was using:
> 
>  
> 
>  ${returnPage} ${message:generic.continue-label} 
> 
>  
> 
> . in my tml with:
> 
>  
> 
> Public Link getReturnPage(){.}
> 
>  
> 
> . in my associated java class until I found IE doesn't behave the same way
> as Chrome / FF.  I am trying to avoid having to provide an onActionFromXYZ
> in my page class as I already have the href I want to navigate to - just
> that I want to style it as a button without too much hacking.  I don't
> want
> to put PageLinks in my tml as in this specific case the context is
> variable.
> 
>  
> 
> Regards,
> 
> Jim. 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/%3Cbutton%3E-for-IE-tp29346696p29347798.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: for IE

2010-08-04 Thread Ville Virtanen

I rolled a component that uses the IE specific tag to render normal button if
the used browser is less than IE 8. (IE 8+ handles it correctly)

That wasn't the greatest solution, but it worked. Also it only matters when
you have more than one button in the form, so single button forms can be
implemented as if it works ok in ie.

 - Ville


IE8 or greater or non-ie browser button


Jim O'Callaghan wrote:
> 
> Can anyone advise on a good approach for IE's handling of the 
> tag?
> I was using:
> 
>  
> 
>  ${returnPage} ${message:generic.continue-label} 
> 
>  
> 
> . in my tml with:
> 
>  
> 
> Public Link getReturnPage(){.}
> 
>  
> 
> . in my associated java class until I found IE doesn't behave the same way
> as Chrome / FF.  I am trying to avoid having to provide an onActionFromXYZ
> in my page class as I already have the href I want to navigate to - just
> that I want to style it as a button without too much hacking.  I don't
> want
> to put PageLinks in my tml as in this specific case the context is
> variable.
> 
>  
> 
> Regards,
> 
> Jim. 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/%3Cbutton%3E-for-IE-tp29346696p29347648.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: Asset in css file?

2010-08-04 Thread Ville Virtanen

The most efficient way (cpu cycle wise) is to bypass Tapestry all together
and let httpd share the images. This approach however lacks the ability to
version assets using the T5 facilities.

The best way IMHO is to use relative paths in css (if there are "images" and
"css" folders, then the images are referenced like ../images/image.png),
this way the versioning is preserved and it just works. This method
obviously has some limitations also. (Works only when your image and css are
in the domain.)

The images are exposed to web via two urls: versioned and non versioned.
Hardcode one of those to the css is also an option. Use firebug or similar
to get the url. If you use versioned url, you may have to change the url in
css when upgrading the 3rd party lib.

You don't have to (atleast in 5.1) expose the image as an asset to reference
it in css or html.

 - Ville


Chuck Kring wrote:
> 
>   Of course.  But what is most efficient way to  return a Tapestry Asset 
> specified in the css file.  The css file is not a template.
> 
> On 8/4/2010 4:23 AM, Steve Eynon wrote:
>> You're probably better off just overriding the css to return the image
>> you
>> want.
>>
>> Steve.
>> ---
>> Sent on the move from my X10 Mini, so excuse the small words and spelling
>> mistakes!
>>
>> On 4 Aug 2010 07:33, "Chuck Kring"  wrote:
>>
>>   Hi everybody,
>>
>> I'm trying to override the gif image used for tabs in the Chenillekit
>> tabset.This is specified in
>> the chenillekit TabSet.css  like this:
>>
>> a.ck.tab {
>>   background:url("white-top-bottom.gif")repeat-x scroll 0 -1px
>> transparent;
>>   .
>> }
>>
>> At this point I assume that the css file is not rendered, so I can't
>> directly specify the gif as an asset.  Aside from returning the asset as
>> a
>> StreamResponse from an onActivate() event is there a better way to serve
>> a
>> gif file into a css-specified background?
>>
>> Thanks,
>>
>> Chuck
>>
>> -
>> 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Asset-in-css-file--tp29343059p29347500.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: Dynamic Type

2010-08-04 Thread Ville Virtanen

The only thing that I can think of is delegate and blocks.

Is there a reason why the layout cannot be an empty component with a
delegate, and then the delegate gets the block to render from java property
that determines which (layout)block to use? In this model the block contains
the actual complete layout?

All (layout)blocks must of course have the same parameters etc. The page
content could be then made available to the layout block as a ... well
block, which could be then rendered using a ... delegate.. :)

 - Ville


Pablo Henrique dos Reis wrote:
> 
> Is there a way to set the component's type in run time?
> 
> 
> I need to choose the layout by onActivate parameter.
> 
> 
> 
> 
> -- 
> Pablo Henrique dos Reis
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Dynamic-Type-tp29346974p29347295.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5.1] No recursive component -> Howto render Beaneditor in code?

2010-07-27 Thread Ville Virtanen

Hi,

@InjectComponent injects the component defined in tml, @Component injects
instance that is configured by the annotation itself (and the associated tml
if it is defined there also).

http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/annotations/Component.html

 - Ville


Oliver Bauer wrote:
> 
> Hi,
> 
> we have noted that T5 doesn't allow recursive components[1],
> so we are currently doing something like this:
> We reference our component in an arbritrary tml like this:
> 
>    source="root"
>   currentNode="currentNode">
> 
> 
> The code stub of the component:
> 
> boolean setupRender(MarkupWriter writer) {
>   // write some opening div
> }
> 
> void beforeRenderBody(MarkupWriter writer) {
>   processRoot(source, writer);
> }
> 
> void cleanupRender(MarkupWriter writer) {
>   // close some opened div's
> }
> 
> This works fine (#processRoot calls itself recursively for its children),
> but now we
> want to display a bean editor in a Node (in processRoot()). Is it possible
> to reference
> a component (like a bean editor) in a component being written in Java? Are
> there any
> examples how to achieve this?
> 
> TIA, Oliver
> 
> [1] [https://issues.apache.org/jira/browse/TAP5-739]
> ___
> Neu: WEB.DE De-Mail - Einfach wie E-Mail, sicher wie ein Brief!  
> Jetzt De-Mail-Adresse reservieren: https://produkte.web.de/go/demail02
> 
> -
> 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/-T5.1--No-recursive-component--%3E-Howto-render-Beaneditor-in-code--tp29273576p29273645.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5.1.05 always runing slowly when it handle the page requests

2010-07-27 Thread Ville Virtanen

Hi

also make sure that you are NOT logging too much in production, that can
REALLY kill performance. So change logging level to error and try it again.

 - Ville


cleverpig-2 wrote:
> 
> Oh,thanks Joachim !
> 
> Seem like your strange problem,my product hosts were deployed in
> internal network.
> And my development host at internet.Maybe we are in the same trouble.
> How can I find where is the problem? and how to work out?
> Please figure out.
> 
> On Tue, Jul 27, 2010 at 4:16 AM, Joachim Van der Auwera
>  wrote:
>> What environment are you using?
>>
>> I have once seen similar kind of strange problems which were caused by
>> the
>> OS trying to do reverse DNS lookups on db accesses which were using
>> direct
>> IP addresses (and no hostname defined for them).
>>
>> Joachim
>>
>>
>> On 07/23/2010 05:33 PM, cleverpig wrote:
>>>
>>> yes,of course.but there is nothing,I had changed tow host,the problem
>>> keeps.
>>>
>>> On Fri, Jul 23, 2010 at 8:50 PM, Thiago H. de Paula Figueiredo
>>>   wrote:
>>>

 On Fri, 23 Jul 2010 04:38:15 -0300, cleverpig
 wrote:


>
> In dev environment,everything is okay.
> But in product environment,T5 takes 14~15 second almostly to handle
> one page request!
>

 Have you checked if the bottleneck is elsewhere? In the database access
 or a
 server with other high CPU or I/O apps, for example? I never had this
 problem.

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

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



>>>
>>>
>>>
>>
>>
>> --
>> Joachim Van der Auwera
>> PROGS bvba, progs.be
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> 
> 
> -- 
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liu...@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: cleverpig.name/dan/
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> or...@facebook: http://www.facebook.com/group.php?gid=8159558294
> 
> -
> 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/T5.1.05-always-runing-slowly-when-it-handle-the-page-requests-tp29244742p29273578.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Using PageResponseRenderer.render() in T5.2?

2010-07-26 Thread Ville Virtanen

Hi

I've always used symbol tapestry.version
(org.apache.tapestry5.SymbolConstants.TAPESTRY_VERSION) and parsed it from
that. Just get rid of the dots and then 5.1.0.5 becomes 5105, easy to
convert to integer and perform all kinds of less than, equals or is greater
than comparisons.

 - Ville


Kalle Korhonen-2 wrote:
> 
> On Mon, Jul 26, 2010 at 3:17 AM, Christophe Cordenier
>  wrote:
>> 2010/7/26 Kalle Korhonen 
>>> On Sun, Jul 25, 2010 at 11:45 PM, Christophe Cordenier
>>>  wrote:
>> Actually i was not thinking about catching the exception at the filter
>> level
>> since Tapestry does it well and as you said, decoration should do the
>> trick,
>> but simply let Tapestry initialize its context (ActivatePage) In fact i
>> was
>> wondering, does your security filter implement a ComponentRequestFilter
>> or a
>> RequestFilter ?
> 
> Ah yes, forgive me for being a little slow here. Yes, the
> SecurityFilter is a ComponentRequestFilter. If I contribute it right
> after "InitializeActivePageName", the fairly comprehensive integration
> tests for the module pass so it seems that would do it. Should have
> found that out and tried it before myself. But wouldn't the wrong page
> be stored as the active page in this case or does it not matter?
> 
> This is not directly related to the issue, but assuming the above
> solution is the right way to go about it and given that
> InitializeActivePageName didn't exist in T5.1, what's the best way for
> checking the version of the core library at runtime (so I can
> contribute it differently depending on the version)?
> 
> Kalle
> 
> 
>>> > Actually, i am not against applying your patch, but as
>>> PageResponseRenderer
>>> > is internal, as a new committer i am definitely cautious in what i am
>>> doing
>>> > and committing ;)
>>>
>>> No worries, I fully understand where you are coming from. The code
>>> worked as is for T5.1 and I already experimentally modified it to call
>>> storeActivePageName() from outside just to verify that'd be enough for
>>> T5.2. So it's not a matter of making it work, but making it work the
>>> right way. Although we both may end up spending more time on it this
>>> way, I much prefer spending my resources on validating the concept
>>> than just hacking it in.
>>>
>>> So in the above case, we don't really want to replace the
>>> RequestExceptionHandler as handling the non-security related
>>> exceptions are delegated back to the original, but if somebody
>>> replaces the DefaultRequestExceptionHandler with one that contains a
>>> form on it, it'd throw an exception as well (just putting together
>>> what you said and reading the code), right? Hopefully that proves the
>>> need for the fix.
>>>
>>> Kalle
>>>
>>>
>>> > 2010/7/26 Kalle Korhonen 
>>> >
>>> >> On Sun, Jul 25, 2010 at 5:35 AM, Christophe Cordenier
>>> >>  wrote:
>>> >> > I am currently working on this JIRA, i have seen that the
>>> >> getActivatePage()
>>> >> > is only called to pre allocate names in Form component so it should
>>> have.
>>> >> So
>>> >> > i guess the page you are returning contains a Form.
>>> >>
>>> >> Right and thanks so much Christophe for taking a look at the issue.
>>> >>
>>> >> > Despite it sound right that PageResponseRenderer should set the
>>> active
>>> >> page,
>>> >> > don't you think that in case of a security exception it would be
>>> easier
>>> >> to
>>> >> > send an HTTP error and let the application developer use standard
>>> web.xml
>>> >> > request dispatching to configure the page to display ?
>>> >>
>>> >> Specifically in the case of security exception, no, I don't think
>>> >> that'd be easier. While it's an option, I don't see what the
>>> advantage
>>> >> would be. The exception handler in tapestry-security catches the
>>> >> exception, sets the error code and renders the configured page.
>>> >> Configuring the page somewhere else (in standard web.xml) seems to me
>>> >> like an unnecessary complication compared to contributing
>>> >> configuration.
>>> >>
>>> >> Security exception aside, in the general case http error codes alone
>>> >> wouldn't be enough to differentiate all the different error cases.
>>> I'm
>>> >> not strongly against exploring alternatives, but it makes sense to me
>>> >> that PageResponseRenderer would set the active page and I don't see
>>> >> any disadvantages in doing so, do you?
>>> >>
>>> >> Kalle
>>> >>
>>> >>
>>> >> > 2010/7/20 Kalle Korhonen 
>>> >> >> Pretty please, any committer? It's a one-liner to fix
>>> >> >> https://issues.apache.org/jira/browse/TAP5-1201 and the patch is
>>> >> >> attached.
>>> >> >>
>>> >> >> Kalle
>>> >> >>
>>> >> >>
>>> >> >> On Mon, Jul 19, 2010 at 2:23 PM, Pierce Wetter 
>>> >> wrote:
>>> >> >> >
>>> >> >> > On Jul 9, 2010, at 1:40 PM, Kalle Korhonen wrote:
>>> >> >> >
>>> >> >> >> Sorry to be a pest, but how could I find a champion to apply
>>> the
>>> >> patch
>>> >> >> >> for TAP5-1201? I understand Howard's busy and his time is
>>> probably
>>> >> >> >> better spent on bigger is

RE: t:grid, inPlace and rowIndex

2010-07-18 Thread Ville Virtanen

Hi,

you can calculate the exact index of the row by injecting the grid to the
page and calculating it by using methods (getRowsPerPage() x
getCurrentPage()) + index.
(http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/corelib/components/Grid.html)

The index of course changes when you reorder the list. Also, this index
should be updated when doing inPlace update as the index changes depending
in which place you insert the new row.

Should the list that contains the entities be a map instead? (Map) You may have to implement your own GridDataSource that uses the
map, as there is no automatic wrapping for that datatype. (See:
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/grid/CollectionGridDataSource.java?revision=964086&view=markup
for reference implementation for collections.)

The cost to iterate the list when doing deletes shouldn't be that much
performance wise - and if you have so many entities that the cost is too
much you should consider implementing special GridDataSource anyway.

 - Ville

jc1001 wrote:
> 
> Hi Thiago,
> 
> I've tried that - but the index is the position within the current 'page'
> of entries in the grid, i.e. zero is the first entry on page one, and also
> on page 2 etc., but also, the inPlace method won't work as the index can't
> be updated because some render phase is skipped.  I guess what I'm looking
> for is some initial index position within the grid (list) entries that is
> not updated during sorting, and so has no need to be updated during an
> inPlace update.
> 
> Regards,
> Jim.
> 
> -Original Message-
> From: Thiago H. de Paula Figueiredo [mailto:thiag...@gmail.com] 
> Sent: 15 July 2010 22:49
> To: Tapestry users
> Subject: Re: t:grid, inPlace and rowIndex
> 
> On Thu, 15 Jul 2010 18:25:03 -0300, Jim O'Callaghan  
>  wrote:
> 
>> I'm using the grid to display a selection where one of the cells is an
>> ActionLink that currently passes the entity key for use in a detail  
>> screen> for via the context,
> 
> Have yout tried passing the index as the context for your ActionLink?
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
> and instructor
> Owner, Ars Machina Tecnologia da Informa��o Ltda.
> http://www.arsmachina.com.br
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t%3Agrid%2C-inPlace-and-rowIndex-tp29177730p29198096.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: Asset protection and upgrade notes

2010-06-02 Thread Ville Virtanen

Exactly, 

the message was only to point out that changes like these make library
writer's life hard in the long run. So I was only questioning the rationale
behind the change in no-slashes-in-virtual-folders and how it auto
contributes the associated contribution to ClasspathAssetAliasManager.

In my opinion that auto contribution should be removed.

The missing RegexAuthorizer is quite a wall to climb for me. Perhaps I need
to contribute my own implementation of AssetPathAuthorizer? Anyone?

 - Ville


jc1001 wrote:
> 
> It would appear that even with this code to check the version number,
> without a T5.2.0 equivalent for the RegexAuthorizer service to allow some
> variation on:
> 
> ("com/orientimport/.*\\.((css)|(js)|(jpg)|(jpeg)|(png)|(gif)|(html)|(ico)|(s
> wf)|(xml))$")
> 
> ... to grant access to resources the t5easyfckEditor won't work.  It's a
> pity no workaround seems to be available for this, unless I am missing
> something.
> 
> Regards,
> Jim.
> 
> -Original Message-
> From: Ville Virtanen [mailto:ville.virta...@cerion.fi] 
> Sent: 31 May 2010 18:00
> To: users@tapestry.apache.org
> Subject: Re: Asset protection and upgrade notes
> 
> 
> Also this choice forces us library writers to either
> 
> a) support two separate deployment jars for different T5 versions
> b) fork the code depending on the T5 version
> 
> So my approach is probably this:
>  public static void
> contributeClasspathAssetAliasManager(MappedConfiguration
> configuration, 
> @Inject @Symbol(FckEditorConstants.EDITOR_CONTEXT) String
> location,
> @Inject @Symbol(SymbolConstants.TAPESTRY_VERSION) String
> t5Version)
> {
> if(!location.equalsIgnoreCase("easyfck") ||
> getTapestryVersion(t5Version) < 5106) {
> configuration.add(location, "com/orientimport/easyfck/js");
> }
> }
> 
> private static int getTapestryVersion(String version) {
> return Integer.parseInt(version.replaceAll("\\.", ""));
> }  
> 
> Not elegant, not good code (assumes something about the future version
> numbers..), not maintainable in long run, if these dicisions will keep
> popping up.
> 
> Also the automatic classpath asset addition works for this library only if
> the user who uses the library hasn't decided to use custom url for
> his/hers
> fck editor. It should not be depended on the TAG prefix?
> 
> My 2c,
> 
>  - Ville
> 
> 
> 
> 
> Ville Virtanen wrote:
>> 
>> Hi,
>> 
>> I've been tracking the documentation to understand the change in asset
>> protection, but haven't found anything useful.
>> 
>> I've checked the upgrade guide from svn (last update 4 days ago):
>>
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/upgrade.a
> pt?revision=948226&view=markup
>> 
>> But really it only mentions the no-slashes-in-virtual-folders
>> restriction.
>> Where is the asset protection part or am I looking from wrong sources?
>> 
>> Also, what is the rationale behind removing library specific versions?
>> Even if the 3rd party library doesn't change any resources browsers are
>> forced to download all assets again when updating the main program.
>> Technical challenges I presume?
>> 
>> Anyhow, the info on asset protection is very important for me, or at
>> least
>> just plain cold "We're working on it and have no eta.". (Then I know to
>> stop reading through sources.)
>> 
>>  - Ville
>> 
> 
> -- 
> View this message in context:
> http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28733093
> .html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28751736.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: Asset protection and upgrade notes

2010-05-31 Thread Ville Virtanen

Also this choice forces us library writers to either

a) support two separate deployment jars for different T5 versions
b) fork the code depending on the T5 version

So my approach is probably this:
 public static void
contributeClasspathAssetAliasManager(MappedConfiguration
configuration, 
@Inject @Symbol(FckEditorConstants.EDITOR_CONTEXT) String
location,
@Inject @Symbol(SymbolConstants.TAPESTRY_VERSION) String
t5Version)
{
if(!location.equalsIgnoreCase("easyfck") ||
getTapestryVersion(t5Version) < 5106) {
configuration.add(location, "com/orientimport/easyfck/js");
}
}

private static int getTapestryVersion(String version) {
return Integer.parseInt(version.replaceAll("\\.", ""));
}  

Not elegant, not good code (assumes something about the future version
numbers..), not maintainable in long run, if these dicisions will keep
popping up.

Also the automatic classpath asset addition works for this library only if
the user who uses the library hasn't decided to use custom url for his/hers
fck editor. It should not be depended on the TAG prefix?

My 2c,

 - Ville




Ville Virtanen wrote:
> 
> Hi,
> 
> I've been tracking the documentation to understand the change in asset
> protection, but haven't found anything useful.
> 
> I've checked the upgrade guide from svn (last update 4 days ago):
> http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/upgrade.apt?revision=948226&view=markup
> 
> But really it only mentions the no-slashes-in-virtual-folders restriction.
> Where is the asset protection part or am I looking from wrong sources?
> 
> Also, what is the rationale behind removing library specific versions?
> Even if the 3rd party library doesn't change any resources browsers are
> forced to download all assets again when updating the main program.
> Technical challenges I presume?
> 
> Anyhow, the info on asset protection is very important for me, or at least
> just plain cold "We're working on it and have no eta.". (Then I know to
> stop reading through sources.)
> 
>  - Ville
> 

-- 
View this message in context: 
http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28733093.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



Asset protection and upgrade notes

2010-05-31 Thread Ville Virtanen

Hi,

I've been tracking the documentation to understand the change in asset
protection, but haven't found anything useful.

I've checked the upgrade guide from svn (last update 4 days ago):
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/src/site/apt/upgrade.apt?revision=948226&view=markup

But really it only mentions the no-slashes-in-virtual-folders restriction.
Where is the asset protection part or am I looking from wrong sources?

Also, what is the rationale behind removing library specific versions? Even
if the 3rd party library doesn't change any resources browsers are forced to
download all assets again when updating the main program. Technical
challenges I presume?

Anyhow, the info on asset protection is very important for me, or at least
just plain cold "We're working on it and have no eta.". (Then I know to stop
reading through sources.)

 - Ville
-- 
View this message in context: 
http://old.nabble.com/Asset-protection-and-upgrade-notes-tp28732735p28732735.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: EasyFCKEditor FileUpload with Tomcat?

2010-05-05 Thread Ville Virtanen

Hi,

yeah, the configuration differs how to set up this with different app
servers. (Or apache as we always use httpd to serve static files anyway.)

 - Ville

Ps. Wish that I had time to finish CKEditor integration, I already have
working version which needs polishing and documentation. The file uploader
part was a lot of work because CK has no open source file uploader.


Steve Eynon-2 wrote:
> 
> Hi,
> 
> It's all about having the app server serve up images once they've been
> uploaded.
> 
> For Tomcat I simply set a new context with the specified docbase. e.g.
> using to set up a context of wwwfiles to serve images from
> 
> C:\Users\Ville\Documents\NetBeansProjects\wwwfiles
> 
> I just created a file called
> 
> C:\Apps\apache-tomcat-6.0.24\conf\Catalina\localhost\wwwfiles.xml
> 
> with the content
> 
> 
> 
> 
> 
> Steve.
> 
> --
> Steve Eynon
> mobie: (+592) 678 4236
> 
> 
> 
> On 5 May 2010 10:45, hunta  wrote:
>>
>> Hi,
>>
>> i tried to get the file upload to work with tomcat with this manual:
>> http://t5-easy-fckeditor.kenai.com/FileUploads.html
>>
>> Now i've got the problem that i use Tomcat instead of jetty and i have no
>> idea how the 3. step in the manual should look like for tomcat.
>>
>> Can someone help?
>>
>> hunta
>> --
>> View this message in context:
>> http://old.nabble.com/EasyFCKEditor-FileUpload-with-Tomcat--tp28461971p28461971.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/EasyFCKEditor-FileUpload-with-Tomcat--tp28461971p28469153.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: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen


Hi,

I think I solved this one. The findings show that FCK editor java
integration library could do little bit more descriptive errors... 

The SimleFckEditorConnector you supplied is a bit invalid. The method public
List> getFiles(ResourceType rt, String currentFolder)
throws InvalidCurrentFolderException, ReadException 

returns list of map. where the String is
net.fckeditor.connector.Connector.KEY_NAME or
net.fckeditor.connector.Connector.KEY_SIZE and the Object is either the file
name or file size.

It should be like this:
Map map = new HashMap();
map.put(Connector.KEY_NAME, "hct.log");
map.put(Connector.KEY_SIZE, new Integer(64));
List list = new ArrayList>();
list.add(map);
return list;

I hope that this gets you going :) You can test the default implementation
by NOT binging your connector, then easyfck will fall back to the default.
Then allow all in SimpleFckEditorUserRightServiceImpl and you can upload and
view images etc.

 - Ville

Ps. Take a look at FCK editor default implementation for details if you
whish to implement your own connector:
http://dev.fckeditor.net/browser/FCKeditor.Java/tags/2.6/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java


Tomek-28 wrote:
> 
> easyfck ver. 1.0.4
> tapestry ver. 5.1.0.5
> 
> I also noticed that only when I add configuration to my textarea that uses
> easyfckeditor, searvices like FckEditorUserRightService
> FckEditorPathService
> are initialized.
> 
> This is my config for fckeditor
> FCKConfig.ContextMenu = [];
> FCKConfig.ToolbarSets["Default"] = [
> ['Image']
> ];
> 
> and tml
> 
>  configuration="customConf"
> />
> 
> 
> and Java class
> @Persist
> @Property
> private String val;
> 
> @Property
> @Inject
> @Path("context:fckeditor/fck.js")
> private Asset2 customConf;
> 
> I will send You my project shortly.
> 
> Tomek
> 
> 
> 
> 
> 2010/3/29 Ville Virtanen 
> 
>>
>> Hi,
>>
>> and sorry for spamming this many messages :) What is the tapestry 5
>> version?
>> Only 5.1.0.5 is supported. Later I plan to continue to support 5.1 and
>> 5.2
>> branches if there are some changes that require heavy changes, otherwise
>> both are supported out of the box.
>>
>> So, I have not tested with the 5.0.x versions.
>>
>>  - Ville
>>
>>
>> Tomek-28 wrote:
>> >
>> > Hi,
>> >
>> > I use jetty 6.1.9 as a maven plugin. Problem occurs in Windows and
>> Linux
>> >
>> > this is my implementation of FckEditorUserRightService
>> >
>> > public class SimpleFckEditorUserRightServiceImpl implements
>> > FckEditorUserRightService {
>> >
>> > private final Logger logger;
>> >
>> > public SimpleFckEditorUserRightServiceImpl(Logger logger) {
>> > this.logger = logger;
>> > }
>> >
>> > @Override
>> > public boolean canCreateFolders() {
>> > logger.info("Allowed folder creation");
>> > return false;
>> >
>> > }
>> >
>> > @Override
>> > public boolean canBrowseFiles() {
>> > logger.info("Allowed file browsing");
>> > return true;
>> > }
>> >
>> > @Override
>> > public boolean canUploadFiles() {
>> > logger.info("Allowed file upload");
>> > return false;
>> >
>> > }
>> > }
>> >
>> > FckEditorPathService interface
>> >
>> > public class SimpleFckEditorPathServiceImpl implements
>> > FckEditorPathService
>> > {
>> >
>> > @Override
>> > public String getServerPathForFiles() {
>> > return "/wwwfiles";
>> > }
>> >
>> > @Override
>> > public String getClientURLStartForFiles() {
>> > return "C:\\logs\\wwwfiles\\";
>> >
>> > }
>> >
>> > }
>> >
>> > pom.xml
>> >
>> > 
>> > 
>> > org.mortbay.jetty
>> > maven-jetty-plugin
>> > 6.1.9
>> > 
>> > 
>> > > > implementation="org.mortbay.jetty.NCSARequestLog">
>> > 
>> > true
>> &

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen
t; SimpleFckEditorUserRightServiceImpl.java:18) via
> pl.syso.paruszynska.services.AppModule.bind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorPathService Invoking constructor
> pl.syso.paruszynska.
> services.SimpleFckEditorPathServiceImpl() (at
> SimpleFckEditorPathServiceImpl.java:14) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> [DEBUG] AppModule.FckEditorConnector Invoking constructor
> pl.syso.paruszynska.services.SimleFckEditorConnector() (at
> SimleFckEditorConnector.java:27) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> CONSTRUCTOR SimleFckEditorConnector
> 
>  Current folder: /
> 2010-03-29 10:05:08.975::WARN:
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor
> java.lang.RuntimeException: java.lang.NullPointerException
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:78)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> $HttpServletRequestHandler_127a8f1ac4a.service($HttpServletRequestHandler_127a8f1ac4a.java)
> at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
> 
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.NullPointerException
> at
> net.fckeditor.response.GetResponse.setFiles(GetResponse.java:236)
> at
> net.fckeditor.connector.Dispatcher.getFoldersAndOrFiles(Dispatcher.java:216)
> at net.fckeditor.connector.Dispatcher.doGet(Dispatcher.java:166)
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:76)
> ... 22 more
> 127.0.0.1 -  -  [29/mar/2010:08:05:08 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1269849907986
> HTTP/1.1" 500 6094 "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=fckeditor";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> 
> 
> 
> When i press 'Browse Server' in 'Image Properties window i get this
> message:
> The server didn't reply with a proper XML data. Please check your
> configuration.
> 
> I think the problem is that i always get Current Folder as a / (ROOT
> folder). I found in source code of easyfckeditor that i can put
> configuration.add(FckEditorConstants.APPLICATION_CONTEXT, "/wwwfiles");
> to change it but it does nothing good to my app.
> 
> 
> 
> Tomek
> 
> 
> 
> 
&g

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen
ind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorPathService Invoking constructor
> pl.syso.paruszynska.
> services.SimpleFckEditorPathServiceImpl() (at
> SimpleFckEditorPathServiceImpl.java:14) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> [DEBUG] AppModule.FckEditorConnector Invoking constructor
> pl.syso.paruszynska.services.SimleFckEditorConnector() (at
> SimleFckEditorConnector.java:27) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> CONSTRUCTOR SimleFckEditorConnector
> 
>  Current folder: /
> 2010-03-29 10:05:08.975::WARN:
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor
> java.lang.RuntimeException: java.lang.NullPointerException
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:78)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> $HttpServletRequestHandler_127a8f1ac4a.service($HttpServletRequestHandler_127a8f1ac4a.java)
> at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
> 
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.NullPointerException
> at
> net.fckeditor.response.GetResponse.setFiles(GetResponse.java:236)
> at
> net.fckeditor.connector.Dispatcher.getFoldersAndOrFiles(Dispatcher.java:216)
> at net.fckeditor.connector.Dispatcher.doGet(Dispatcher.java:166)
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:76)
> ... 22 more
> 127.0.0.1 -  -  [29/mar/2010:08:05:08 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1269849907986
> HTTP/1.1" 500 6094 "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=fckeditor";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> 
> 
> 
> When i press 'Browse Server' in 'Image Properties window i get this
> message:
> The server didn't reply with a proper XML data. Please check your
> configuration.
> 
> I think the problem is that i always get Current Folder as a / (ROOT
> folder). I found in source code of easyfckeditor that i can put
> configuration.add(FckEditorConstants.APPLICATION_CONTEXT, "/wwwfiles");
> to change it but it does nothing good to my app.
> 
> 
> 
> Tomek
> 
> 
> 
> 
> 
> 2010/3/28 Ville Virtanen 
> 
>>
>> Hi,
>>
>> can you attach the stack trace 

Re: easyfckeditor and file upload

2010-03-29 Thread Ville Virtanen
mport.easyfck.resolvers.FckEditorPathResolver
> [DEBUG] AppModule.FckEditorUserRightService Creating service
> 'FckEditorUserRightService'.
> [DEBUG] AppModule.FckEditorUserRightService Invoking constructor
> pl.syso.paruszynska.services.SimpleFckEditorUserRightServiceImpl(Logger)
> (at
> SimpleFckEditorUserRightServiceImpl.java:18) via
> pl.syso.paruszynska.services.AppModule.bind(Servi
> ceBinder) (at AppModule.java:35).
> [INFO] AppModule.FckEditorUserRightService Allowed file browsing
> [DEBUG] AppModule.FckEditorPathService Creating service
> 'FckEditorPathService'.
> [DEBUG] AppModule.FckEditorPathService Invoking constructor
> pl.syso.paruszynska.
> services.SimpleFckEditorPathServiceImpl() (at
> SimpleFckEditorPathServiceImpl.java:14) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> [DEBUG] AppModule.FckEditorConnector Invoking constructor
> pl.syso.paruszynska.services.SimleFckEditorConnector() (at
> SimleFckEditorConnector.java:27) via
> pl.syso.paruszynska.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:35).
> CONSTRUCTOR SimleFckEditorConnector
> 
>  Current folder: /
> 2010-03-29 10:05:08.975::WARN:
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor
> java.lang.RuntimeException: java.lang.NullPointerException
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:78)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726)
> at
> $HttpServletRequestHandler_127a8f1ac51.service($HttpServletRequestHandler_127a8f1ac51.java)
> at
> $HttpServletRequestHandler_127a8f1ac4a.service($HttpServletRequestHandler_127a8f1ac4a.java)
> at
> org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127)
> 
> at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
> at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
> at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
> at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
> at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
> at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
> 
> at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
> at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
> at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
> at org.mortbay.jetty.Server.handle(Server.java:324)
> at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
> at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
> at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
> at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
> at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
> at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
> Caused by: java.lang.NullPointerException
> at
> net.fckeditor.response.GetResponse.setFiles(GetResponse.java:236)
> at
> net.fckeditor.connector.Dispatcher.getFoldersAndOrFiles(Dispatcher.java:216)
> at net.fckeditor.connector.Dispatcher.doGet(Dispatcher.java:166)
> at
> net.fckeditor.connector.Tapestry5InterceptFckActivityFilter.service(Tapestry5InterceptFckActivityFilter.java:76)
> ... 22 more
> 127.0.0.1 -  -  [29/mar/2010:08:05:08 +] "GET
> /paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/fckeditor?Command=GetFoldersAndFiles&Type=Image&CurrentFolder=%2F&uuid=1269849907986
> HTTP/1.1" 500 6094 "
> http://localhost:8080/paruszynska/assets/easyfck/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=fckeditor";
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.2) Gecko/20100316
> Firefox/3.6.2 (.NET CLR 3.5.30729)"
> 
> 
> 
> When i press 'Browse Server' in 'Image Properties window i get this
> message:
> The server didn't reply with a proper XML data. Please check your
> configuration.
> 
> I think the problem is t

Re: easyfckeditor and file upload

2010-03-28 Thread Ville Virtanen

Hi,

can you attach the stack trace for further analysis? Also what servlet
container are you using to run software?

  -Ville

Tomek-28 wrote:
> 
> Hi,
> 
> i need to integrate a WYSIWYG editor to my website. I found only 2
> projects
> that integrate fckeditor with tapestry 5 - ChenilleKit and easyfckeditor.
> I
> found that easyfckeditor support file uploads while ChenilleKit doesn't. I
> went through author's tutorial:
> http://t5-easy-fckeditor.kenai.com/FileUploads.html
> but after implementing and binding FckEditorUserRightService class:
> 
> binder.bind(FckEditorUserRightService.class,
> SimpleFckEditorUserRightServiceImpl.class);
> 
> I can't browse any files. I got a message:
> "*Invalid current folder specified*"
> 
> Implementing and binding FckEditorPathService.class:
> 
> binder.bind(FckEditorPathService.class,
> SimpleFckEditorPathServiceImpl.class);
> 
> does nothing - the same message. I even tried to make my own connector but
> I
> get NullPointerException all the time.
> Has anyone used easyfckeditor? Or maybe there is another way to have
> WYSIWYG
> editor and file upload support?
> 
> 
> Tomek
> 
> 

-- 
View this message in context: 
http://old.nabble.com/easyfckeditor-and-file-upload-tp28055044p28058075.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: Pretty Printing JSON

2010-02-24 Thread Ville Virtanen

Hi,

this definitely sounds something T5 should do as it is known to be developer
friendly and aid in debugging whenever possible. 

It sounds good to enable this in non-production mode and disable in
production.

 - Ville


Ben Dotte-2 wrote:
> 
> I put up a post on pretty printing the JSON that gets output on the
> bottom of the generated HTML by Tapestry:
> 
> http://bdotte.blogspot.com/2010/02/pretty-printing-json-in-tapestry-5.html
> 
> I'm not sure if there is any interest in having this functionality
> available in the actual Tapestry codebase; I could look into
> (attempting) to clean it up if there is. In any case it has been handy
> for me, so I thought I'd post it.
> 
> Ben
> 
> -
> 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/Pretty-Printing-JSON-tp27713069p27714144.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: How to get rid of some T5 stack traces ...

2010-01-29 Thread Ville Virtanen

Hi, 

hrx -> xhr :D

It is true that T5 catches many of these
"I-did-not-even-know-something-makes-these" -requests, and it is good to
know of this happening.

Obviously I should also take a look at the URL re-write functionality.

 - Ville

Ps. It's minus 20 Celsius here... (-4 Fahrenheit) I'm freezing! :)


Thiago H. de Paula Figueiredo wrote:
> 
> On Thu, 28 Jan 2010 14:47:08 -0200, Ville Virtanen  
>  wrote:
> 
>> Hi,
> 
> Hi!
> 
>> One way to prevent this is to contribute a T5 httprequest filter that  
>> just redirects to error page if it detects a post url submitted using  
>> GET.
> 
> Well, Tapestry always submit by POST, so any submission using GET is not  
> an human user.
> If you want to provide access to robots, I think it's better to have some  
> kind of API linke Twitter has.
> 
>> (And isn't hrx?)
> 
> hrx? I guess I need some more internet vocabulary . . . hehehe
> 
>> This is one of the T5 weaker sides I think. It produces many
>> like these in the production for us for a site that slightly altered url
>> layout, although these errors are rarely made by human.
> 
> I think this is an upside, not a downside, as it shows that suspicious  
> requests are being made.
> 
>> Haven't seen that one on our production servers, however our servers are
>> getting hammered by someone trying to get /index.html which produces  
>> "there is no such component in page... blah .. the valid components  
>> are...".
>> This can be fixed by implementing a component named html that does
>> absolutely nothing and placing it to the page.
> 
> You could also have an URL rewriter rule to catch that.
> 
>>  - Ville (From f*cking cold and snowy Turku ;))
> 
> Thiago (from f*cking-but-not-that-much hot Belo Horizonte) ;)
> 
> -- 
> 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/How-to-get-rid-of-some-T5-stack-traces-...-tp27352338p27367110.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: How to get rid of some T5 stack traces ...

2010-01-28 Thread Ville Virtanen

Hi,

One way to prevent this is to contribute a T5 httprequest filter that just
redirects to error page if it detects a post url submitted using GET. (And
isn't hrx?) This is one of the T5 weaker sides I think. It produces many
like these in the production for us for a site that slightly altered url
layout, although these errors are rarely made by human.

Haven't seen that one on our production servers, however our servers are
getting hammered by someone trying to get /index.html which produces "there
is no such component in page... blah .. the valid components are...".

This can be fixed by implementing a component named html that does
absolutely nothing and placing it to the page.

 - Ville (From f*cking cold and snowy Turku ;))


oakstair wrote:
> 
> Hi !
> 
> Our production servers get hitted by our users as well as robots as well
> as
> ...
> 
> The stack trace below appears now and then and I would like to get rid of
> it.
> 
> I haven't yet turned on production mode since we thought that bug haunting
> should be easier if not.
> 
> So my questiosn are:
> 
> + Will the trace disappear if PROD mode is enabled.
> + Is there a smart way to get rid of it without turning on PROD mode.
> ? How do I best find out what the request is that is causing this trace?
> 
> Thanks in advance!
> /Gunnar Eketrapp
> (from a very cold and snowy Stockholm)
> 
> 
> 
> 4:09:18.842 [http-8080-Processor14] ERROR
> o.a.t.s.T.RequestExceptionHandler
> - Processing of request failed with uncaught exception: Forms require that
> the request method be POST and that the t:formdata query parameter have
> values.
> org.apache.tapestry5.runtime.ComponentEventException: Forms require that
> the
> request method be POST and that the t:formdata query parameter have
> values.
> at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1098)
> [tapestry-core-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75)
> [tapestry-core-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $ComponentEventRequestHandler_12661a80307.handle($ComponentEventRequestHandler_12661a80307.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> $ComponentEventRequestHandler_12661a801ea.handle($ComponentEventRequestHandler_12661a801ea.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $ComponentRequestHandler_12661a8018c.handleComponentEvent($ComponentRequestHandler_12661a8018c.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
> [tapestry-core-5.1.0.5.jar:na]
> at $Dispatcher_12661a8018e.dispatch($Dispatcher_12661a8018e.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at $Dispatcher_12661a80183.dispatch($Dispatcher_12661a80183.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)
> [tapestry-core-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at
> org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85)
> [tapestry-core-5.1.0.5.jar:na]
> at
> $RequestHandler_12661a80184.service($RequestHandler_12661a80184.java)
> [tapestry-ioc-5.1.0.5.jar:na]
> at com.te

Re: [T5.1.0.4] Distinguishing Between Internal and Scripts when Combining

2010-01-21 Thread Ville Virtanen

Hi,

GA works ok for us by just adding it to the tml as is instructed in GA site
- No need to use T5 facilities to include the script. (Done in layout.tml in
our case.)

This doesn't solve the external script problems, and may not work for you
but just thought to let you know.

 - Ville


Kalle Korhonen-2 wrote:
> 
> This seems to be the case with 5.1.0.5 as well - was there any
> resolution for it? Did you ever create an enhancement request?
> 
> Kalle
> 
> 
> On Sun, May 3, 2009 at 3:07 PM, Steve Eynon
>  wrote:
>> Hi,
>>
>> If you add a script with an external url then script combining is
>> disabled.
>>
>> From DocumentLinkerImpl :
>>
>> public void addScriptLink(String scriptURL) {
>> ...
>>    // If a script with an external URL is added, we can't combine the
>> scripts after all.
>>    if (combineScripts && !scriptURL.startsWith(fullAssetPrefix))
>>        combineScripts = false;
>> ...
>> }
>>
>> Would it not be possible to have two buckets of scripts, one for
>> internal scripts and the other for external? The internal scripts
>> could then combined into a virtual asset and the external ones
>> rendered as separate script tags.
>>
>> The script combining and virtual assets were working wonderfully until
>> I added script link to Google Analytics on all my pages.
>>
>> renderSupport.addScriptLink("http://www.google-analytics.com/ga.js";);
>>
>> I don't want to loose this cool feature of T5 and I would imagine
>> adding Google Analytics to sites (in the manner above) would be a
>> rather common thing to do.
>>
>> Regards,
>>
>> Steve.
>>
>> -
>> 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/-T5.1.0.4--Distinguishing-Between-Internal-and-Scripts-when-Combining-tp23360860p27268795.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: Installing easyfckeditor

2010-01-11 Thread Ville Virtanen

Hi,

just released 1.0.4 which uses the latest java integration library. I also
updated some of the docs at http://t5-easy-fckeditor.kenai.com

 - Ville


oskar_a wrote:
> 
> Thx to all,
> 
> but I solved this problem by creating a new maven-project from tapestry
> quickstart archetype and addinng the statements in pom.xml. Not really
> elegant but it works.
> May be I did some mistakes in maven configuration or something else.
> --
> Regards Oskar
> 

-- 
View this message in context: 
http://old.nabble.com/Installing-easyfckeditor-tp27020854p27107494.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: Advice on Tapestry5 best practise for user session data

2010-01-10 Thread Ville Virtanen

Hi,

as Thiago said you can access the application state using
ApplicationStateManager in services, but beware that this approach doesn't
work if there is no request. 

So, you cannot use the service anymore if the calling code is, let's say
some sort of batch job that has actually nothing to do with a web request.

IMHO web related stuff should never be accessed in low level services / dal
to avoid this. If you can live with that restriction it is ok to use
ApplicationStateManager.

 - Ville


jc1001 wrote:
> 
> Eric, Juan,
> 
> Thanks for the replies.  I can see how this would work between
> pages/components but how would it work say from a service that was used as
> some sort of entity manager?  Would it be a question of passing it as a
> parameter to each method call on the service that requires data from it or
> is there a way to access it from a service?  As you can probably guess,
> I'm
> trying to minimise interface / method signature changes?  Thanks.
> 
> Regards,
> Jim.
> 
> -Original Message-
> From: Juan E. Maya [mailto:maya.j...@gmail.com]
> Sent: 10 January 2010 16:47
> To: Tapestry users
> Subject: Re: Advice on Tapestry5 best practise for user session data
> 
> 
> I would also use a @SessionState pojo. The approach of the service
> having a map wouldn't work in a clustered environment.
> 
> On Sun, Jan 10, 2010 at 11:34 AM, Erick Erickson
>  wrote:
>> POJOs can be stored as @SessionState variables *if* they're
>> serializable (as I understand it), would that work?
>>
>> I can't weigh in on the pros and cons of memory usage etc over
>> your injected service idea, but using @SessionState would
>> be simpler code-wise until you had reason to change
>>
>> FWIW
>> Erick
>>
>> On Sun, Jan 10, 2010 at 10:58 AM, Jim O'Callaghan
>> wrote:
>>
>>> I'm trying to work out the best approach to passing a pojo around a
> system
>>> that is to be used for caching some user relevant data (keys only, and
>>> otherwise minimal amounts of information) on a per-user basis.  The data
> is
>>> to be used in a large number of db queries in the system (various
> persisted
>>> config demarcated by company / division codes) during a user's session,
> and
>>> as such I don't want to be reloading it from the db on a per-user basis
>>> each
>>> time.  I would like to use a pojo, and do an initial load of the data
> when
>>> the user logs in (or lazy-load and cache on getter access of specific
>>> data),
>>> and then have it available around various parts of the system (esp. the
>>> service and possibly DAO layer).  Can some of you more experienced
>>> Tapestry5
>>> users advise on how best to approach this scenario?  Is an injected
> service
>>> containing a map of pojos keyed on user a bad idea?  Thanks for any
>>> suggestions.
>>>
>>> Regards,
>>> Jim.
>>>
>>
> 
> -
> 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Advice-on-Tapestry5-best-practise-for-user-session-data-tp27099574p27100792.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: Installing easyfckeditor

2010-01-10 Thread Ville Virtanen

Hi,

Please include more of the stack trace so I can take a look at it. You
should be able to follow this guide:
http://t5-easy-fckeditor.kenai.com/Simple.html

I've also rolled out new version, 1.0.3 which fixes some problems with
application initialization that caused recursive problems. I will also
shortly release 1.0.4 which uses the newer java integration package 2.6
(http://java.fckeditor.net/) to provide the file upload capabilities.

 - Ville


oskar_a wrote:
> 
> Hi Ville,
> 
> thank you for your advice. I installed the m2 Eclipse plugin and enabled
> the dependency management for my Project. So when I add something like
> this in my pom.xml
> 
> 
>  com.orientimport
>  t5-easy-fckeditor
>  1.0.2
> 
> 
> maven adds the jars etc. (i can see it in the build path) but i still can
> not use the component.
> "[ERROR] TapestryModule.RequestExceptionHandler Processing of request
> failed with uncaught exception: Unable to resolve 'easyfck/fckeditor' to a
> component class name.  Available component types: ActionLink"
> 
> I have also the same problem when I try to add the tapestry-hibernate
> dependencies.
> When I start a new Project and let maven built it from tapestry-quickstart
> it works but I would prefer to use my old Project (I importet just a
> hello-world.war file from http://code.google.com/p/tapestrybook/ and
> worked on it. Server is Tomcat6). 
> Dou you or somebody elso knows how to solve this Problem?
> 
> Regards Oskar
> 
> 
> Ville Virtanen wrote:
>> 
>> Hi,
>> 
>> if you don't use maven you have to provide yourself also all the required
>> dependencies. (See http://t5-easy-fckeditor.kenai.com/dependencies.html
>> to view the list of dependencies.)
>> 
>> The jar must be in the project libraries so that the jar is accessible to
>> T5 during runtime, so adding it to only build path may not be enough.
>> 
>> You really should use maven, follow this guide to setup your env:
>> http://www.troymaxventures.com/2008/05/tapestry5-netbeans-quickstart.html
>> but use the latest 6.8 instead of the 6.1 mentioned in the guide.
>> 
>> This way maven takes care of all those dependencies etc.
>> 
>>  - Ville
>> 
>> Ps. The project has moved to Kenai, so the 1.0.2 jar can be obtained from
>> mvn repository, just go with your favorite browser to
>> http://kenai.com/svn/t5-easy-fckeditor~maven-release-repository/com/orientimport/t5-easy-fckeditor
>> to view the releases.
>> 
>> 
>> oskar_a wrote:
>>> 
>>> Hi, 
>>> I'm really new in Tapestry and try to install the easyfckeditor
>>> component
>>> http://code.google.com/p/easyfckeditor/
>>> (I don't used maven to create my project and also don't have the maven
>>> eclipse plugin.)
>>> 
>>> I downloaded the jar-file (Tapestry5EasyFckEditor-1.0-Beta-2.jar) and
>>> added it to the build path. But when I try to use it with 
>>> 
>>> 
>>> tapestry means:
>>> 
>>> Unable to resolve 'easyfck/fckeditor' to a component class name.
>>> 
>>> Regards Oskar
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Installing-easyfckeditor-tp27020854p27100341.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: Advice on Tapestry5 best practise for user session data

2010-01-10 Thread Ville Virtanen

I would follow this guide:
http://tapestry.apache.org/tapestry5/guide/appstate.html
and make my own app state object, UserSession, which would contain the
needed per user data. (The keys anyway.) There can be services that provide
data based on these keys, and those services should also take care of
caching or more preferably use cache service(s) to do the caching. Cache
service can be implemented using ehcache (http://ehcache.org/) for an
example.

Make interface that the user session implements, then use this interface in
your service and dal methods as a parameter.

This way your system is also cluster ready, as long as the caching mechanism
is cluster friendly too, you could make it using mem-cached
(http://memcached.org/) and one of it's java clients or one of the java
caches.

If you require absolute scaling then throw out the session all together and
live with cookies or encoded urls, this way you can achieve truly stateless
server side and you can add more servers without any sort of sticky sessions
or session replication problems etc.

 - Ville

Ps. for 99% of cases using as light user session as possible + pure java
cache is the right way to go afaik, so consider sessionless + memcahced only
if you plan on running the software with loads or servers.



Jim O'Callaghan wrote:
> 
> I'm trying to work out the best approach to passing a pojo around a system
> that is to be used for caching some user relevant data (keys only, and
> otherwise minimal amounts of information) on a per-user basis.  The data
> is
> to be used in a large number of db queries in the system (various
> persisted
> config demarcated by company / division codes) during a user's session,
> and
> as such I don't want to be reloading it from the db on a per-user basis
> each
> time.  I would like to use a pojo, and do an initial load of the data when
> the user logs in (or lazy-load and cache on getter access of specific
> data),
> and then have it available around various parts of the system (esp. the
> service and possibly DAO layer).  Can some of you more experienced
> Tapestry5
> users advise on how best to approach this scenario?  Is an injected
> service
> containing a map of pojos keyed on user a bad idea?  Thanks for any
> suggestions.
> 
> Regards,
> Jim.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Advice-on-Tapestry5-best-practise-for-user-session-data-tp27099574p27100214.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: Installing easyfckeditor

2010-01-06 Thread Ville Virtanen

Hi,

if you don't use maven you have to provide yourself also all the required
dependencies. (See http://t5-easy-fckeditor.kenai.com/dependencies.html to
view the list of dependencies.)

The jar must be in the project libraries so that the jar is accessible to T5
during runtime, so adding it to only build path may not be enough.

You really should use maven, follow this guide to setup your env:
http://www.troymaxventures.com/2008/05/tapestry5-netbeans-quickstart.html
but use the latest 6.8 instead of the 6.1 mentioned in the guide.

This way maven takes care of all those dependencies etc.

 - Ville

Ps. The project has moved to Kenai, so the 1.0.2 jar can be obtained from
mvn repository, just go with your favorite browser to
http://kenai.com/svn/t5-easy-fckeditor~maven-release-repository/com/orientimport/t5-easy-fckeditor
to view the releases.


oskar_a wrote:
> 
> Hi, 
> I'm really new in Tapestry and try to install the easyfckeditor component
> http://code.google.com/p/easyfckeditor/
> (I don't used maven to create my project and also don't have the maven
> eclipse plugin.)
> 
> I downloaded the jar-file (Tapestry5EasyFckEditor-1.0-Beta-2.jar) and
> added it to the build path. But when I try to use it with 
> 
> 
> tapestry means:
> 
> Unable to resolve 'easyfck/fckeditor' to a component class name.
> 
> Regards Oskar
> 

-- 
View this message in context: 
http://old.nabble.com/Installing-easyfckeditor-tp27020854p27026838.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: Number Formatting in TextField (T5)

2010-01-04 Thread Ville Virtanen

Hi,

we actually made it the hard way and currently we have our own
BigDecimalFieldTranslatorImpl, which takes care of the actual validation, as
seen here:

public class BigDecimalFieldTranslatorImpl extends
FieldTranslatorImpl {

private final Locale locale;
private final int numberOfDecimals;
private final Field field;
private final MessageFormatter messageFormatter;
private final Messages messages;
private final boolean useGrouping;

public BigDecimalFieldTranslatorImpl(int numberOfDecimals, boolean
useGrouping, Locale locale, Field field, Translator translator,
MessageFormatter formatter, FormSupport formSupport, Messages messages) {
super(field, translator, formatter, formSupport);
this.locale = locale;
this.numberOfDecimals = numberOfDecimals;
this.field = field;
this.messageFormatter = formatter;
this.messages = messages;
this.useGrouping = useGrouping;
}

@Override
public String toClient(BigDecimal value)
{
if(useGrouping){
return NumberFormatUtility.formatWithGrouping(value,
numberOfDecimals, locale);
}
return NumberFormatUtility.format(value, numberOfDecimals, locale);
}

@Override
public BigDecimal parse(String input) throws ValidationException {

if(input != null) {
input = input.replaceAll("\\s", "");
}

BigDecimal result = super.parse(input);

if(NumberFormatUtility.hasTooManyDecimals(input, numberOfDecimals,
locale)) {
throw new ValidationException(formatMessage());
}

return result;
}

private String formatMessage()
{
if(numberOfDecimals == 0) {
return messages.format("integer-format-exception",
field.getLabel());
} else {
return
messages.format("fi.cerion.common.too-many-decimal-places",
field.getLabel(), numberOfDecimals);
}
}

}

However, to supply per field validation data to the validator we opted to
make our own service that is used to get the field translator:
public class CerionFieldTranslatorSourceImpl implements
CerionFieldTranslatorSource {

private final PersistentLocale persistentLocale;
private final TranslatorSource translatorSource;
private final FieldTranslatorSource fieldTranslatorSource;
private final ValidationMessagesSource validationMessagesSource;
private final FormSupport formSupport;

public CerionFieldTranslatorSourceImpl(PersistentLocale
persistentLocale, TranslatorSource translatorSource, FieldTranslatorSource
fieldTranslatorSource, ValidationMessagesSource validationMessagesSource,
FormSupport formSupport) {
this.persistentLocale = persistentLocale;
this.translatorSource = translatorSource;
this.fieldTranslatorSource = fieldTranslatorSource;
this.validationMessagesSource = validationMessagesSource;
this.formSupport = formSupport;
}

@Override
public FieldTranslator createBigDecimalTranslator(Field
field, int numberOfDecimals)
{
ComponentResources resources =
((ComponentResourcesAware)field).getComponentResources();
Translator translator =
translatorSource.getByType(BigDecimal.class);

return createTranslator(field, resources.getId(),
resources.getContainerMessages(), resources.getLocale(), translator,
numberOfDecimals, false);
}

@Override
public FieldTranslator createBigDecimalTranslator(Field
field, int numberOfDecimals, boolean useGrouping)
{
ComponentResources resources =
((ComponentResourcesAware)field).getComponentResources();
Translator translator =
translatorSource.getByType(BigDecimal.class);

return createTranslator(field, resources.getId(),
resources.getContainerMessages(), resources.getLocale(), translator,
numberOfDecimals, useGrouping);
}

private FieldTranslator createTranslator(Field field, String overrideId,
Messages overrideMessages, Locale locale, Translator translator, int
numberOfDecimals, boolean useGrouping)
{
MessageFormatter formatter = findFormatter(overrideId,
overrideMessages, locale, translator);
return new BigDecimalFieldTranslatorImpl(numberOfDecimals,
useGrouping, locale, field, translator, formatter, formSupport,
overrideMessages);
}

private MessageFormatter findFormatter(String overrideId, Messages
overrideMessages, Locale locale,
   Translator translator)
{
// TAP5-228: Try to distinguish message overrides by form id and
overrideId (i.e., property name) first.

String translatorName = translator.getName();

String overrideKey = formSupport.getFormValidationId() + "-" +
overrideId + "-" + translatorName + "-message";

if (overrideMessages.contains(overrideKey))
return overrideMessages.getFormatter(overrideKey);

// Ok, look for a simpler name that om

Re: Passing object as paramters to component

2009-12-30 Thread Ville Virtanen

Hi,

define private YourObjectType param; variable to your component class and
use it. Annotate it with @Parameter annotation.

Then use your component like this: 

Or read the documentation:
http://tapestry.apache.org/tapestry5/guide/parameters.html

 - Ville


Captain Cid wrote:
> 
> I want to pass an object to component. Components renders from data from
> this object.
> 
> I tried doing an environment push of component but tapestry gives error
> "java.lang.ClassNotFoundException: caught an exception while obtaining a
> class file" .
> 
> It seems only component classes can be pushed into environment..and not
> normal classes.
> 

-- 
View this message in context: 
http://old.nabble.com/Passing-object-as-paramters-to-component-tp26966814p26966920.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: Number Formatting in TextField (T5)

2009-12-27 Thread Ville Virtanen

Hi!

If you get this working please share the results. This is something I never
thought when adding our number format handling. (Which is based on custom
translators. I'm happy to share the current solution if you are interested?)

 - Ville


Benny Law wrote:
> 
> On Thu, Dec 24, 2009 at 5:41 AM, Thiago H. de Paula Figueiredo <
> thiag...@gmail.com> wrote:
> 
>>
>> This is very clever! I guess it'll work. :) Just pay attention that the
>> parameter received by the translate is a FieldTranslator, not a
>> Translator
>> itself.
>>
>> Thanks Thiago. I already found out the hard way, but it's basically
>> working
> now :) The last thing I still need to figure out is the purpose of
> FieldTranslator (I read the doc but still didn't fully get it) and how I
> can
> allow the error messages to be overridden in the message catalogue on a
> per
> field basis in the standard manner. I guess I need to use some other
> service
> to do that. Any hint will be appreciated :)
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Number-Formatting-in-TextField-%28T5%29-tp26398708p26934138.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: Tapestry 5 and Selenium

2009-12-14 Thread Ville Virtanen

Yep, that's what I was afraid of.

I don't have anything to base my opinion to, but I have a feeling that the
tests will be really easily broken if and when someone decides to change the
page layout etc.

This of course is not related to T5 at any level, but rather common problem.
And that's the only thing afaik that is holding us back from making more
business minded consultants to make n' bake their own tests. Well, that was
the dream anyway.. ;) (I suppose that given the nature of the best tools
today you have to be somewhat technology-aware to actually make meaning full
tests.)

 - Ville


Howard Lewis Ship wrote:
> 
> Identify the fields using XPath instead of id.
> 
> On Sun, Dec 13, 2009 at 11:05 PM, Ville Virtanen
>  wrote:
>>
>> Hi,
>>
>> I've googled around but couldn't find solution for this one. The problem
>> is
>> that we have to test a form that is loaded using progressive display
>> which
>> makes all the ids to be generated for each request.
>>
>> Now, how can I use selenium.type to locate the correct input, when the
>> input
>> name changes like this:
>>
>> request one: mpo-1258bc89493_0
>> request two: mpo-1258bcae418_0
>> request three: mpo-1258dfea345_0
>>
>> Has anyone solved this?
>>
>>  - Ville
>> --
>> View this message in context:
>> http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26779936.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



Tapestry 5 and Selenium

2009-12-13 Thread Ville Virtanen

Hi,

I've googled around but couldn't find solution for this one. The problem is
that we have to test a form that is loaded using progressive display which
makes all the ids to be generated for each request.

Now, how can I use selenium.type to locate the correct input, when the input
name changes like this:

request one: mpo-1258bc89493_0
request two: mpo-1258bcae418_0
request three: mpo-1258dfea345_0

Has anyone solved this?

 - Ville
-- 
View this message in context: 
http://old.nabble.com/Tapestry-5-and-Selenium-tp26773754p26773754.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: Tapestry 5.1.0.5 FCKEDITOR PROBLEM

2009-12-09 Thread Ville Virtanen

Hi,

you can take a look at:
http://kenai.com/projects/t5-easy-fckeditor

The documentation lives here:
http://t5-easy-fckeditor.kenai.com/

Please report any problems to 
http://kenai.com/jira/browse/T5_EASY_FCKEDITOR

Or if you want to use the Chenillekit one then please report this problem to
Chenillekit mailing list / issue tracking.

 - Ville


Boban Stojanovski wrote:
> 
> Hi
> can someone tell me how to implement a fckeditor in a tapestry webapp.
> 
> i use maven.
> The Pom.XML is a bit large so ill paste just the fckeditor part
> 
> 
> org.chenillekit
> chenillekit-core
> 1.2.0
> jar
> false
> 
> 
> org.chenillekit
> chenillekit-tapestry
> 1.2.0
> jar
> false
> 
> 
> Chenillekit has a FCKeditor.
> 
> I tried to use it in my web app but i have a problem.
> 
> the *.java page
> 
> import org.chenillekit.tapestry.core.components.Editor;
> 
> @Property
> @Persist
> private String testValue;
> @Component(parameters = {"value=testValue", "width=100%"})
> private Editor editor;
> 
> the *.tml part of the page
> 
> 
> 
> this is a test input
> 
> 
> ${testValue}
> .
> 
> 
> i get an error
> 
> HTTP ERROR: 403
> 
> org/chenillekit/tapestry/core/components/fckeditor/editor/fckeditor.html
> 
> RequestURI=/assets/classpath/959ef68b8f100eee/org/chenillekit/tapestry/core/components/fckeditor/editor/fckeditor.html
> 
> Powered by Jetty://
> 
> can anyone give me some advice about fixing the problem?
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Tapestry-5.1.0.5-FCKEDITOR-PROBLEM-tp26717402p26723282.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: collection of components within a page (Tapestry 5.1)

2009-12-03 Thread Ville Virtanen

Hi again,

also forgot to mention great source to learn from:
http://jumpstart.doublenegative.com.au:8080/jumpstart/

(http://jumpstart.doublenegative.com.au/home.html)

 - Ville


Steven Tönsing wrote:
> 
> Hi,
> i'm completely new to tapestry and i got a very fundamental (for my  
> project) question.
> 
> So this is my sitiation :
> I'm using tapestry 5.1 and i have a collection of components (Boxes)  
> which can be placed on a page (in a certain order) the only thing i  
> whant to do now is to get this collection of components rendered in  
> the markup (template) of the page.
> 
> Pretty much like this
> 
> 
>   
> 
> 
> but this is obviously wrong. Is there a way to do so ?
> 
> thanks,
> steve
> 
> Structure :
> 
> de.steven.tapestry.components.Box.java
> de.steven.tapestry.components.Box.tml
> 
> de.steven.tapestry.pages.Overwiew.java
> de.steven.tapestry.pages.Overwiew.tml
> 
> Source :
> 
> de.steven.tapestry.pages.Overview.java
> 
> public class Overview{
> 
>   private List boxes;
> 
>   public Overview(){
>   boxes = new ArrayList();
>   
>   System.out.println("creating some boxes");
>   boxes.add( new Box("box 1") );
>   boxes.add( new Box("box 2") );
>   boxes.add( new Box("box 3") );
>   boxes.add( new Box("box 4") );
>   }
> 
>   public List getBoxes() {
>   return boxes;
>   }
> 
>   public void setBoxes(List boxes) {
>   this.boxes = boxes;
>   }
> 
> }
> 
> de.steven.tapestry.compoents.Box.java
> 
> public class Box {
>   @Parameter
>   @Property
>   private String name = "noname";
> 
>   public Box(){
>   
>   }
>   
>   public Box(String name){
>   this.name = name;
>   }
> }
> 
> 
> -
> 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/collection-of-components-within-a-page-%28Tapestry-5.1%29-tp26623064p26629675.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: collection of components within a page (Tapestry 5.1)

2009-12-03 Thread Ville Virtanen

Hi,

Don't loop your components, loop your data. If it is the name of the
component that is your data, then loop over the names and give those as
parameter to your boxes. Normally it would be orders or products or users or
what not that are looped through.

You don't have to give unique identifiers to your components if you don't
want to, so you can just have components without any parameters. (Obviously
:))

Take a look at http://tapestry.apache.org/tapestry5/tutorial1/hilo.html it
shows how you can make a loop that loops 10 times and creates new actionlink
every time. (Creating guessable links part) Source is the list that you
loop, and value is the variable that contains one list item at every
iteration of the loop. (So your component can be given one object at a time
as parameter from the list.) Tapestry takes care of your component
instantiation and instrumentation if you just follow the normal project
layout. (So that T5 knows which classes are components / pages. You can of
course use non-standard packages and instruct T5 to treat any class as
component.)

Hopefully this clarifies it a bit.

 - Ville


Steven Tönsing wrote:
> 
> Hi,
> i'm completely new to tapestry and i got a very fundamental (for my  
> project) question.
> 
> So this is my sitiation :
> I'm using tapestry 5.1 and i have a collection of components (Boxes)  
> which can be placed on a page (in a certain order) the only thing i  
> whant to do now is to get this collection of components rendered in  
> the markup (template) of the page.
> 
> Pretty much like this
> 
> 
>   
> 
> 
> but this is obviously wrong. Is there a way to do so ?
> 
> thanks,
> steve
> 
> Structure :
> 
> de.steven.tapestry.components.Box.java
> de.steven.tapestry.components.Box.tml
> 
> de.steven.tapestry.pages.Overwiew.java
> de.steven.tapestry.pages.Overwiew.tml
> 
> Source :
> 
> de.steven.tapestry.pages.Overview.java
> 
> public class Overview{
> 
>   private List boxes;
> 
>   public Overview(){
>   boxes = new ArrayList();
>   
>   System.out.println("creating some boxes");
>   boxes.add( new Box("box 1") );
>   boxes.add( new Box("box 2") );
>   boxes.add( new Box("box 3") );
>   boxes.add( new Box("box 4") );
>   }
> 
>   public List getBoxes() {
>   return boxes;
>   }
> 
>   public void setBoxes(List boxes) {
>   this.boxes = boxes;
>   }
> 
> }
> 
> de.steven.tapestry.compoents.Box.java
> 
> public class Box {
>   @Parameter
>   @Property
>   private String name = "noname";
> 
>   public Box(){
>   
>   }
>   
>   public Box(String name){
>   this.name = name;
>   }
> }
> 
> 
> -
> 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/collection-of-components-within-a-page-%28Tapestry-5.1%29-tp26623064p26629581.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: Switching between Stage & Production DB with Tapestry5 & Hibernate3

2009-11-15 Thread Ville Virtanen

Hi,

we use our custom configuration file that reads everything from single file.
The application reads a system property that defines the location of the
conf file. This way, the jar and build process is the same for every
environment and the deploy procedure is just to copy the war to the server
(prod, pilot, internal test, demo etc..)

Also, this enables us to run our software in the mode we choose in every
environment: if we need to run in debug or development mode in production
that we indeed can. Also the log4j conf is read from outside the
war/exploded war, so that conf is also out of the build cycle.

The only downside is that we have to define the single configuration key to
catalina_opts or similar, but this setup has proven to be useful for us:
even the new guy can deploy to any environment, as the procedure is always
similar and there is no checklist ;)

Quick solution is to determine the wished configuration from the production
mode flag.

 - Ville


Alessandro Bottoni-4 wrote:
> 
> Hi All,
> I'm almost completely new to Tapestry and Hibernate so, please, be
> patient..
> 
> In your opinion, what's the best (simplest/most-maintainable) way to
> deal with two different databases with T5 and H3?
> 
> I have the classical stage/production environment with the same software
> (and the same RDBMS) on the two machines but two different data sets and
> I have to switch from the one to the other when deploying the T5 stuff.
> 
> Is it better to rely on the mechanisms provided by Hibernate (loading
> different configuration files, for example) or is it better to use some
> Tapestry-specific trick?
> 
> How do you do that, usually?
> 
> Thanks in advance for your attention.
> 
> -- 
> 
> Alessandro Bottoni
> Website: http://www.alessandrobottoni.it/
> 
> "In mathematics you don't understand things. You just get used to them."
>  -- John von Neumann
> 
> 
> 
> 
> -
> 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/Switching-between-Stage---Production-DB-with-Tapestry5---Hibernate3-tp26340524p26367152.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: Netbeans 6.7 tapestry 5 plugin support

2009-11-15 Thread Ville Virtanen

Ok, 

I'll try to do that as soon as I have the required time in my hands.

 - Ville


Andreas Andreou-4 wrote:
> 
> When was that? i think the T5related project used to be hosted at
> google-code
> but then was moved into https://nbtapestrysupport.dev.java.net/
> (where the t4project was)
> 
> Just request for the developer role if you have a java.net account - or
> add the
> patches to an issue at
> https://nbtapestrysupport.dev.java.net/servlets/ProjectIssues
> 
> On Thu, Nov 12, 2009 at 10:00 PM, Ville Virtanen
>  wrote:
>>
>> We use it, but we have inhouse modified version of it due to problems in
>> tml
>> / java class change functionality. (The original version does not know
>> how
>> to resolve all possible template locations.)
>>
>> I contacted the author if he would like to get / review the changes, but
>> I
>> never got any reply back.
>>
>> Anyhow, it really is usefull, atleast the tml / java class switch
>> functionality.
>>
>>  - Ville
>>
>>
>> Sergey Didenko wrote:
>>>
>>> Hi,
>>>
>>> does anybody uses this T5 plugin for Netbeans? ("nbtapestrysupport",
>>> see below). Does it work all right?
>>>
>>> On Mon, Jun 15, 2009 at 9:07 AM, iberck  wrote:
>>>>
>>>> Hi I'm developing a netbeans plugin for tapestry 5 tested on windows xp
>>>> The supported features are:
>>>>
>>> 
>>>>
>>>> Feel free to download from:
>>>> https://nbtapestrysupport.dev.java.net/servlets/ProjectDocumentList
>>>>
>>>> View this message in context:
>>>> http://www.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p24029691.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
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p26325187.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
>>
>>
> 
> 
> 
> -- 
> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> -
> 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/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p26360217.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: Netbeans 6.7 tapestry 5 plugin support

2009-11-12 Thread Ville Virtanen

We use it, but we have inhouse modified version of it due to problems in tml
/ java class change functionality. (The original version does not know how
to resolve all possible template locations.)

I contacted the author if he would like to get / review the changes, but I
never got any reply back.

Anyhow, it really is usefull, atleast the tml / java class switch
functionality.

 - Ville


Sergey Didenko wrote:
> 
> Hi,
> 
> does anybody uses this T5 plugin for Netbeans? ("nbtapestrysupport",
> see below). Does it work all right?
> 
> On Mon, Jun 15, 2009 at 9:07 AM, iberck  wrote:
>>
>> Hi I'm developing a netbeans plugin for tapestry 5 tested on windows xp
>> The supported features are:
>>
> 
>>
>> Feel free to download from:
>> https://nbtapestrysupport.dev.java.net/servlets/ProjectDocumentList
>>
>> View this message in context:
>> http://www.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p24029691.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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p26325187.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: updating a zone during loading of page?

2009-11-05 Thread Ville Virtanen

Hi,

I think this could be a framework level component, as it seems that there
are many of us solving the same problem with a bit different approaches.
(Everyone invents the wheel..)

so +1 for this idea! :)

 - Ville


Howard Lewis Ship wrote:
> 
> Idea for a component: ImagePlaceholder that displays some content in a
> div (a "loading ..." message), and an invisible   tag in an
> non-visible div. When the image is loaded, it removes the loading div
> and makes the   visible.
> 
> On Thu, Nov 5, 2009 at 4:36 PM, Thiago H. de Paula Figueiredo
>  wrote:
>> Em Thu, 05 Nov 2009 22:06:28 -0200, Angelo Chen
>> 
>> escreveu:
>>
>>> Hi,
>>
>> Hi!
>>
>>> If we generate the image in the event, and return the link, then we need
>>> to store the image somewhere in the file system, and clean it up later
>>> after
>>> the image got rendered, any idea how to handle this ?
>>
>> Do not generate the image in the event nor store the image. I suggest you
>> to
>> try the approach I've already suggested: create a page that generates the
>> image and returns a StreamResponse of it in its onActivate() method. In
>> your
>> page, just use an  imageLink  tag, with a getImageLink() method
>> that returns a Link to your image page.
>>
>> --
>> 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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> 
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
> 
> (971) 678-5210
> http://howardlewisship.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/t5%3A-updating-a-zone-during-loading-of-page--tp26208359p26226549.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: tapestry 5.1.0.5 with php

2009-10-26 Thread Ville Virtanen

Technically possible, feasibility?

If you have httpd in front of tomcat or some other j2ee container that
drives T5, then the session state is held in httpd and can be accessed from
php also.

Only scenario that comes to my mind is app that has to transition to some
legacy system in some of the views... (In which case the state should be
transferred via the url and/or for an example shibboleth imho.)

 - Ville


Argo Vilberg wrote:
> 
> hi
> 
> Are everyone tried integrage tapestry with php pages?
> 
> Is it even possible?
> 
> I mean tapestry servlet send request to php and vise versa.
> 
> How to manage session state?
> 
> 
> Argo
> 
> 

-- 
View this message in context: 
http://www.nabble.com/tapestry-5.1.0.5-with-php-tp26068724p26072158.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: redirect to a page in javascript?

2009-10-17 Thread Ville Virtanen

Hi,

this is not the best place to ask js questions, but my guess is 

1. The window.location accepts only full urls? (Or atleast the context start
/, window.location="/items")
2. Your method never gets called or the execution is halted in saveupdates()
(Which should have ; at the end of the line, like after "items"; also..)

 - Ville


Angelo Chen wrote:
> 
> Hi,
> How to redirect to another page in a javascript? example:
>  
> function do_proc() {
> saveupdates()
> window.location="items"
> }
> 
> this does not work, any idea? Thanks,
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-redirect-to-a-page-in-javascript--tp25853995p25939222.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: About T5 IoC

2009-10-17 Thread Ville Virtanen

Hi,

Do you ask is it possible to know which module has done the service bind or
building? What kind of problem you are trying to solve?

You could guess something from the class name, but imho it sounds that there
is something wrong with the logic whatever you might be trying to solve.

 - Ville


Zenberg wrote:
> 
> Hi All,
> 
> Is there a way to know a contribution object comes from which module?
> 
> Thanks
> 
> 
> Zenberg Ding
> 
> -- 
> Keep It Simple & Stupid.
> 
> -
> 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://www.nabble.com/About-T5-IoC-tp25919282p25939108.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: Chenille kit Quartz

2009-10-17 Thread Ville Virtanen

Hi,

You can override the used version in pom.xml like this:



org.chenillekit
chenillekit-quartz
1.2.0


opensymphony
quartz-all




opensymphony
quartz-all
1.6.3


As you see we're using 1.6.3.

 - Ville


Sam Domonkos wrote:
> 
> I was wondering if the Chenille kit project will be updating the Quartz 
> module to version 1.6.5 from 3/6/2009, it seems to be using 1.6.0 from 
> 11/6/2006
> 
> Thanks
> --
> Sam
> 
> -
> 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://www.nabble.com/Chenille-kit-Quartz-tp25928830p25939052.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5 NPE on service realization

2009-10-17 Thread Ville Virtanen

Hi,

please share some more of the code + stack trace, without those further
speculation is nearly impossible.

 - Ville


zack1403 wrote:
> 
> Hi all,
> 
> I was just curious if anyone has had weird NullPointerExceptions on
> service realization.  I am getting this NPE when using this service for
> the first time after startup:
> 
> if (hu == null)
>   throw new RuntimeException("bad"); //debug and system.out show this as a
> proxied service
> if (con == null)
>   throw new RuntimeException("bad");
> if (statement == null)
>   throw new RuntimeException("bad");
> if (params == null)
>   throw new RuntimeException("bad");
> 
> return hu.getInsertKey(con, statement, params); //NPE thrown on this line
> 
> I really am at a loss because I can see the object as not null plain as
> day and it makes it past the null checks.  Anyone have an idea what might
> be causing it?
> 

-- 
View this message in context: 
http://www.nabble.com/T5-NPE-on-service-realization-tp25929920p25939005.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: Slightly OT: Ad hoc connection pools

2009-10-17 Thread Ville Virtanen

Hi,

I would probably create service that handles the connection pooling by using
multiple pools that are backed up by some third party lib.

Service would take care of closing pools when the registry shuts down or the
pool has remained unused for certain period. Don't know how heavy it is to
initialize pools / how much memory will those pools use? Also it could be
done so that the user can have only one pool at a time to limit resource
usage.

The service could use ApplicationStateManager to check the user and
connection data from session transparently. Pseudo service code for one pool
/ user:

public Connection getConnection() {
 1. get user object from session
 2. get connection data from session
 3. get pool from hashtable by user id 
 4. check if the pool matches the connection data
 - if it does, update last access time ->  return connection from pool
 - if it does NOT or is null -> closePool(); + create and test pool, add
to hashtable, update last access time ->  return
}

public void closePool() { 
 1. get user data from session
 2. get pool from hashtable by user id
 3. if exists -> close, remove from hashtable
}

Of course the pool must be enclosed in class that contains last access
milliseconds, creation milliseconds, the actual pool, and the connection
data.

Also make a method that loops through all pools and closes and discards all
pools that have been unused for 30 mins or something to close connections
for users that didn't do logout. Then use for an example quartz to run that
method every 5 minutes or something. (http://www.opensymphony.com/quartz/)

The last thing is to implement the registry shutdown method which closes all
pools.

Example how to use the commons pool in java code:
http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/doc/ManualPoolingDriverExample.java?revision=821733&view=markup

Tapestry 5 Quartz:
http://www.chenillekit.org/chenillekit-quartz/index.html

 - Ville


Daniel Jue wrote:
> 
> Hi all, I'm hoping someone might have a suggestion for a strange
> challenge.  I'm using both T5 and GWT for the app, but I imagine the
> core solution to be independent of either, although for implementation
> T5 IOC may be called in.
> 
> OK here it is:
> I am working on a web app where the app's server side makes
> connections to hundreds of databases.
> Yes, that's right.
> 
> Use case is like this:
> User logs into main app, gets a user ASO, etc.
> User can enter their personal login/password info for a database, and
> select a database from a list.
> (The database list items correspond to some hard coded connection
> info, like the machine and port, etc.)
> Once the connection info has been verified to work by making a test
> connection, the connection info is saved as an ASO.
> Then for each request, whatever DAO is being used will create a
> connection using the info, do stuff, and then close the connection.
> A user can only be logged into one of these databases at a time, and
> they can change the settings to log into a different db, etc.
> The database username and password is different for each user and each
> database.
> There would probably be about 20 users online on average, with a peak of
> 100.
> 
> Right now I'm making Ad Hoc connections using a handmade jdbc
> connection factory, and then i close the connection after each
> request.
> It's painfully slow and error prone, since the connections sometimes
> fail to get created.
> 
> What I am wondering about is a way to assign a (small) connection pool
> for each user that's logged into the system, which at the very least
> would be discarded when they timeout or logout.   Custom use of DBCP?
> Custom connection pool?  I'm thinking one or two connections per pool,
> because I fear the memory requirements.
> 
> I'm using Tomcat, which has a read only JNDI, afaict.
> 
> Please let me know if you've faced a problem like this before, or how
> you would approach it.
> 
> Thanks, Dan
> 
> -
> 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://www.nabble.com/Slightly-OT%3A-Ad-hoc-connection-pools-tp25931113p25938928.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: [ANNOUNCEMENT] New Tapestry 5 book

2009-10-14 Thread Ville Virtanen

Hi,

If this ever gets published in English we will buy one copy for sure, so
plase :)

 - Ville


Igor Drobiazko wrote:
> 
> Not yet but I'll ask the publisher again.
> 
> On Tue, Oct 13, 2009 at 9:02 PM, Borut Bolčina
> wrote:
> 
>> Hi,
>>
>> any news on when the book will be available in English?
>>
>> Cheers,
>> Borut
>>
>> 2009/9/16 Igor Drobiazko 
>>
>> > Hello folks,
>> >
>> > I am pleased to announce a new Tapestry 5 book. The book is written in
>> > German and is available as eBook on publisher's website:
>> >
>> >
>> >
>> http://www.addison-wesley.de/main/main.asp?page=home/bookdetails&ProductID=174975
>> >
>> >
>> > The hardcover version of the book will be available starting from Sep
>> 28
>> > 2009.
>> > I'll make another announcement when the hardcover version is released.
>> >
>> > Among other things the book covers :
>> >   * Getting Started with Tapestry 5
>> >   * Concepts of the framework
>> >   * Localization/internationalization
>> >   * Creating Forms
>> >   * Generation of user interfaces for JavaBeans
>> >   * Writing own components and mixins
>> >   * Ajax
>> >   * Writing tests for Tapestry applications
>> >   * Hibernate and Spring integration
>> >   * Dependency Injection and Tapestry IoC
>> >   * AOP and bytecode manipuation
>> >
>> > Special thanks go to Howard and Ulrich Stärk. Howard gave me some hints
>> on
>> > how to write a better book and wrote a foreword.
>> > Ulrich was responsible for the technical review of the book and helped
>> me
>> > to
>> > improve the quality.
>> >
>> > Enjoy
>> >
>> > --
>> > Best regards,
>> >
>> > Igor Drobiazko
>> >
>>
> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-ANNOUNCEMENT--New-Tapestry-5-book-tp25477922p25888652.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [t5] upgrade to java 6 and javassist

2009-10-06 Thread Ville Virtanen

Hi,

Also make 100% sure that there aren't multiple javassists (different
versions in classpath) AND that the included javassist version is the right
one. Check this from the produced war, do NOT trust what the ide is saying
;)

Sometimes we have had problems like this, but those were because maven
dependencies affected to the included javassist version.

We use java 6, and our compile targets are 1.6 in about ten projects, we
have multiple developers compiling with different versions of java and
haven't had any problems besides those javaassist version related.

The version of javassist that gets included for us is 3.9.0.GA

 - Ville

Ps. Below is the mvn configuration we're using w/ netbeans


org.apache.maven.plugins
maven-compiler-plugin

1.6
1.6
true
UTF-8
true
true




Thiago H. de Paula Figueiredo wrote:
> 
> Em Tue, 06 Oct 2009 17:39:17 -0300, Fermin Da Costa Gomez  
>  escreveu:
> 
>> Using Eclipse, my Compiler compliance level is set at 1.5 already and  
>> still. What OS are you using?
> 
> Ubuntu. But I guess it's not operating-system related.
> 
>> The @OnEvent i understand but i can't find a 'ready made' entry for the
>> EventConstants.
> 
> What do you mean by ready-made? EventConstants is just a class that  
> declares String constants. You can use the event name directly if you want  
> or need.
> 
>> Do i make my own enum for that?
> 
> No, event names are Strings.
> 
>> And if so, how does that
>> hook into the autocompleter mixin without additional coding?
> 
> I'm not following you here. All events are hooked by name and, optionally,  
> component id, just that.
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> 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://www.nabble.com/-t5--upgrade-to-java-6-and-javassist-tp25295834p25780245.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: Announcment: T5 FCK editor integration library

2009-07-25 Thread Ville Virtanen

Hi,

We have been using FCK happily for ages now. This editor is tested at least
with the progressive display, but nothing more exotic. Perhaps I have to do
some test cases with zone.

Also, the total rewrite of FCK, now known as CKEditor looks much more
promising, that we are using also. I think I can publish a library as soon
as the CKEditor hits 3.0 final, now it is RC 1. Take a look :
http://ckeditor.com/ckeditor/3.0rc/_samples/index.html.

 - Ville

Ps. The yui library seems definitely worth looking...


Howard Lewis Ship wrote:
> 
> I've been having problems with FCKEditor (I haven't tried your library
> however) in that it caused problems with other Ajax components on the
> same page, for reasons I didn't have time and skill to diagnose. In my
> workshop, I'm starting to switch over to Yahoo's rich text editor
> instead.
> 
> On Thu, Jul 23, 2009 at 11:37 PM, Ville
> Virtanen wrote:
>>
>> Hello everyone
>>
>> we have used FCK editor for quite some time now with file uploading
>> capabilities, and we needed the same functionality in several clients
>> that
>> would have had to be kept separate due to licensing issues. Thus we
>> agreed
>> to make it publicly available and so we have to keep only one copy up to
>> date.
>>
>> Currently the project lives in http://code.google.com/p/easyfckeditor/,
>> but
>> I hope that we get Tapestry 360 site soon. Also, are there any maven
>> repositories that would accept packages without much fuss? The using
>> would
>> be _much_ easier if the library was in a maven repository.
> 
> I'm beginning to think that Tapestry 360 hosting code & issue's is not
> going to be sustainable.
> I want to shift the focus to being a build environment, Maven
> repository and a location for static web sites ... but code and issues
> I think will be better served on Google or on GitHub.
> 
>>
>> Anyway, here is short description of the project (I hope that you enjoy,
>> and
>> remember to give feedback.):
>>
>> Easy Fck Editor is open source extension to Tapestry 5 that uses (as the
>> name implies) FCK Editor under it's hood to deliver easy richtext editor
>> component with file upload capabilities.
>> The main focus is to do everything Tapestry 5 way: you can work entirely
>> with the provided (and excellent I might add) IoC as developers are used
>> to.
>> Also the idea is to really provide such documentation that it is easy to
>> follow and understand. Easy Fck Editor aims to be simple to use and yet
>> provide good interface to aid in extending and securing Tapestry 5 based
>> rich editor needs.
>> Why? Doesn't ChenilleKit already have one?
>>
>> Easy Fck Editor project started because the editor in ChenilleKit
>> couldn't
>> handle file uploads. Also I found that (at that time atleast) the
>> documentation was not on very good level. I also didn't need but a
>> fraction
>> of what ChennilleKit provided. For me, I would be more merrier if there
>> was
>> tiny bits that I can put together in the project pom, so that I could
>> "harvest" the libraries I need. This is also why I intent to package all
>> forthcoming Tapestry 5 extensions as separate jars where possible.
>> (CKEditor
>> should follow shortly.)
>>
>>  - Ville
>> --
>> View this message in context:
>> http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24639378.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
>>
>>
> 
> 
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
> 
> -
> 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://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24655683.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: Announcment: T5 FCK editor integration library

2009-07-24 Thread Ville Virtanen

Mainly because we had it already as standalone jar, and the time that I would
have had to use before having commit rights to ChenilleKit would have taken
too long. Busy schedule as you might guess.

Also I see this as more of an standalone thing, not necessarily as part of
the application framework thing you have going on. Of course, you're free to
use the provided code anyway you see fit ;)

Also I'll be updating that jar as part of my job, which unfortunately
dictates what I can do and what not when I'm using the office hours for open
source. The dream lives that I could work full time for the benefit of open
source software :) In the mean time though...

 - Ville


Sven Homburg wrote:
> 
> Why invent the wheel again?
> 
> I know and agree with you, that the chenillekit documentation is far away
> from being the big shot, but we invite everybody to contribute the project
> and share your time to create the real big one
> 
> with regards
> Sven Homburg
> Founder of the Chenille Kit Project
> http://www.chenillekit.org
> 
> 
> 
> 
> 
> 2009/7/24 Ville Virtanen :
>>
>> Hello everyone
>>
>> we have used FCK editor for quite some time now with file uploading
>> capabilities, and we needed the same functionality in several clients
>> that
>> would have had to be kept separate due to licensing issues. Thus we
>> agreed
>> to make it publicly available and so we have to keep only one copy up to
>> date.
>>
>> Currently the project lives in http://code.google.com/p/easyfckeditor/,
>> but
>> I hope that we get Tapestry 360 site soon. Also, are there any maven
>> repositories that would accept packages without much fuss? The using
>> would
>> be _much_ easier if the library was in a maven repository.
>>
>> Anyway, here is short description of the project (I hope that you enjoy,
>> and
>> remember to give feedback.):
>>
>> Easy Fck Editor is open source extension to Tapestry 5 that uses (as the
>> name implies) FCK Editor under it's hood to deliver easy richtext editor
>> component with file upload capabilities.
>> The main focus is to do everything Tapestry 5 way: you can work entirely
>> with the provided (and excellent I might add) IoC as developers are used
>> to.
>> Also the idea is to really provide such documentation that it is easy to
>> follow and understand. Easy Fck Editor aims to be simple to use and yet
>> provide good interface to aid in extending and securing Tapestry 5 based
>> rich editor needs.
>> Why? Doesn't ChenilleKit already have one?
>>
>> Easy Fck Editor project started because the editor in ChenilleKit
>> couldn't
>> handle file uploads. Also I found that (at that time atleast) the
>> documentation was not on very good level. I also didn't need but a
>> fraction
>> of what ChennilleKit provided. For me, I would be more merrier if there
>> was
>> tiny bits that I can put together in the project pom, so that I could
>> "harvest" the libraries I need. This is also why I intent to package all
>> forthcoming Tapestry 5 extensions as separate jars where possible.
>> (CKEditor
>> should follow shortly.)
>>
>>  - Ville
>> --
>> View this message in context:
>> http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24639378.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> -
> best regards
> Sven
> 

-- 
View this message in context: 
http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24647004.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: Announcment: T5 FCK editor integration library

2009-07-24 Thread Ville Virtanen

Hi again,

I rolled new version that has 

1.5
1.5

tags set in build configuration. This should do the trick, right? (Have no
machine where I could verify with 1.5 java, and I'm too lazy to install one
:))

 - Ville


Bryan Lewis-5 wrote:
> 
> It looks good.  Thanks for contributing!
> 
> When I tried it (after manually adding the jar to my web-app project), I
> got:
> 
> java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
> 
> EasyFCKEditor is compiled with JDK 1.6, while we have to run with JDK 1.5.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24646735.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: Announcment: T5 FCK editor integration library

2009-07-24 Thread Ville Virtanen

Damn, we're on 1.6 only... I'll roll another 1.5 compiled release tonight if
I have the time after work.

 - Ville


Bryan Lewis-5 wrote:
> 
> It looks good.  Thanks for contributing!
> 
> When I tried it (after manually adding the jar to my web-app project), I
> got:
> 
> java.lang.UnsupportedClassVersionError: Bad version number in .class
> file
> 
> EasyFCKEditor is compiled with JDK 1.6, while we have to run with JDK 1.5.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24644330.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



Announcment: T5 FCK editor integration library

2009-07-23 Thread Ville Virtanen

Hello everyone

we have used FCK editor for quite some time now with file uploading
capabilities, and we needed the same functionality in several clients that
would have had to be kept separate due to licensing issues. Thus we agreed
to make it publicly available and so we have to keep only one copy up to
date.

Currently the project lives in http://code.google.com/p/easyfckeditor/, but
I hope that we get Tapestry 360 site soon. Also, are there any maven
repositories that would accept packages without much fuss? The using would
be _much_ easier if the library was in a maven repository.

Anyway, here is short description of the project (I hope that you enjoy, and
remember to give feedback.):

Easy Fck Editor is open source extension to Tapestry 5 that uses (as the
name implies) FCK Editor under it's hood to deliver easy richtext editor
component with file upload capabilities.
The main focus is to do everything Tapestry 5 way: you can work entirely
with the provided (and excellent I might add) IoC as developers are used to.
Also the idea is to really provide such documentation that it is easy to
follow and understand. Easy Fck Editor aims to be simple to use and yet
provide good interface to aid in extending and securing Tapestry 5 based
rich editor needs.
Why? Doesn't ChenilleKit already have one?

Easy Fck Editor project started because the editor in ChenilleKit couldn't
handle file uploads. Also I found that (at that time atleast) the
documentation was not on very good level. I also didn't need but a fraction
of what ChennilleKit provided. For me, I would be more merrier if there was
tiny bits that I can put together in the project pom, so that I could
"harvest" the libraries I need. This is also why I intent to package all
forthcoming Tapestry 5 extensions as separate jars where possible. (CKEditor
should follow shortly.)

 - Ville
-- 
View this message in context: 
http://www.nabble.com/Announcment%3A-T5-FCK-editor-integration-library-tp24639378p24639378.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5.1] Obtaining Messages in Service

2009-07-15 Thread Ville Virtanen

Hi,

there are few possible solutions:

1. Pass the messages as parameter from the calling page or component to the
service

2. Return only codes or something that you translate to human readable form
in the page / component

3. If messages are errors, return your own exception that contains message
key or code that gets translated in the UI

4. Take a look at TapestryTestCase
(http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/test/TapestryTestCase.java?revision=753426)
method messagesFor. Basicly you can load what ever to the MapMessages
implementation
(http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/internal/services/MapMessages.html)
and use that OR you can load standard java ResourceBundle and wrap it with
MessagesImpl
(http://tapestry.apache.org/tapestry5.1/apidocs/org/apache/tapestry5/ioc/internal/util/MessagesImpl.html)

Remember that case 4 involves using classes that are marked as internal and
may change anytime.

 - Ville


Felix Gonschorek-2 wrote:
> 
> Hi all,
> 
> i am trying to obtain a Messages object for localization in an service
> that has 
> no connection to a page or component. How can i load the Application
> default 
> Messages (app.properties) as a Messages object in my service? Searched the 
> source, howtos and the list and found no hint so far, any hint apreciated!
> 
> 
> felix
> 
> 
> 
> -- 
> Felix Gonschorek
> ggmedia
> 
> Kirchstr. 18
> 69115 Heidelberg
> 
> Tel:  +49 6221 187 44 10
> Fax:  +49 6221 187 44 99
> Mobil: +49 176 2234 1338
> 
> fe...@ggmedia.net
> http://www.ggmedia.net
> 
> Vertretungsberechtigte Gesellschafter:
> Felix Gonschorek & Jochen Greiner
> 
> Umsatzsteuer-Identifikationsnummer
> gemäß § 27a Umsatzsteuergesetz:
> DE232906440
> 
> -
> 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://www.nabble.com/-T5.1--Obtaining-Messages-in-Service-tp24498126p24510755.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: [Tapestry Central] Why chose Tapestry?

2009-06-18 Thread Ville Virtanen

Hi,

First we used eclipse too, but ran in far too many problems with maven.
Today we use NetBeans, which seems to do most of the things that we expect
it to. At first there was _really_ much resistance to start using NetBeans
which was seen as toy and not as an IDE for professional developer, but in
my opinion if you want an environment that _just_ works, use NetBeans.
(Especially if your developers aren't that familiar with Eclipse.)

Maven also caused a lot of trouble for us at the beginning. Some devs didn't
have any problems, some had more. The more resistance the dev had, the more
problems he/she also had...

Anyway, today when new developer starts (s)he installs maven, svn tortoise,
netbeans and downloads the project and then starts the app with mvn
jetty:run -> dev is ready to start coding. This process usually takes about
45 minutes, depending how long the machine downloads stuff and installs
java/netbeans. 

The start of new project does not take any longer than T4 project, but I
must admit that there is some learning curve when you come from T4 or some
other environments, after all, this is new and different system. However, it
is not black magic, and if you have experience with systems it shouldn't be
that hard.

The documentation is lacking, and is the next thing to be fixed (As Howard
has mentioned.). Also T5 should be as new-user-friendly as possible, which
clearly could be improved?

 - Ville


Norman Franke-2 wrote:
> 
> I've been using T4/4.1 for several years and have been quite pleased  
> with it. I've been using it with Hibernate, and while not perfect,  
> it's worked pretty well. We've found it much faster to embed a web  
> browser in our main app and do editing, queries and the like via  
> Tapestry than writing native code.
> 
> I have a new project to replace our aging billing system. I figured  
> this would be a great way to learn T5. So, I'm migrating me, not an  
> app. :-)
> 
> I was pondering posting this, but this thread sort of pushed me over  
> the top. Note that I don't disagree with anything Howard said.  
> However, this almost became "Why I almost dumped Tapestry entirely."
> 
> I'm writing this in order to solicit feedback and maybe help others.  
> I've been using Tomcat (now 6.0.20) and Eclipse (now 3.4.2) for quite  
> time time, and I'm very productive developing use them (and T4.1) I  
> think this is a pretty common development environment.
> 
> To get started in T5 for a fresh new app, my first thought was to  
> follow the tutorial at http://tapestry.apache.org/tapestry5.1/ 
> tutorial1/.
> 
> Chapter 2 just plain didn't work for me. I think part of it is due to  
> Maven generally being extremely fragile and working less than half of  
> the time. However, even after working around that, you can't just  
> import the project into Eclipse. At least not under Eclipse 3.4.2.
> 
> No problem, I thought. Maven is annoying anyway. I'll just create a  
> Dynamic Web project (like I do for T4.1) and download the T5.1 binary  
> distribution. That's even worse. It comes with no README listing  
> dependencies or anything useful, and includes tons of libraries that  
> don't appear to be even needed. Tapestry failed to start up during  
> initialization. Why have a binary distro that doesn't work?
> 
> Back to Maven. After some googling, I found this article:
> http://tapestry.formos.com/wiki/display/T5IDEINT/Eclipse+(including+Maven) 
>   Shouldn't this be included in the tutorial? Sadly, the tutorial is  
> extremely basic, but at least it works. (And is the only way I've  
> found to actually create a new project in Eclipse to date.)
> 
> Next, I tried Tapestry Jumpstart. After hours of configuration and  
> random errors (using Tomcat), it worked. However, it's so fragile and  
> klugy that I just can't see using it in production. I don't care about  
> OpenEJB. I want just plain T5.1 and Hibernate. Plus running in a  
> remote tomcat sessions eliminates many of the developer productivity  
> benefits of T5 in the first place. One thing I liked about T4 was that  
> I could deploy a WAR to a stock Tomcat install, and it would just  
> work. That won't happen with Jumpstart. Plus. it if takes 3 hours to  
> just get a working developer environment, why even bother?
> 
> Next up, AppFuse. It's only T4, but there is a Tapestry 5 add-on.  
> Sadly, AppFuse's T4 support is now broken due to a dependancy on  
> tapestry-flash that appears to be missing and following the  
> instructions on the AppFuse Tapestry 5 page doesn't work anymore  
> either, resulting in tons of missing resources.
> 
> So, since T5 doesn't appear to provide much in the way of  
> authentication / security (a very basic requirement for almost all  
> webapps), I started down the tapestry5-acegi approach. Of course, that  
> doesn't work with T5.1. I managed to get it working and then upgraded  
> to tapestry-spring-security 2.1.0-SNAPSHOT. Still didn't work without  
> augmentation. (Thanks t

RE: Two Menu Components

2009-06-16 Thread Ville Virtanen

Hi, 

this is wild guess, but take a look at the environment? You can push, pop
and peek objects that are in the environment, shared by all enclosed
components.

http://tapestry.apache.org/tapestry5/guide/env.html

http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/Environment.html

 - Ville 


eldred wrote:
> 
> Hi Guys
> 
> No problem, thanks Otho and donf yang for helping a newbie at Tapestry.
> Am still trying get my head around how to pass data between components
> (not same as pages) ie how to pass data from one component to another.
> Let me be more precise: 
> 
> If I use the @Component annotation then my second menu component it has
> be nested inside first 
> there you can pass a string to submenu provided that its enclosed inside
> MainMenu component, however would not work if my two menu components sit
> independently from each other inside my Layout component. Apologies is I
> did not explain myself clearly enough. Here is my Layout.tml code
> fragment: 
> 
> 
> ... 
> 
> 
>  
>  
>   
>   
>   
>   
>   
>   
>  
> 
>   
>   
>   
>   
>   
>   
>
>   
> 
> ...
> 
> When the event hander is called ie onAction(String context) from
> MainMenu.java I want to be able to pass that string from the onAction
> method (MainMenu.java) to another method called
> setSelectedMenuItem(String context) inside SideMenu.java without getting
> a NullPointerException. If I use @Component annotation then I need to
> nest  then it will work.
> But because my sidemenu component sits further down in my Layout.tml
> page, how can I do this ?
> 
> Thanks again for the assistance. 
> 
> 
> 
> -Original Message-
> From: Otho [mailto:taa...@googlemail.com] 
> Sent: Friday, June 12, 2009 2:55 PM
> To: Tapestry users
> Subject: Re: Two Menu Components
> 
> Oops, sorry. My bad.
> 
> This doesn't work with components in this way.
> 
> If you want to update with Ajax I suggest you try donf jangs solution.
> The
> following works on full page refresh.
> 
> You need to have MainMenu and SideMenu as components in your Layout.java
> 
> Layout.java
> 
> @Component
> private MainMenu mainMenu;
> 
> @Component
> private SideMenu sideMenu;
> 
> 
> Object setupRender()
> {
> 
> sideMenu.setSelectedMainMenuItem(mainMenu.getSelectedMenuItem());
> 
> 
> 
>   return null;
> }
> 
> 
> MainMenu.java
> 
> @Persist
> private String selectedItem;
> 
> @Property
> private List menuItems = Arrays.asList("home", "about", "help");
> 
> @Property
> private String currentMenuItem;
> 
> public String getSelectedMenuItem()
> {
>   return selectedItem;
> }
> 
> Object onActionFromMyMenu(String context)
> {
>selectedItem = context;
> 
>return null;
> }
> 
> MainMenu.tml
> ...
> 
> 
>  ${message:${currentMenuItem}-label} 
> 
> 
> 
> MainMenu.properties
> 
> home-label=Start
> about-label=About
> help-label=Help
> 
> 
> SideMenu.java
> 
> @Persist
> private String selectedMainMenuItem;
> 
> public getSelectedMainMenuItem()
> {
>   return selectedMainMenuItem;
> }
> 
> public setSelectedMainMenuItem(String value)
> {
>   selectedMainMenuItem=value;
> }
> 
> The rest with the blocks can stay as it is in the first post.
> 
> If you don't write explicit getters and setters like I did in this
> second
> example, it won't compile, since the getters and setters are only
> created at
> runtime by Tapestry when using the @Property annotation. Sorry for being
> so
> rash. I hope this helps, and as I said if you want Ajax, look at donf
> yangs
> code.
> 
> 
> 2009/6/12 Eldred Mullany 
> 
>> Hi Otho
>>
>> Thank you for the feedback, I am trying this example, but notice that
> I
>> get a transformation exception if I inject my component as per your
>> example. Complaining about it not having a serviceID ?
>>
>> Using T5 5.1.0.5
>>
>> How do I provide a serviceID to ComponentResourcesInjectionProvider ?
>>
>> Thank you
>>
>> -Original Message-
>> From: Otho [mailto:taa...@googlemail.com]
>> Sent: Thursday, June 11, 2009 3:33 PM
>> To: Tapestry users
>> Subject: Re: Two Menu Components
>>
>> Create an eventhandler in your MainMenu component which fires on
> select
>> and
>> gives the selected menuitem as context.
>>
>> For example
>>
>> class MainMenu
>> @Inject
>> private SideMenu sideMenu;
>>
>> Object onActionFromYourMenu(String context)
>> {
>>   sideMenu.setSelectedMainMenuItem(context);
>>
>>   return null;
>> }
>>
>> class SideMenu
>>
>> @Property
>> @Persist
>> private String selectedMainMenuItem;
>>
>> @Inject
>> private Block whateverBlock;
>>
>> @Property
>> @Persist
>> private Block displayBlock;
>>
>> Object setupRender()
>> {
>>  if(selectedMainMenuItem.equals("whatever")
>>displayBlock = whateverBlock;
>>
>> ...
>>
>>  return null;
>> }

Re: Netbeans 6.7 tapestry 5 plugin support

2009-06-16 Thread Ville Virtanen

Thanks!

This is something that looks very nice on paper, so I'll test it as soon as
possible.

 - Ville


iberck wrote:
> 
> Hi I'm developing a netbeans plugin for tapestry 5 tested on windows xp
> The supported features are:
> 
> Initial features:
> * Support on Netbeans 6.5, 6.51, 6.7 Betas, Release candidates
> * Create pages/components from wizard
> * Code templates
> * Actions
> * tml files highlighting
> * Live class reloading
> 
> Code templates
> 
>  For example, if you type [onaction + tab] in the java class template, the
> editor will insert the template of "onaction" method
> 
> @OnEvent(component="ComponentName")
> Object onActionFrom"ComponentName"() {
> // TODO Add content
> return null;
> }
> 
> * Supported java class code templates
>   o pagelifecycle
>   o onpageloaded
>   o onpageattached
>   o onpagedetached
>   o property
>   o aso
>   o injectpage
>   o log
>   o asset
>   o ontranslator
>   o rendercomponent
>   o setuprender
>   o beginrender
>   o beforerenderbody
>   o afterrenderbody
>   o afterrendertemplate
>   o afterrender
>   o cleanuprender
>   o formevents
>   o onsuccess
>   o onaction
>   o onexception
>   o includecss
>   o includejs
>   o component
>   o inject
>   o oncontext
>   o onactivate
>   o onpassivate
>   o onvalidate
>   o onevent
> * Supported tml code templates
>   o palette
>   o linksubmit
>   o linksubmithtml
>   o radiogroup
>   o radiogrouphtml
>   o passwordfield
>   o passwordfieldhtml
>   o errors
>   o errorshtml
>   o formfragment
>   o pagelink
>   o pagelinkhtml
>   o actionlink
>   o actionlinkhtml
>   o form
>   o formhtml
>   o submit
>   o submithtml
>   o select
>   o selecthtml
>   o tmlfile
>   o renderobject
>   o renderobjecthtml
>   o label
>   o labelhtml
>   o eventlink
>   o eventlinkhtml
>   o beandisplay
>   o beandisplayhtml
>   o textarea
>   o textareahtml
>   o if
>   o ifhtml
>   o ifelse
>   o datefield
>   o datefieldhtml
>   o output
>   o outputhtml
>   o beaneditform
>   o beaneditformhtml
>   o delegate
>   o loop
>   o loophtml
>   o grid
>   o gridhtml
>   o textfield
>   o textfieldhtml
>   o checkbox
>   o checkboxhtml
>   o radio
> * Supported properties code templates
> 
> Actions
> 
> * You can switch between template/class [Ctrl + Alt + S]
> * If you are in properties file you can switch to page [Ctrl + Alt +
> S]
> * As part of the Netbeans you can use [Ctrl + Shift + 1] to select the
> file in the project
> * You can go to properties file from page or component [Ctrl + Alt +
> P]
> * You can create the .properties file if it does not exists
> * Switch supports pages and components
> * Switch supports nested pages and components
> 
> Live class reloading (Only on Netbeans > 6.7RC1 )
> 
> As a part of Alex Kotchnev's work you can follow the blog instructions:
> http://www.troymaxventures.com/2009/05/rad-w-tapestry-5-netbeans-67-maven-and.html
>  
> 
> The official web page of the project:
> https://nbtapestrysupport.dev.java.net/
> 
> Feel free to download from:
> https://nbtapestrysupport.dev.java.net/servlets/ProjectDocumentList?folderID=11159&expandFolder=11159&folderID=0
> 
> Regards
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Netbeans-6.7-tapestry-5-plugin-support-tp24029691p24067704.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: [Tapestry Central] Why chose Tapestry?

2009-06-16 Thread Ville Virtanen

Don't know if I double posted but..

Indeed, if you aim to code shit, please don't use T5 :)

The best case scenario would be that the compiler would detect all errors. 
The next best case would be that the app would point out what is wrong when
it starts.
The worst case is to have to click through the thousands of pages to even
detect that you can access it.

 - Ville 


Howard Lewis Ship wrote:
> 
> I recently had an e-mail exchange with a Tapestry user; after
> congratulating me on creating Tapestry, he went on with the following
> observation on his organization: The company I work at unfortunately
> chose JSF for their big app. The reason was that Tapestry was "brittle"
> in the sense that, if one developer breaks something, on a page or a
> service, very often the whole site won't come up because the initial
> registry startup will fail. Or for example, if page A has a pagelink to
> page B, and page B is broken, then page A won't render. While I agree
> that we shouldn't ship unless the whole app is working, this is a
> thousands of pages big app with hundreds of mediocre (as in likely to
> break things) developers. They'd rather have 80% of the thing working
> than nothing at all. I never thought of this for my own projects, and
> haven't had the time to examine the truth of their claims. What's your
> take?
> I provided the following response:
> Early failures are absolutely, 100%, the only path towards code
> quality. You may have heard the phrase "no broken windows" (see "The
> Tipping Point" by Malcom Gladwell for more details) but the short form
> is that when errors go uncorrected (whether they are broken windows in
> an abandoned building, or broken code in an application) they tend to
> multiply quite rapidly.
> The things that will "break" a link from page A to page B are
> substantial problems such as invalid templates, references to unknown
> properties or components, or compile errors in the page B class ...
> things that no other developer should ever see when page B's developer
> is working and checking in code. That is, problems that should never be
> checked into trunk, but instead kept in a local workspace or a private
> branch.
> An organization that thinks that fail early is a problem is an
> organization that isn't prepared to develop a large application in any
> technology. The image I'm getting is one where there is no build
> server, no continuous integration, at best CVS for source code
> management (or possibly one of those "shared directory"
> monstrosities)  i.e., a chaotic environment where errors are
> allowed to be checked in to the trunk and can go unnoticed for some
> time.
> The solution to coding errors in pages or components is not to wait
> until your testers (or end users) find the bugs, but to identify and
> fix the bugs early. That's called "engineering discipline" and the
> reality is that even self-professed "mediocre" developers can do it.
> Tapestry helps because it fails early and has great exception reporting
> to guide you right the problem so that you can fix it.
> Another factor here is enforced helplessness. If only Fred understands
> page B and he's out when it's broken, then all development stops
> waiting for Fred to get back. I hit this problem myself, years ago
> working on a large Struts application (those words give me the heebie
> jeebies now!). We had lots of code, a fragile and slow build process,
> and many little code "fiefdoms". I spent too much wasted time twiddling
> my thumbs.
> Nobody should "own the code"; if page B is is broken, Julie (who
> normally develops page A) should be free to fix it. Julie will need to
> understand the page B code well enough to fix it, but also you need an
> overall environment with shared source, no repository locks (that is,
> nothing that says "Only Fred can change this file"), and no management
> PHB's getting in the way. Pair programming is the best way for Fred and
> Julie to share knowledge so that they can understand each other's code.
> Even if pairing occurs only part time, it's very effective at knowledge
> transfer as well as ordinary coding.
> The idea that "mediocre" developers should use JSF as it is more
> tolerant of errors is absurd! Tapestry 5 is designed to improve
> productivity for all developers, by streamlining, simplifying, being
> smart and being concise ... not to mention live class reloading and
> best-of-breed exception reporting, which makes it fast to identify and
> fix those errors.
> If your doctor tells you to eat less red meat, that doesn't mean you
> should switch to a diet of fried chicken three meals a day! Likewise,
> if you have concerns with code quality from your developers, you should
> not switch to a less agile, more code-intensive, less supportive
> development model and hope to catch all the bugs in QA. Sweeping
> problems under the rug is never a winning strategy.
> Coming down off my soap box, I should also add that Tapestry 5.1 works
> a little bit dif

Re: T5: Huge t-formdata

2009-06-08 Thread Ville Virtanen

Hi,

Few suggestions: try 5.1, there are many optimizations in this release,
don't know if any of those are related to this though.

Also, does the size grow linearly with more objects in the row? How much by
per row? (Test with 100, 200, 300, 400, 500 etc.)

Include the tml and java, without those we're pretty much guessing what
might or might not go wrong.

Also t-formdata contains (i think) data about the state of the related form
components, so the complexity of the form might play role here also. So, if
possible simplify the contents of the loop by removing all unneccessary t5
components from inside it. Again, it would be easier to guess with some
source.

 - Ville


Inge Solvoll-2 wrote:
> 
> Hi!
> 
> I'm using T5.0.18.
> 
> I have a form containing a loop with possibly hundreds or even thousands
> of
> items. My problem is that when the numbers grow, the t-formdata string
> grows
> to be about 500.000 characters.
> 
> The loop consists of objects that extend from a type I've contributed a
> type
> coercer to and from string for. I've also specified a PrimaryKeyEncoder
> that
> converts to string and from string for the looped items.
> 
> I've tried setting loop attributes volatile="true" and formState="none",
> none of them caused any significant changes to the size of the t-formdata
> string.
> 
> Any pointers on where to look to solve this problem?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Huge-t-formdata-tp23886649p23922483.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



Next 5.1 bug fix release? (ProgressiveDisplay and chrome / ie8 woes)

2009-05-26 Thread Ville Virtanen

Hi,

sometimes chrome and ie8 don't make the request when using progressive
display. Symptoms: the ajax-loader.gif is displayed for the user
indefinitely and the server never sees the request. This can be fixed by
pressing refresh with shift. (Empty-cache-reload). So it is probably
prototype issue with these new browsers, right?

Are there any plans to publish new 5.1 series bug fix release once the next
version of prototype becomes stable? It has stayed as beta for quite long
time now, so release should be nearing...

 - Ville
-- 
View this message in context: 
http://www.nabble.com/Next-5.1-bug-fix-release--%28ProgressiveDisplay-and-chrome---ie8-woes%29-tp23719764p23719764.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: URL pattern that causes TapestryException

2009-05-17 Thread Ville Virtanen

Hi,

I also have the same problem, the app also breaks if you enter some custom
character, like the % sign.

java.lang.IllegalArgumentException
Input string 'totalsadf%' is not valid; the character '%' at position 10 is
not valid.

Hide uninteresting stack frames Stack trace

*
org.apache.tapestry5.internal.services.URLEncoderImpl.decode(URLEncoderImpl.java:143)
* $URLEncoder_12151d2041c.decode($URLEncoder_12151d2041c.java)
*
org.apache.tapestry5.internal.services.ContextPathEncoderImpl.decodePath(ContextPathEncoderImpl.java:86)
*
$ContextPathEncoder_12151d20413.decodePath($ContextPathEncoder_12151d20413.java)
*
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.checkIfPage(ComponentEventLinkEncoderImpl.java:333)
*
org.apache.tapestry5.internal.services.ComponentEventLinkEncoderImpl.decodePageRenderRequest(ComponentEventLinkEncoderImpl.java:313)
*
$ComponentEventLinkEncoder_12151d20411.decodePageRenderRequest($ComponentEventLinkEncoder_12151d20411.java)
*
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:41)
* $Dispatcher_12151d20412.dispatch($Dispatcher_12151d20412.java)
* $Dispatcher_12151d20408.dispatch($Dispatcher_12151d20408.java)
*
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245)

The earlier proposed fix is to contribute your own exception handler, see 

http://wiki.apache.org/tapestry/Tapestry5ExceptionPage
and 
http://wiki.apache.org/tapestry/Tapestry5RedirectException
for clues. 

Don't know how up-to-date those are.

 - Ville





sdeniss wrote:
> 
> Hi,
> 
> if you add ".whatever" to the end of URL that runs tapestry 5.1 (the one I
> use) you'll get Exception. 
> 
> For example 
> http://localhost:8080/pr/reference/new.abracadabra 
> will cause
> 
> 
> org.apache.tapestry5.ioc.internal.util.TapestryException: 
> Component reference/New does not contain an embedded component with id
> 'abracadabra'. 
> Available components: author, copyright, createForm, description, errors,
> keyword, label, label_0, 
> label_1, label_2, label_3, label_4, label_5, lastRevisionDate, layout,
> publisher, submit, title.
> 
> 
> If I select existing component then exception depends on the type of the
> selected component. For example for
> http://lalala.com/pr/reference/new.createForm exception looks like the
> following
> 
> 
> org.apache.tapestry5.runtime.ComponentEventException: 
> Forms require that the request method be POST and that the t:formdata
> query parameter have values. [at
> classpath:com/pr/web/pages/reference/ReferenceNew.tml, line 3]
> 
> 
> 
> The problem is that I as administrator don't want to be disturbed every
> time somebody types rubbish in URL. I want to display 404 in this
> case.
> Does anybody know how to solve this?
> 
> Thanks,
> Deniss
> 
> 

-- 
View this message in context: 
http://www.nabble.com/URL-pattern-that-causes-TapestryException-tp23571617p23590706.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: Component won't render its body

2009-05-12 Thread Ville Virtanen

Hi,

check that the associated .tml is really named correctly and is part of the
correct package. The case matters, it must be same in .java as it is in
.tml. The tml file is not mandatory, if it is omitted then the component
outputs only what the java class writes directly to the writer.

 - Ville


daniel joyce wrote:
> 
> The component is in a subpackage projects under components,
> 
> I use it via  
> I know it IS getting picked up ( at the class is ) because the debug
> statements are getting logged. But the tml doesn't render AT ALL.
> 
> On Tue, May 12, 2009 at 8:30 AM, daniel joyce 
> wrote:
>> I have a method in the java file annotated with @SetupRender. Debug
>> statements show it should be rendering. The code is being called. But
>> no content is emitted by the .tml
>>
>> > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>    
>>        
>>            
>>                ${cName}
>>                
>>            
>>            
>>                 
>>                
>>                
>>                    ${pName}
>>                
>>            
>>        
>>        
>>            
>>            
>>                
>>            
>>            Edit
>>            Delete
>>        
>>    
>>
>>
>> At the bare minimum, it should be emitting a empty table into the
>> completed page. Is there another method I need to implement? Something
>> I am missing?
>>
>> I've tried having the method annotated with @SetupRender return void
>> and true; No content at all is emitted by the tml file in either case.
>>
>>
>> -Daniel
>>
> 
> -
> 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://www.nabble.com/Component-won%27t-render-its-body-tp23504925p23505797.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: embed a variable in a javascript in a tml?

2009-05-05 Thread Ville Virtanen

Ofcourse one could write simple component that encapsulates the JS and
outputs required script tags and comment etc. things...

 - Ville


Ville Virtanen wrote:
> 
> The ugly way out of this is to output the comments using 
> 
> 
> 
> and in java 
> 
> public String getCommentStart(){
> return " html comments -
>> tapestry 
>> does not evaluate markup in html/xml comments.
>> 
>> felix
>> 
>> Kristian Marinkovic schrieb:
>>> never did this myself, but i think this should work somehow if there
>>> is a myid property...
>>> 
>>> instead... you could use the RenderSupport service to render your 
>>> script programmatically
>>> 
>>> g,
>>> kris
>>> 
>>> 
>>> 
>>> 
>>> Angelo Chen  
>>> 05.05.2009 09:22
>>> Bitte antworten an
>>> "Tapestry users" 
>>> 
>>> 
>>> An
>>> users@tapestry.apache.org
>>> Kopie
>>> 
>>> Thema
>>> t5: embed a variable in a javascript in a tml?
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Hi,
>>> 
>>> I'd like to get myid from the page,  but following code will not work,
>>> the
>>> line:
>>> 
>>> var google_conversion_id = "${myid}"
>>> 
>>> will be rendered as it is, it is not as what I expected
>>> 
>>> var google_conversion_id = "12345678"
>>> 
>>> any idea how to embed a variable in a javascript in the template? thanks
>>> 
>>> Anelo
>>> 
>>> 
>>> 
>>> <!--
>>> var google_conversion_id = ${myid}
>>> var google_conversion_language = "en_US";
>>> var google_conversion_format = "3";
>>> var google_conversion_color = "ff"
>>> //-->
>>> 
>> 
>> -- 
>> Felix Gonschorek
>> GG-Media
>> 
>> Kirchstr. 18
>> 69115 Heidelberg
>> 
>> Tel: +49 6221 890 168-0
>> Fax: +49 6221 890 168-1
>> Mobil: +49 176 2234 1338
>> 
>> fe...@gg-media.biz
>> http://www.gg-media.biz
>> 
>> Vertretungsberechtigte Gesellschafter:
>> Felix Gonschorek & Jochen Greiner
>> 
>> Umsatzsteuer-Identifikationsnummer
>> gemäß § 27a Umsatzsteuergesetz:
>> DE232906440
>> 
>> -
>> 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://www.nabble.com/t5%3A-embed-a-variable-in-a-javascript-in-a-tml--tp23382334p23387191.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: embed a variable in a javascript in a tml?

2009-05-05 Thread Ville Virtanen

The ugly way out of this is to output the comments using 



and in java 

public String getCommentStart(){
return " html comments -
> tapestry 
> does not evaluate markup in html/xml comments.
> 
> felix
> 
> Kristian Marinkovic schrieb:
>> never did this myself, but i think this should work somehow if there
>> is a myid property...
>> 
>> instead... you could use the RenderSupport service to render your 
>> script programmatically
>> 
>> g,
>> kris
>> 
>> 
>> 
>> 
>> Angelo Chen  
>> 05.05.2009 09:22
>> Bitte antworten an
>> "Tapestry users" 
>> 
>> 
>> An
>> users@tapestry.apache.org
>> Kopie
>> 
>> Thema
>> t5: embed a variable in a javascript in a tml?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Hi,
>> 
>> I'd like to get myid from the page,  but following code will not work,
>> the
>> line:
>> 
>> var google_conversion_id = "${myid}"
>> 
>> will be rendered as it is, it is not as what I expected
>> 
>> var google_conversion_id = "12345678"
>> 
>> any idea how to embed a variable in a javascript in the template? thanks
>> 
>> Anelo
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Felix Gonschorek
> GG-Media
> 
> Kirchstr. 18
> 69115 Heidelberg
> 
> Tel: +49 6221 890 168-0
> Fax: +49 6221 890 168-1
> Mobil: +49 176 2234 1338
> 
> fe...@gg-media.biz
> http://www.gg-media.biz
> 
> Vertretungsberechtigte Gesellschafter:
> Felix Gonschorek & Jochen Greiner
> 
> Umsatzsteuer-Identifikationsnummer
> gemäß § 27a Umsatzsteuergesetz:
> DE232906440
> 
> -
> 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://www.nabble.com/t5%3A-embed-a-variable-in-a-javascript-in-a-tml--tp23382334p23387164.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Using "futures" to parallelize rendering of components

2009-05-03 Thread Ville Virtanen

Hi,

Don't really understand the question, but if you're having perfomance
problems then caching would be the way to go?

You can use blocks to separate what ever you wish to wrap as T5 components
and place them to one central page, from which those blocks can be used.

T5 caches all pages and components in it's own pools, and you can mark
content that can be cached with @Retain annotation.

I hope this gives some ideas,

 - Ville


cfineman wrote:
> 
> We have an app that's an aggregation of several 'components' (not yet
> written in Tapestry... using an older in-house framework). Although each
> component is not very expensive to create, the aggregate cost can get
> kinda high sometimes.
> 
> I've been poking around Tapestry for the past couple of days trying to see
> if I can figure out an elegant way to launch of bunch of "futures" at the
> start of rendering and then join with them in the "@BeginRendering"
> handler.
> 
> The simplest way I could think to do it is by creating a "@PageAttached"
> handler in the components that are to be rendered in a farm and creating
> the "future" in that method.
> 
> I was hoping to find a way to do it in a "container" component that all
> the "futured" components were in and then crawl the component tree
> invoking the future on each component with an appropriate tag (perhaps
> using mixins). However, there does not seem to be a public way to gain
> access to the component tree (the public interfaces don't seem to support
> this). 
> 
> Keep in mind, I would like to be able to render most of the page
> server-side if possible (otherwise I would have just created a bunch of
> javascript-populated divs).
> 
> Was hoping to find some slick extension point in Tapestry but it feels
> like I've not identified the most elegant solution. Does the PageAttached
> (or perhaps, activate??) feel like the right way to go? Any other
> suggestions?
> 

-- 
View this message in context: 
http://www.nabble.com/Using-%22futures%22-to-parallelize-rendering-of-components-tp23353811p23356193.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: Solving the T5 Documentation Dilemma

2009-05-03 Thread Ville Virtanen

Is someone still using own mail to receive these :)

I've used nabble for a while, and it really rocks. Try it out

http://www.nabble.com/Tapestry-f302.html

 - Ville


Piero Sartini-4 wrote:
> 
> On Freitag, 1. Mai 2009 19:04:53 Otho wrote:
>> The perfect solution and topping cream would be a forum/community system
>> written in Tapestry of course, as a showcase and demonstration of its
>> capabilities as well as a solid starting point for Tapestry apps. But I
>> am
>> aware of the effort and time that takes.
> 
> The main problem with a forum is the additional work for people who are
> signed 
> into more than one or two mailing lists.
> 
> Checking one forum for news may be ok. But navigating to 5-10 or even more 
> forums to check if there is something new and to post answers does take a
> lot 
> more time than going through your mailing folders and press the reply
> button. 
> 
> The only real possibility I see is a web-gateway for the mailing lists 
> (NetBeans did it that way). But then... web-gateways like nabble are in
> place, 
> why develop another one?
> 
>   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://www.nabble.com/Solving-the-T5-Documentation-Dilemma-tp23307256p23356147.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: workaround for hibernate-module problem (ValueEncoderSource contribution)

2009-05-03 Thread Ville Virtanen

Provide the hibernate configuration if it is missing.

If not, please attach the stack trace so we can take a look at it.

 - Ville


aldana wrote:
> 
> hi,
> 
> I am facing problem described in 
> http://www.nabble.com/Hi-Lo-tutorial,-HIbernate-cfg-errors-td22230480.html.
> 
> In my app I am using palette component and tapestry-hibernate, so the 
> ValueEncoder contribution is interfering with each other.
> 
> Is there another alternative/workaround as removing hibernate-tapestry 
> module dependency? I cannot remove it because I am using its features.
> 
> thanks.
>  
> 
> -- 
>  manuel aldana
>  ald...@gmx.de
>  software-engineering blog: http://www.aldana-online.de
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> -
> manuel aldana
> aldana((at))gmx.de
> software-engineering blog: http://www.aldana-online.de
> 

-- 
View this message in context: 
http://www.nabble.com/workaround-for-hibernate-module-problem-%28ValueEncoderSource-contribution%29-tp23355171p23356127.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: InjectPage and context

2009-05-03 Thread Ville Virtanen

Forgot to mention that the PageRenderLinkSource is not part of T5.0.18, It
was introduced later.

 - Ville


Ville Virtanen wrote:
> 
> Hi,
> 
> Two solutions:
> 
> 1. Use PageLink in tml. (And supply the context to it from the java class)
> 
> 2. Use PageRenderLinkSource (return
> PageRenderLinkSource.createPageRenderLinkWithContext(WriteMsg.class,
> Object... context);)
> 
> Neither requires injected page.
> 
>  - Ville
> 
> 
> Angelo Chen wrote:
>> 
>> Hi,
>> 
>> I have a page called WriteMsg, in another page I use follow code to
>> inject the page
>> 
>> @InjectPage
>> private WriteMsg writeMsg
>> 
>> Ojbect onActionFromWrite() { 
>>  return writeMsg;
>> }
>> 
>> but how to pass a context to the instance of page without using @Persist
>> instances?
>> 
>> Thanks,
>> 
>> 
>> 
>> public class WriteMsg {
>> 
>>  Object onActivate(EventContext ec) {
>>  }
>> 
>> }
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-InjectPage-and-context-tp23355029p23356065.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: t5: InjectPage and context

2009-05-03 Thread Ville Virtanen

Hi,

Two solutions:

1. Use PageLink in tml. (And supply the context to it from the java class)

2. Use PageRenderLinkSource (return
PageRenderLinkSource.createPageRenderLinkWithContext(WriteMsg.class,
Object... context);)

Neither requires injected page.

 - Ville


Angelo Chen wrote:
> 
> Hi,
> 
> I have a page called WriteMsg, in another page I use follow code to inject
> the page
> 
> @InjectPage
> private WriteMsg writeMsg
> 
> Ojbect onActionFromWrite() {  
>   return writeMsg;
> }
> 
> but how to pass a context to the instance of page without using @Persist
> instances?
> 
> Thanks,
> 
> 
> 
> public class WriteMsg {
> 
>   Object onActivate(EventContext ec) {
>   }
> 
> } 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-InjectPage-and-context-tp23355029p23355810.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



[T5] Tapestry.decimalFormatSymbols

2009-04-22 Thread Ville Virtanen

Hi,

I have javascript that depends on Tapestry.decimalFormatSymbols. How can I
ensure that those symbols are added to page?

Could there be annotation that would trigger it?

 - Ville
-- 
View this message in context: 
http://www.nabble.com/-T5--Tapestry.decimalFormatSymbols-tp23175562p23175562.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: once-only onActivate method

2009-04-20 Thread Ville Virtanen

This probably is NOT the solution, as this method gets executed only once
when the page is loaded and added to the pool.

Multiple users and hundreds of requests can be served with only one call to
PageLoaded, if I understand it correctly.

The pageAttached and pageDetached events occur when the page is fetched from
the pool (attach) and returned back (detach). This occurs once per request.

The best solution that I can come up is to use additional context parameter
to simulate the activateExternalPage(), so when you use page link or similar
you can "notify" the page correctly.

I mean

onActivate(Long key, boolean fromAnotherPage) {
  //Do activateExternalPage() stuff
}

onActivate(Long key){
  if(noInitializationYetDone){
//do normal initialization
  }
}

onPassivate(){
  return key;
}

This way the normal page flow does the normal initialization on form
postbacks etc, and the special initialization can be done if the link that
directs to the page contains the magic boolean in the context.

However, this should be avoided by design, so that page can initialize
itself correctly without stale checks imho, so no data in session etc. (I
don't know how Cayenne works so this might not apply, but I've noticed that
this is best practise for our apps w/ hibernate.)

 - Ville


JoelG wrote:
> 
> This might help... PageLoaded ... 
> http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/annotations/PageLoaded.html
> 
> 
> 
> -Original Message-
> From: Bryan Lewis 
> Reply-To: Tapestry users 
> To: users@tapestry.apache.org
> Subject: once-only onActivate method
> Date: Sun, 19 Apr 2009 22:18:10 -0400
> 
> I need a method that will get called exactly once when a page is first
> invoked, and not again when a form in the page is submitted.  In Tapestry
> 4
> the activateExternalPage() method was good for that.  I don't think the
> new
> onActivate() method is a replacement, nor is the SetupRender-annotated
> method.  For example, they get called when an autocomplete textfield is
> used
> in mid-form.  How do I do this in Tap 5?  (My intent is to clear any stale
> changes in my Cayenne DataContext.)
> 
> Thanks.
> 
> -- 
> Joel Halbert
> 020 3051 8637
> 075 2501 0825
> j...@storequery.com
> www.storequery.com
> SU3 Analytics Ltd, The Print House, 18 Ashwin St, London E8 3DL.
> 
> 
> -
> 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://www.nabble.com/once-only-onActivate-method-tp23129460p23141937.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 rendering of the template done before initialization of the backing model?

2009-04-19 Thread Ville Virtanen

Could you attach a simple page that reproduces this?

 - Ville


daniel joyce wrote:
> 
> I find that if my template uses a field in the backing model java file
> that hasn't been inited yet, it throws exceptions in when rendering.
> 
> Is there a reason the tml file is rendered/reified before the backing
> model class?
> 
> I usually have to stick a dummy instance or do some dummy
> initialization via PageAttached or PageLoaded, so the renderqueue is
> happy, before the real values are apparently set up via
> onPassivate/onActivate, or being passed in from a previous page via a
> initialize or set method.
> 
> I can't think of any good reason that the renderqueue should run
> before the page values it uses are even inited. It's a big source of
> frustration and bugs.
> 
> One good thing, would be a document on the order of the following calls.
> 
> PageLoaded
> PageAttached
> PageDetached
> OnActivate
> OnPassivate
> The render methods.
> 
> The render flow is well documented. How Activate/Passivate, external
> initialization ( via called a setup parameter on the page, say
> "SomePage.set(SomeValue) play with
> PageLoaded/PageAttached/PageDetached isn't.
> 
> -Daniel
> 
> -
> 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://www.nabble.com/Is-rendering-of-the-template-done-before-initialization-of-the--backing-model--tp23130905p23131270.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5.0.18: how to have variable data structures in a bean?

2009-04-19 Thread Ville Virtanen

Hi,

the given tml is missing encoder for the inner loop. Without this T5 uses
the default approach which is the highly inefficient
serialize-whole-thing-to-form-data. 

This encoder can be constructed in the bean itself (resident) but imho
should not be there, so the best approach (afaik) is to construct it in the
page based on the data that resident contains (So that one encoder is
created per resident for the profiles loop.).

 Add the encoder and if this doesn't work attach the associated java code
snippet also

 - Ville


Chuck Kring wrote:
> 
> Hi all,
> 
> This is somewhat complicated so bear with me.
> 
> I'm trying to create a bean with a variable number of fields, each which 
> has a name and an associated select box to set various properties.   
> The  tml looks something like this:
> 
> .
>  t:encoder="encoder">
> 
> 
>
>model="profile.model" encoder="profile.model" /> 
>
> 
> 
> 
> Resident and profile are standard beans except that resident contains an 
> ArrayList of profiles that is accesses through getProfiles().
> 
> This all works pretty well except that Tapestry 5.0.18 tries to 
> serialize the profile bean (I get errors unless I make it extend 
> Serializable)  AND it appears to set the selection on another instance 
> of the profile bean.  I suspect that tapestry serializes the profile 
> bean,  unserializes it to create it's own copy, then changes selection 
> on it's own copy.  My bean never sees the updated result.
> 
> The work around is ugly - to store the profiles list in the session, the 
> retrieve it and update the actual bean in in the profile.setSelection() 
> method. 
> 
> My question is is this a bug in tapestry or am I doing something wrong?  
> Is there a better way to accomplish this?
> 
> Thanks!
> 
> Chuck Kring
> 
> 
> 
> 
> 
> -
> 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://www.nabble.com/T5.0.18%3A-how-to-have-variable-data-structures-in-a-bean--tp23115133p23120688.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: [REQUEST] Live T5 web sites, quotes, marketting

2009-04-17 Thread Ville Virtanen

Hi, 

nice to see what others are making. We use T5 to build different kinds of
systems for public and private sectors, but mainly budgeting and enterprise
resource planning and monitoring software. Currently we have 4 T5 systems in
production all in different client's environments, and two more projects are
nearing release almost immediately. 

Our software typically integrates to multiple other systems, like personnel
registries, data warehouses, salary systems, reporting systems etc. to
combine all the wonderful data already present in most companies and to
present it in usable and efficient way. The number of systems, old and new
that are in use in a typical firm is overwhelming.. 

We'll anyway T5 has proven to be stable, doesn't require much resources to
do it's tasks and is easy and reliable to integrate to almost anything. The
most important thing to us is that T5 allows us, you could even say directs
us, to architect our systems easily and well, it supports us to write
easy-to-understand code by removing all that clutter and exposes only the
real things we wish to do, which directly means less code, which directly
means quality and reduced costs (the drop of unsuccesfull code inspections
etc.) lowered bug fix times etc. And we can also sell cheaper in the first
place and win more cases, as development times have dropped. 

Also it can be seen that the developers who work with T5 are more motivated
and happy with their work than those that are still stuck maintaining old
Struts and servlet stuff. This cannot be calculated and is hard to prove,
but there is definitely that trend: whether developer maintains or creates
new functionality with Struts (or asp.net) they usually start with "why me,
couldn't xxx do it", where as with T5 software it usually is "ok, let's go
through the specs..." 

Before we have used Struts, plain servlets, T4 and we still use asp.net / C#
for clients that require it, and so far there just is no match for T5 when
software must be developed with minimum cost, but still to the standard and
professionally. (Which, in my opinion, excludes all scripting languages.) 

There definitely is learning curve (as with any new technology), but in my
opinion it definitely is worth it. 

Our end products aren't that attractive or flashy, and most of the sites are
intranet-only software anyway so I don't have any sites to provide. I also
don't have any hard numbers to back my statements that I can publish, but I
do know that the projects we sold two years ago would be sold for about
10-20% cheaper today. (And I mean technical development time, not the
overall price to which I have no access.) If we would change back to using
old technologies we would have to add 10-20% to our work estimates. Also the
customer benefits: the bought software is less error prone, easier to
maintain and develop further. 

Tapestry 5 is no silver bullet, you still have to think before you code, but
it does clearly add value. We are 100% committed to Tapestry 5 and will be
using and recommending it for upcoming projects. 

 - Ville 

Ps. What I stated above is my experience in the firm I work for. On top of
that I have developed wholesale trade software system on my own for
orientimport.fi, which makes 7th system that uses T5 that I've build.
(Currently only static website, in about month there should be the real
system online.)


Howard Lewis Ship wrote:
> 
> I'm putting together some new presentations about Tapestry and I could
> use the help of the Tapestry community.
> 
> I need more pictures of live T5 sites.  Just send me a URL and I can
> do a screen grab.  This is all about answering the question: "is it
> mature?"
> 
> I make a number of reasonable observations about Tapestry 5, but would
> love quotes to back it up:
> - Fast and easy to develop
> - Helps with big teams
> - Great performance
> - Great internationalization / localization
> - Live class reloading gives "almost scripting language productivity"
> 
> 
> so quotes along the lines of "we were able to quickly put together
> xyz" or "we found qrstuv much easier than our last framework" or
> "would have been a failure without Tapestry".  Don't let me put words
> in your mouth, however!
> 
> -- 
> Howard M. Lewis Ship
> 
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
> 
> -
> 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://www.nabble.com/-REQUEST--Live-T5-web-sites%2C-quotes%2C-marketting-tp23050433p23095252.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: Order of rendering of page versus components in page?

2009-04-17 Thread Ville Virtanen

Hi,

if you rely on onActivate, you surely have the corresponding onPassivate
also?

It should work if you do have the onPassivate. If not, please post some code
so we can check it.

 - Ville


daniel joyce wrote:
> 
> I have a datagrid that is embedded in a page. Its datasource is built
> by a method in the page, and the grid component references it through
> a property that calls that method.
> 
> It seems that method is getting called before the page's OnActivate is
> ever called, and the data needed to initialize that datasource is not
> entirely available yet..
> 
> Are components rendered/setup first before a page is ever activated?
> 
> IF so, why? Wouldn't it make more sense for the OnActive to be run
> first, to ensure all the passed values are ready, before rendering
> components that may depend on them?
> 
> -Daniel
> 
> -
> 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://www.nabble.com/Order-of-rendering-of-page-versus-components-in-page--tp23090925p23092723.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



Ordering of meta tags

2009-04-15 Thread Ville Virtanen

Hi,

Per Microsoft documentation
(http://msdn.microsoft.com/en-us/library/cc817574.aspx) 
"The X-UA-compatible header is not case sensitive; however, it must appear
in the Web page's header (the HEAD section) before all other elements,
except for the TITLE element and other META elements."

T5 puts some link tags before meta tags, so the META tags wont work..

How can I achieve this?

 - Ville
-- 
View this message in context: 
http://www.nabble.com/Ordering-of-meta-tags-tp23065095p23065095.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5 How to onLoad focus() to textfield in Layout component

2009-04-15 Thread Ville Virtanen

You can achieve this the T5 way by doing this in the page that contains the
textbox, no need to mess with layout etc. this can even be in a
component...:

  @Environmental
  private RenderSupport renderSupport;

  void setupRender()
  {
renderSupport.addScript("document.getElementById('%s').focus();",
"text1");
  }

Of course, you can do this in afterRender also.

It is all explained in http://tapestry.apache.org/tapestry5/guide/ajax.html

Also, you can inject the textbox using @Component annotation to avoid typing
that id in plain text.

@Component
private TextField text1;
.
.
.
renderSupport.addScript("document.getElementById('%s').focus();",
text1.getClientId());

 - Ville

wesleywj2 wrote:
> 
> hi,
> 
> i'm trying to do an automatic focus on 1 of 3 textfield input upon the
> page render. 
> 
> so i thought in my textfield 
> 
>  onchange="this.form.submit()"/>
> 
> upon resubmit this page, the onLoad attribute in  can call the
> javascript 
> document.getElementById('text1').focus();
> 
> but the environment of my page is using Layout component, the textfield in
> the page does not have a body and i have to include it under my layout.tml
> which fails as the browser could not locate the id since its all shared by
> different pages.
> 
> anyway i can set the focus upon rerender of pages under my pojo class? in
> the documentation, there's no such method. any alternatives is welcome.
> 
> please advise.
> 
> thanks & regards,
> wesley
> 

-- 
View this message in context: 
http://www.nabble.com/T5-How-to-onLoad-focus%28%29-to-textfield-in-Layout-component-tp23055988p23057325.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5.1.0.2] / [T5.1.0.3] Combining JavaScript Libraries in IE 6

2009-04-15 Thread Ville Virtanen

I've experienced this too, and some others in the list.

The underlying issue is that the combining / gzipping dies in the server
side -> the page is loaded but the javascript asset is never delivered to
the browser. However, tapestry includes initialization in the page which
dependes to the asset, which gives error Tapestry does not exist.

Hunt down the stack trace from production and attach it here. Do you also
have tomcat, and develop in windows + deploy to linux?

 - Ville

Ps. We're experiencing this randomly, and for us this is not browser
dependent.


Steve Eynon wrote:
> 
> Hi,
> 
> I noticed that if I added script on page in a component during the
> beginRender() method via...
> 
> renderSupport.addScript()
> 
> ...I recieved a javascript error in IE 6 complaining that the Tapestry
> object did not exist on the line:
> 
> Tapestry.onDOMLoaded(function() {
> 
> This only happens if "tapestry.combine-scripts" is set to true (i.e.
> in production mode). If this is set to false, then IE 6 is more than
> happy. It seems like IE 6 was not happy with the virtual asset js
> file.
> 
> I was just wondering if anyone else had noticed this behaviour as I'm
> only able to test IE 6 via the usual Multiple IEs install on a Windows
> XP box (and not through a *real* IE 6 install).
> 
> Regards,
> 
> Steve.
> 
> -
> 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://www.nabble.com/-T5.1.0.2-T5.1.0.3--Combining-JavaScript-Libraries-in-IE-6-tp23051348p23055231.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: Maxlength Client Validation Error

2009-04-14 Thread Ville Virtanen

Hi,

definitely worth Jira issue. Many fields require (all?) maxlength validation
&& are not required.

We aren't using any client side validation as all those balloons drove our
clients crazy :)

 - Ville


leechj wrote:
> 
> Sorry to bring this up againbut I wasn't able to find any other topics on
> this.
> I just want to make sure that it's not just me. Am I doing something wrong
> or is it really a requirement to mark a field as "required" to make
> "maxlength" client side validation work correctly?
> 
> 
> leechj wrote:
>> 
>> Hi All,
>> I'm running into an error on my forms when I have textfield elements that
>> specify a "maxlength" validator but not a "required" validator. I get a
>> javascript error of: "this.requiredCheck is undefined" Luckily, the
>> server side validation catches it if it's too large of a value, but it
>> would be nice to have his handled on the client side.
>> 
>> My elements that have both "required" and "maxlength" work as expected.
>> 
>> Thanks for any help!
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maxlength-Client-Validation-Error-tp22992514p23037142.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: More migration issues, 5.0.18 -> 5.1.0.2

2009-04-08 Thread Ville Virtanen

Hi,

exatly the same problems we were having. I opened Jira issue because of
this:

https://issues.apache.org/jira/browse/TAP5-623

For us the main reason was because we had 



and then


   ${value}
   
  
   


Now with T5.0.18 this worked fine, but now dies in 5.1.0.2 if it is
readmode: (label gets null for parameter) - givin only some T5 internal
stacktrace or the unsupported form of compression..

 Hope this helps,

 - Ville



Andy Blower wrote:
> 
> Another day, another couple of stumbling blocks for our applications
> migration to T5.1 - I can't believe this has taken a solid week of effort
> so far. I'm starting to wonder if we jumped the gun on moving to T5.1 so
> soon? I do seem to be having more problems than most people on the list,
> so maybe it's just me / our app or something.
> 
> Anyway, the first issue is with our checkbox components that do an Ajax
> call when checked or unchecked. They work fine if Gzip compression is
> switched off, but if it's enabled the Ajax.Request hits the onException
> block with this error message "TypeError: response is null". The server
> event handler is being called correctly and returning the correct
> JSONObject, but the responseText is empty and responseXML, responseJSON,
> and headerJSON are all null even though the status code is 200. My guess
> that the JSONObject is being compressed and it shouldn't be. Should I
> raise a JIRA for this, or am I mistaken here?
> 
> I also have a page that works fine with T5.0.18 but breaks in T5.1.0.2 and
> I have no idea why - curiously, if I have gzip compression I don't see the
> stacktrace in the browser, but I get "Content Encoding Error", "The page
> you are trying to view cannot be shown because it uses an invalid or
> unsupported form of compression." From Firefox.
> 
> Here is the stack trace, in case anyone can make any sense of it:
> 
> An unexpected application exception has occurred.
> 
>  *   java.lang.NullPointerException
> *  
> org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarkupModel.java:94)
> *   org.apache.tapestry5.dom.Attribute.render(Attribute.java:69)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:313)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *  
> org.apache.tapestry5.dom.Element.writeChildMarkup(Element.java:835)
> *   org.apache.tapestry5.dom.Element.toMarkup(Element.java:351)
> *   org.apache.tapestry5.dom.Document.toMarkup(Document.java:163)
> *   org.apache.tapestry5.dom.Node.toMarkup(Node.java:80)
> *  
> org.apache.tapestry5.internal.services.MarkupWriterImpl.toMarkup(MarkupWriterImpl.java:57)
> *  
> org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
> *  
> $PageResponseRenderer_12085541484.renderPageResponse($PageResponseRenderer_12085541484.java)
> *  
> org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:63)
> *  
> org.apache.tapestry5.services.TapestryModule$33.handle(TapestryModule.java:1952)
> *  
> $PageRenderRequestHandler_12085541485.handle($PageRenderRequestHandler_12085541485.java)
> *  
> $PageRenderRequestHandler_12085541478.han

Re: t5: forwarding in index

2009-03-25 Thread Ville Virtanen

Two possibilities that I can see:

http://tapestry.apache.org/tapestry5/guide/conf.html and
tapestry.suppress-redirect-from-action-requests. Otherwise T5 will send
redirect to browser and the url in the browser changes.

Other is some url re-write magic.

 - Ville


Angelo Chen wrote:
> 
> Hi,
> 
> we can return a page class in the index page to redirect to another page,
> but the URL in the browser got changed as well, is there a way to do a
> forward in the index page so that the URL in the browser remain the same,
> example:
> 
> http://localhost:8080?myquerystring
> 
> I can capture myQueryString in the HttpServletRequest injected in the
> Index.java, and I'd like to forward this to /myOtherPage/p1/p2, without
> browser's url got updated, possible?
> 
> Thanks,
> 
> Angelo
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/t5%3A-forwarding-in-index-tp22694515p22696142.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: Binding of Boolean parameter

2009-03-24 Thread Ville Virtanen

Also the line

writer.write(""+value);

could be to blame?

try something like 

if(value == null) {
  writer.write("null");
} else if (value.booleanValue() == true) {
  writer.write("true");
} else {
  writer.write("false");
}

If it still does not work I suggest that you create JIRA issue and attach
.tml and .java files that replicate this with explanation.

 - Ville


Łukasz Jazgar wrote:
> 
> 5.0.18
> 
> 2009/3/24 Ville Virtanen :
>>
>> What version are you using?
>>
>>  - Ville
>>
>>
>> Łukasz Jazgar wrote:
>>>
>>> 2009/3/24 Ville Virtanen :
>>>>
>>>> Hi,
>>>>
>>>> double check that the boolean is not primitive _anywhere_, as then
>>>> assigning
>>>> null to it would coerse the value to false witch is the default in Java
>>>> if
>>>> it is unknown.
>>>
>>> I checked it 10 times before. Parameter of component and property of
>>> page are not primitive Booleans.
>>>
>>> Similar behaviour I see in oposite direction. When I set value of
>>> component parameter to null, page property gets false, not null.
>>>
>>>>
>>>> The other option is that the type coersion system in T5 handles null
>>>> values
>>>> incorrectly?
>>>
>>> Is it possible, that so base functionality is buggy in stable release
>>> (5.0.18) and nobody noticed it before? Neither unit tests? I can't
>>> belive. I still think it's my fault and my lack of understanding.
>>>
>>>
>>> Łukasz
>>>
>>> -
>>> 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://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675837.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675928.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: Binding of Boolean parameter

2009-03-24 Thread Ville Virtanen

What version are you using?

 - Ville


Łukasz Jazgar wrote:
> 
> 2009/3/24 Ville Virtanen :
>>
>> Hi,
>>
>> double check that the boolean is not primitive _anywhere_, as then
>> assigning
>> null to it would coerse the value to false witch is the default in Java
>> if
>> it is unknown.
> 
> I checked it 10 times before. Parameter of component and property of
> page are not primitive Booleans.
> 
> Similar behaviour I see in oposite direction. When I set value of
> component parameter to null, page property gets false, not null.
> 
>>
>> The other option is that the type coersion system in T5 handles null
>> values
>> incorrectly?
> 
> Is it possible, that so base functionality is buggy in stable release
> (5.0.18) and nobody noticed it before? Neither unit tests? I can't
> belive. I still think it's my fault and my lack of understanding.
> 
> 
> Łukasz
> 
> -
> 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://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675837.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: Binding of Boolean parameter

2009-03-23 Thread Ville Virtanen

Hi,

double check that the boolean is not primitive _anywhere_, as then assigning
null to it would coerse the value to false witch is the default in Java if
it is unknown.

The other option is that the type coersion system in T5 handles null values
incorrectly?

 - Ville


Łukasz Jazgar wrote:
> 
> 
> Hi all,
> 
> I am a newbie in Tapestry. Please, help me to understand, how binding of
> parameters works. I'll show my problem on very simplified example.
> 
> There is a component:
> 
> public class BooleanComponent {
> 
> @Parameter
> private Boolean value;
> 
> boolean beginRender(MarkupWriter writer) {
> writer.write(""+value);
> return false;
> }
> }
> 
> Component has one parameter of type Boolean, and all what component does
> is rendering value of this parameter.
> 
> This component is placed on Page:
> BooleanTestPage.tml:
> http://www.w3.org/1999/xhtml";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";
>  xsi:schemaLocation="http://www.w3.org/2001/XMLSchema-instance
> http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd";
> >
> 
> 
> PageProperty: ${boolProperty} 
> BooleanComponent: 
> 
> 
> 
> BooleanTestPage.java:
> public class BooleanTestPage {
> @Property
> private Boolean boolProperty;
> 
> void onActivate(String yesNoNullStr) {
> if (yesNoNullStr.equalsIgnoreCase("yes"))
> boolProperty = true;
> else if (yesNoNullStr.equalsIgnoreCase("no"))
> boolProperty = false;
> else
> boolProperty = null;
> }
> }
> 
> Page has property of type Boolean passed to component by parameter.
> 
> When I show the page with parameter "yes" or "no", everything goes
> according to my expectations. Property of page and parameter of
> component are binded, so they have same value, true or false.
> 
> But, when I show page with any other value, property of page gets null
> value, but parameter of component gets false, not null. Why?
> What am I doing wrong?
> 
> 
> Regards
> Lukasz
> 
> 
> -
> 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://www.nabble.com/Binding-of-Boolean-parameter-tp22670091p22675016.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] 5.1.0.1 RC, rendering of some views produces stacktrace

2009-03-23 Thread Ville Virtanen

Ok, now I had time to look it little closer:

In the particular view I'm generating lazy initialization exp and observe
T5:

The String content is null and thus of course generates npe at that point.
the last encoded string (or one of those) is t-omitted-frame, so it actually
crashes somewhere when rendering the own T5 error page?

Anyway, I don't have the required insight to trace the T5 rendering
mechanisms quickly, and unfortunately just now I don't even have the time to
make a view that reproduces it. (This does not happen under all
circumstances.)

I'll be back when I have time (if it is not solved yet) but atm my work is
too crazy...

 - Ville

Code that crashes: (AbstractMarkupModel, 94)
 public void encodeQuoted(String content, StringBuilder builder)
{
int length = content.length();  <--- 



Ville Virtanen wrote:
> 
> Hi,
> 
> We are constantly getting this stacktrace on some of our views. Nothing,
> and I mean nothing else is visible. The normal T5 error page doesn't come
> up etc. Only this stacktrace. Using 5.1.0.1-20090305.090208-13 everything
> works ok.
> 
> Does anyone know how to trace this or dig deeper?
> 
>  - Ville
> 
> java.lang.NullPointerException
> at
> org.apache.tapestry5.dom.AbstractMarkupModel.encodeQuoted(AbstractMarkupModel.java:94)
> at
> org.apache.tapestry5.dom.Element$Attribute.render(Element.java:60)
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--5.1.0.1-RC%2C-rendering-of-some-views-produces-stacktrace-tp22451299p22666415.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: 5.0.18 - 5.1.0.1 upgrade problems

2009-03-23 Thread Ville Virtanen

For the exact same reason we use:

String pageName = someObject.getPageName();
Class pageClass = someObject.getPageClass();
if (pageClass != null) {
pageName = resolver.resolvePageClassNameToPageName(pageClass.getName());
}
pageLink = linkSource.createPageRenderLink(pageName, true, new Object[]{});

where resolver is ComponentClassResolver and linkSource is LinkSource.

Still, you have to use internal services atm :(

 - Ville 


Andreas Pardeike-2 wrote:
> 
> On 21 mar 2009, at 18.19, Robert Zeigler wrote:
> 
>> What's more is that it makes absolutely no sense to inject into a  
>> service;
>> ComponentResource for which component, in particular?
> 
> My Exception service has a method that handles my own redirect  
> execptions. Those
> have an embedded parameter PageClassName which needs to be converted  
> to an url.
> 
> Previously, I used ComponentResource for creating a page link from a  
> Page (which
> I get from RequestPageCache). How do I do this with 5.1?
> 
> /Andreas Pardeike
> 
> -
> 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://www.nabble.com/5.0.18---5.1.0.1-upgrade-problems-tp22619066p22657980.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



  1   2   >