Re: [T5] Getting DWR to work with tapestry's filter mapping

2008-11-07 Thread BarryDev

The ServerContextFactory.get() only works if dwr has been already called from
a dwr initiated thread, otherwise it returns null.


BarryDev wrote:
> 
> Got the reverse ajax method working.  An interesting gotcha if trying to
> trigger a dwr reverse ajax call from a tapestry thread you need to get
> hold of the servlet context, 
> 
> @Inject
> @Service("ApplicationGlobals")
> private ApplicationGlobals applicationGlobals;
> 
> and than use this to load dwr's servercontext:
> serverContext = ServerContextFactory.get(servletContext);
> 
> which allows you to get all script sessions currently logged in:
> serverContext.getScriptSessionsByPage("/chatroom/chatroom")
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Getting-DWR-to-work-with-tapestry%27s-filter-mapping-tp20361316p20393481.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] Getting DWR to work with tapestry's filter mapping

2008-11-07 Thread BarryDev



Howard Lewis Ship wrote:
> 
> Ooops.  I'll check a fix in for that with some other outstanding
> changes (no JIRA issue necessary).
> 
> 

Thanks Howard,

Got the reverse ajax method working.  An interesting gotcha if trying to
trigger a dwr reverse ajax call from a tapestry thread you need to get hold
of the servlet context, 

@Inject
@Service("ApplicationGlobals")
private ApplicationGlobals applicationGlobals;

and than use this to load dwr's servercontext:
serverContext = ServerContextFactory.get(servletContext);

which allows you to get all script sessions currently logged in:
serverContext.getScriptSessionsByPage("/chatroom/chatroom")



-- 
View this message in context: 
http://www.nabble.com/-T5--Getting-DWR-to-work-with-tapestry%27s-filter-mapping-tp20361316p20392968.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] Ajax And Zones

2008-11-07 Thread Marcel Sammut

So am I dead in the water here?  Sounds like this functionality isn't
supported in T5?  Seems strange that Tapestry 5 requires an INPUT field to
be contained within a Form, and AJAX uses Zones, and you can not combine the
two.  So basically, AJAX functionality in T5 should only be used with
straight text and HTML, no input fields.

In my situation, the AJAX component doesn't contain a Form, but the
components container may, so how do you use AJAX Zones with forms...for
example, dynamic content.

Thanks,
Marcel


Thiago H. de Paula Figueiredo wrote:
> 
> Em Fri, 07 Nov 2008 04:49:05 -0300, Inge Solvoll <[EMAIL PROTECTED]>  
> escreveu:
> 
>> Isn't this the same problem I ran into some weeks ago? Forms not  
>> supported in zones?
> 
> My experience says that you can put a Form inside a Zone, but you cannot  
> put a Zone around some fields inside a Form (hence the "No object of type  
> org.apache.tapestry5.services.FormSupport is available from the  
> Environment" message).
> 
> -- 
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-T5--Ajax-And-Zones---Missing-FormSupprt-tp20373776p20389729.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: IOC problem

2008-11-07 Thread Howard Lewis Ship
You declared your services configuration to be a List, so your problem is here:

Configuration configuration

That should be OrderedConfiguration which collects and orders its
contributions to form a List.

What are you building?

On Fri, Nov 7, 2008 at 4:42 AM, bobpuley <[EMAIL PROTECTED]> wrote:
>
> Hi,
> i get an error during contribute method invocation, using T5 IOC in my
> application.
> I don't use T5 core and other, simply get Registry via builder, inspired to
> code stored on the tapestry wiki
> (http://wiki.apache.org/tapestry/Tapestry5HowToIocOnly) and code of
> TapestryFilter/ServletApplicationInitializer classes, and add my modules
> (that contains some binding, building and contributing method).
>
> this is the complete error message:
> Error invoking service builder method
> org.jspe.web.configuration.JSPEModule.buildRequestHandlerService(List,
> Logger) (at JSPEModule.java:57) (for service 'RequestHandlerService'): Error
> invoking service contribution method
> org.jspe.web.configuration.JSPEModule.contributeRequestHandlerService(Configuration,
> AssetManager, PageLoader): No service implements the interface
> org.apache.tapestry5.ioc.Configuration.
>
> My code of contribute and builder method pairs, is:
>public static RequestHandlerService
> buildRequestHandlerService(List contributions,
>Logger serviceLog){
>
>return new HttpRequestHandlerService(contributions, 
> serviceLog);
>}
>public static void
> contributeRequestHandlerService(Configuration configuration,
>   
>  @InjectService("AssetManager") AssetManager 
> assetManager,
>   
>  @InjectService("PageLoader") PageLoader 
> pageLoader){
>configuration.add(new JspRequestHandler(pageLoader));
>configuration.add(new AssetRequestHandler(assetManager));
>}
>
> Someone have an idea of cause for my error?? Only contribute methods fails,
> builder e binder methods works fine.
>
> ps:AssetManager and PageLoader is my services, no Tapestry object, only
> Logger is a Tapestry built-in service called.
>
> Tnx
>
> Marco.
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/IOC-problem-tp20379889p20379889.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



HiveMind Question

2008-11-07 Thread Norman Franke
In my Tapestry 4.1 app, I have the session store a persistent cache  
that contains a variety of counts and such read from the database. I  
don't want to calculate this each time the user hits a page, hence the  
cache.


My question is, how do I integrate this with HiveMind so I can access  
other HiveMind services and get the auto wiring? I created a service- 
point that does an invoke-factory. However, it appears that these  
objects are being reused. How can I instantiate a object that HiveMind  
doesn't mange that object's lifecycle, i.e. it never re-uses that  
object.


This seems like it should be simple, but the HiveMind 1.1  
documentation isn't any help here.


Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



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



Re: Returning @InjectPage does not display set properties

2008-11-07 Thread Keith Bottner

Just what I needed.

Keith

On Nov 7, 2008, at 2:54 PM, Thiago H. de Paula Figueiredo wrote:

Em Fri, 07 Nov 2008 16:38:17 -0300, Keith Bottner  
<[EMAIL PROTECTED]> escreveu:



Here is the Notification class.


Tapestry 5 uses redirect-after-post by default, so the request that  
shows a page is not the same request that submitted a form or  
triggered an action. You should persist your fields value between  
requests. The flash persistence is perfect for this, as the fields  
values are cleared from the user session after the second request:


public class Notification {

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

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

   ...

}   

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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




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



Re: Returning @InjectPage does not display set properties

2008-11-07 Thread Thiago H. de Paula Figueiredo
Em Fri, 07 Nov 2008 16:38:17 -0300, Keith Bottner <[EMAIL PROTECTED]>  
escreveu:



Here is the Notification class.


Tapestry 5 uses redirect-after-post by default, so the request that shows  
a page is not the same request that submitted a form or triggered an  
action. You should persist your fields value between requests. The flash  
persistence is perfect for this, as the fields values are cleared from the  
user session after the second request:


public class Notification {

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

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

...

}   

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: persisted fields initialization

2008-11-07 Thread Thiago H. de Paula Figueiredo
Em Fri, 07 Nov 2008 16:14:22 -0300, jthompson209 <[EMAIL PROTECTED]>  
escreveu:



java.lang.RuntimeException
Persistent fields may not be updated until after the page has finished
loading. This may be due to a persistent field with a default value. The
default value should be removed.

so my question is where can we do this now?


I would suggest the onActivate or onPageAttached methods/events. ;)

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: Returning @InjectPage does not display set properties

2008-11-07 Thread Howard Lewis Ship
Please read the Tapestry tutorial ... especially the section on
persistent field data.

On Fri, Nov 7, 2008 at 11:38 AM, Keith Bottner <[EMAIL PROTECTED]> wrote:
> Design Problem: To have a single page that can be passed various
> notifications instead of having tens if not hundreds of separate
> notification pages that just display successful completion, errors, etc.
>
> Our Solution: Was to use a @InjectPage in those pages and use setters on the
> page to set the title and the message to be displayed and return the
> @InjectPage from the onSuccess method.
>
> Behavior Seen: The values are set on the @InjectPage properly and the page
> is displayed but the values are not displayed.
>
> And of course if someone knows of a more excepted pattern for handling this
> type of problem then please feel free to share it.
>
> Thanks in advance for any help, I am sure it is something small but I have
> been looking at it so long I just can't find the problem.
>
> Keith
>
>
>
> Please see code below:
>
> Page wanting to display Notification page:
>
> class Test
> {
>  @InjectPage
>  private Notification notificationPage;
> ...
>  Object onSuccess()
>  {
>  ...
>  notificationPage.setTitle("Enter your title here");
>  notificationPage.setNotification("Here is the notification message");
>  ...
>  return notificationPage;
>  }
> ...
> }
>
> Here is the Notification class.
> public class Notification
> {
>
>  @Property
>  private String title;
>
>  @Property
>  private String notification;
>
>  public String getTitle()
>  {
>return title;
>  }
>
>  public void setTitle( String title )
>  {
>this.title = title;
>  }
>
>  public String getNotification()
>  {
>return notification;
>  }
>
>  public void setNotification( String notification )
>  {
>this.notification = notification;
>  }
> }
>
> And finally the notification template:
>
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>
> 
>
>
>${notification}
>
>
> 
>
> 
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Returning @InjectPage does not display set properties

2008-11-07 Thread Keith Bottner
Design Problem: To have a single page that can be passed various  
notifications instead of having tens if not hundreds of separate  
notification pages that just display successful completion, errors, etc.


Our Solution: Was to use a @InjectPage in those pages and use setters  
on the page to set the title and the message to be displayed and  
return the @InjectPage from the onSuccess method.


Behavior Seen: The values are set on the @InjectPage properly and the  
page is displayed but the values are not displayed.


And of course if someone knows of a more excepted pattern for handling  
this type of problem then please feel free to share it.


Thanks in advance for any help, I am sure it is something small but I  
have been looking at it so long I just can't find the problem.


Keith



Please see code below:

Page wanting to display Notification page:

class Test
{
  @InjectPage
  private Notification notificationPage;
...
  Object onSuccess()
  {
  ...
  notificationPage.setTitle("Enter your title here");
  notificationPage.setNotification("Here is the notification message");
 ...
  return notificationPage;
  }
...
}

Here is the Notification class.
public class Notification
{

  @Property
  private String title;

  @Property
  private String notification;

  public String getTitle()
  {
return title;
  }

  public void setTitle( String title )
  {
this.title = title;
  }

  public String getNotification()
  {
return notification;
  }

  public void setNotification( String notification )
  {
this.notification = notification;
  } 
}

And finally the notification template:

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




${notification}







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



persisted fields initialization

2008-11-07 Thread jthompson209

Hello 

With last night snapshot I am getting a new error. We use to be able to
initialize persisted fields in the class contructor, now we get this error

java.lang.RuntimeException
Persistent fields may not be updated until after the page has finished
loading. This may be due to a persistent field with a default value. The
default value should be removed.

so my question is where can we do this now?

-jeff


-- 
View this message in context: 
http://n2.nabble.com/persisted-fields-initialization-tp1471104p1471104.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


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



Re: Making runtime Services (e.g. Request) available in a custom binding

2008-11-07 Thread Howard Lewis Ship
Tapestry has a Request service that is a "property shadow" of
RequestGlobals.request.  That means that you can inject Request and
any method you invoke on it is forwarded to the current per-thread
Request object.

The end result is you can treat Request as you like ... as the current
Request ... even though it is a shared global object.


On Fri, Nov 7, 2008 at 10:05 AM, Joel Halbert <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to create a binding which is dependent on data within the user
> session.
> How can runtime information such as the request/session be made available to
> the Binding?
>
> In other bindings I have written I have injected any services I needed into
> the BindingFactory - but BindingFactory is created once, when the app loads,
> and so can not not know about the current runtime.
>
> Thanks,
> Joel
>
> --
> SU3 Analytics Ltd
> 61b Oxford Gardens
> W10 5UJ
> London
>
> Tel: +44 20 8960 2634
> Mob: +44 75 2501 0825
> www.su3analytics.com
>
> SU3 Analytics Ltd is a company registered in England and Wales under company
> number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ,
> United Kingdom.
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



Making runtime Services (e.g. Request) available in a custom binding

2008-11-07 Thread Joel Halbert

Hi,

I want to create a binding which is dependent on data within the user 
session.
How can runtime information such as the request/session be made 
available to the Binding?


In other bindings I have written I have injected any services I needed 
into the BindingFactory - but BindingFactory is created once, when the 
app loads, and so can not not know about the current runtime.


Thanks,
Joel

--
SU3 Analytics Ltd
61b Oxford Gardens
W10 5UJ
London

Tel: +44 20 8960 2634
Mob: +44 75 2501 0825
www.su3analytics.com

SU3 Analytics Ltd is a company registered in England and Wales under company 
number 06639473 at registered address 61b Oxford Gardens, London W10 5UJ, 
United Kingdom.



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



Re: Tapestry 5, WAR files and deployment

2008-11-07 Thread tapestryphoto

Thank you Olle and everyone else who replied to my query.

Indeed, I had to recreate the repository (plus I missed one or two  
dependencies).


p.


Quoting Olle Hallin <[EMAIL PROTECTED]>:


The standard cure-most-dependency-problems medicin for Maven is to wipe your
local repository and try again.
Delete (or rename) $HOME/.m2/repository (Linux) or
%USERPROFILE%\.m2\repository (Windows).

Also: the standard way to package a any Maven project is mvn package.
mvn war:war happens to work here, since it is bound to the package goal for
a war project.

HTH,
Olle

2008/11/6 Fernando Padilla <[EMAIL PROTECTED]>


This is probably because it can't download the files..

I would double check your networking, but because you're emailing us I'll
assume it's working.

Someone I know also had issue like this, and the cause for him was he
installed it as root on his laptop, so when he tried to build it as his user
he didn't have permissions to actually modify the repository.  So it could
not successfully fetch any dependencies.

Though I don't recommend it, he runs all maven with sudo.

Not sure what the best way to install it is, but I installed maven on my
laptop simply by extracting it into a directory as my user, then adding the
bin directory to my user's path..






tapestryphoto wrote:


Quoting Olle Hallin <[EMAIL PROTECTED]>:

 Does it work from the command line?

Olle



I tried mvn war:war from the project directory.

Bizarrely it gives even more problems.  I find Maven very frustrating...


[INFO] Failed to resolve artifact.

Missing:
--
1) org.apache.maven:maven-archiver:jar:2.2

 Try downloading the file manually from the project website.

 Then, install it using the command:
 mvn install:install-file -DgroupId=org.apache.maven
-DartifactId=maven-arc
hiver -Dversion=2.2 -Dpackaging=jar -Dfile=/path/to/file

 Alternatively, if you host your own repository you can deploy the file
there:

 mvn deploy:deploy-file -DgroupId=org.apache.maven
-DartifactId=maven-archi
ver -Dversion=2.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-DrepositoryI
d=[id]

 Path to dependency:
   1)
org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
   2) org.apache.maven:maven-archiver:jar:2.2

2) org.codehaus.plexus:plexus-utils:jar:1.4.7

 Try downloading the file manually from the project website.

 Then, install it using the command:
 mvn install:install-file -DgroupId=org.codehaus.plexus
-DartifactId=plexus
-utils -Dversion=1.4.7 -Dpackaging=jar -Dfile=/path/to/file

 Alternatively, if you host your own repository you can deploy the file
there:

 mvn deploy:deploy-file -DgroupId=org.codehaus.plexus
-DartifactId=plexus-u
tils -Dversion=1.4.7 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-Dreposito
ryId=[id]

 Path to dependency:
   1)
org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
   2) org.codehaus.plexus:plexus-utils:jar:1.4.7

3) com.thoughtworks.xstream:xstream:jar:1.2.2

 Try downloading the file manually from the project website.

 Then, install it using the command:
 mvn install:install-file -DgroupId=com.thoughtworks.xstream
-DartifactId=x
stream -Dversion=1.2.2 -Dpackaging=jar -Dfile=/path/to/file

 Alternatively, if you host your own repository you can deploy the file
there:

 mvn deploy:deploy-file -DgroupId=com.thoughtworks.xstream
-DartifactId=xst
ream -Dversion=1.2.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
-Dreposito
ryId=[id]

 Path to dependency:
   1)
org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
   2) com.thoughtworks.xstream:xstream:jar:1.2.2

--
3 required artifacts are missing.



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



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





--
Olle Hallin
Senior Java Developer and Architect
[EMAIL PROTECTED]
www.crisp.se






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



Re: [T5] A root element of is needed when linking JavaScript and stylesheet resources.

2008-11-07 Thread Howard Lewis Ship
That should only be triggered by the use (implicit or explicit) of
JavaScript, such as a Form component (client validation and initial
field focusing), or a DateField, etc.

The error is coming from the environmental DocumentLinker; it is
possible to override Tapestry's DocumentLinker with your own.

The previous behavior was to do nothing if the root element was not
"html", which led to confusingly inconsistent behavior.  Sorry this
change left you in the lurch, but thanks for testing against the
snapshot!

On Fri, Nov 7, 2008 at 9:20 AM, Axel Tetzlaff
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> we are using T5 for over a year now. Since zones weren't avaliable at the
> time we started, we have some places where we respond to Ajax requests with
> pages.
>
> Since the response only contain snippets which are inserted in an existing
> page they must not have  as root-element.
>
> This causes :
> Processing of request failed with uncaught exception: The root element of
> the rendered document was , not . A root element of  is
> needed when linking JavaScript and stylesheet resources.
>
> Although we're not, at least not explicitly, linking to any JavaScript or
> stylesheet.
>
> Is there any way around this?
>
> Thanks,
> Axel
> --
> View this message in context: 
> http://www.nabble.com/-T5--A-root-element-of-%3Chtml%3E-is-needed-when-linking-JavaScript-and-stylesheet-resources.-tp20384969p20384969.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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



[T5] A root element of is needed when linking JavaScript and stylesheet resources.

2008-11-07 Thread Axel Tetzlaff

Hi,

we are using T5 for over a year now. Since zones weren't avaliable at the
time we started, we have some places where we respond to Ajax requests with
pages.

Since the response only contain snippets which are inserted in an existing
page they must not have  as root-element.

This causes :
Processing of request failed with uncaught exception: The root element of
the rendered document was , not . A root element of  is
needed when linking JavaScript and stylesheet resources.

Although we're not, at least not explicitly, linking to any JavaScript or
stylesheet.

Is there any way around this? 

Thanks,
Axel
-- 
View this message in context: 
http://www.nabble.com/-T5--A-root-element-of-%3Chtml%3E-is-needed-when-linking-JavaScript-and-stylesheet-resources.-tp20384969p20384969.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



override grid header and sort indicators

2008-11-07 Thread Joachim Van der Auwera
Is there a possibility to have the standard sort link/icons on 
overridden grid headers.
The manual specifically mentions that these are not displayed when 
overriding the header, but this means that a lot of overhead (copying 
most of grid if I am not mistaking) is needed if the standard sort 
behaviour is good but the title itself should be a button or text 
different from the default.


Any ideas?

Thanks,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Re: CSS mistake

2008-11-07 Thread Hugo Palma
That bug is fixed in 5.0.16

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

On Fri, Nov 7, 2008 at 3:33 PM, Joachim Van der Auwera <[EMAIL PROTECTED]>wrote:

> The default.css in 5.0.15 contains the following section :
>
> IMG.t-autoloader-icon {
>   margin-left: 4px;
>   width: 16px;
>   heigth: 16px;
>   background: url( ajax-loader.gif );
> }
>
> The "heigth" is a typo and should be changed to "height".
>
> Kind regards,
> Joachim
>
> --
> Joachim Van der Auwera
> PROGS bvba, progs.be
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


CSS mistake

2008-11-07 Thread Joachim Van der Auwera

The default.css in 5.0.15 contains the following section :

IMG.t-autoloader-icon {
   margin-left: 4px;
   width: 16px;
   heigth: 16px;
   background: url( ajax-loader.gif );
}

The "heigth" is a typo and should be changed to "height".

Kind regards,
Joachim

--
Joachim Van der Auwera
PROGS bvba, progs.be


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



Restore former behavior of URL encoding [WAS: Re: new URLEncoder Service]

2008-11-07 Thread Martin Grotzke
Hi,

I also want to keep the former behavior of URL encoding but have issues
with form submissions.

For keeping the former behavior I added a custom URLEncoder service
which does mostly what was before done in TapestryInternalUtils (see the
code at the end of the post).

However, when I do a form submission containing special chars (like
german umlauts), they are decoded wrong. We're using UTF-8, and have
configured UTF-8 support in our AppModule (Utf8Filter).

AFAICS RequestImpl.getParameter already returns the wrong parameter
value when the form input fields are processed.

Can anybody help with this issue?

Thx && cheers,
Martin


public class UrlEncoderImpl implements URLEncoder {

private final static URLCodec CODEC = new URLCodec();
private static final String PERCENT = "%";
private static final Pattern PERCENT_PATTERN = Pattern.compile(PERCENT);
private static final String ENCODED_PERCENT = "%25";
private static final Pattern ENCODED_PERCENT_PATTERN = 
Pattern.compile(ENCODED_PERCENT);
private static final String SLASH = "/";
private static final Pattern SLASH_PATTERN = Pattern.compile(SLASH);
// just a special char that denotes the slash, to circumvent issues with 
mod_jk
private static final String ENCODED_SLASH = "172";
private static final Pattern ENCODED_SLASH_PATTERN = 
Pattern.compile(ENCODED_SLASH, Pattern.CASE_INSENSITIVE);

/* (non-Javadoc)
 * @see org.apache.tapestry5.services.URLEncoder#decode(java.lang.String)
 */
public String decode( String input ) {
return unescapePercentAndSlash( input );
}

/* (non-Javadoc)
 * @see org.apache.tapestry5.services.URLEncoder#encode(java.lang.String)
 */
public String encode( String input ) {
try {
return CODEC.encode( escapePercentAndSlash(input) );
} catch ( EncoderException e ) {
throw new RuntimeException( e );
}
}
/**
 * Encodes percent and slash characters in the string for later decoding 
via [EMAIL PROTECTED]
 * #unescapePercentAndSlash(String)}.
 *
 * @param input string to encode
 * @return modified string
 */
public static String escapePercentAndSlash(String input) {
return replace(replace(input, PERCENT_PATTERN, ENCODED_PERCENT), 
SLASH_PATTERN, ENCODED_SLASH);
}

/**
 * Used to decode certain escaped characters that are replaced when using 
[EMAIL PROTECTED] #encodeContext(String)}}.
 *
 * @param input a previously encoded string
 * @return the string with slash and percent characters restored
 */
public static String unescapePercentAndSlash(String input) {
return replace( replace( input, ENCODED_SLASH_PATTERN, SLASH ), 
ENCODED_PERCENT_PATTERN, PERCENT );
}

private static String replace( String input, Pattern pattern, String 
replacement ) {
return pattern.matcher(input).replaceAll(replacement);
}

public static void main( String[] args ) {
print( "foo/bar test" );
print( "tästumlaut" );

}

private static void print( final String uri ) {
System.out.println( "encoded: " + new UrlEncoderImpl().encode( uri ) );
System.out.println( "decoded: " + new UrlEncoderImpl().decode( new 
UrlEncoderImpl().encode( uri ) ) );
}

}


On Tue, 2008-10-28 at 15:39 -0700, Howard Lewis Ship wrote:
> Contribute a new implementation of URLEncoder to the Alias service
> configuration and Tapestry will use the contributed one instead of the
> default URLEncoder service.
> 
> Alternately, you can decorate the URLEncoder service with an
> alternative implementation, or a filter depending on how much of the
> existing URLEncoder service implementation you want to keep.
> 
> Could you provide some more context as to why URLEncoder is a problem?
> 
> On Tue, Oct 28, 2008 at 11:39 AM, jthompson209 <[EMAIL PROTECTED]> wrote:
> >
> > Hello I am in need of either turning off this new service or overriding it
> > and having it do nothing, it is currently breaking some code that I have,
> > what would be the best way of doing that, also if overriding it is the
> > answer how would i go about doing it.
> >
> > thanks so much
> > -jeff
> > --
> > View this message in context: 
> > http://n2.nabble.com/new-URLEncoder-Service-tp1389907p1389907.html
> > Sent from the Tapestry Users mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 
> 
> 


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


Re: [T5] Auto-load / Auto-request start page on Tapestry startup

2008-11-07 Thread Hugo Palma
This is me thinking out loud, so this might not work at all because i
haven't tried it. But here's what my first go at this would be.
In the application module:

public static void contributeRegistryStartup(OrderedConfiguration
configuration, @Inject @Value("${tapestry.start-page-name}")
final String startPageName, final PagePool pagePool) {
configuration.add("StartPageLoad", new Runnable() {
public void run() {
pagePool.checkout(startPageName);
}
});
}

Try this out, maybe it doesn't work but at least it's something to start
from.


On Fri, Nov 7, 2008 at 1:29 PM, Szemere Szemere <
[EMAIL PROTECTED]> wrote:

> Is there an easy way to have Tapestry auto-load or auto-request the start
> page when the core Tapestry servlet loads up?
>
> The first page to load when we restart Tapestry takes over 10seconds
> (mostly
> because of Hibernate and number of linked pages), which we only get to when
> making the first request from a browser.  A way to automate the first
> request would be very useful, because it places the time cost outside of
> user interaction.
>
> Szemere
>


Re: T5: changed URI encoding - create valid URIs in javascript

2008-11-07 Thread Martin Grotzke
Hi,

thanx for your answer, martijn!

[ And sorry for my post picking up an already existing topic as a new
thread (I right now *found* the T5-list posts in my mail client, I must
have configured a filter without remembering this :)) ]

We're using AJAX GETs to links with context arguments, I would have to
change many parts in our application. For those who are interested: I
wrote two js-functions for this (at the end of the post).

However, after that I realized that all URLs containing "special" chars
changed, so that our former URLs are no longer valid. Partly they can be
seen as "perma-links" - therefore I cannot (don't want to) change the
behavior that much and need to stick (basically) with the former
behavior.

So now I'm contributing a custom URLEncoder - I'll enter the thread
related to the new URLEncoder service for this.

Cheers,
Martin


var VALID_T5_CHARS = 
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890-_.:".split( "" 
);
function encodeURIComponentForTapestry(uri) {

if ( uri == null || uri.length == 0 ) {
return "$B";
}

var result = "";
for( i = 0; i < uri.length; i++ ) {
var c = uri.charAt( i );
if( VALID_T5_CHARS.indexOf( c ) > -1 ) {
result += c;
}
else {
result += "$00" + uri.charCodeAt( i ).toString(16);
}
}

return result;
}

function encodeURIForTapestry(uri) {
var result = "";
var parts = uri.split( "/" );
for ( var i = 0; i < parts.length; i++ ) {
result += encodeURIComponentForTapestry( parts[i] );
if ( (i + 1) < parts.length ) {
result += "/";
}
}
return result; 
}



On Fri, 2008-11-07 at 10:53 +0100, Martijn Brinkers wrote:
> Initially I used to activation context for my Ajax calls as well. I now
> use the request parameters and JSON for Ajax calls instead of the
> activation context. I think the rationale for the activation context is
> that it makes nicer looking URLs but that's not needed for Ajax calls.
> So you can either create your own specialized URL encoder in Javascript
> or you can change your Ajax calls to use the request parameters.
> 
> Martijn
> 
> On Fri, 2008-11-07 at 09:56 +0100, Martin Grotzke wrote:
> > Hi,
> > 
> > with the fix of TAP5-302 (URL encoded strings that contain symbols such
> > as %2f (encoded "/") are decoded incorrectly in some environments) the
> > URI encoding/decoding changed.
> > 
> > AFAICS URIs containing anything else than a-z, A-Z, 0-9 or one of -_.:
> > are considered invalid.
> > 
> > Therefore, when I have an URI that contains e.g. the '*' char, this is
> > invalid. The URLEncoderImpl expects $002a as a representation for this
> > char ($ + the four hex digits for this char).
> > 
> > We're doing "custom" ajax calls and therefore need to build valid URIs
> > in javascript (in terms of T5-URI-encoding). So I need to encode s.th.
> > like "foo*bar" to "foo$002abar"
> > 
> > Has anybody else this problem and has it solved already?
> > 
> > Is there another / a better way to come around this URI encoding issue
> > on the client side?
> > 
> > Thx && cheers,
> > Martin
> > 
> > 
> > [1] https://issues.apache.org/jira/browse/TAP5-302
> > 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/


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


Re: [T5] Auto-load / Auto-request start page on Tapestry startup

2008-11-07 Thread Andy Pahne



+1


Szemere Szemere schrieb:

Is there an easy way to have Tapestry auto-load or auto-request the start
page when the core Tapestry servlet loads up?

The first page to load when we restart Tapestry takes over 10seconds (mostly
because of Hibernate and number of linked pages), which we only get to when
making the first request from a browser.  A way to automate the first
request would be very useful, because it places the time cost outside of
user interaction.

Szemere

  



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



Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Alex Shneyderman
On Fri, Nov 7, 2008 at 1:35 PM, Otho <[EMAIL PROTECTED]> wrote:
> Yes of course, but Tapestry and Groovy integrate quite well.

yes I recall an attempt I do not know if anything beyond basic page
was ever implemented.

http://www.troymaxventures.com/2007/08/grails-tapestry-grapestry-part-1-of-n.html

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



[T5] Auto-load / Auto-request start page on Tapestry startup

2008-11-07 Thread Szemere Szemere
Is there an easy way to have Tapestry auto-load or auto-request the start
page when the core Tapestry servlet loads up?

The first page to load when we restart Tapestry takes over 10seconds (mostly
because of Hibernate and number of linked pages), which we only get to when
making the first request from a browser.  A way to automate the first
request would be very useful, because it places the time cost outside of
user interaction.

Szemere


Re: [T5]ActionLink to pass textField value as blank value

2008-11-07 Thread Thiago H. de Paula Figueiredo

Em Fri, 07 Nov 2008 07:57:33 -0300, CG <[EMAIL PROTECTED]> escreveu:


Hi, I would like to use actionLink to pass value that key by user in a
TextField , it seems like it cannot get the blank value from the
textbox  ...and pass to the onActionFromXXX  ..

can I actually use actionLink here ? or should I use form submit ?


Use a form submit or create a component that uses Javascript to include  
your field value in the URL.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



Re: [T5] Ajax And Zones

2008-11-07 Thread Thiago H. de Paula Figueiredo
Em Fri, 07 Nov 2008 04:49:05 -0300, Inge Solvoll <[EMAIL PROTECTED]>  
escreveu:


Isn't this the same problem I ran into some weeks ago? Forms not  
supported in zones?


My experience says that you can put a Form inside a Zone, but you cannot  
put a Zone around some fields inside a Form (hence the "No object of type  
org.apache.tapestry5.services.FormSupport is available from the  
Environment" message).


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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



IOC problem

2008-11-07 Thread bobpuley

Hi,
i get an error during contribute method invocation, using T5 IOC in my
application.
I don't use T5 core and other, simply get Registry via builder, inspired to
code stored on the tapestry wiki
(http://wiki.apache.org/tapestry/Tapestry5HowToIocOnly) and code of
TapestryFilter/ServletApplicationInitializer classes, and add my modules
(that contains some binding, building and contributing method).

this is the complete error message:
Error invoking service builder method
org.jspe.web.configuration.JSPEModule.buildRequestHandlerService(List,
Logger) (at JSPEModule.java:57) (for service 'RequestHandlerService'): Error
invoking service contribution method
org.jspe.web.configuration.JSPEModule.contributeRequestHandlerService(Configuration,
AssetManager, PageLoader): No service implements the interface
org.apache.tapestry5.ioc.Configuration.

My code of contribute and builder method pairs, is:
public static RequestHandlerService
buildRequestHandlerService(List contributions,
Logger serviceLog){

return new HttpRequestHandlerService(contributions, serviceLog);
} 
public static void
contributeRequestHandlerService(Configuration configuration, 

@InjectService("AssetManager") AssetManager 
assetManager,

@InjectService("PageLoader") PageLoader 
pageLoader){
configuration.add(new JspRequestHandler(pageLoader));
configuration.add(new AssetRequestHandler(assetManager));
}

Someone have an idea of cause for my error?? Only contribute methods fails,
builder e binder methods works fine.

ps:AssetManager and PageLoader is my services, no Tapestry object, only
Logger is a Tapestry built-in service called.

Tnx 

Marco.



-- 
View this message in context: 
http://www.nabble.com/IOC-problem-tp20379889p20379889.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



IOC problem

2008-11-07 Thread bobpuley

Hi,
i get an error during contribute method invocation, using T5 IOC in my
application.
I don't use T5 core and other, simply get Registry via builder, inspired to
code stored on the tapestry wiki
(http://wiki.apache.org/tapestry/Tapestry5HowToIocOnly) and code of
TapestryFilter/ServletApplicationInitializer classes, and add my modules
(that contains some binding, building and contributing method).

this is the complete error message:
Error invoking service builder method
org.jspe.web.configuration.JSPEModule.buildRequestHandlerService(List,
Logger) (at JSPEModule.java:57) (for service 'RequestHandlerService'): Error
invoking service contribution method
org.jspe.web.configuration.JSPEModule.contributeRequestHandlerService(Configuration,
AssetManager, PageLoader): No service implements the interface
org.apache.tapestry5.ioc.Configuration.

My code of contribute and builder method pairs, is:
public static RequestHandlerService
buildRequestHandlerService(List contributions,
Logger serviceLog){

return new HttpRequestHandlerService(contributions, serviceLog);
} 
public static void
contributeRequestHandlerService(Configuration configuration, 

@InjectService("AssetManager") AssetManager 
assetManager,

@InjectService("PageLoader") PageLoader 
pageLoader){
configuration.add(new JspRequestHandler(pageLoader));
configuration.add(new AssetRequestHandler(assetManager));
}

Someone have an idea of cause for my error?? Only contribute methods fails,
builder e binder methods works fine.

ps:AssetManager and PageLoader is my services, no Tapestry object, only
Logger is a Tapestry built-in service called.

Tnx 

Marco.



-- 
View this message in context: 
http://www.nabble.com/IOC-problem-tp20379878p20379878.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Otho
Yes of course, but Tapestry and Groovy integrate quite well. You don't have
to use all Java for everything.


2008/11/7 Alex Shneyderman <[EMAIL PROTECTED]>

> > That is not the same, since you don't only have the AND operator at hand.
> >
> > def books = Book.findAllByPublisheddateBetween(lastyear, today)
>
> You do realize that what you are asking is not possible given that impl
> language is Java (for Tapestry based projects)?
>
> So DAO's your friend. If you like GORM write a generator that will
> pre-generate
> most of those nifty dynamic methods GORM has with your DAO.
>
> Alex.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Alex Shneyderman
> That is not the same, since you don't only have the AND operator at hand.
>
> def books = Book.findAllByPublisheddateBetween(lastyear, today)

You do realize that what you are asking is not possible given that impl
language is Java (for Tapestry based projects)?

So DAO's your friend. If you like GORM write a generator that will pre-generate
most of those nifty dynamic methods GORM has with your DAO.

Alex.

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



Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Otho
Yes, that would be a nice option, but realistically my skill-level just
isn't high enough and my time too sparse to do an integration myself and
keep it up to date with Tapestry releases.
Regards,
Otho


Re: Problem passing several values as component's parameter

2008-11-07 Thread Hugo Palma
I think this
http://www.chenillekit.org/chenillekit-tapestry/listbinding.html should do
what you want.

On Fri, Nov 7, 2008 at 10:54 AM, Daniel Alonso Sanchez <[EMAIL PROTECTED]>wrote:

>
> Hi everybody again.
>
> I need to pass a list of literals as parameter of a custom component. Look
> like this:
>
> t:newBeanColumn t:id="formpersonales"  object="datosPersonales"
> numColumns="1-3-5-2"
>
> That literal (1-3-5-2) are 4 numbers that i need to process, but tapestry
> give me an exception. Is there any way to pass several literals as
> parameters?
>
> I have been looking deeply into the mailing list forum, but i haven't found
> anything about that. Thanks a lot in advance for the support
> --
> View this message in context:
> http://www.nabble.com/Problem-passing-several-values-as-component%27s-parameter-tp20378376p20378376.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Problem passing several values as component's parameter

2008-11-07 Thread Martijn Brinkers
Perhaps you can create your own binding?

http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix

Martijn

On Fri, 2008-11-07 at 02:54 -0800, Daniel Alonso Sanchez wrote:
> Hi everybody again. 
> 
> I need to pass a list of literals as parameter of a custom component. Look
> like this:
> 
> t:newBeanColumn t:id="formpersonales"  object="datosPersonales" 
> numColumns="1-3-5-2"
> 
> That literal (1-3-5-2) are 4 numbers that i need to process, but tapestry
> give me an exception. Is there any way to pass several literals as
> parameters?
> 
> I have been looking deeply into the mailing list forum, but i haven't found
> anything about that. Thanks a lot in advance for the support


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



[T5]ActionLink to pass textField value as blank value

2008-11-07 Thread CG
Hi, I would like to use actionLink to pass value that key by user in a
TextField , it seems like it cannot get the blank value from the
textbox  ...and pass to the onActionFromXXX  ..

can I actually use actionLink here ? or should I use form submit ?

Thanks.

CG

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



Problem passing several values as component's parameter

2008-11-07 Thread Daniel Alonso Sanchez

Hi everybody again. 

I need to pass a list of literals as parameter of a custom component. Look
like this:

t:newBeanColumn t:id="formpersonales"  object="datosPersonales" 
numColumns="1-3-5-2"

That literal (1-3-5-2) are 4 numbers that i need to process, but tapestry
give me an exception. Is there any way to pass several literals as
parameters?

I have been looking deeply into the mailing list forum, but i haven't found
anything about that. Thanks a lot in advance for the support
-- 
View this message in context: 
http://www.nabble.com/Problem-passing-several-values-as-component%27s-parameter-tp20378376p20378376.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T5: changed URI encoding - create valid URIs in javascript

2008-11-07 Thread Martijn Brinkers
Initially I used to activation context for my Ajax calls as well. I now
use the request parameters and JSON for Ajax calls instead of the
activation context. I think the rationale for the activation context is
that it makes nicer looking URLs but that's not needed for Ajax calls.
So you can either create your own specialized URL encoder in Javascript
or you can change your Ajax calls to use the request parameters.

Martijn

On Fri, 2008-11-07 at 09:56 +0100, Martin Grotzke wrote:
> Hi,
> 
> with the fix of TAP5-302 (URL encoded strings that contain symbols such
> as %2f (encoded "/") are decoded incorrectly in some environments) the
> URI encoding/decoding changed.
> 
> AFAICS URIs containing anything else than a-z, A-Z, 0-9 or one of -_.:
> are considered invalid.
> 
> Therefore, when I have an URI that contains e.g. the '*' char, this is
> invalid. The URLEncoderImpl expects $002a as a representation for this
> char ($ + the four hex digits for this char).
> 
> We're doing "custom" ajax calls and therefore need to build valid URIs
> in javascript (in terms of T5-URI-encoding). So I need to encode s.th.
> like "foo*bar" to "foo$002abar"
> 
> Has anybody else this problem and has it solved already?
> 
> Is there another / a better way to come around this URI encoding issue
> on the client side?
> 
> Thx && cheers,
> Martin
> 
> 
> [1] https://issues.apache.org/jira/browse/TAP5-302
> 


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



Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Lubor Gajda
Otho, don't forget that Grails allows you to use alternative view rendering
technologies on top of GORM. So, maybe you should be looking for some kind
of Tapestry - Grails integration.


On Fri, Nov 7, 2008 at 8:50 AM, Otho <[EMAIL PROTECTED]> wrote:

> That is not the same, since you don't only have the AND operator at hand.
>
> def books = Book.findAllByPublisheddateBetween(lastyear, today)
>
> with lastyear and today being Date instances is also possible and a lot
> more.
>
> Sure it is possible to construct queries from arbitrary length method
> calls.
> But in the above example there would be much to do in analyzing and it
> doesn't help readybility either.
>
> But of course, something like this in Java is probably out of the way.
>
> Maybe something along the lines of
>
> GenericDao bookDao = new GenericDao(Book.class).
>
> List books = dao.findAllBy("publishedDate").between(Date.class,
> lastYear, today);
>
> would be possible.
>
> Regards,
> Otho
>


T5: changed URI encoding - create valid URIs in javascript

2008-11-07 Thread Martin Grotzke
Hi,

with the fix of TAP5-302 (URL encoded strings that contain symbols such
as %2f (encoded "/") are decoded incorrectly in some environments) the
URI encoding/decoding changed.

AFAICS URIs containing anything else than a-z, A-Z, 0-9 or one of -_.:
are considered invalid.

Therefore, when I have an URI that contains e.g. the '*' char, this is
invalid. The URLEncoderImpl expects $002a as a representation for this
char ($ + the four hex digits for this char).

We're doing "custom" ajax calls and therefore need to build valid URIs
in javascript (in terms of T5-URI-encoding). So I need to encode s.th.
like "foo*bar" to "foo$002abar"

Has anybody else this problem and has it solved already?

Is there another / a better way to come around this URI encoding issue
on the client side?

Thx && cheers,
Martin


[1] https://issues.apache.org/jira/browse/TAP5-302



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


Re: [T5] Something like GORM for Tapestry?

2008-11-07 Thread Otho
That is not the same, since you don't only have the AND operator at hand.

def books = Book.findAllByPublisheddateBetween(lastyear, today)

with lastyear and today being Date instances is also possible and a lot
more.

Sure it is possible to construct queries from arbitrary length method calls.
But in the above example there would be much to do in analyzing and it
doesn't help readybility either.

But of course, something like this in Java is probably out of the way.

Maybe something along the lines of

GenericDao bookDao = new GenericDao(Book.class).

List books = dao.findAllBy("publishedDate").between(Date.class,
lastYear, today);

would be possible.

Regards,
Otho


Re: Tapestry 5, WAR files and deployment

2008-11-07 Thread Olle Hallin
The standard cure-most-dependency-problems medicin for Maven is to wipe your
local repository and try again.
Delete (or rename) $HOME/.m2/repository (Linux) or
%USERPROFILE%\.m2\repository (Windows).

Also: the standard way to package a any Maven project is mvn package.
mvn war:war happens to work here, since it is bound to the package goal for
a war project.

HTH,
Olle

2008/11/6 Fernando Padilla <[EMAIL PROTECTED]>

> This is probably because it can't download the files..
>
> I would double check your networking, but because you're emailing us I'll
> assume it's working.
>
> Someone I know also had issue like this, and the cause for him was he
> installed it as root on his laptop, so when he tried to build it as his user
> he didn't have permissions to actually modify the repository.  So it could
> not successfully fetch any dependencies.
>
> Though I don't recommend it, he runs all maven with sudo.
>
> Not sure what the best way to install it is, but I installed maven on my
> laptop simply by extracting it into a directory as my user, then adding the
> bin directory to my user's path..
>
>
>
>
>
>
> tapestryphoto wrote:
>
>> Quoting Olle Hallin <[EMAIL PROTECTED]>:
>>
>>  Does it work from the command line?
>>> Olle
>>>
>>>
>> I tried mvn war:war from the project directory.
>>
>> Bizarrely it gives even more problems.  I find Maven very frustrating...
>>
>>
>> [INFO] Failed to resolve artifact.
>>
>> Missing:
>> --
>> 1) org.apache.maven:maven-archiver:jar:2.2
>>
>>  Try downloading the file manually from the project website.
>>
>>  Then, install it using the command:
>>  mvn install:install-file -DgroupId=org.apache.maven
>> -DartifactId=maven-arc
>> hiver -Dversion=2.2 -Dpackaging=jar -Dfile=/path/to/file
>>
>>  Alternatively, if you host your own repository you can deploy the file
>> there:
>>
>>  mvn deploy:deploy-file -DgroupId=org.apache.maven
>> -DartifactId=maven-archi
>> ver -Dversion=2.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
>> -DrepositoryI
>> d=[id]
>>
>>  Path to dependency:
>>1)
>> org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
>>2) org.apache.maven:maven-archiver:jar:2.2
>>
>> 2) org.codehaus.plexus:plexus-utils:jar:1.4.7
>>
>>  Try downloading the file manually from the project website.
>>
>>  Then, install it using the command:
>>  mvn install:install-file -DgroupId=org.codehaus.plexus
>> -DartifactId=plexus
>> -utils -Dversion=1.4.7 -Dpackaging=jar -Dfile=/path/to/file
>>
>>  Alternatively, if you host your own repository you can deploy the file
>> there:
>>
>>  mvn deploy:deploy-file -DgroupId=org.codehaus.plexus
>> -DartifactId=plexus-u
>> tils -Dversion=1.4.7 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
>> -Dreposito
>> ryId=[id]
>>
>>  Path to dependency:
>>1)
>> org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
>>2) org.codehaus.plexus:plexus-utils:jar:1.4.7
>>
>> 3) com.thoughtworks.xstream:xstream:jar:1.2.2
>>
>>  Try downloading the file manually from the project website.
>>
>>  Then, install it using the command:
>>  mvn install:install-file -DgroupId=com.thoughtworks.xstream
>> -DartifactId=x
>> stream -Dversion=1.2.2 -Dpackaging=jar -Dfile=/path/to/file
>>
>>  Alternatively, if you host your own repository you can deploy the file
>> there:
>>
>>  mvn deploy:deploy-file -DgroupId=com.thoughtworks.xstream
>> -DartifactId=xst
>> ream -Dversion=1.2.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url]
>> -Dreposito
>> ryId=[id]
>>
>>  Path to dependency:
>>1)
>> org.apache.maven.plugins:maven-war-plugin:maven-plugin:2.1-alpha-1
>>2) com.thoughtworks.xstream:xstream:jar:1.2.2
>>
>> --
>> 3 required artifacts are missing.
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Olle Hallin
Senior Java Developer and Architect
[EMAIL PROTECTED]
www.crisp.se