Re: Tapestry 5.4

2016-03-01 Thread Gunnar Eketrapp
The minimal test project is now on GitHub with super easy instructions how
to test

(If you have git + gradle in you environment)

Please se

https://github.com/oakstair/tapinapp





2016-03-01 10:02 GMT+01:00 Gunnar Eketrapp :

>
>
>
> Hi!
>
>
> I have been away from WEB development and Tapestry for a while now.
>
> Yesterday I decided to try use Tapestry to serve some web pages from our
> google app engine based backend. Some year ago I managed to get 5.3 to work
> in app engine  ...
>
> I will be using jquery + bootstrap.
>
> I finally got a minimal test project to work but when I switched to jquery
> by
> adding
>
> c.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery")
>
> The page raises following js errors
>
> Uncaught TypeError: this.element.readAttribute is not a function
>
> ElementWrapper.attr @ dom.js:137
> (anonymous function) @ console.js:36
> context.execCb @ require.js:1665
> Module.check @ require.js:874
> (anonymous function) @ require.js:1121
> (anonymous function) @ require.js:132
> (anonymous function) @ require.js:1171
> each @ require.js:57
> Module.emit @ require.js:1170
> Module.check @ require.js:925
> (anonymous function) @ require.js:1121
> (anonymous function) @ require.js:132
> (anonymous function) @ require.js:1171each @ require.js:57
> Module.emit @ require.js:1170Module.check @ require.js:925
> Module.enable @ require.js:1158
> Module.init @ require.js:782
> callGetModule @ require.js:1185
> context.completeLoad @ require.js:1559
> context.onScriptLoad @ require.js:1686
>
> I am also phasing a strange problem in the full project (not in the
> minimal example) that
> the page fails to load these assets file:
>
> All these fails to be loaded:
> =
> admin:20 GET
> http://localhost:/assets/meta/adfea7fc/tapestry5/bootstrap/css/bootstrap.css
>
> admin:20 GET
> http://localhost:/assets/meta/8dcee84b/tapestry5/tapestry-console.css
> admin:20 GET http://localhost:/assets/meta/74b3f9bf/tapestry5/tree.css
>
> admin:20 GET
> http://localhost:/assets/meta/c81e9337/tapestry5/exception-frame.css
> admin:60 GET http://localhost:/assets/stack/24577ff5/en/core.js
> admin:20 GET
> http://localhost:/assets/meta/5f95a7ec/tapestry5/tapestry.css
> admin:60 Uncaught TypeError: require is not a function(anonymous function)
> @ admin:60
>
>
> Thanks in advance! /Gunnar
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Tapestry 5.4

2016-03-01 Thread Gunnar Eketrapp
Hi!


I have been away from WEB development and Tapestry for a while now.

Yesterday I decided to try use Tapestry to serve some web pages from our
google app engine based backend. Some year ago I managed to get 5.3 to work
in app engine  ...

I will be using jquery + bootstrap.

I finally got a minimal test project to work but when I switched to jquery
by
adding

c.add(SymbolConstants.JAVASCRIPT_INFRASTRUCTURE_PROVIDER, "jquery")

The page raises following js errors

Uncaught TypeError: this.element.readAttribute is not a function

ElementWrapper.attr @ dom.js:137
(anonymous function) @ console.js:36
context.execCb @ require.js:1665
Module.check @ require.js:874
(anonymous function) @ require.js:1121
(anonymous function) @ require.js:132
(anonymous function) @ require.js:1171
each @ require.js:57
Module.emit @ require.js:1170
Module.check @ require.js:925
(anonymous function) @ require.js:1121
(anonymous function) @ require.js:132
(anonymous function) @ require.js:1171each @ require.js:57
Module.emit @ require.js:1170Module.check @ require.js:925
Module.enable @ require.js:1158
Module.init @ require.js:782
callGetModule @ require.js:1185
context.completeLoad @ require.js:1559
context.onScriptLoad @ require.js:1686

I am also phasing a strange problem in the full project (not in the minimal
example) that
the page fails to load these assets file:

All these fails to be loaded:
=
admin:20 GET
http://localhost:/assets/meta/adfea7fc/tapestry5/bootstrap/css/bootstrap.css

admin:20 GET
http://localhost:/assets/meta/8dcee84b/tapestry5/tapestry-console.css
admin:20 GET http://localhost:/assets/meta/74b3f9bf/tapestry5/tree.css
admin:20 GET
http://localhost:/assets/meta/c81e9337/tapestry5/exception-frame.css
admin:60 GET http://localhost:/assets/stack/24577ff5/en/core.js
admin:20 GET
http://localhost:/assets/meta/5f95a7ec/tapestry5/tapestry.css
admin:60 Uncaught TypeError: require is not a function(anonymous function)
@ admin:60


Thanks in advance! /Gunnar


Re: Adding IOC services from pico

2014-11-18 Thread Gunnar Eketrapp
Thanks Thiago!

I finally got it working so now I have access to my pico services from
Tapestry code.

Which is great!

/Gunnar

2014-11-18 13:55 GMT+01:00 Thiago H de Paula Figueiredo 
:

> On Tue, 18 Nov 2014 10:39:52 -0200, Lance Java 
> wrote:
>
>  This might help
>>
>> https://github.com/apache/tapestry-5/search?utf8=%E2%9C%93&q=Mapmoduledef
>>
>
> Have you tried contributing an ObjectProvider to the MasterObjectProvider
> service? This won't allow your Pico-provided objects to be Tapestry-IoC
> services, but you'll be able to @Inject them.
>
>
>   On 18 Nov 2014 11:00, "Gunnar Eketrapp" 
>> wrote:
>>
>>  Hi!
>>>
>>>
>>> I would like to add service from our own ioc container (pico based) so
>>> that they may used in my tapestry projects.
>>>
>>> I.e. I have an ioc container used within none Tapestry projects.
>>>
>>> Now I would like to be able to use those services from within my Tapestry
>>> pages components and services.
>>>
>>>
>>> I didn't find any example on how to do it for pico but found this for
>>> guice
>>> http://tawus.wordpress.com/2011/04/22/tapestry-magic-4-
>>> integrating-guice/
>>>
>>> I tried to follow that one and adopt it for our container but have not
>>> been lucky yet!
>>>
>>> I have created 4 classes (Our own IOC container is called
>>> ApplicationContainer)
>>>
>>> TapestryApplicationContainerFilter.java
>>> ApplicationContainerModuleDef.java
>>> ApplicationContainerObjectProvider.java
>>> ApplicationContainerServiceDef.java
>>>
>>> But I cant figure out how the ServiceDef and ObjectProvider should be
>>> implemented.
>>>
>>> Thanks in advance!
>>> /Gunnar Eketrapp
>>>
>>>
>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Adding IOC services from pico

2014-11-18 Thread Gunnar Eketrapp
I can't see the atcachements in Nabble .. can you see them? I.e. I attached
4 source code files.


Adding IOC services from pico

2014-11-18 Thread Gunnar Eketrapp
Hi!


I would like to add service from our own ioc container (pico based) so that
they may used in my tapestry projects.

I.e. I have an ioc container used within none Tapestry projects.

Now I would like to be able to use those services from within my Tapestry
pages components and services.


I didn't find any example on how to do it for pico but found this for guice
http://tawus.wordpress.com/2011/04/22/tapestry-magic-4-integrating-guice/

I tried to follow that one and adopt it for our container but have not been
lucky yet!

I have created 4 classes (Our own IOC container is called
ApplicationContainer)

TapestryApplicationContainerFilter.java
ApplicationContainerModuleDef.java
ApplicationContainerObjectProvider.java
ApplicationContainerServiceDef.java

But I cant figure out how the ServiceDef and ObjectProvider should be
implemented.

Thanks in advance!
/Gunnar Eketrapp

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

Re: Forms plus none tapestry fields

2012-03-06 Thread Gunnar Eketrapp
Thanks for the tip!

That component looks awsame and I made a test and compare it with Erich
Hynd's multiselect which also is god.

I ran into some javascript issues in my minimal test page that I will try
to solve this evening.
It was some god old conflict between prototype / jquery but I think.
I'll get back with more info if I don't solve it.
I dont use tapestry-jquery but perhaps i should ... what does it do?
Now I just include jquery js files in my layout template.

A general question regarding js @Import ...

If using @Import how is dependencies and js include ordering handled.

I.e. AutoComplete imports tokeinput js which depends on jquery js.

  @SupportsInformalParameters
  @Import(library = "jquery.tokeninput.js", stylesheet = "token-input.css")
  public class AutoComplete extends AbstractField {
  ...

/Gunnar

-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Fails to injecting a textarea

2012-03-04 Thread Gunnar Eketrapp
Thanks! That was the problem!

I am  a little bit confused of when  the t: prefix is needed.

/Gunnar

2012/3/4 Bryan Lewis 

> A quick guess at the easy typo...   missing 't:' before 'id'.
>
>
> On Sun, Mar 4, 2012 at 7:51 AM, Gunnar Eketrapp
> wrote:
>
> > I fail to inject a textarea ..
> >
> > Tml extract
> > > value="message" style="height: 50px;"/>
> >
> >
> > Java extract
> >
> >
> > Neither ..
> > @InjectComponent
> > private TextArea messageField;
> >
> > .. or ..
> >
> > @Component(id = "messageField")
> > private TextArea messageField;
> >
> > ... works. Gives:
> >
> >  Caused by: org.apache.tapestry5.ioc.util.UnknownValueException:
> Component
> > fee/Edit does not contain embedded component 'messageField'.
> >
> >
> > Must be some easy typo ... but beats me!
> >
> > TIA, Gunnar Eketrapp
> >
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Forms plus none tapestry fields

2012-03-03 Thread Gunnar Eketrapp
Hi!

I have a form field where users can select a number of lists or individual
members that e.g. should receive a meeting invitation.

My first solution was based on jquery-ui autocomplete but I cant get that
to work in IE. (Even jquery's autocomplete examples does not work in IE.)

I then found and wanted to try Erich Hynd's jquery multi select. See
http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/

My first attempt was to just add a tml generated  to my tapestry
form. (+ some js)

I.e. I intended to get / set a string encoded value with selected items by
myself.

However when submitting the form I got a stacktrace ...

Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
find a coercion from type java.lang.String to type
utskicket.model.entity.MemberList.
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.findOrCreateCoercion(TypeCoercerImpl.java:276)
~[tapestry-ioc-5.3.1.jar:na]
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.access$000(TypeCoercerImpl.java:38)
~[tapestry-ioc-5.3.1.jar:na]
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.getCoercion(TypeCoercerImpl.java:94)
~[tapestry-ioc-5.3.1.jar:na]
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl$TargetCoercion.coerce(TypeCoercerImpl.java:71)
~[tapestry-ioc-5.3.1.jar:na]
at
org.apache.tapestry5.ioc.internal.services.TypeCoercerImpl.coerce(TypeCoercerImpl.java:147)
~[tapestry-ioc-5.3.1.jar:na]
at $TypeCoercer_1ab47ed4cd58.coerce(Unknown Source) ~[na:na]
at
org.apache.tapestry5.internal.services.TypeCoercedValueEncoderFactory$1.toValue(TypeCoercedValueEncoderFactory.java:45)
~[tapestry-core-5.3.1.jar:na]
at
org.apache.tapestry5.corelib.components.Loop.restoreStateFromStoredClientValue(Loop.java:470)
~[tapestry-core-5.3.1.jar:na]
at org.apache.tapestry5.corelib.components.Loop.access$500(Loop.java:64)
~[tapestry-core-5.3.1.jar:na]
at
org.apache.tapestry5.corelib.components.Loop$RestoreStateFromStoredClientValue.execute(Loop.java:185)
~[tapestry-core-5.3.1.jar:na]
at
org.apache.tapestry5.corelib.components.Loop$RestoreStateFromStoredClientValue.execute(Loop.java:174)
~[tapestry-core-5.3.1.jar:na]
at
org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:661)
~[tapestry-core-5.3.1.jar:na]
... 83 common frames omitted

So it seams like T5 does not like it that way!

Is there an easy way around this !?

Thanks in advance,
Gunnar Eketrapp

The selected data where assembled correctly by the
jquery-ui-multiselect-widget an delivered as

invited=L3,M4,M2

I.e. L for selected lists and M for selected members.

Extract from my bad .tml  (The invited value is a String)  Note: Select is
not a T5 select :





${list.name}





${member.name}






Re: Question about caching of assets ...

2012-02-28 Thread Gunnar Eketrapp
Hi!

Caching seems complex and I am fairly new to it.

I found out that T5 delivers a 304 for assets that have not been modified
since they where fetched.
I.e. there is one server request per asset.

[When serving an asset T5 delivers a last modified header. And clients
sends If-Modified-Since
when asking for an asset.]

My question is, if my findings are correct.

Would it be possible to tell clients to cache assets for ever and use the
version to force a reload.
I.e. the way I thought it worked ...

/Gunnar


2012/2/28 Steve Eynon 

> Hi,
>
> I'm sure if you're asking about what T5 serves up, or how the client
> interprets what it is served?
>
> Ultimately you have no control over what the client does - if the
> client wants to make a request, it'll make a request. At best all the
> server can do is 'suggest' and 'hint' to the client that it uses it's
> cache. Hence the 304's, the If-Modified-Since headers and everything
> else we throw at the client.
>
> But if the client has a small cache limit, or is new to the site, then
> regardless, it's going to make lots of requests.
>
> Steve.
>
> On 27 February 2012 22:58, Gunnar Eketrapp 
> wrote:
> > Hi!
> >
> > Recently I made a fix so that my uploaded images (stored in db) are
> cached.
> >
> > I did this by returning status 304 (HTTP status not modified) as I found
> > out that T5 handles asset requests in that way.
> >
> > But this means that the client has to perform a request for each
> > asset/image.
> >
> > I thought that the adding of the application version to the assets url
> was
> > there to inform clients when assets needed to be refetched
> > and that they should be fetched from client cache (without a request)
> > otherwise.
> >
> > For my images, the ideal would be as Howard pointed out to add a hashed
> > signature to my image url:s and to cache them forever on client side.
> >
> > But as I found out T5 assets are not handled that way I skipped the hash
> > code and just performed a check on the header "If-Modified-Since".
> >
> > What have I missed?  Am I right when i say that T5 assets are handled
> with
> > a request + 304 reply.
> >
> > Thanks in advance,
> > Gunnar Eketrapp
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Question about caching of assets ...

2012-02-27 Thread Gunnar Eketrapp
Hi!

Recently I made a fix so that my uploaded images (stored in db) are cached.

I did this by returning status 304 (HTTP status not modified) as I found
out that T5 handles asset requests in that way.

But this means that the client has to perform a request for each
asset/image.

I thought that the adding of the application version to the assets url was
there to inform clients when assets needed to be refetched
and that they should be fetched from client cache (without a request)
otherwise.

For my images, the ideal would be as Howard pointed out to add a hashed
signature to my image url:s and to cache them forever on client side.

But as I found out T5 assets are not handled that way I skipped the hash
code and just performed a check on the header "If-Modified-Since".

What have I missed?  Am I right when i say that T5 assets are handled with
a request + 304 reply.

Thanks in advance,
Gunnar Eketrapp


Re: Caching page results ...

2012-02-26 Thread Gunnar Eketrapp
Ok here is my solution  ...

In my app module I added ..

public void contributeComponentEventResultProcessor(final Response response,
MappedConfiguration,
ComponentEventResultProcessor> configuration) {
configuration.add(HttpErrorNotModified.class, new
ComponentEventResultProcessor() {
public void processResultValue(HttpErrorNotModified value) throws
IOException {
response.sendError(304, "");
}
});
}

In page onActivate i do ...

String since = request.getHeader("If-Modified-Since");

if (since != null)  {
try {
UTTime sincetime = new UTTime(HTTP_DATE_FORMAT.parse(since));

if (!file.getUpdated().isAfter(sincetime)) {
return new HttpErrorNotModified();
}
} catch (ParseException e) {
   log.error("Faield to parse http time: " + since, e);
}
}

The new return type is

   package utskicket.util.tapestry;

   /**
* An event handler method may return an instance of this class to send
an 304 response to the client.
*/
public class HttpErrorNotModified {

   }



Sometimes I think that the whole web is a leaky abstraction ... but perhaps
it's not an abstraction at all  ...



2012/2/26 Gunnar Eketrapp 

> I just saw that ResourceStreamerImpl.java checks modification time and
> does ...
>
>   response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "");
>
> Is there a way for  me to achieve the same from my onActivate() method
> below ...
>
> I.e. how do I return a 304 when my image hasn't been changed according to
> the
> I*f-Modified-Since* header that I receive.
>
> Or do I have to it in some other way .. I guess so!
>
> 2012/2/26 Howard Lewis Ship 
>
>> Do the images ever change?  If not, you can use the same kind of
>> approach Tapestry uses for assets: incorporate a version number (or
>> SHA1 checksum) into the path, and set the headers that ensure caching
>> on the client (I'd have to check the Tapestry code for the exact ones
>> that work).
>>
>> On Sat, Feb 25, 2012 at 9:25 AM, Gunnar Eketrapp
>>  wrote:
>> > Hi!
>> >
>> > I currently store uploaded files in the db.
>> >
>> > I then retrieve those images with via an Image page.
>> >
>> > My problem now is that the client does not cache these images.
>> >
>> > Is there an easy way to fix my erreneous solution !?
>> >
>> >public void prepareResponse(Response r) {
>> > r.setHeader("Cache-Control", "max-age=3600");
>> >}
>> >
>> > I have included the entire Image.java below ...
>> >
>> > Thanks in advance,
>> > Gunnar
>> >
>> > 
>> >
>> > package utskicket.pages;
>> >
>> > import java.io.IOException;
>> > import java.io.InputStream;
>> >
>> > import org.apache.tapestry5.StreamResponse;
>> > import org.apache.tapestry5.ioc.annotations.Inject;
>> > import org.apache.tapestry5.services.Response;
>> > import org.slf4j.Logger;
>> >
>> > import utskicket.base.BasePage;
>> > import utskicket.model.dao.UploadedFileDAO;
>> > import utskicket.model.entity.UploadedFile;
>> >
>> >
>> > public class Image extends BasePage {
>> >
>> >private Long groupId;
>> >private Long imageId;
>> >
>> >@Inject
>> >private UploadedFileDAO fileDAO;
>> >
>> >@Inject
>> >private Logger log;
>> >
>> >public class UploadedFileStreamResponse implements StreamResponse {
>> >private final UploadedFile file;
>> >
>> >public UploadedFileStreamResponse(UploadedFile file) {
>> >this.file = file;
>> >}
>> >
>> >public String getContentType() {
>> >return file.getContentType();
>> >}
>> >
>> >public InputStream getStream() throws IOException {
>> >return file.getInputStream();
>> >}
>> >
>> >// TODO: Find out how to get images cached by browser's. This
>> does
>> > not work!
>> >public void prepareResponse(Response r) {
>> >r.setHeader("Cache-Control", "max-age=3600");
>> >}
>> >}
>> >
>> >//
>> >
>> --
>> >// -- Tapestry event methods - Tape

Re: Caching page results ...

2012-02-26 Thread Gunnar Eketrapp
I just saw that ResourceStreamerImpl.java checks modification time and does
...

  response.sendError(HttpServletResponse.SC_NOT_MODIFIED, "");

Is there a way for  me to achieve the same from my onActivate() method
below ...

I.e. how do I return a 304 when my image hasn't been changed according to
the
I*f-Modified-Since* header that I receive.

Or do I have to it in some other way .. I guess so!

2012/2/26 Howard Lewis Ship 

> Do the images ever change?  If not, you can use the same kind of
> approach Tapestry uses for assets: incorporate a version number (or
> SHA1 checksum) into the path, and set the headers that ensure caching
> on the client (I'd have to check the Tapestry code for the exact ones
> that work).
>
> On Sat, Feb 25, 2012 at 9:25 AM, Gunnar Eketrapp
>  wrote:
> > Hi!
> >
> > I currently store uploaded files in the db.
> >
> > I then retrieve those images with via an Image page.
> >
> > My problem now is that the client does not cache these images.
> >
> > Is there an easy way to fix my erreneous solution !?
> >
> >public void prepareResponse(Response r) {
> > r.setHeader("Cache-Control", "max-age=3600");
> >}
> >
> > I have included the entire Image.java below ...
> >
> > Thanks in advance,
> > Gunnar
> >
> > 
> >
> > package utskicket.pages;
> >
> > import java.io.IOException;
> > import java.io.InputStream;
> >
> > import org.apache.tapestry5.StreamResponse;
> > import org.apache.tapestry5.ioc.annotations.Inject;
> > import org.apache.tapestry5.services.Response;
> > import org.slf4j.Logger;
> >
> > import utskicket.base.BasePage;
> > import utskicket.model.dao.UploadedFileDAO;
> > import utskicket.model.entity.UploadedFile;
> >
> >
> > public class Image extends BasePage {
> >
> >private Long groupId;
> >private Long imageId;
> >
> >@Inject
> >private UploadedFileDAO fileDAO;
> >
> >@Inject
> >private Logger log;
> >
> >public class UploadedFileStreamResponse implements StreamResponse {
> >private final UploadedFile file;
> >
> >public UploadedFileStreamResponse(UploadedFile file) {
> >this.file = file;
> >}
> >
> >public String getContentType() {
> >return file.getContentType();
> >}
> >
> >public InputStream getStream() throws IOException {
> >return file.getInputStream();
> >}
> >
> >// TODO: Find out how to get images cached by browser's. This does
> > not work!
> >public void prepareResponse(Response r) {
> >r.setHeader("Cache-Control", "max-age=3600");
> >}
> >}
> >
> >//
> >
> --
> >// -- Tapestry event methods - Tapestry event methods - Tapestry event
> > methods --
> >//
> >
> --
> >
> >StreamResponse onActivate(Long groupId, Long imageId) {
> >this.groupId = groupId;
> >this.imageId = imageId;
> >
> >// UploadedFile file = cache.uploadedFileLookup(imageId);
> >UploadedFile file = fileDAO.findById(imageId);
> >
> >if (null == file) {
> >log.warn("Failed to load image #" + imageId);
> >return null;
> >} else {
> >log.debug("Loaded file #" + imageId + " with a size of " +
> > file.getContent().length + " bytes");
> >return new UploadedFileStreamResponse(file);
> >}
> >}
> >
> >Object[] onPassivate() {
> >return new Object [] {groupId, imageId};
> >}
> > }
>
>
>
> --
> 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Caching page results ...

2012-02-25 Thread Gunnar Eketrapp
Hi!

I currently store uploaded files in the db.

I then retrieve those images with via an Image page.

My problem now is that the client does not cache these images.

Is there an easy way to fix my erreneous solution !?

public void prepareResponse(Response r) {
 r.setHeader("Cache-Control", "max-age=3600");
}

I have included the entire Image.java below ...

Thanks in advance,
Gunnar



package utskicket.pages;

import java.io.IOException;
import java.io.InputStream;

import org.apache.tapestry5.StreamResponse;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Response;
import org.slf4j.Logger;

import utskicket.base.BasePage;
import utskicket.model.dao.UploadedFileDAO;
import utskicket.model.entity.UploadedFile;


public class Image extends BasePage {

private Long groupId;
private Long imageId;

@Inject
private UploadedFileDAO fileDAO;

@Inject
private Logger log;

public class UploadedFileStreamResponse implements StreamResponse {
private final UploadedFile file;

public UploadedFileStreamResponse(UploadedFile file) {
this.file = file;
}

public String getContentType() {
return file.getContentType();
}

public InputStream getStream() throws IOException {
return file.getInputStream();
}

// TODO: Find out how to get images cached by browser's. This does
not work!
public void prepareResponse(Response r) {
r.setHeader("Cache-Control", "max-age=3600");
}
}

//
--
// -- Tapestry event methods - Tapestry event methods - Tapestry event
methods --
//
--

StreamResponse onActivate(Long groupId, Long imageId) {
this.groupId = groupId;
this.imageId = imageId;

// UploadedFile file = cache.uploadedFileLookup(imageId);
UploadedFile file = fileDAO.findById(imageId);

if (null == file) {
log.warn("Failed to load image #" + imageId);
return null;
} else {
log.debug("Loaded file #" + imageId + " with a size of " +
file.getContent().length + " bytes");
return new UploadedFileStreamResponse(file);
}
}

Object[] onPassivate() {
return new Object [] {groupId, imageId};
}
}


Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It just stroke me that it could have to with page abbreviations.

I have problems with meeting/answers and meeting/list

I.e. MeetingAnswers.java & MeetingList.java / MeetingAnswers_sv.properties
& MeetingList_sv.properties

which both are accessed with short hand format

But it works if I skip the _sv suffix on the property files.



2012/2/23 Gunnar Eketrapp 

> MeetingAnwsers_sv.properties i mean
>
>
> 2012/2/23 Gunnar Eketrapp 
>
>> It does not have to do with the casing so it must be something else.
>>
>> E.g. page MeetingAnswers.java does not pick up texts
>> from MeetingAnwsers_sv.txt when running in Ubuntu
>>
>> The strange thing is that it only some of the pages have this problem.
>>
>> I will add a MeetingAnwsers.txt now to se if that fixes the problem.
>>
>>
>>  2012/2/22 Howard Lewis Ship 
>>
>>> There are some cases where you need to have the app.properties file
>>> for app_sv.properties to be picked up.
>>>
>>> However, when you hit a problem like this, it is most likely the case
>>> of the file name.  Windows is case-insenstive, Ubunutu is case
>>> sensitive.
>>>
>>> Thus MyPage.java means MyPage.properties, and mypage.properties will
>>> work on Windows, fail on Ubuntu.
>>>
>>>
>>> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>>>  wrote:
>>> > Hi!
>>> >
>>> > My app is current in swedish only.
>>> >
>>> > So my app module states ..
>>> >
>>> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>>> >
>>> > I have named my page property files as ..
>>> >
>>> >  _sv.properties
>>> >
>>> > .. and there are no .properties files.
>>> >
>>> > Actually dont know why I have added the _sv ending since _sv is the
>>> default
>>> > but I will remember that I had some problem that was solved by doing
>>> this
>>> >
>>> > Anyhow this has worked well during development on my windows machine.
>>> >
>>> > Now I am phasing missing-key for my properties in the released ubuntu
>>> live
>>> > version.
>>> >
>>> > I.e. T5 does not search my _sv property files.
>>> >
>>> > What have I missed? Must there by files without locale suffix and if
>>> so why
>>> > did it wor during development.
>>> >
>>> > Thanks in advance!
>>> >
>>> > /Gunnar
>>>
>>>
>>>
>>> --
>>> 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
>>>
>>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
MeetingAnwsers_sv.properties i mean

2012/2/23 Gunnar Eketrapp 

> It does not have to do with the casing so it must be something else.
>
> E.g. page MeetingAnswers.java does not pick up texts
> from MeetingAnwsers_sv.txt when running in Ubuntu
>
> The strange thing is that it only some of the pages have this problem.
>
> I will add a MeetingAnwsers.txt now to se if that fixes the problem.
>
>
> 2012/2/22 Howard Lewis Ship 
>
>> There are some cases where you need to have the app.properties file
>> for app_sv.properties to be picked up.
>>
>> However, when you hit a problem like this, it is most likely the case
>> of the file name.  Windows is case-insenstive, Ubunutu is case
>> sensitive.
>>
>> Thus MyPage.java means MyPage.properties, and mypage.properties will
>> work on Windows, fail on Ubuntu.
>>
>>
>> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>>  wrote:
>> > Hi!
>> >
>> > My app is current in swedish only.
>> >
>> > So my app module states ..
>> >
>> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>> >
>> > I have named my page property files as ..
>> >
>> >  _sv.properties
>> >
>> > .. and there are no .properties files.
>> >
>> > Actually dont know why I have added the _sv ending since _sv is the
>> default
>> > but I will remember that I had some problem that was solved by doing
>> this
>> >
>> > Anyhow this has worked well during development on my windows machine.
>> >
>> > Now I am phasing missing-key for my properties in the released ubuntu
>> live
>> > version.
>> >
>> > I.e. T5 does not search my _sv property files.
>> >
>> > What have I missed? Must there by files without locale suffix and if so
>> why
>> > did it wor during development.
>> >
>> > Thanks in advance!
>> >
>> > /Gunnar
>>
>>
>>
>> --
>> 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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Localization question / problem ...

2012-02-22 Thread Gunnar Eketrapp
It does not have to do with the casing so it must be something else.

E.g. page MeetingAnswers.java does not pick up texts
from MeetingAnwsers_sv.txt when running in Ubuntu

The strange thing is that it only some of the pages have this problem.

I will add a MeetingAnwsers.txt now to se if that fixes the problem.


2012/2/22 Howard Lewis Ship 

> There are some cases where you need to have the app.properties file
> for app_sv.properties to be picked up.
>
> However, when you hit a problem like this, it is most likely the case
> of the file name.  Windows is case-insenstive, Ubunutu is case
> sensitive.
>
> Thus MyPage.java means MyPage.properties, and mypage.properties will
> work on Windows, fail on Ubuntu.
>
>
> On Wed, Feb 22, 2012 at 11:54 AM, Gunnar Eketrapp
>  wrote:
> > Hi!
> >
> > My app is current in swedish only.
> >
> > So my app module states ..
> >
> >configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
> >
> > I have named my page property files as ..
> >
> >  _sv.properties
> >
> > .. and there are no .properties files.
> >
> > Actually dont know why I have added the _sv ending since _sv is the
> default
> > but I will remember that I had some problem that was solved by doing this
> >
> > Anyhow this has worked well during development on my windows machine.
> >
> > Now I am phasing missing-key for my properties in the released ubuntu
> live
> > version.
> >
> > I.e. T5 does not search my _sv property files.
> >
> > What have I missed? Must there by files without locale suffix and if so
> why
> > did it wor during development.
> >
> > Thanks in advance!
> >
> > /Gunnar
>
>
>
> --
> 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


utskicket.se - A new tapestry based site has been released ...

2012-02-19 Thread Gunnar Eketrapp
For some time I have been working on a hobby project, a web based solution
to adminstrate various types of "assocations".

In Sweden we have a lot of those. It can be associations for shared
properties, apartments, boat clubs etc etc.

You administrate members, meetings, economy, fees, documents and so on.

I first started this project in 2004 and worked some month with it until
other stuff came in between.
Back then I used  Tapestry 4 which i had a hate/love relation with.

About a year ago I had some time over and checked out the old code and
lifted it to Tapestry 5.

Since then I have been adding stuff and sometimes it seems like release day
is just getting further and further away.
Anyhow, yesterday I decided to release the site.

I would like to THANK YOU ALL in this list since it is a very dear friend
when you get stucked somewhere.

The site is in swedish only so I don't expect you too understand too much
... but nowadays with google translate .. who knows!

I plan to add a thank-you-page to the various open source projects that I
use. (T5, Java, Mysql, Hibernate, Spring, Linux, iText, jQuery, ...)

If so Tapestry will have the prime position.

THANK YOU !

P.S.
The web design is from 2005 so "bear with me" if you think it looks
outdated.
D.S.


Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2012-02-01 Thread Gunnar Eketrapp
Thanks Kalle!

That solved my ajax securing problem.

/Gunnar

Den tisdagen den 17:e januari 2012 skrev Kalle Korhonen<
kalle.o.korho...@gmail.com>:
> On Thu, Aug 25, 2011 at 1:08 AM, Gunnar Eketrapp
>  wrote:
>> I still havn't managde to get ajax calls to redirect.
>> I changed to reload as a I saw in this mailing list.
>> In Chromes debugger I can see that the timed out ajax call returns ..
>> {"script":"window.location.reload();"}
>> ... but nothing happens on the client side.
>> So the question is still open do I have to do something to enable this ?
>
> Hey Gunnar, in case you never solved this on your own since the issue
> resurfaced on one of my projects to my surprise. The behavior is
> version dependent, you might need to send a content key with the
> response to get the scripts executed, but if all you need is a
> redirect, it's better to respond simply with:
> os.write(("{\"redirectURL\":\"" + link.toAbsoluteURI() +
"\"}").getBytes());
>
> And to Howard, as explained at
>
http://stackoverflow.com/questions/282429/returning-redirect-as-response-to-xhr-request
,
> it's not possible for the client application to handle a 302. The
> browser handles it directly and all the client sees is a response to
> the redirected request.
>
> Kalle
>
>
>> 2011/8/24 Magnus Kvalheim 
>>
>>> No sorry, that's not relevant for this. Eager to help, but I should
>>> have paid more attention to detail :)
>>>
>>> On Wed, Aug 24, 2011 at 8:33 AM, Magnus Kvalheim 
>>> wrote:
>>>
>>> > I sometimes use a proxy for doing redirects.
>>> >
>>> > *public class RedirectProxy {*
>>> > * @Persist private String redirectURL;*
>>> > * @Inject private ComponentResources _resources;*
>>> > * Object onActivate(){*
>>> > * try {*
>>> > * URL url = new URL(redirectURL);*
>>> > * return url;*
>>> > * } catch (Exception e) {*
>>> > * // TODO: handle exception*
>>> > * } finally{*
>>> > * _resources.discardPersistentFieldChanges(); *
>>> > * }*
>>> > * return Index.class;*
>>> > * }*
>>> > * public void setRedirectURL(String redirectURL) {*
>>> > * this.redirectURL = redirectURL;*
>>> > * }*
>>> > *
>>> > *
>>> > * public String getRedirectURL() {*
>>> > * return redirectURL;*
>>> > * }*
>>> > *}*
>>> >
>>> > Then from an eventhandler:
>>> > *redirectProxy.setRedirectURL(u);*
>>> > *return redirectProxy;*
>>> >
>>> > It could perhaps be useful for this case?
>>> >
>>> > --magnus
>>> >
>>> > On Tue, Aug 23, 2011 at 11:00 PM, Gunnar Eketrapp <
>>> > gunnar.eketr...@gmail.com> wrote:
>>> >
>>> >> Hum .. this did not work so I guess I have to do something on the
client
>>> >> side as well ...
>>> >>
>>> >>   if (request.isXHR()) {
>>> >>OutputStream os =
>>> >> response.getOutputStream("application/json;charset=UTF-8");
>>> >>os.write(("{\"script\":\"window.location.replace('" +
>>> >> link.toAbsoluteURI() + "');\"}").getBytes());
>>> >>os.close();
>>> >>} else {
>>> >>response.sendRedirect(link);
>>> >> }
>>> >>
>>> >>
>>> >> 2011/8/23 Kalle Korhonen 
>>> >>
>>> >> > On Mon, Aug 22, 2011 at 4:42 PM, Howard Lewis Ship <
hls...@gmail.com>
>>> >> > wrote:
>>> >> > > Actually, perhaps Tapestry's client-side support should, by
default,
>>> >> > > handle 302 correctly.
>>> >> >
>>> >> > Yes, perhaps so. But the correctness is "in the eye of the
beholder".
>>> >> > It's clear that a 302 response to a non-ajax request always causes
a
>>> >> > redirect, but not necessarily so for an ajax request. If the
default
>>> >> > behavior was easily overridable then yes, why not. Perhaps I should
>>> >> > just bring tapestry-exceptionpage functionality to the core.
>>> >> >
>>> >> > Kalle
>>> >> >
>>> >> >
>>> >> > > Currently, Tapestry's JSON response for partial page updates
>>> includes
>>> >> > > a special key for performing a redirect.
>>> >> > >
>>> >> > > On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen
>>> >> > >  wrote:
>>> >> > >> On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
>>> >> > >> <


Re: Stuts VS Tapestry - I need some ammo

2012-01-26 Thread Gunnar Eketrapp
I forgot one thing!

Line-Precise-Error-Reporting !

The elegent error handling in Tapestry is one of the strongest point.

I did not see that in you list.

If your developers are like me they sometimes make errors.

LPER leads to faster development. Together with live class reloading it's a
winner!

Cheers!


2012/1/26 Gunnar Eketrapp 

> Clean and readable 
>
> Having worked with Spring MVC, JSP, Struts and finally found Tapestry I
> can just tell that a web project gets much much more "Clean and Readable"
> when choosing T5.
>
> The elegant page and component folder structure leads to an easy-to-locate
> whatever you are searching for.
>
> It's always hard to win these arguments since people are often suspicious
> to new unproven (in their minds) technology.
>
> If the POC was not enough to convince you manager it was probably not a
> god POC or probably not a god manager.
>
> If you want to be close to the web (html, css, js) I can't think of any
> better more robust framework then T5.
>
> Struts was a mess when I tried it seven years ago but perhaps it has
> matured since then (actually T4 was a little bit messy then as well ...)
>
> I looked at http://struts.apache.org/primer.html and saw that they are
> referring to .jsp as key technology.
> If there where a minus one button somewhere I would press that one ...
>
> Gunnar Eketrapp
>
> 2012/1/26 Thim Anneesens 
>
>> Hello Tapestry users,
>>
>> The company where I work is going to choose a web framework to implement
>> there site (the company core business revolves around that site). We did a
>> POC with Spirng MVC, JSF, Struts and Tapestry.
>> We have shortlisted to Struts and Tapestry and I have the feeling that
>> Struts will win.
>>
>> The manager decision seams to revolve around the argument that if we can
>> do in Struts what we can do with Tapestry while keeping a code that is
>> relatively clean and readable, we should use Struts.
>>
>> *Does anyone have a killer use case that would be difficult to implement
>> in Struts and easy in Tapestry.*
>>
>> I already demonstrated the following about tapestry:
>>
>>  * Better components in Tapestry than in Struts
>>  * Better persistence tools (FLASH, CLIENT, SESSION ,SESSION STATE, ...)
>>  * Cleaner templates
>>  * Less code review because of the framework sensible conventions
>>  * Better code navigability (when using an IDE)
>>  * Better refactoring (most of the code is in Java)
>>  * Coherence and homogeneity (One framework for all your needs / Struts
>>   needs JSP, Freemarker, Spring services and Tiles to even compete )
>>  * Strong Ajax support out of the box
>>  * Powerful configuration with symbols
>>  * Beautiful architecture (easy to remember because very sensible)
>>  * Easy to extend or override most of the features
>>  * Live class reloading
>>  * Made with most of the common web use cases in mind (javascript, css,
>>   ajax, session, query parameters, cookies, integration with backend,
>>   ...).
>>  * Everything at your fingertips with Injection and IoC
>>
>> These are more than sufficient to convince me that productivity and
>> maintainability will be far better with Tapestry than with Struts. But
>> unfortunately, I fail to demonstrate to the manager :(.
>>
>> Sorry for my poor English and thanks in advance,
>>
>> Thim Anneessens.
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Stuts VS Tapestry - I need some ammo

2012-01-26 Thread Gunnar Eketrapp
Clean and readable 

Having worked with Spring MVC, JSP, Struts and finally found Tapestry I can
just tell that a web project gets much much more "Clean and Readable" when
choosing T5.

The elegant page and component folder structure leads to an easy-to-locate
whatever you are searching for.

It's always hard to win these arguments since people are often suspicious
to new unproven (in their minds) technology.

If the POC was not enough to convince you manager it was probably not a god
POC or probably not a god manager.

If you want to be close to the web (html, css, js) I can't think of any
better more robust framework then T5.

Struts was a mess when I tried it seven years ago but perhaps it has
matured since then (actually T4 was a little bit messy then as well ...)

I looked at http://struts.apache.org/primer.html and saw that they are
referring to .jsp as key technology.
If there where a minus one button somewhere I would press that one ...

Gunnar Eketrapp

2012/1/26 Thim Anneesens 

> Hello Tapestry users,
>
> The company where I work is going to choose a web framework to implement
> there site (the company core business revolves around that site). We did a
> POC with Spirng MVC, JSF, Struts and Tapestry.
> We have shortlisted to Struts and Tapestry and I have the feeling that
> Struts will win.
>
> The manager decision seams to revolve around the argument that if we can
> do in Struts what we can do with Tapestry while keeping a code that is
> relatively clean and readable, we should use Struts.
>
> *Does anyone have a killer use case that would be difficult to implement
> in Struts and easy in Tapestry.*
>
> I already demonstrated the following about tapestry:
>
>  * Better components in Tapestry than in Struts
>  * Better persistence tools (FLASH, CLIENT, SESSION ,SESSION STATE, ...)
>  * Cleaner templates
>  * Less code review because of the framework sensible conventions
>  * Better code navigability (when using an IDE)
>  * Better refactoring (most of the code is in Java)
>  * Coherence and homogeneity (One framework for all your needs / Struts
>   needs JSP, Freemarker, Spring services and Tiles to even compete )
>  * Strong Ajax support out of the box
>  * Powerful configuration with symbols
>  * Beautiful architecture (easy to remember because very sensible)
>  * Easy to extend or override most of the features
>  * Live class reloading
>  * Made with most of the common web use cases in mind (javascript, css,
>   ajax, session, query parameters, cookies, integration with backend,
>   ...).
>  * Everything at your fingertips with Injection and IoC
>
> These are more than sufficient to convince me that productivity and
> maintainability will be far better with Tapestry than with Struts. But
> unfortunately, I fail to demonstrate to the manager :(.
>
> Sorry for my poor English and thanks in advance,
>
> Thim Anneessens.
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


EventContext.toString() ?

2012-01-25 Thread Gunnar Eketrapp
Hi!

Some time ago I suggested to add a toString method to EventContext in order
for it to be properly logged by the @Log annotation.

I coded a workaround at that time.

This was fixed in T5 for some time ago .

My old workaround code is still there but now I noticed that


@Log
Object onActivate(EventContext ctx) { // groupId, mode
logEnter(log, ctx);   // My fix

--


T5.3.1 writes this .. via @Log

2012-01-26 08:25:18.152 [8952910@qtp-12934710-3] DEBUG
utskicket.pages.group.EditMember - [ENTER] onActivate(EventContext: null)


My log fix writes this ..

2012-01-26 08:25:18.152 [8952910@qtp-12934710-3] DEBUG
utskicket.pages.group.EditMember - [ENTER] onActivate(2,skapa)



protected void logEnter(Logger l, EventContext ctx) {
l.debug("[ENTER] onActivate(" + toString(ctx) + ")");
}

protected void logExit(Logger l, EventContext ctx) {
l.debug("[ EXIT] onActivate(" + toString(ctx) + ")");
}

public static String toString(EventContext ctx) {
StringBuilder b = new StringBuilder();
String[] ss = ctx.toStrings();
for (String s : ss) {
if (b.length() > 0)
b.append(",");
b.append(s);
}
return b.toString();
}


Re: [5.3] JSONArray Error while submitting forms

2012-01-10 Thread Gunnar Eketrapp
I have already answered to this.

The clearing of the cache seems to have solved my problem as well.

2012/1/10 Muhammad Gelbana 

> Shouldn't Gunnar decide first if the issue should be closed or not ?
>
> On Tue, Jan 10, 2012 at 12:08 AM, Bob Harner  wrote:
>
> > Is anyone still seeing this problem after clearing the browser cache?
> > If not, we'll be able to close TAP5-1777.
> >
> > On Mon, Jan 9, 2012 at 9:52 AM, Michael Gentry 
> > wrote:
> > > Hi Josh (and others),
> > >
> > > I was using Chrome and then tried my app in Safari and it worked in
> > > Safari.  I then cleared my Chrome cache and it started working in
> > > Chrome, too.  I suspect some JS was being cached somewhere that was
> > > making things incompatible.  Hope that helps others, too.
> > >
> > > Thanks,
> > >
> > > mrg
> > >
> > >
> > > On Mon, Jan 9, 2012 at 9:34 AM, Michael Gentry 
> > wrote:
> > >> Hi Josh,
> > >>
> > >> Better late than never?  :-)
> > >>
> > >> Here is with 5.3.1, which still didn't help:
> > >>
> > >>
> >
> t:formdata:H4sIAJ2RvUsDMRjG3x4ofkAHncTFoWO5q6IguggiKpRSPCe39C6eKbkkJu
> > >> 1dw5OgrOj/4OTH DUwbH/i4vOgrlWKOU61E5JHt43z4/nefqEua4L1UsVEO
> > >>
> >
> Is4i1GGeY7eVCl90QHXKSyQTddhIrlIpE1Gg4kDpyiSLBFXWRKGpQZztuIDXlrGXPWElBBRr3hIUhFZWmlgE1xk9aMTOGSXFxv7Garr/PO1Cqw3IgBWrJGySmCCv1NukQjxMReT5qJqL9VCEs5QDnsmkBJgLT0d0668zVJGQy0jJRFnh3WuCzfOs436r4FBP1UOtVX8rfHwXQa7iF0gBsZDQD2PYMYJv9tN9/9n96DkA62bRQn8mjR0FT/E99g8KwWN
> > >>
> >
> j/7X29np36IBTh4WAMzt9Gg4isSlRTmMrjKc0BGhYgLFHdwtq09IrTTtMJsbkvy4ilIdy808uCL9fOuk83QIAAA==
> > >> t:submit:submitNext
> > >> jumpToPage:
> > >> radiogroup:USM
> > >> submitNext:Continue >
> > >> Response Headersview source
> > >>
> > >> The t:form is defined as:
> > >>
> > >> 
> > >>
> > >> The t:submit is defined as:
> > >>
> > >>  > >> value="Continue >" tabindex="100" />
> > >>
> > >> Thanks,
> > >>
> > >> mrg
> > >>
> > >>
> > >> On Wed, Dec 7, 2011 at 5:31 PM, Josh Canfield  >
> > wrote:
> > >>> A copy of the request would be helpful. It seems like in the first
> > >>> report the "t:submit" parameter was coming back as a quoted string,
> > >>> but later reports seem to have it fixed by checking if it's empty.
> > >>>
> > >>> On Wed, Dec 7, 2011 at 1:58 PM, Gunnar Eketrapp
> > >>>  wrote:
> > >>>> I have no idea! For sure there must be something special with your
> > case, my
> > >>>> case and Seamus case.
> > >>>>
> > >>>> Or perhaps we are the only one using form's :-)
> > >>>>
> > >>>> My browser is Chrome ...
> > >>>>
> > >>>> I have coded around the problem for now by using my own 5.3.1 as
> > reported
> > >>>> above.
> > >>>>
> > >>>>
> > >>>> 2011/12/7 Muhammad Gelbana 
> > >>>>
> > >>>>> But how come this issue isn't causing enough noise !!! We must have
> > >>>>> something common in our code that is very unique !!!
> > >>>>> I can't figure out what could be unique in my login page !!..2
> fields
> > >>>>> form...1 submit button...1 event handling method !
> > >>>>>
> > >>>>> On Wed, Dec 7, 2011 at 9:24 PM, Gunnar Eketrapp
> > >>>>> wrote:
> > >>>>>
> > >>>>> > I just created an issue for this
> > >>>>> > https://issues.apache.org/jira/browse/TAP5-1777
> > >>>>> >
> > >>>>> > I would love to see a fix for this otherwise I must go into
> > production
> > >>>>> with
> > >>>>> > my own brewed 5.3.1
> > >>>>> > or revert to 5.2.6.
> > >>>>> >
> > >>>>> > Thanks in advance,
> > >>>>> > Gunnar Eketrapp
> > >>>>> >
> > >>>>> > 2011/12/7 Muhammad Gelbana 
> > >>>>> >
> > >>>>> > > F

Re: [ANNOUNCE] Announcing Tapestry 5.3.1

2011-12-22 Thread Gunnar Eketrapp
A pity that the easy fix described in
https://issues.apache.org/jira/browse/TAP5-1777 wasn't added.

I have coded around this but some people has reverted back to 5.2.6 due to
this.

2011/12/21 Massimo Lusetti 

> On Wed, Dec 21, 2011 at 11:43 PM, jose luis sanchez
>  wrote:
>
> > No binary package available yet …  8-(
>
> I'm not sure where you were looking for but you can find it in the
> central maven repo:
>
>
> http://search.maven.org/#artifactdetails%7Corg.apache.tapestry%7Ctapestry5-annotations%7C5.3.1%7Cjar
>
> and on Apache main distribution:
>
> http://www.apache.org/dist/tapestry/apache-tapestry-5.3.1-sources.zip
>
> Maybe the archives need to reach every single mirror but it should a
> matters of hours...
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


JPA / SessionInView / ?

2011-12-11 Thread Gunnar Eketrapp
Hi!

Will tapestry-jpa module give me one jpa session per request ?
(Or entityManger is perhaps the right word here)

I am currenlty  using JPA but not tapestry-jpa.

My DAO methods (+some bigger service methods) are JPA transaction annotated.

The problem I am phasing now is that when I make some optimizations by
changing
references in my entity beans to lazy I get lazy init exceptions in other
places.
E.g. when page template tries to display some entity properties that are
lazy loaded.

I guess what I want is the OpenSessionInView pattern ... since then the
fetching (when needed)
would be solved automatically.

My current setup is Spring, TapestrySpringFilter, JPA (annoation based),
Spring Transactions Hibernate.

In my DAO implementation classes I have

@PersistenceContext
protected EntityManager entityManager;

When playing around with tapestry-jpa I also encountered the JPA Maven
dependence problem ...

I guess for now I will make som dummy code to fetch lazy loaded refs when
needed. But that can get ugly
in the long run.

How do you folks solve these problems?

I.e. OpenSessionInView or not !? If not how can I optimze by lazy loading
but avoid a lot of dummy code to load data when needed.

Thanks in advance,
Gunnar Eketrapp

My current Spring persistence setup 




























 


Re: [5.3] JSONArray Error while submitting forms

2011-12-07 Thread Gunnar Eketrapp
I have no idea! For sure there must be something special with your case, my
case and Seamus case.

Or perhaps we are the only one using form's :-)

My browser is Chrome ...

I have coded around the problem for now by using my own 5.3.1 as reported
above.


2011/12/7 Muhammad Gelbana 

> But how come this issue isn't causing enough noise !!! We must have
> something common in our code that is very unique !!!
> I can't figure out what could be unique in my login page !!..2 fields
> form...1 submit button...1 event handling method !
>
> On Wed, Dec 7, 2011 at 9:24 PM, Gunnar Eketrapp
> wrote:
>
> > I just created an issue for this
> > https://issues.apache.org/jira/browse/TAP5-1777
> >
> > I would love to see a fix for this otherwise I must go into production
> with
> > my own brewed 5.3.1
> > or revert to 5.2.6.
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
> > 2011/12/7 Muhammad Gelbana 
> >
> > > Facing the same issue !! I didn't expect that to happen and it will
> take
> > > sometime to revert back to 5.2.6 :(
> > >
> > > I cleared my browser's cache and made sure I'm using tapestry's latest
> > > css\js...still having the same problem with a form that has nothing to
> do
> > > ajax !
> > >
> > > On Wed, Dec 7, 2011 at 8:36 AM, Gunnar Eketrapp
> > > wrote:
> > >
> > > > if (raw != null && *!raw.isEmpty() &&*
> > > >new *JSONArray(raw)*.getString(1).equals
> > > >
> > > > This seems to have solved the problem.
> > > >
> > > > I made this fix in *Form.java, Submit.java* and *LinkSubmit.java*.
> > Built
> > > > and installed my own 5.3.1 in my local maven repo.
> > > >
> > > > Rebuilt my project and now I can login and run the app again.
> > > >
> > > > It has been been very quiet in this thread ...
> > > >
> > > > Can anyone (that understands web development) give a comment ...
> please
> > > ...
> > > >
> > > > Thanks in advance,
> > > > Gunnar Eketrapp
> > > >
> > > >
> > > >
> > > > 2011/12/6 Gunnar Eketrapp 
> > > >
> > > > > A possible solution would be to make a code around in the method
> > > > > isFormCancelled() in Form.java.
> > > > >
> > > > > /Gunnar
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >   if (raw != null &&
> > > > > new *JSONArray(raw)*
> > > > > .getString(1).equals(InternalConstants.CANCEL_NAME))
> > > > > {
> > > > > return true;
> > > > > }
> > > > > 
> > > > >
> > > > >
> > > > >   if (raw != null && *!raw.isEmpty() &&*
> > > > > new *JSONArray(raw)*
> > > > > .getString(1).equals(InternalConstants.CANCEL_NAME))
> > > > > {
> > > > > return true;
> > > > > }
> > > > >
> > > > >
> > > > >
> > > > > 2011/12/6 Seamus 
> > > > >
> > > > >> Anyone have a solution to this. I have a form which I dont believe
> > is
> > > > >> making
> > > > >> use of any ajax (unless tapestry is and I dont know about it I am
> > > using
> > > > >> the
> > > > >> current T5.3 release) and I get this error. When inspecting my
> page
> > in
> > > > >> chrome and looking at the resources I see prototype 1.7 and
> > > > scriptaculous
> > > > >> 1.9.
> > > > >>
> > > > >> I dont see any other versions loaded for me to try and remove.
> > > > >>
> > > > >> --
> > > > >> View this message in context:
> > > > >>
> > > >
> > >
> >
> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > > > > Allévägen 2A, 132 42 Saltsjö-Boo
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > > > Allévägen 2A, 132 42 Saltsjö-Boo
> > > >
> > >
> > >
> > >
> > > --
> > > *Regards,*
> > > *Muhammad Gelbana
> > > Java Developer*
> > >
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > Allévägen 2A, 132 42 Saltsjö-Boo
> >
>
>
>
> --
> *Regards,*
> *Muhammad Gelbana
> Java Developer*
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: [5.3] JSONArray Error while submitting forms

2011-12-07 Thread Gunnar Eketrapp
I just created an issue for this
https://issues.apache.org/jira/browse/TAP5-1777

I would love to see a fix for this otherwise I must go into production with
my own brewed 5.3.1
or revert to 5.2.6.

Thanks in advance,
Gunnar Eketrapp

2011/12/7 Muhammad Gelbana 

> Facing the same issue !! I didn't expect that to happen and it will take
> sometime to revert back to 5.2.6 :(
>
> I cleared my browser's cache and made sure I'm using tapestry's latest
> css\js...still having the same problem with a form that has nothing to do
> ajax !
>
> On Wed, Dec 7, 2011 at 8:36 AM, Gunnar Eketrapp
> wrote:
>
> > if (raw != null && *!raw.isEmpty() &&*
> >new *JSONArray(raw)*.getString(1).equals
> >
> > This seems to have solved the problem.
> >
> > I made this fix in *Form.java, Submit.java* and *LinkSubmit.java*. Built
> > and installed my own 5.3.1 in my local maven repo.
> >
> > Rebuilt my project and now I can login and run the app again.
> >
> > It has been been very quiet in this thread ...
> >
> > Can anyone (that understands web development) give a comment ... please
> ...
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
> >
> >
> > 2011/12/6 Gunnar Eketrapp 
> >
> > > A possible solution would be to make a code around in the method
> > > isFormCancelled() in Form.java.
> > >
> > > /Gunnar
> > >
> > >
> > >
> > >
> > >
> > >   if (raw != null &&
> > > new *JSONArray(raw)*
> > > .getString(1).equals(InternalConstants.CANCEL_NAME))
> > > {
> > > return true;
> > > }
> > > 
> > >
> > >
> > >   if (raw != null && *!raw.isEmpty() &&*
> > > new *JSONArray(raw)*
> > > .getString(1).equals(InternalConstants.CANCEL_NAME))
> > > {
> > > return true;
> > > }
> > >
> > >
> > >
> > > 2011/12/6 Seamus 
> > >
> > >> Anyone have a solution to this. I have a form which I dont believe is
> > >> making
> > >> use of any ajax (unless tapestry is and I dont know about it I am
> using
> > >> the
> > >> current T5.3 release) and I get this error. When inspecting my page in
> > >> chrome and looking at the resources I see prototype 1.7 and
> > scriptaculous
> > >> 1.9.
> > >>
> > >> I dont see any other versions loaded for me to try and remove.
> > >>
> > >> --
> > >> View this message in context:
> > >>
> >
> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
> > >>
> > >>
> > >
> > >
> > > --
> > > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > > Allévägen 2A, 132 42 Saltsjö-Boo
> > >
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > Allévägen 2A, 132 42 Saltsjö-Boo
> >
>
>
>
> --
> *Regards,*
> *Muhammad Gelbana
> Java Developer*
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: [5.3] JSONArray Error while submitting forms

2011-12-06 Thread Gunnar Eketrapp
if (raw != null && *!raw.isEmpty() &&*
new *JSONArray(raw)*.getString(1).equals

This seems to have solved the problem.

I made this fix in *Form.java, Submit.java* and *LinkSubmit.java*. Built
and installed my own 5.3.1 in my local maven repo.

Rebuilt my project and now I can login and run the app again.

It has been been very quiet in this thread ...

Can anyone (that understands web development) give a comment ... please ...

Thanks in advance,
Gunnar Eketrapp



2011/12/6 Gunnar Eketrapp 

> A possible solution would be to make a code around in the method
> isFormCancelled() in Form.java.
>
> /Gunnar
>
>
>
>
>
>   if (raw != null &&
> new *JSONArray(raw)*
> .getString(1).equals(InternalConstants.CANCEL_NAME))
> {
> return true;
> }
> 
>
>
>   if (raw != null && *!raw.isEmpty() &&*
> new *JSONArray(raw)*
> .getString(1).equals(InternalConstants.CANCEL_NAME))
> {
> return true;
> }
>
>
>
> 2011/12/6 Seamus 
>
>> Anyone have a solution to this. I have a form which I dont believe is
>> making
>> use of any ajax (unless tapestry is and I dont know about it I am using
>> the
>> current T5.3 release) and I get this error. When inspecting my page in
>> chrome and looking at the resources I see prototype 1.7 and scriptaculous
>> 1.9.
>>
>> I dont see any other versions loaded for me to try and remove.
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: [5.3] JSONArray Error while submitting forms

2011-12-06 Thread Gunnar Eketrapp
A possible solution would be to make a code around in the method
isFormCancelled() in Form.java.

/Gunnar





  if (raw != null &&
new *JSONArray(raw)*
.getString(1).equals(InternalConstants.CANCEL_NAME))
{
return true;
}



  if (raw != null && *!raw.isEmpty() &&*
new *JSONArray(raw)*
.getString(1).equals(InternalConstants.CANCEL_NAME))
{
return true;
}



2011/12/6 Seamus 

> Anyone have a solution to this. I have a form which I dont believe is
> making
> use of any ajax (unless tapestry is and I dont know about it I am using the
> current T5.3 release) and I get this error. When inspecting my page in
> chrome and looking at the resources I see prototype 1.7 and scriptaculous
> 1.9.
>
> I dont see any other versions loaded for me to try and remove.
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp5011831p5052214.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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Slow rendering of pagelinks !?

2011-12-04 Thread Gunnar Eketrapp
Howord I found this issue and it was my LinkTransformer that made a db
lookup!

Very embarrasing.

Now I am stuck with this when my login form submits ...

Caused by: java.lang.RuntimeException: A JSONArray text must start with '['
at character 0 of
at org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
~[tapestry-json-5.3.jar:na]
at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
~[tapestry-json-5.3.jar:na]
at org.apache.tapestry5.json.JSONArray.(JSONArray.java:95)
~[tapestry-json-5.3.jar:na]
at
org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.corelib.components.Form.advised$onAction_2bbba79dd4fd(Form.java:511)
~[tapestry-core-5.3.jar:na]

2011/12/4 Howard Lewis Ship 

> That seems awfully high ... I suspect the problem is elsewhere, such
> as how your entity objects are retrieved from the database; I would
> suspect the classic N+1 selects issue
> http://stackoverflow.com/questions/97197/what-is-the-n1-selects-problem
>
> Definitely enable logging of your SQL operations to track down the
> problem. Tapestry is pretty lightning quick, especially considering
> all that it does.
>
> On Sun, Dec 4, 2011 at 8:42 AM, Thiago H. de Paula Figueiredo
>  wrote:
> > On Sun, 04 Dec 2011 09:20:31 -0200, Gunnar Eketrapp
> >  wrote:
> >
> >> Hi!
> >
> >
> > Hi!
> >
> >> I have an page which I would like to speed up and when looking into it I
> >> found out the the tml section below adds ca 3000 msecs to request the
> page
> >> for a page with 18 grid lines and an avarage of 3 bookings per line.
> >
> >
> > Have you checked with just the Pagelinks commented out? If not, please do
> > it, as the surrounding template may be the 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
> >
>
>
>
> --
> 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: [5.3] JSONArray Error while submitting forms

2011-12-04 Thread Gunnar Eketrapp
For some reason my form submission crashes in the the method
isFormCancelled in Form.java.

The call to JSONArray(raw) crashes since raw is an empty string which is
not allowed.

I must have missed something with 5.3 and form handling that is
incompatible with 5.2.6.

Does anyone have a clue what has to be done ?

Thanks in advance,
Gunnar Eketrapp



request.getParameter(SUBMITTING_ELEMENT_ID);

private boolean isFormCancelled()
{
// The "cancel" query parameter is reserved for this purpose; if it
is present then the form was canceled on the
// client side.  For image submits, there will be two parameters:
"cancel.x" and "cancel.y".

if (request.getParameter(InternalConstants.CANCEL_NAME) != null ||
request.getParameter(InternalConstants.CANCEL_NAME + ".x")
!= null)
{
return true;
}

// When JavaScript is involved, it's more complicated. In fact,
this is part of HLS's desire
// to have all forms submit via XHR when JavaScript is present,
since it would provide
// an opportunity to get the submitting element's value into the
request properly.

String raw = request.getParameter(SUBMITTING_ELEMENT_ID);

if (raw != null &&
new *JSONArray(raw)*
.getString(1).equals(InternalConstants.CANCEL_NAME))
{
return true;
    }

return false;
}


2011/12/4 Gunnar Eketrapp 

> Did you solve this? I am getting the same right now.
>
> I just started my second attempt with 5.3 after Taha pointed out  a
> solution for my user type translators.
>
> But now I am looking at these JSONArray stack traces ...
>
> Perhaps there is a snapshot release of 5.3 that I can try with !?
>
> 2011/11/21 Serge Eby 
>
>> Hi,
>>
>> I am using T 5.3-rc-3 and I am getting the following error message while
>> submitting any forms in my app:
>>
>> ---
>> A JSONArray text must start with '[' at character 1 of "[\"save\",
>> \"save\"]"
>> --
>>
>> Stack trace:
>> --
>> org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
>> org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
>> org.apache.tapestry5.json.JSONArray.(JSONArray.java:95)
>>
>> org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
>>
>> org.apache.tapestry5.corelib.components.Form.advised$onAction_12585e84eba88bfd(Form.java:511)
>>
>> org.apache.tapestry5.corelib.components.Form$Invocation_onAction_12585e84eba88bfc.proceedToAdvisedMethod(Unknown
>> Source)
>>
>> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:
>> ...
>> ---
>> What's puzzling is that the form works in a dummy app but fails in the
>> core
>> (complex) app. This makes me believe that there is something else that is
>> interfering with tapestry. I've also noticed that if I disable Javascript
>> in
>> the browser, the submission is  successful.
>>
>> It looks as if:
>> String raw = request.getParameter(SUBMITTING_ELEMENT_ID);
>>
>> in Form.isCancelled() is returning a String in double quotes (in my case)
>> but I can't figure out where this is created.
>>
>> Has anybody else seen this?
>>
>>
>> Below is an excerpt:
>>
>> java class:
>>
>>  
>>  void onSuccess() {
>>
>>   String uploadDir = context.getRealFile("/").getAbsolutePath() +
>> "/resources";
>>File dirPath = new File(uploadDir);
>>
>>if (!dirPath.exists()) {
>>dirPath.mkdirs();
>>}
>>
>>File copied = new File(uploadDir , file.getFileName());
>>file.write(copied);
>>
>>   }
>>
>> tml:
>>
>> 
>>  
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ...
>>
>>
>> --
>> Thanks,
>>
>> /Serge
>>
>>
>> --
>> View this message in context:
>> http://tapestry-users.832.n2.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp7018161p7018161.html
>> Sent from the Tapestry Users 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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: [5.3] JSONArray Error while submitting forms

2011-12-04 Thread Gunnar Eketrapp
Did you solve this? I am getting the same right now.

I just started my second attempt with 5.3 after Taha pointed out  a
solution for my user type translators.

But now I am looking at these JSONArray stack traces ...

Perhaps there is a snapshot release of 5.3 that I can try with !?

2011/11/21 Serge Eby 

> Hi,
>
> I am using T 5.3-rc-3 and I am getting the following error message while
> submitting any forms in my app:
>
> ---
> A JSONArray text must start with '[' at character 1 of "[\"save\",
> \"save\"]"
> --
>
> Stack trace:
> --
> org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
> org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
> org.apache.tapestry5.json.JSONArray.(JSONArray.java:95)
> org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
>
> org.apache.tapestry5.corelib.components.Form.advised$onAction_12585e84eba88bfd(Form.java:511)
>
> org.apache.tapestry5.corelib.components.Form$Invocation_onAction_12585e84eba88bfc.proceedToAdvisedMethod(Unknown
> Source)
>
> org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:
> ...
> ---
> What's puzzling is that the form works in a dummy app but fails in the core
> (complex) app. This makes me believe that there is something else that is
> interfering with tapestry. I've also noticed that if I disable Javascript
> in
> the browser, the submission is  successful.
>
> It looks as if:
> String raw = request.getParameter(SUBMITTING_ELEMENT_ID);
>
> in Form.isCancelled() is returning a String in double quotes (in my case)
> but I can't figure out where this is created.
>
> Has anybody else seen this?
>
>
> Below is an excerpt:
>
> java class:
>
>  
>  void onSuccess() {
>
>   String uploadDir = context.getRealFile("/").getAbsolutePath() +
> "/resources";
>File dirPath = new File(uploadDir);
>
>if (!dirPath.exists()) {
>dirPath.mkdirs();
>}
>
>File copied = new File(uploadDir , file.getFileName());
>file.write(copied);
>
>   }
>
> tml:
>
> 
>  
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ...
>
>
> --
> Thanks,
>
> /Serge
>
>
> --
> View this message in context:
> http://tapestry-users.832.n2.nabble.com/5-3-JSONArray-Error-while-submitting-forms-tp7018161p7018161.html
> Sent from the Tapestry Users 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Show your Tapestry support!

2011-12-04 Thread Gunnar Eketrapp
I would love to upgrade to 5.3 and show my support but since user types
stopped working I am not able to do so.

But as soon as https://issues.apache.org/jira/browse/TAP5-1763 is resolved
I will of course praise this excellent release.
(Yesterday I added a minimal project that highlights the error ...)

Also great thanks to Howard for harassing me (with the condolence statement
to Maven users) into the direction of Gradle.
By by Maven ...

Tapestry made web hacking fun and Gradle made building and testing fun!

Gunnar Eketrapp


2011/12/4 Christian Riedel 

> congratulations... seems the announcement made it to #1 in dzone's top
> links!
> hope you're satisfied with that result ;-)
>
>
> Am 02.12.2011 um 01:16 schrieb Howard Lewis Ship:
>
> > On additional note ... there's several links along the left edge of
> > the page for voting up the announcement. Please do that as well!
> >
> > On Thu, Dec 1, 2011 at 2:21 PM, robert baker 
> wrote:
> >> For what it's worth, I registered and put in my $(1/50).  Thanks
> >> Howard for letting us know about the announcement.
> >>
> >> Les Baker
> >>
> >> On Thu, Dec 1, 2011 at 4:21 PM, Howard Lewis Ship 
> wrote:
> >>> Ok folks, time to strike while the iron's hot.  Major release
> >>> announcements are a great way to get people interested in Tapestry. I
> >>> can't tell you how many times I've met with people who have "heard
> >>> good things about Tapestry" but "don't know what it's all about".
> >>> Seeing an outpouring of support on a release announcement is one way
> >>> to tip the balance towards more people looking at Tapestry ... and
> >>> that's good for *everyone*. The more people using Tapestry, the easier
> >>> it is for me, and the other Tapestry committers, to continue extending
> >>> and improving the project.
> >>>
> >>> So, if all you've ever done with Tapestry is take it, and not give
> >>> back, then now's a very good time to start making a small
> >>> contribution: a one line posting about Tapestry to the JavaLobby
> >>> announcement!
> >>>
> >>> On Wed, Nov 30, 2011 at 5:13 PM, Howard Lewis Ship 
> wrote:
> >>>> First five comments are nice, but I'd like to see 50, or 500,
> comments!
> >>>>
> >>>> On Wed, Nov 30, 2011 at 8:30 AM, Howard Lewis Ship 
> wrote:
> >>>>> The Tapestry 5.3 announcement has hit JavaLobby:
> >>>>>
> >>>>> http://java.dzone.com/announcements/announcing-apache-tapestry-53
> >>>>>
> >>>>> Now is an excellent time to post a short comment showing your support
> >>>>> for Tapestry.  It's a small thing you can do that can make a big, big
> >>>>> difference in the long term.
> >>>>>
> >>>>> Please don't start any flamewars, or bash other frameworks, just say
> >>>>> (in your own words) "Tapestry lets me get great results".
> >>>>>
> >>>>> Thanks!
> >>>>>
> >>>>> --
> >>>>> 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
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> 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
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> 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
> >>>
> >>
> >> -
> >> 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
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Slow rendering of pagelinks !?

2011-12-04 Thread Gunnar Eketrapp
Hi!

I have an page which I would like to speed up and when looking into it I
found out the the tml section below adds ca 3000 msecs to request the page
for a page with 18 grid lines and an avarage of 3 bookings per line.

That gives ca 55 msecs per rendered page link.

Is this normal considered my specs. Se attached image.

If so I must redesign my page ... since 3 secs / 18 lines is not feasible.

Note: I am using T5.2.6 ...

Thanks in advance,
Gunnar Eketrapp


...


${booking.account.code}



...

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

Re: [jira] [Commented] (TAP5-1763) User types stopped working when upgrading to 5.3

2011-12-03 Thread Gunnar Eketrapp
Ok this morning I had some time to create a minimal project that reproduces
the issue.

Download and extract t53.rar and runt with *gradle jettyRun*
*
*
The test page is located at http://localhost:8080/t53/usertypes

Also see readme.txt

/Gunnar

P.S.
I tried to make a gradle task to easily switch between 5.3 and 5.2.6 but my
gradle experience is too low so I gave up after
my initial novice copy + filtering of build.gradle. (File is locked )
D.S.

2011/11/30 Igor Drobiazko (Commented) (JIRA) 

>
>[
> https://issues.apache.org/jira/browse/TAP5-1763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13160290#comment-13160290]
>
> Igor Drobiazko commented on TAP5-1763:
> --
>
> Can you please provide more details? Some source code.
>
> > User types stopped working when upgrading to 5.3
> > 
> >
> > Key: TAP5-1763
> > URL: https://issues.apache.org/jira/browse/TAP5-1763
> > Project: Tapestry 5
> >      Issue Type: Bug
> >Affects Versions: 5.3
> >Reporter: Gunnar Eketrapp
> >
> > This morning i decided to step up to 5.3.
> > I encountered a problem that at the first sight could not be seen among
> the breaking
> > changes listing in http://tapestry.apache.org/release-notes-53.html
> > A textfield that is using a none standard type raises an exception.
> > Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> Failure reading parameter 'translate' of component
> economy/EditTransaction:date: java.lang.NullPointerException
> >   at
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
> ~[tapestry-core-5.3.jar:na]
> >   ... 82 common frames omitted
> > Caused by: java.lang.NullPointerException: null
> >   at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> ~[na:1.6.0_22]
> >   at
> org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67)
> ~[tapestry-ioc-5.3.jar:na]
> >   at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
> >   at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
> >   at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93)
> ~[tapestry-core-5.3.jar:na]
> >   at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74)
> ~[tapestry-core-5.3.jar:na]
> > To get my user types to function in textfield's I have added the
> following in my module config class which worked in 5.2
> > public static void
> contributeTranslatorSource(MappedConfiguration, Translator>
> configuration) {
> > configuration.add(EmailAddress.class, new EmailTranslator());
> > configuration.add(Money.class, new MoneyTranslator());
> > configuration.add(Percentage.class, new PercentageTranslator());
> > configuration.add(UTDate.class, new UTDateTranslator());
> > }
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


User types stopped working when upgrading to 5.3

2011-11-30 Thread Gunnar Eketrapp
I'm just curious if anyone has looked into this.

Am I the only one that have encountered these problems and/or are using
user types in text fields.

I don't think so and I have probably missed something ...

I added this JIRA about the problem
https://issues.apache.org/jira/browse/TAP5-1763

I am eager to switch over to 5.3 but must sort this out first ...

Thanks in advance,
Gunnar


Re: Gave up on T5.3 for now ...

2011-11-29 Thread Gunnar Eketrapp
I tried to change this ..

   

... which disabled the field if user is present to something that set's
readonly when user is present but failed.

Closest to success where

   

public String getReadOnly() {
return getUser() != null ? "readonly" : "false";
}

But that failed due to a bug (in chrome !?) that sets readonly even if the
html is readonly="false".  w3schools states ...
*
*
*Note:* The readonly attribute is a boolean attribute, and can be set in
the following ways:

   - 
   - 
   - 


So on my wishlist (not very important due) is to make readonly into a T5
component parameter for textfield and passwordfield ...

I have solved this for now but not being dependent on that the form returns
my disabled field.

2011/11/27 Martin Strand 

> On Sun, 27 Nov 2011 22:46:18 +0100, Gunnar Eketrapp <
> gunnar.eketr...@gmail.com> wrote:
>
>  T5.3 looks promising and it felt quite faster.
>>
>> The two major concerns where
>>
>> 1) My user types didn't work in forms.
>> 2) Disabled field did not work in forms. (The value was not passed back)
>>
>> Of course I must have missed something obviously but I decided to
>> wait with T5.3 until these questions are sorted out.
>>
>
>
> 2) is standard behaviour - the browser is not supposed to submit values of
> disabled fields.
> Not sure how your page works, but perhaps you'd want to use "readonly"
> instead?
> http://reference.sitepoint.**com/html/input/readonly<http://reference.sitepoint.com/html/input/readonly>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Moving to T5.3 / Problem with textfield and translate ...

2011-11-28 Thread Gunnar Eketrapp
Hi Thiago!

I created JIRA issue  https://issues.apache.org/jira/browse/TAP5-1762 for
the missing component params.

/Gunnar

2011/11/28 Thiago H. de Paula Figueiredo 

> On Sun, 27 Nov 2011 14:26:49 -0200, Gunnar Eketrapp <
> gunnar.eketr...@gmail.com> wrote:
>
>  When looking at the 5.3 component reference for
>> textfield the component parameters are all gone ...
>>
>
> Yep, that's something that needs to be fixed. Documentation JIRA please? ;)
>
> --
> 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
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Gave up on T5.3 for now ...

2011-11-27 Thread Gunnar Eketrapp
Hi!

I encountered problems with my forms in T5.3 so I will wait with the
upgrade.

I'm in the phase of releasing my site and will do so with T5.2.6

T5.3 looks promising and it felt quite faster.

The two major concerns where

1) My user types didn't work in forms.
2) Disabled field did not work in forms. (The value was not passed back)

Of course I must have missed something obviously but I decided to
wait with T5.3 until these questions are sorted out.

Gunnar Eketrapp


Re: Moving to T5.3 / Problem with textfield and translate ...

2011-11-27 Thread Gunnar Eketrapp
When looking at the 5.3 component reference for
textfield the component parameters are all gone ...

2011/11/27 Gunnar Eketrapp 

> Has disabled been removed as component parameter to textfield ?
>
> 2011/11/27 Chris Poulsen 
>
>> It sounds like you are using the "disabled" attribute instead of the
>> "readonly" attribute - but it is hard to tell without seeing the code.
>>
>> Some random google result on the difference between the two:
>> http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html
>>
>> --
>> Chris
>>
>> On Sun, Nov 27, 2011 at 2:54 PM, Gunnar Eketrapp
>> wrote:
>>
>> > Hi!
>> >
>> > Now I also noticed that my contact form does not work with 5.3.
>> >
>> > It is a really simple page with a form containing an email textfield, a
>> > title textfield plus a message textarea.
>> >
>> > When a user is logged in I disable editing of the email textfield but
>> still
>> > uses the value when the mail is sent.
>> >
>> > With 5.3 I get no email value back ...
>> >
>> > Have I missed something completely with 5.3 and forms !?
>> >
>> > Thank in advance,
>> > Gunnar Eketrapp
>> >
>> >
>> > 2011/11/27 Gunnar Eketrapp 
>> >
>> > > Hi!
>> > >
>> > > This morning i decided to step up to 5.3.
>> > >
>> > > I noticed that 5.3 is stricter and some of my pages did not work due
>> to
>> > > the fact that
>> > > there where event methods with no corresponding template component.
>> So I
>> > > had to
>> > > do some cleanup but that I like ! I was also one of the few that had
>> used
>> > > @PageDetached :-)
>> > >
>> > > Now I encountered another problem that at the first sight could not be
>> > > seen among the breaking
>> > > changes listing in http://tapestry.apache.org/release-notes-53.html
>> > >
>> > > A textfield that is using a none standard type raises an exception.
>> > >
>> > > Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
>> > > Failure reading parameter 'translate' of component
>> > > economy/EditTransaction:date: java.lang.NullPointerException
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  ... 82 common frames omitted
>> > > Caused by: java.lang.NullPointerException: null
>> > >  at
>> > > java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
>> > > ~[na:1.6.0_22]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67)
>> > > ~[tapestry-ioc-5.3.jar:na]
>> > >  at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
>> > >  at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
>> > >  at
>> > >
>> >
>> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129)
>> > > ~[tapestry-core-5.3.jar:na]
>> > >  at
>> > >
>> >
>

Re: Moving to T5.3 / Problem with textfield and translate ...

2011-11-27 Thread Gunnar Eketrapp
Has disabled been removed as component parameter to textfield ?

2011/11/27 Chris Poulsen 

> It sounds like you are using the "disabled" attribute instead of the
> "readonly" attribute - but it is hard to tell without seeing the code.
>
> Some random google result on the difference between the two:
> http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html
>
> --
> Chris
>
> On Sun, Nov 27, 2011 at 2:54 PM, Gunnar Eketrapp
> wrote:
>
> > Hi!
> >
> > Now I also noticed that my contact form does not work with 5.3.
> >
> > It is a really simple page with a form containing an email textfield, a
> > title textfield plus a message textarea.
> >
> > When a user is logged in I disable editing of the email textfield but
> still
> > uses the value when the mail is sent.
> >
> > With 5.3 I get no email value back ...
> >
> > Have I missed something completely with 5.3 and forms !?
> >
> > Thank in advance,
> > Gunnar Eketrapp
> >
> >
> > 2011/11/27 Gunnar Eketrapp 
> >
> > > Hi!
> > >
> > > This morning i decided to step up to 5.3.
> > >
> > > I noticed that 5.3 is stricter and some of my pages did not work due to
> > > the fact that
> > > there where event methods with no corresponding template component. So
> I
> > > had to
> > > do some cleanup but that I like ! I was also one of the few that had
> used
> > > @PageDetached :-)
> > >
> > > Now I encountered another problem that at the first sight could not be
> > > seen among the breaking
> > > changes listing in http://tapestry.apache.org/release-notes-53.html
> > >
> > > A textfield that is using a none standard type raises an exception.
> > >
> > > Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> > > Failure reading parameter 'translate' of component
> > > economy/EditTransaction:date: java.lang.NullPointerException
> > >  at
> > >
> >
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
> > > ~[tapestry-core-5.3.jar:na]
> > >  ... 82 common frames omitted
> > > Caused by: java.lang.NullPointerException: null
> > >  at
> > > java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> > > ~[na:1.6.0_22]
> > >  at
> > >
> >
> org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67)
> > > ~[tapestry-ioc-5.3.jar:na]
> > >  at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
> > >  at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93)
> > > ~[tapestry-core-5.3.jar:na]
> > >  at
> > >
> >
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74)
> > > ~[tapestry-core-5.3.jar:na]
> > >
> > >
> > > To get my user types to function in textfield's I have added the
> > following
> > > in my module config class which worked in 5.2
> > >
> > > public static void
> > > contributeTranslatorSource(MappedConfiguration, Translator>
> > > configuration) {
> > > configuration.add(EmailAddress.class, new EmailTranslator());
> > > configuration.add(Money.class, new MoneyTranslator());
> > > configuration.add(Percentage.class, new
> PercentageTranslator());
> > > configuration.add(UTDate.class, new UTDateTranslator());
> > > }
> > >
> > > Thanks in advance!!!
> > > Gunnar Eketrapp
> > > (Note: Stockholm in november is as made for hacking ...)
> > >
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > Allévägen 2A, 132 42 Saltsjö-Boo
> >
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Moving to T5.3 / Problem with textfield and translate ...

2011-11-27 Thread Gunnar Eketrapp
Hi!

Now I also noticed that my contact form does not work with 5.3.

It is a really simple page with a form containing an email textfield, a
title textfield plus a message textarea.

When a user is logged in I disable editing of the email textfield but still
uses the value when the mail is sent.

With 5.3 I get no email value back ...

Have I missed something completely with 5.3 and forms !?

Thank in advance,
Gunnar Eketrapp


2011/11/27 Gunnar Eketrapp 

> Hi!
>
> This morning i decided to step up to 5.3.
>
> I noticed that 5.3 is stricter and some of my pages did not work due to
> the fact that
> there where event methods with no corresponding template component. So I
> had to
> do some cleanup but that I like ! I was also one of the few that had used
> @PageDetached :-)
>
> Now I encountered another problem that at the first sight could not be
> seen among the breaking
> changes listing in http://tapestry.apache.org/release-notes-53.html
>
> A textfield that is using a none standard type raises an exception.
>
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> Failure reading parameter 'translate' of component
> economy/EditTransaction:date: java.lang.NullPointerException
>  at
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
> ~[tapestry-core-5.3.jar:na]
>  ... 82 common frames omitted
> Caused by: java.lang.NullPointerException: null
>  at
> java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
> ~[na:1.6.0_22]
>  at
> org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67)
> ~[tapestry-ioc-5.3.jar:na]
>  at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
>  at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
>  at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93)
> ~[tapestry-core-5.3.jar:na]
>  at
> org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74)
> ~[tapestry-core-5.3.jar:na]
>
>
> To get my user types to function in textfield's I have added the following
> in my module config class which worked in 5.2
>
> public static void
> contributeTranslatorSource(MappedConfiguration, Translator>
> configuration) {
> configuration.add(EmailAddress.class, new EmailTranslator());
> configuration.add(Money.class, new MoneyTranslator());
> configuration.add(Percentage.class, new PercentageTranslator());
> configuration.add(UTDate.class, new UTDateTranslator());
> }
>
> Thanks in advance!!!
> Gunnar Eketrapp
> (Note: Stockholm in november is as made for hacking ...)
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Moving to T5.3 / Problem with textfield and translate ...

2011-11-27 Thread Gunnar Eketrapp
Hi!

This morning i decided to step up to 5.3.

I noticed that 5.3 is stricter and some of my pages did not work due to the
fact that
there where event methods with no corresponding template component. So I
had to
do some cleanup but that I like ! I was also one of the few that had used
@PageDetached :-)

Now I encountered another problem that at the first sight could not be seen
among the breaking
changes listing in http://tapestry.apache.org/release-notes-53.html

A textfield that is using a none standard type raises an exception.

Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
Failure reading parameter 'translate' of component
economy/EditTransaction:date: java.lang.NullPointerException
at
org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143)
~[tapestry-core-5.3.jar:na]
... 82 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
~[na:1.6.0_22]
at
org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67)
~[tapestry-ioc-5.3.jar:na]
at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na]
at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na]
at
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93)
~[tapestry-core-5.3.jar:na]
at
org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74)
~[tapestry-core-5.3.jar:na]


To get my user types to function in textfield's I have added the following
in my module config class which worked in 5.2

public static void
contributeTranslatorSource(MappedConfiguration, Translator>
configuration) {
configuration.add(EmailAddress.class, new EmailTranslator());
configuration.add(Money.class, new MoneyTranslator());
configuration.add(Percentage.class, new PercentageTranslator());
configuration.add(UTDate.class, new UTDateTranslator());
}

Thanks in advance!!!
Gunnar Eketrapp
(Note: Stockholm in november is as made for hacking ...)


Re: Gradle o Gradle!

2011-11-11 Thread Gunnar Eketrapp
>
> Hum what worked was RunJettyRun from within Eclipse.


Gradle test or gradle runJetty did not work.

But they do now after adding entity classes explicitley to persistence.xml

2011/11/12 Chris Mylonas 

> In glassfish?
>
>
> On 12/11/2011, at 4:26 AM, Gunnar Eketrapp wrote:
>
> > I'll answer this me myself.
> >
> > The problem was solved by adding the entity classes to persistence.xml
> >
> > I don't know why it works wiht Maven without having them there.
> >
> >
> > 2011/11/11 Gunnar Eketrapp 
> >
> >> Inspired by HLS condolences to us that are still using Maven I tried
> >> Gradle out yesterday.
> >>
> >> And  gosh that seem's like a big leap forward. Awesome product and I was
> >> almost there in less then an hour!
> >>
> >> One small step in the other direction was that the scanning of my entity
> >> beans totally disappeared.
> >>
> >> I have filed a question in the Gradle forum ...
> >>
> >>
> >>
> http://forums.gradle.org/gradle/topics/context_component_scan_stopped_working_after_move_to_gradle
> >>
> >> Has anyone in this forum encountered something alike !?
> >>
> >> Thanks in advance and excuse me for asking Gradle related quest in this
> >> forum.
> >>
> >> /Gunnar
> >>
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> > Allévägen 2A, 132 42 Saltsjö-Boo
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Gradle o Gradle!

2011-11-11 Thread Gunnar Eketrapp
I'll answer this me myself.

The problem was solved by adding the entity classes to persistence.xml

I don't know why it works wiht Maven without having them there.


2011/11/11 Gunnar Eketrapp 

> Inspired by HLS condolences to us that are still using Maven I tried
> Gradle out yesterday.
>
> And  gosh that seem's like a big leap forward. Awesome product and I was
> almost there in less then an hour!
>
> One small step in the other direction was that the scanning of my entity
> beans totally disappeared.
>
> I have filed a question in the Gradle forum ...
>
>
> http://forums.gradle.org/gradle/topics/context_component_scan_stopped_working_after_move_to_gradle
>
> Has anyone in this forum encountered something alike !?
>
> Thanks in advance and excuse me for asking Gradle related quest in this
> forum.
>
> /Gunnar
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Gradle o Gradle!

2011-11-10 Thread Gunnar Eketrapp
Inspired by HLS condolences to us that are still using Maven I tried Gradle
out yesterday.

And  gosh that seem's like a big leap forward. Awesome product and I was
almost there in less then an hour!

One small step in the other direction was that the scanning of my entity
beans totally disappeared.

I have filed a question in the Gradle forum ...

http://forums.gradle.org/gradle/topics/context_component_scan_stopped_working_after_move_to_gradle

Has anyone in this forum encountered something alike !?

Thanks in advance and excuse me for asking Gradle related quest in this
forum.

/Gunnar


Re: URL handling ..

2011-11-07 Thread Gunnar Eketrapp
Thank's Kalle for the advice!  Now I know what has to be done!

I wonder how long the wonderful atmosphere in this list will continue.

I hope forever ...


2011/11/7 Kalle Korhonen 

> On Sun, Nov 6, 2011 at 10:26 PM, Gunnar Eketrapp
>  wrote:
> > Now I am phasing another problem and that is that T5 seems to encode
> > context string in a way that they are not displayed properly in the the
> > browser.
> > I.e. if I URL encode the swedish word Räksmörgås (=Shrimp sandwich) i
> > get *r%C3%A4ksm%C3%B6rg%C3%A5s
> > *which shows up correct in browser url.
> > But if I add it as a context param T5 encodes it as
> *r$00e4ksm$00f6rg$00e5s
> > *which is shown as that in the browser.
> > I figure T5 has to do this but is there an easy way to get around this so
> > that swedish words shows up nicely in the browser !?
>
> There's not been a T5 project where I haven't needed to override
> URLEncoder service. Take a look at T5's URLEncoderImpl, override it
> with your version and mark whichever characters you prefer as safe
> (i.e. not encoded).
>
> Kalle
>
>
> > 2011/11/6 Gunnar Eketrapp 
> >
> >> I digged into this yesterday and created a transfomer for my url's.
> >>
> >> I managed to transform pages to swedish names with the group name up
> front.
> >> Pretty pretty ...
> >>
> >> Today I encountered a problem whit action methods that return Link's
> with
> >> swedish characters in them.
> >> It seems like the åäö get's screwed up when the request  makes it to the
> >> browser and back.
> >>
> >> See  this log extract that shows the Link as returned from the
> >> onActionFromEdit method as well as the logged request that it leads to.
> >>
> >> *2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
> >> onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
> >> *2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger -
> Request:
> >> /VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0
> >> (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko)
> Chrome/15.0.874.106
> >> Safari/535.2, isXHR=false)*
> >> *
> >> *
> >> Due to this my transformer fails to decode the incoming request.
> >>
> >> Surely I have missed something ...
> >> Thanks in advance!
> >>
> >> ...
> >>
> >> @Log
> >> Object onActionFromEdit() {
> >> return
> >> linkRenderer.createPageRenderLinkWithContext("wiki/edit", groupId,
> >> pageName) ;
> >> }
> >>
> >> 
> >>
> >>
> >> 2011/11/4 Gunnar Eketrapp 
> >>
> >>> Ok thx for the tip!
> >>>
> >>>
> >>> 2011/11/4 Alejandro Scandroli 
> >>>
> >>>> Hi Gunnar
> >>>>
> >>>> You can also take a look at how tapestry-rounting is implemented.
> >>>> http://tynamo.org/tapestry-routing+guide
> >>>> http://svn.codehaus.org/tynamo/trunk/tapestry-routing/
> >>>>
> >>>> It may not be exactly what you need and may not have a good
> >>>> performance in a site with lots of pages, but I think it can give you
> >>>> a good idea of what you need to do in order to achieve what you need.
> >>>>
> >>>> Cheers.
> >>>> Alejandro.
> >>>>
> >>>> On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
> >>>>  wrote:
> >>>> > On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
> >>>> >  wrote:
> >>>> >
> >>>> >> Can page name can be localized in an easy way !?  I would rather
> not
> >>>> give
> >>>> >> swedish names to my page classes unless I have to.
> >>>> >> Is it possible to freely name a page. E.g. so that it separates
> words
> >>>> with
> >>>> >> dashes, e.g. "my-profile"
> >>>> >> And finally if it is possible to name a page different from the
> class
> >>>> name
> >>>> >> should I go for Sweidsh chars in url's or should I not !?
> >>>> >> I think wikipedia is using local char's in their url's ... so
> perhaps
> >>>> that
> >>>> >> is the answer!?
> >>>> >
> >>>> > You can do almost whatever you want w

Re: URL handling ..

2011-11-06 Thread Gunnar Eketrapp
Hi!

I will answer this myself for someone else that encounters the same problem
(=equal stupid).

The problem was that my LinkTransformer had to encode the swedish page
names in the path passes to LinkImpl.

I did this in this way (slashes shall not be encoded!)

private String urlEncodedPath(String path) {
StringBuilder b = new StringBuilder();
for (String s : path.split("/")) {
if (b.length() > 0)
b.append("/");
b.append(URLEncoder.encode(s, "UTF-8"));
}
return b.toString();
}

Now I am phasing another problem and that is that T5 seems to encode
context string in a way that they are not displayed properly in the the
browser.

I.e. if I URL encode the swedish word Räksmörgås (=Shrimp sandwich) i
get *r%C3%A4ksm%C3%B6rg%C3%A5s
*which shows up correct in browser url.

But if I add it as a context param T5 encodes it as *r$00e4ksm$00f6rg$00e5s
*which is shown as that in the browser.

I figure T5 has to do this but is there an easy way to get around this so
that swedish words shows up nicely in the browser !?

Thanks in advance!


2011/11/6 Gunnar Eketrapp 

> I digged into this yesterday and created a transfomer for my url's.
>
> I managed to transform pages to swedish names with the group name up front.
> Pretty pretty ...
>
> Today I encountered a problem whit action methods that return Link's with
> swedish characters in them.
> It seems like the åäö get's screwed up when the request  makes it to the
> browser and back.
>
> See  this log extract that shows the Link as returned from the
> onActionFromEdit method as well as the logged request that it leads to.
>
> *2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
> onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
> *2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger - Request:
> /VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0
> (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106
> Safari/535.2, isXHR=false)*
> *
> *
> Due to this my transformer fails to decode the incoming request.
>
> Surely I have missed something ...
> Thanks in advance!
>
> ...
>
> @Log
> Object onActionFromEdit() {
>     return
> linkRenderer.createPageRenderLinkWithContext("wiki/edit", groupId,
> pageName) ;
> }
>
> 
>
>
> 2011/11/4 Gunnar Eketrapp 
>
>> Ok thx for the tip!
>>
>>
>> 2011/11/4 Alejandro Scandroli 
>>
>>> Hi Gunnar
>>>
>>> You can also take a look at how tapestry-rounting is implemented.
>>> http://tynamo.org/tapestry-routing+guide
>>> http://svn.codehaus.org/tynamo/trunk/tapestry-routing/
>>>
>>> It may not be exactly what you need and may not have a good
>>> performance in a site with lots of pages, but I think it can give you
>>> a good idea of what you need to do in order to achieve what you need.
>>>
>>> Cheers.
>>> Alejandro.
>>>
>>> On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
>>>  wrote:
>>> > On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
>>> >  wrote:
>>> >
>>> >> Can page name can be localized in an easy way !?  I would rather not
>>> give
>>> >> swedish names to my page classes unless I have to.
>>> >> Is it possible to freely name a page. E.g. so that it separates words
>>> with
>>> >> dashes, e.g. "my-profile"
>>> >> And finally if it is possible to name a page different from the class
>>> name
>>> >> should I go for Sweidsh chars in url's or should I not !?
>>> >> I think wikipedia is using local char's in their url's ... so perhaps
>>> that
>>> >> is the answer!?
>>> >
>>> > You can do almost whatever you want with URLs: you just need to
>>> implement
>>> > the logic for mapping incoming URLs to page classes and activation
>>> context
>>> > (if any) and the reverse (pages and activation context to rewritten
>>> URLs).
>>> >
>>> > --
>>> > 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
>>>
>>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-06 Thread Gunnar Eketrapp
I digged into this yesterday and created a transfomer for my url's.

I managed to transform pages to swedish names with the group name up front.
Pretty pretty ...

Today I encountered a problem whit action methods that return Link's with
swedish characters in them.
It seems like the åäö get's screwed up when the request  makes it to the
browser and back.

See  this log extract that shows the Link as returned from the
onActionFromEdit method as well as the logged request that it leads to.

*2011-11-06 12:30:45.700 DEBUG utskicket.pages.wiki.WikiView - [ EXIT]
onActionFromEdit [/VillaSkurusundet/wiki/ändra/start]*
*2011-11-06 12:30:45.704 DEBUG u.s.UtskicketModule.RequestLogger - Request:
/VillaSkurusundet/wiki/?dra/start (Method=GET, browser=Mozilla/5.0 (Windows
NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106
Safari/535.2, isXHR=false)*
*
*
Due to this my transformer fails to decode the incoming request.

Surely I have missed something ...
Thanks in advance!

...

@Log
Object onActionFromEdit() {
return
linkRenderer.createPageRenderLinkWithContext("wiki/edit", groupId,
pageName) ;
    }

    


2011/11/4 Gunnar Eketrapp 

> Ok thx for the tip!
>
>
> 2011/11/4 Alejandro Scandroli 
>
>> Hi Gunnar
>>
>> You can also take a look at how tapestry-rounting is implemented.
>> http://tynamo.org/tapestry-routing+guide
>> http://svn.codehaus.org/tynamo/trunk/tapestry-routing/
>>
>> It may not be exactly what you need and may not have a good
>> performance in a site with lots of pages, but I think it can give you
>> a good idea of what you need to do in order to achieve what you need.
>>
>> Cheers.
>> Alejandro.
>>
>> On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
>>  wrote:
>> > On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
>> >  wrote:
>> >
>> >> Can page name can be localized in an easy way !?  I would rather not
>> give
>> >> swedish names to my page classes unless I have to.
>> >> Is it possible to freely name a page. E.g. so that it separates words
>> with
>> >> dashes, e.g. "my-profile"
>> >> And finally if it is possible to name a page different from the class
>> name
>> >> should I go for Sweidsh chars in url's or should I not !?
>> >> I think wikipedia is using local char's in their url's ... so perhaps
>> that
>> >> is the answer!?
>> >
>> > You can do almost whatever you want with URLs: you just need to
>> implement
>> > the logic for mapping incoming URLs to page classes and activation
>> context
>> > (if any) and the reverse (pages and activation context to rewritten
>> URLs).
>> >
>> > --
>> > 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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-04 Thread Gunnar Eketrapp
Ok thx for the tip!

2011/11/4 Alejandro Scandroli 

> Hi Gunnar
>
> You can also take a look at how tapestry-rounting is implemented.
> http://tynamo.org/tapestry-routing+guide
> http://svn.codehaus.org/tynamo/trunk/tapestry-routing/
>
> It may not be exactly what you need and may not have a good
> performance in a site with lots of pages, but I think it can give you
> a good idea of what you need to do in order to achieve what you need.
>
> Cheers.
> Alejandro.
>
> On Thu, Nov 3, 2011 at 1:35 PM, Thiago H. de Paula Figueiredo
>  wrote:
> > On Thu, 03 Nov 2011 10:16:40 -0200, Gunnar Eketrapp
> >  wrote:
> >
> >> Can page name can be localized in an easy way !?  I would rather not
> give
> >> swedish names to my page classes unless I have to.
> >> Is it possible to freely name a page. E.g. so that it separates words
> with
> >> dashes, e.g. "my-profile"
> >> And finally if it is possible to name a page different from the class
> name
> >> should I go for Sweidsh chars in url's or should I not !?
> >> I think wikipedia is using local char's in their url's ... so perhaps
> that
> >> is the answer!?
> >
> > You can do almost whatever you want with URLs: you just need to implement
> > the logic for mapping incoming URLs to page classes and activation
> context
> > (if any) and the reverse (pages and activation context to rewritten
> URLs).
> >
> > --
> > 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: URL handling ..

2011-11-03 Thread Gunnar Eketrapp
OK thanks to both of you!

Some more questions !

Can page name can be localized in an easy way !?  I would rather not give
swedish names to my page classes unless I have to.

Is it possible to freely name a page. E.g. so that it separates words with
dashes, e.g. "my-profile"

And finally if it is possible to name a page different from the class name
should I go for Sweidsh chars in url's or should I not !?
I think wikipedia is using local char's in their url's ... so perhaps that
is the answer!?

Thanks in advance to all of you!
/Gunnar Eketrapp



2011/11/3 Emmanuel DEMEY 

> Hi,
>
> If you need more informations about LinkTransformer, this post is very
> helpful :
> http://blog.tapestry5.de/index.php/2010/09/06/new-url-rewriting-api/
>
> Emmanuel
>
> 2011/11/2 Thiago H. de Paula Figueiredo 
>
> > On Wed, 02 Nov 2011 16:53:37 -0200, Gunnar Eketrapp <
> > gunnar.eketr...@gmail.com> wrote:
> >
> >  Hi !
> >>
> >
> > Hi!
> >
> >  *https://utskicket.se/GroupA/**economy/accounting/2011*<
> https://utskicket.se/GroupA/economy/accounting/2011*>
> >> and not
> >> *https://utskicket.se/economy/**accounting/GroupA/2011*<
> https://utskicket.se/economy/accounting/GroupA/2011*>
> >> I just found the LinkTransforner interfaces and I guess that's the way
> to
> >> go.
> >>
> >
> > Yep!
> >
> >
> >  Is there any hidden lurks or should this be easy.
> >>
> >
> > The API use itself should be easy, but sometimes the URL transformation
> > logic itself you'll write is the hard part. You need to correctly
> identify
> > URLs that should be rewritten then rewrite the correctly.
> >
> > --
> > 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-unsubscribe@tapestry.**apache.org<
> users-unsubscr...@tapestry.apache.org>
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> Emmanuel DEMEY
> Ingénieur Etude et Développement
> ATOS Worldline
> +33 (0)6 47 47 42 02
> demey.emman...@gmail.com
> http://emmanueldemey.fr
>
> Twitter : @gillespie59
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


URL handling ..

2011-11-02 Thread Gunnar Eketrapp
Hi !

I have a T5 site that is about to be launched with lots of pages.

The site will help various associations up here in Sweden with their
administration. (Members register, Billing, Economy, Agendas, Protocol,
Wiki, bla, bla)

The domain name will be *utskicket.se*

Now to my question. For a page economy/accounting and customer like
"GroupA" and accounting year 2011

I would like the URL's to be like

*https://utskicket.se/GroupA/economy/accounting/2011*

and not

*https://utskicket.se/economy/accounting/GroupA/2011*


I.e. the first part of the path should denote the group and not a page or
page directory.

I just found the LinkTransforner interfaces and I guess that's the way to
go.

Is there any hidden lurks or should this be easy. I have quite a big site
with lots of components and ajax requests and if this is a no brainer I
will wait until upcoming releases.

It would however be nice if it could be so from the start.

Thanks in advance,
Gunnar Eketrapp


Grid++

2011-09-06 Thread Gunnar Eketrapp
Hi!

I will soon release a site built with T5 which will help small
organisiations (we have a lot of those up here) in Sweden to manager their
members and economy.
See http://utskicket.se in a near future ...

Anyway while developing this site I have been using fogbugz to manage
requirements and bugs and now to the question.

I have been "drowling" over the table component that fogcreek uses in their
tables. It is really advanced with a lot of slick features.

Do anyone know if there is a T5 add-on-component that comes near to what
Spolsky and his team has achieved!

It would be juice for my next major release ...

I guess not so then I have to build one one my own ... which is of course
much more fun .. or is it!?

Thanks in advance ...
Gunnar Eketrapp


Re: Eid Mubarak

2011-09-06 Thread Gunnar Eketrapp
As long as you dont go after us other in a Jihad way it's ok by me ... but
pehaps this forum has other points to discuss. :-)

2011/9/6 George Banus 

> And since the majority of us Tapestry developers/users are Muslims, maybe
> we should form a cult and call it:
> *
> Tapeslims*
>
> What about that? :-)
>
> George
>
>
> On Mon, Sep 5, 2011 at 8:23 PM, Muhammad Gelbana wrote:
>
>> I just came from my vacation yesterday and saw this mail just now. It's
>> nice from you to such this mail :)
>>
>> Eid Mubarak :)[?]
>>
>>
>> On Wed, Aug 31, 2011 at 9:59 AM, nillehammer <
>> tapestry.nilleham...@winfonet.eu> wrote:
>>
>>> And bon appetit ;-))
>>>
>>> -
>>> http://www.winfonet.eu
>>> --
>>> View this message in context:
>>> http://tapestry.1045711.n5.nabble.com/Eid-Mubarak-tp4752847p4753283.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
>>>
>>>
>>
>>
>> --
>> *Regards,*
>> *Muhammad Gelbana
>> Java Developer*
>>
>>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: May Tapestry go wrong ...

2011-09-03 Thread Gunnar Eketrapp
Yea for sure that was exactly the problem.

I changed closed to a closedDate and isClosed to

@Transient
public boolean isClosed() {
return closedDate != null;
}

so now I also now when the ledger was closed.

Thank you for "bearing with me" ...

2011/9/3 Steve Eynon 

> Yeah, autoboxing is evil - it's just a compiler convenience thing. If you
> have:
>
> Boolean closed = null;
>
> boolean isClosed() {
>return closed;
> }
>
> The compiler transforms it to
>
> boolean isClosed() {
>return closed.booleanValue();
> }
>
> which of course throws an NPE.
>
> Steve.
> --
> Steve Eynon
>
>
> On 3 September 2011 16:04, Gunnar Eketrapp 
> wrote:
> > Tapestry may not go wrong!
> >
> > It must has to do with autoboxing in method isClosed() in Ledger.
> >
> > I was fooled by the debugger and that ledger was shown as null but when
> > adding log statements I can see that it isn't.
> >
> > So I have to read a little bit about aoutoboxing but for sure it was NOT
> a
> > T5 problem!
> >
> > The call ledger.isClosed() raises a nul pointer but ledgers is not null!
> >
> > Sorry for disturbing all of you.
> >
> >
> > 2011/9/3 Gunnar Eketrapp 
> >
> >> BUT it is also a T5 property so that could be T5 related.
> >>
> >> The instance seems to created but the T5 property ledger is null after
> the
> >> assignment.
> >>
> >>
> >> 2011/9/3 Gunnar Eketrapp 
> >>
> >>> Hum .. sorry .. too early in the morning for me .. Ledger is a
> hibernate
> >>> entity class and T5 should not be involved.
> >>>
> >>> I'll be right back ...
> >>>
> >>>
> >>> 2011/9/3 Gunnar Eketrapp 
> >>>
> >>>> Hi !
> >>>>
> >>>> I have been happily hacking web sites with T5 for a year and half now
> and
> >>>> is more then pleased!
> >>>> Kudos to all of you for this excellent web framework that makes coding
> >>>> fun again.
> >>>>
> >>>> And I have never ever encountered any defect in the T5 code.
> >>>>
> >>>> Now to my problem.
> >>>>
> >>>> I just got an error in an onActivate method that looked like it could
> not
> >>>> happen.
> >>>>
> >>>> When steeping through it in my debugger I really get puzzled.
> >>>>
> >>>> A variable assigned inside a block is null after leaving the block.
> >>>>
> >>>> It must have something to do with the "plastering" of my code. Or !?
> >>>>
> >>>> The error I get is ..
> >>>>
> >>>> Caused by: java.lang.NullPointerException
> >>>>at
> >>>>
> utskicket.pages.economy.EditYear._$advised$onActivate_13(EditYear.java:91)
> >>>>
> >>>> ... and in the debugger I can see that ledger is null at line 91.
> >>>>
> >>>> In the code below I have commented what happens in the debugger.
> >>>>
> >>>> Can anyone understand what could cause this error ...
> >>>> I have stepped through the generated code without seeing anything
> >>>> strange. It all looks great but when returning ledger is null.
> >>>>
> >>>> Do I break any rule / convention with my code !?
> >>>>
> >>>> Many many thanks in  advance,
> >>>> Gunnar Eketrapp, Stockholm, Sweden
> >>>>
> >>>> Environment:
> >>>> *jdk 1.6.0_22*
> >>>> *t5.2.6*
> >>>> *windows 7 proffesional, 32-bit*
> >>>>
> >>>>
> >>>> @Property
> >>>> private Ledger ledger;
> >>>>
> >>>> @Property
> >>>> private String notice;
> >>>>
> >>>> //
> >>>>
> --
> >>>> // -- Tapestry event methods - Tapestry event methods - Tapestry
> >>>> event methods --
> >>>> //
> >>>>
> --
> >>>>
> >>>> @Log
> >>>> Object onActivate(long groupId, long ledgerId) {
> >>>>
> >>>> group = groupD

Re: May Tapestry go wrong ...

2011-09-03 Thread Gunnar Eketrapp
Tapestry may not go wrong!

It must has to do with autoboxing in method isClosed() in Ledger.

I was fooled by the debugger and that ledger was shown as null but when
adding log statements I can see that it isn't.

So I have to read a little bit about aoutoboxing but for sure it was NOT a
T5 problem!

The call ledger.isClosed() raises a nul pointer but ledgers is not null!

Sorry for disturbing all of you.


2011/9/3 Gunnar Eketrapp 

> BUT it is also a T5 property so that could be T5 related.
>
> The instance seems to created but the T5 property ledger is null after the
> assignment.
>
>
> 2011/9/3 Gunnar Eketrapp 
>
>> Hum .. sorry .. too early in the morning for me .. Ledger is a hibernate
>> entity class and T5 should not be involved.
>>
>> I'll be right back ...
>>
>>
>> 2011/9/3 Gunnar Eketrapp 
>>
>>> Hi !
>>>
>>> I have been happily hacking web sites with T5 for a year and half now and
>>> is more then pleased!
>>> Kudos to all of you for this excellent web framework that makes coding
>>> fun again.
>>>
>>> And I have never ever encountered any defect in the T5 code.
>>>
>>> Now to my problem.
>>>
>>> I just got an error in an onActivate method that looked like it could not
>>> happen.
>>>
>>> When steeping through it in my debugger I really get puzzled.
>>>
>>> A variable assigned inside a block is null after leaving the block.
>>>
>>> It must have something to do with the "plastering" of my code. Or !?
>>>
>>> The error I get is ..
>>>
>>> Caused by: java.lang.NullPointerException
>>>at
>>> utskicket.pages.economy.EditYear._$advised$onActivate_13(EditYear.java:91)
>>>
>>> ... and in the debugger I can see that ledger is null at line 91.
>>>
>>> In the code below I have commented what happens in the debugger.
>>>
>>> Can anyone understand what could cause this error ...
>>> I have stepped through the generated code without seeing anything
>>> strange. It all looks great but when returning ledger is null.
>>>
>>> Do I break any rule / convention with my code !?
>>>
>>> Many many thanks in  advance,
>>> Gunnar Eketrapp, Stockholm, Sweden
>>>
>>> Environment:
>>> *jdk 1.6.0_22*
>>> *t5.2.6*
>>> *windows 7 proffesional, 32-bit*
>>>
>>>
>>> @Property
>>> private Ledger ledger;
>>>
>>> @Property
>>> private String notice;
>>>
>>> //
>>> --
>>> // -- Tapestry event methods - Tapestry event methods - Tapestry
>>> event methods --
>>> //
>>> --
>>>
>>> @Log
>>> Object onActivate(long groupId, long ledgerId) {
>>>
>>> group = groupDAO.findById(groupId);
>>> if (group == null)
>>> return Index.class;
>>>
>>> if (ledgerId != 0) {
>>> ledger = ledgerDAO.findById(ledgerId);
>>> if (ledger == null)
>>> return Index.class;
>>> if (!same(group.getId(), ledger.getGroup().getId()))
>>> return Index.class;
>>>
>>> hasPrevious = (null != ledgerDAO.findPrevious(ledger));
>>> hasNext = (null != ledgerDAO.findNext(ledger));
>>> transactionCount = transactionDAO.countTransactions(ledger);
>>>
>>> } else  {
>>> ledger = new Ledger(); * // 1: This one returns null !!!*
>>> Ledger lastLedger = ledgerDAO.findLast(group);
>>> if (null == lastLedger) {
>>> UTDate today = new UTDate();
>>> ledger.setStartDate(new UTDate(today.getYear(), 1, 1));
>>> *// 2: This line ends the block!*
>>> ledger.setEndDate(new UTDate(today.getYear(), 12, 31));
>>> } else {
>>>
>>> ledger.setStartDate(lastLedger.getStartDate().warpYears(1));
>>> ledger.setEndDate(lastLedger.getEndDate().warpYears(1));
>>> }
>>> }
>>>
>>> *if (ledger.getClosed())  // 3: And here we crash!*
>>> notice = "Året är stängt och kan inte ändras";
>>> else {
>>> if (!mayEdit())
>>> notice = "Endast det senaste året kan ändras.";
>>> else if (!mayEditStarts())
>>> notice = "Startdagen kan inte ändras då det finns
>>> tidigare år.";
>>> }
>>>
>>>return null;
>>> }
>>>
>>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: May Tapestry go wrong ...

2011-09-03 Thread Gunnar Eketrapp
BUT it is also a T5 property so that could be T5 related.

The instance seems to created but the T5 property ledger is null after the
assignment.

2011/9/3 Gunnar Eketrapp 

> Hum .. sorry .. too early in the morning for me .. Ledger is a hibernate
> entity class and T5 should not be involved.
>
> I'll be right back ...
>
>
> 2011/9/3 Gunnar Eketrapp 
>
>> Hi !
>>
>> I have been happily hacking web sites with T5 for a year and half now and
>> is more then pleased!
>> Kudos to all of you for this excellent web framework that makes coding fun
>> again.
>>
>> And I have never ever encountered any defect in the T5 code.
>>
>> Now to my problem.
>>
>> I just got an error in an onActivate method that looked like it could not
>> happen.
>>
>> When steeping through it in my debugger I really get puzzled.
>>
>> A variable assigned inside a block is null after leaving the block.
>>
>> It must have something to do with the "plastering" of my code. Or !?
>>
>> The error I get is ..
>>
>> Caused by: java.lang.NullPointerException
>>at
>> utskicket.pages.economy.EditYear._$advised$onActivate_13(EditYear.java:91)
>>
>> ... and in the debugger I can see that ledger is null at line 91.
>>
>> In the code below I have commented what happens in the debugger.
>>
>> Can anyone understand what could cause this error ...
>> I have stepped through the generated code without seeing anything strange.
>> It all looks great but when returning ledger is null.
>>
>> Do I break any rule / convention with my code !?
>>
>> Many many thanks in  advance,
>> Gunnar Eketrapp, Stockholm, Sweden
>>
>> Environment:
>> *jdk 1.6.0_22*
>> *t5.2.6*
>> *windows 7 proffesional, 32-bit*
>>
>>
>> @Property
>> private Ledger ledger;
>>
>> @Property
>> private String notice;
>>
>> //
>> --
>> // -- Tapestry event methods - Tapestry event methods - Tapestry event
>> methods --
>> //
>> --
>>
>> @Log
>> Object onActivate(long groupId, long ledgerId) {
>>
>> group = groupDAO.findById(groupId);
>> if (group == null)
>> return Index.class;
>>
>> if (ledgerId != 0) {
>> ledger = ledgerDAO.findById(ledgerId);
>> if (ledger == null)
>> return Index.class;
>> if (!same(group.getId(), ledger.getGroup().getId()))
>> return Index.class;
>>
>> hasPrevious = (null != ledgerDAO.findPrevious(ledger));
>> hasNext = (null != ledgerDAO.findNext(ledger));
>> transactionCount = transactionDAO.countTransactions(ledger);
>>
>> } else  {
>> ledger = new Ledger(); * // 1: This one returns null !!!*
>> Ledger lastLedger = ledgerDAO.findLast(group);
>> if (null == lastLedger) {
>> UTDate today = new UTDate();
>> ledger.setStartDate(new UTDate(today.getYear(), 1, 1));
>> *// 2: This line ends the block!*
>> ledger.setEndDate(new UTDate(today.getYear(), 12, 31));
>> } else {
>>
>> ledger.setStartDate(lastLedger.getStartDate().warpYears(1));
>> ledger.setEndDate(lastLedger.getEndDate().warpYears(1));
>> }
>> }
>>
>> *if (ledger.getClosed())  // 3: And here we crash!*
>> notice = "Året är stängt och kan inte ändras";
>> else {
>> if (!mayEdit())
>> notice = "Endast det senaste året kan ändras.";
>> else if (!mayEditStarts())
>> notice = "Startdagen kan inte ändras då det finns tidigare
>> år.";
>> }
>>
>>return null;
>> }
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: May Tapestry go wrong ...

2011-09-03 Thread Gunnar Eketrapp
Hum .. sorry .. too early in the morning for me .. Ledger is a hibernate
entity class and T5 should not be involved.

I'll be right back ...

2011/9/3 Gunnar Eketrapp 

> Hi !
>
> I have been happily hacking web sites with T5 for a year and half now and
> is more then pleased!
> Kudos to all of you for this excellent web framework that makes coding fun
> again.
>
> And I have never ever encountered any defect in the T5 code.
>
> Now to my problem.
>
> I just got an error in an onActivate method that looked like it could not
> happen.
>
> When steeping through it in my debugger I really get puzzled.
>
> A variable assigned inside a block is null after leaving the block.
>
> It must have something to do with the "plastering" of my code. Or !?
>
> The error I get is ..
>
> Caused by: java.lang.NullPointerException
>at
> utskicket.pages.economy.EditYear._$advised$onActivate_13(EditYear.java:91)
>
> ... and in the debugger I can see that ledger is null at line 91.
>
> In the code below I have commented what happens in the debugger.
>
> Can anyone understand what could cause this error ...
> I have stepped through the generated code without seeing anything strange.
> It all looks great but when returning ledger is null.
>
> Do I break any rule / convention with my code !?
>
> Many many thanks in  advance,
> Gunnar Eketrapp, Stockholm, Sweden
>
> Environment:
> *jdk 1.6.0_22*
> *t5.2.6*
> *windows 7 proffesional, 32-bit*
>
>
> @Property
> private Ledger ledger;
>
> @Property
> private String notice;
>
> //
> --
> // -- Tapestry event methods - Tapestry event methods - Tapestry event
> methods --
> //
> --
>
> @Log
> Object onActivate(long groupId, long ledgerId) {
>
> group = groupDAO.findById(groupId);
> if (group == null)
> return Index.class;
>
> if (ledgerId != 0) {
> ledger = ledgerDAO.findById(ledgerId);
> if (ledger == null)
> return Index.class;
> if (!same(group.getId(), ledger.getGroup().getId()))
> return Index.class;
>
> hasPrevious = (null != ledgerDAO.findPrevious(ledger));
> hasNext = (null != ledgerDAO.findNext(ledger));
> transactionCount = transactionDAO.countTransactions(ledger);
>
> } else  {
> ledger = new Ledger(); * // 1: This one returns null !!!*
> Ledger lastLedger = ledgerDAO.findLast(group);
> if (null == lastLedger) {
> UTDate today = new UTDate();
> ledger.setStartDate(new UTDate(today.getYear(), 1, 1));  *//
> 2: This line ends the block!*
> ledger.setEndDate(new UTDate(today.getYear(), 12, 31));
> } else {
>
> ledger.setStartDate(lastLedger.getStartDate().warpYears(1));
> ledger.setEndDate(lastLedger.getEndDate().warpYears(1));
> }
> }
>
> *if (ledger.getClosed())  // 3: And here we crash!*
> notice = "Året är stängt och kan inte ändras";
> else {
> if (!mayEdit())
> notice = "Endast det senaste året kan ändras.";
> else if (!mayEditStarts())
> notice = "Startdagen kan inte ändras då det finns tidigare
> år.";
> }
>
>return null;
> }
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


May Tapestry go wrong ...

2011-09-03 Thread Gunnar Eketrapp
Hi !

I have been happily hacking web sites with T5 for a year and half now and is
more then pleased!
Kudos to all of you for this excellent web framework that makes coding fun
again.

And I have never ever encountered any defect in the T5 code.

Now to my problem.

I just got an error in an onActivate method that looked like it could not
happen.

When steeping through it in my debugger I really get puzzled.

A variable assigned inside a block is null after leaving the block.

It must have something to do with the "plastering" of my code. Or !?

The error I get is ..

Caused by: java.lang.NullPointerException
   at
utskicket.pages.economy.EditYear._$advised$onActivate_13(EditYear.java:91)

... and in the debugger I can see that ledger is null at line 91.

In the code below I have commented what happens in the debugger.

Can anyone understand what could cause this error ...
I have stepped through the generated code without seeing anything strange.
It all looks great but when returning ledger is null.

Do I break any rule / convention with my code !?

Many many thanks in  advance,
Gunnar Eketrapp, Stockholm, Sweden

Environment:
*jdk 1.6.0_22*
*t5.2.6*
*windows 7 proffesional, 32-bit*


@Property
private Ledger ledger;

@Property
private String notice;

//
--
// -- Tapestry event methods - Tapestry event methods - Tapestry event
methods --
//
--

@Log
Object onActivate(long groupId, long ledgerId) {

group = groupDAO.findById(groupId);
if (group == null)
return Index.class;

if (ledgerId != 0) {
ledger = ledgerDAO.findById(ledgerId);
if (ledger == null)
return Index.class;
if (!same(group.getId(), ledger.getGroup().getId()))
return Index.class;

hasPrevious = (null != ledgerDAO.findPrevious(ledger));
hasNext = (null != ledgerDAO.findNext(ledger));
transactionCount = transactionDAO.countTransactions(ledger);

} else  {
ledger = new Ledger(); * // 1: This one returns null !!!*
Ledger lastLedger = ledgerDAO.findLast(group);
if (null == lastLedger) {
UTDate today = new UTDate();
ledger.setStartDate(new UTDate(today.getYear(), 1, 1));  *//
2: This line ends the block!*
ledger.setEndDate(new UTDate(today.getYear(), 12, 31));
} else {
ledger.setStartDate(lastLedger.getStartDate().warpYears(1));
ledger.setEndDate(lastLedger.getEndDate().warpYears(1));
}
}

*if (ledger.getClosed())  // 3: And here we crash!*
notice = "Året är stängt och kan inte ändras";
else {
if (!mayEdit())
notice = "Endast det senaste året kan ändras.";
else if (!mayEditStarts())
notice = "Startdagen kan inte ändras då det finns tidigare
år.";
}

   return null;
}


Re: Tapestry 5.3 and JQuery

2011-08-30 Thread Gunnar Eketrapp
I use jQuery without any hazzle.

Just remember to call jQuery.noConflict() and to use jQuery instead of $
since prototype has taken that one.

2011/8/30 Julien Martin 

> Hello all,
> Can someone please tell me what are the recommended patterns or frameworks
> -
> if any - I should rely if I want to use JQuery together with Tapestry 5?
> For instance, can I just include the JQuery library in my template pages
> and
> go ahead and use JQuery features? Are there pitfalls I should avoid?
> Any clue or comment welcome.
> Thanks,
> Julien.
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Form components may not be placed inside other Form components.

2011-08-29 Thread Gunnar Eketrapp
Hum .. there where no forms in form but my new page had some errors in it's
form (i.e. pointed to variables that did not exist)

This lead to this strange behaviour.

I don't have time to dig into it now but it could be related to this plus
the ExceptionReport page that I recently added.

Now I am back on track anyway .. but I was really fooled by the error
message.

Anyway the error reports in T5 are usually so god that you get forget how
hard it can be to find bugs once you get "normal" error messages.

2011/8/29 Christian Köberl 

> 2011/08/29 08:00, Gunnar Eketrapp:
>
>> I have a layout component and a quite simple page. (recently created it
>> ...)
>>
>> There are no zones involved ...
>>
>> When displaying this new page I get the error message ...
>>
>> *Form components may not be placed inside other Form components.*
>>
>
> There has to be a form in any of your components and a component in the
> tree below (maybe in your layout component). Nested forms are not allowed by
> Tapestry since this won't work in browsers.
>
> --
> Chris
>
>
> --**--**-
> To unsubscribe, e-mail: 
> users-unsubscribe@tapestry.**apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Form components may not be placed inside other Form components.

2011-08-28 Thread Gunnar Eketrapp
I have a layout component and a quite simple page. (recently created it ...)

There are no zones involved ...

When displaying this new page I get the error message ...

*Form components may not be placed inside other Form components.*
*
*
I have seen this error message before but normally it disappears after a
clean + build.
Now it is sticky ...

Has anyone encountered this problem and can point me in any direction of
what can cause it.

I have stared at the .tml files for a while now and can't see any problems
within them.

Thanks in advance,
Gunnar Eketrapp


Re: Default locale does not work form validation messages !?

2011-08-27 Thread Gunnar Eketrapp
Hum .. I just saw that th swedish property files in tapestry are named **
_sv_SE*.properties

Can this be the reason that my "sv" locale does not find them ...

2011/8/27 Gunnar Eketrapp 

> Hi!
>
> I have a question related to localization in general and validation
> messages specifially.
>
> My site is swedish only . i.e.
>
> configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");
>
> Localization works fine for pages and components where my swedish property
> files are selected by T5.
>
> But form validation messages are in english even if I can see that T5.2.5
> includes swedish versions.
>
> What am I missing ?
>
> Thanks in advance!
> Gunnar Eketrapp
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Default locale does not work form validation messages !?

2011-08-27 Thread Gunnar Eketrapp
Hi!

I have a question related to localization in general and validation messages
specifially.

My site is swedish only . i.e.

configuration.add(SymbolConstants.SUPPORTED_LOCALES, "sv");

Localization works fine for pages and components where my swedish property
files are selected by T5.

But form validation messages are in english even if I can see that T5.2.5
includes swedish versions.

What am I missing ?

Thanks in advance!
Gunnar Eketrapp


Re: My loggings changed when upgrading to 5.2.6

2011-08-27 Thread Gunnar Eketrapp
Problem solved!

Hum ... strange

I added a dependence to tapestry-ioc and moved the exlusions og log4j there
and now it is back to normal.


2011/8/27 Gunnar Eketrapp 

> Hum ...
>
> I upgraded from 5.2.4.to 5.2.6 and noticed that my logging output has
> changed.
>
> What could have caused this? I am using logback ...
>
> The release notes did not mention anything that could have this effect ...
>
> If I switch back to 5.2.4 they get back to "normal" again.
>
> [The switches where made by simple changing the dependency and a mvn clean
> + mvn package]
>
> Thanks in advance,
> Gunnar Eketrapp
> *
> *
> *
> *
> *5.2.4 look*
> *
> *
> 2011-08-27 10:26:23.557::INFO:  Started
> SelectChannelConnector@0.0.0.0:8080
> 2011-08-27 10:26:30.101 [btpool0-1] DEBUG u.s.UtskicketModule.TimingFilter
> - Creating service 'TimingFilter'.
> 2011-08-27 10:26:30.126 [btpool0-1] DEBUG u.s.UtskicketModule.TimingFilter
> - Invoking method
> utskicket.services.UtskicketModule.buildTimingFilter(Logger) (at
> UtskicketModule.java:153).
> 2011-08-27 10:26:30.129 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
> - Creating service 'RequestLogger'.
> 2011-08-27 10:26:30.140 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
> - Invoking constructor
> utskicket.services.RequestLogger(ApplicationStateManager,
> ComponentClassResolver, ComponentSource, Logger) (at RequestLogger.java:48)
> via utskicket.services.UtskicketModule.bind(ServiceBinder) (at
> UtskicketModule.java:42).
> 2011-08-27 10:26:30.161 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: / (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1)
> AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1,
> isXHR=false)
> 2011-08-27 10:26:30.291 [btpool0-1] DEBUG
> u.services.ProtectedPageGateKeeper2 - Loading class
> utskicket.services.ProtectedPageGateKeeper2.
> 2011-08-27 10:26:30.292 [btpool0-1] DEBUG
> u.services.ProtectedPageGateKeeper2 - Marking class
> utskicket.services.ProtectedPageGateKeeper2 to be (re-)loaded
> 2011-08-27 10:26:30.292 [btpool0-1] DEBUG
> u.services.ProtectedPageGateKeeper2 - BEGIN Analyzing
> utskicket.services.ProtectedPageGateKeeper2
> 2011-08-27 10:26:30.300 [btpool0-1] DEBUG
> u.services.ProtectedPageGateKeeper2 -   END Analyzing
> utskicket.services.ProtectedPageGateKeeper2
> 2011-08-27 10:26:32.298 [btpool0-1] WARN  u.s.UtskicketModule.TimingFilter
> - Request time: 2171 ms.
> *
> *
> *5.2.6 look*
>
>
> 2011-08-27 10:22:12.192::INFO:  Started
> SelectChannelConnector@0.0.0.0:8080
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
> [DEBUG] UtskicketModule.RequestLogger Creating service 'RequestLogger'.
> [DEBUG] UtskicketModule.RequestLogger Invoking constructor
> utskicket.services.RequestLogger(ApplicationStateManager,
> ComponentClassResolver, ComponentSource, Logger) (at RequestLogger.java:47)
> via utskicket.services.UtskicketModule.bind(ServiceBinder) (at
> UtskicketModule.java:42).
> [DEBUG] UtskicketModule.RequestLogger Request: / (Method=GET,
> browser=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko)
> Chrome/13.0.782.215 Safari/535.1, isXHR=false)
> [DEBUG] services.ProtectedPageGateKeeper2 Loading class
> utskicket.services.ProtectedPageGateKeeper2.
> [DEBUG] services.ProtectedPageGateKeeper2 Marking class
> utskicket.services.ProtectedPageGateKeeper2 to be (re-)loaded
> [DEBUG] services.ProtectedPageGateKeeper2 BEGIN Analyzing
> utskicket.services.ProtectedPageGateKeeper2
> [DEBUG] services.ProtectedPageGateKeeper2   END Analyzing
> utskicket.services.ProtectedPageGateKeeper2
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
> [DEBUG] pages.Index Executed 768 rendering commands (max queue depth: 44)
> in 0,751 seconds
> [WARN] UtskicketModule.TimingFilter Request time: 3111 ms.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
> [DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


My loggings changed when upgrading to 5.2.6

2011-08-27 Thread Gunnar Eketrapp
Hum ...

I upgraded from 5.2.4.to 5.2.6 and noticed that my logging output has
changed.

What could have caused this? I am using logback ...

The release notes did not mention anything that could have this effect ...

If I switch back to 5.2.4 they get back to "normal" again.

[The switches where made by simple changing the dependency and a mvn clean +
mvn package]

Thanks in advance,
Gunnar Eketrapp
*
*
*
*
*5.2.4 look*
*
*
2011-08-27 10:26:23.557::INFO:  Started SelectChannelConnector@0.0.0.0:8080
2011-08-27 10:26:30.101 [btpool0-1] DEBUG u.s.UtskicketModule.TimingFilter -
Creating service 'TimingFilter'.
2011-08-27 10:26:30.126 [btpool0-1] DEBUG u.s.UtskicketModule.TimingFilter -
Invoking method utskicket.services.UtskicketModule.buildTimingFilter(Logger)
(at UtskicketModule.java:153).
2011-08-27 10:26:30.129 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
- Creating service 'RequestLogger'.
2011-08-27 10:26:30.140 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
- Invoking constructor
utskicket.services.RequestLogger(ApplicationStateManager,
ComponentClassResolver, ComponentSource, Logger) (at RequestLogger.java:48)
via utskicket.services.UtskicketModule.bind(ServiceBinder) (at
UtskicketModule.java:42).
2011-08-27 10:26:30.161 [btpool0-1] DEBUG u.s.UtskicketModule.RequestLogger
- Request: / (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1)
AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.215 Safari/535.1,
isXHR=false)
2011-08-27 10:26:30.291 [btpool0-1] DEBUG
u.services.ProtectedPageGateKeeper2 - Loading class
utskicket.services.ProtectedPageGateKeeper2.
2011-08-27 10:26:30.292 [btpool0-1] DEBUG
u.services.ProtectedPageGateKeeper2 - Marking class
utskicket.services.ProtectedPageGateKeeper2 to be (re-)loaded
2011-08-27 10:26:30.292 [btpool0-1] DEBUG
u.services.ProtectedPageGateKeeper2 - BEGIN Analyzing
utskicket.services.ProtectedPageGateKeeper2
2011-08-27 10:26:30.300 [btpool0-1] DEBUG
u.services.ProtectedPageGateKeeper2 -   END Analyzing
utskicket.services.ProtectedPageGateKeeper2
2011-08-27 10:26:32.298 [btpool0-1] WARN  u.s.UtskicketModule.TimingFilter -
Request time: 2171 ms.
*
*
*5.2.6 look*


2011-08-27 10:22:12.192::INFO:  Started SelectChannelConnector@0.0.0.0:8080
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
[DEBUG] UtskicketModule.RequestLogger Creating service 'RequestLogger'.
[DEBUG] UtskicketModule.RequestLogger Invoking constructor
utskicket.services.RequestLogger(ApplicationStateManager,
ComponentClassResolver, ComponentSource, Logger) (at RequestLogger.java:47)
via utskicket.services.UtskicketModule.bind(ServiceBinder) (at
UtskicketModule.java:42).
[DEBUG] UtskicketModule.RequestLogger Request: / (Method=GET,
browser=Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko)
Chrome/13.0.782.215 Safari/535.1, isXHR=false)
[DEBUG] services.ProtectedPageGateKeeper2 Loading class
utskicket.services.ProtectedPageGateKeeper2.
[DEBUG] services.ProtectedPageGateKeeper2 Marking class
utskicket.services.ProtectedPageGateKeeper2 to be (re-)loaded
[DEBUG] services.ProtectedPageGateKeeper2 BEGIN Analyzing
utskicket.services.ProtectedPageGateKeeper2
[DEBUG] services.ProtectedPageGateKeeper2   END Analyzing
utskicket.services.ProtectedPageGateKeeper2
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
[DEBUG] pages.Index Executed 768 rendering commands (max queue depth: 44) in
0,751 seconds
[WARN] UtskicketModule.TimingFilter Request time: 3111 ms.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl started.
[DEBUG] entity.Job Job utskicket.jobs.OurMailSenderImpl stopped.


Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-25 Thread Gunnar Eketrapp
I still havn't managde to get ajax calls to redirect.

I changed to reload as a I saw in this mailing list.
In Chromes debugger I can see that the timed out ajax call returns ..

{"script":"window.location.reload();"}

... but nothing happens on the client side.

So the question is still open do I have to do something to enable this ?

Thanks in advance!

2011/8/24 Magnus Kvalheim 

> No sorry, that's not relevant for this. Eager to help, but I should
> have paid more attention to detail :)
>
> On Wed, Aug 24, 2011 at 8:33 AM, Magnus Kvalheim 
> wrote:
>
> > I sometimes use a proxy for doing redirects.
> >
> > *public class RedirectProxy {*
> > * @Persist private String redirectURL;*
> > * @Inject private ComponentResources _resources;*
> > * Object onActivate(){*
> > * try {*
> > * URL url = new URL(redirectURL);*
> > * return url;*
> > * } catch (Exception e) {*
> > * // TODO: handle exception*
> > * } finally{*
> > * _resources.discardPersistentFieldChanges(); *
> > * }*
> > * return Index.class;*
> > * }*
> > * public void setRedirectURL(String redirectURL) {*
> > * this.redirectURL = redirectURL;*
> > * }*
> > *
> > *
> > * public String getRedirectURL() {*
> > * return redirectURL;*
> > * }*
> > *}*
> >
> > Then from an eventhandler:
> > *redirectProxy.setRedirectURL(u);*
> > *return redirectProxy;*
> >
> > It could perhaps be useful for this case?
> >
> > --magnus
> >
> > On Tue, Aug 23, 2011 at 11:00 PM, Gunnar Eketrapp <
> > gunnar.eketr...@gmail.com> wrote:
> >
> >> Hum .. this did not work so I guess I have to do something on the client
> >> side as well ...
> >>
> >>   if (request.isXHR()) {
> >>OutputStream os =
> >> response.getOutputStream("application/json;charset=UTF-8");
> >>os.write(("{\"script\":\"window.location.replace('" +
> >> link.toAbsoluteURI() + "');\"}").getBytes());
> >>os.close();
> >>} else {
> >>response.sendRedirect(link);
> >> }
> >>
> >>
> >> 2011/8/23 Kalle Korhonen 
> >>
> >> > On Mon, Aug 22, 2011 at 4:42 PM, Howard Lewis Ship 
> >> > wrote:
> >> > > Actually, perhaps Tapestry's client-side support should, by default,
> >> > > handle 302 correctly.
> >> >
> >> > Yes, perhaps so. But the correctness is "in the eye of the beholder".
> >> > It's clear that a 302 response to a non-ajax request always causes a
> >> > redirect, but not necessarily so for an ajax request. If the default
> >> > behavior was easily overridable then yes, why not. Perhaps I should
> >> > just bring tapestry-exceptionpage functionality to the core.
> >> >
> >> > Kalle
> >> >
> >> >
> >> > > Currently, Tapestry's JSON response for partial page updates
> includes
> >> > > a special key for performing a redirect.
> >> > >
> >> > > On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen
> >> > >  wrote:
> >> > >> On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
> >> > >>  wrote:
> >> > >>> I just rewrote my very old ProtectedPageGateKeeper that
> implemented
> >> > >>> Dispatcher with a new one
> >> > >>> inspired by Howard's blog
> >> > >>> http://tapestryjava.blogspot.com/search/label/security
> >> > >>> The new one implements ComponentRequestFilter and is better suited
> >> for
> >> > >>> protecting ajax enabled pages.
> >> > >>> So I thought ...
> >> > >>> Now to my problem:
> >> > >>> The redirect that takes place after an ajax call seems to
> disappear
> >> > into
> >> > >>> thin air. I.e. the page displaying
> >> > >>> a rollling ajax loader is not redirected to my /noacess page. I
> have
> >> to
> >> > hit
> >> > >>> a full page refresh for the redirect to work.
> >> > >>> Is there some trick needed in order to get the redirect to work
> for
> >> an
> >> > ajax
> >> > >>> call.
> >> > >>> Sorry for asking stupid newbie questions 

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Gunnar Eketrapp
Hum .. this did not work so I guess I have to do something on the client
side as well ...

   if (request.isXHR()) {
OutputStream os =
response.getOutputStream("application/json;charset=UTF-8");
os.write(("{\"script\":\"window.location.replace('" +
link.toAbsoluteURI() + "');\"}").getBytes());
os.close();
} else {
response.sendRedirect(link);
}


2011/8/23 Kalle Korhonen 

> On Mon, Aug 22, 2011 at 4:42 PM, Howard Lewis Ship 
> wrote:
> > Actually, perhaps Tapestry's client-side support should, by default,
> > handle 302 correctly.
>
> Yes, perhaps so. But the correctness is "in the eye of the beholder".
> It's clear that a 302 response to a non-ajax request always causes a
> redirect, but not necessarily so for an ajax request. If the default
> behavior was easily overridable then yes, why not. Perhaps I should
> just bring tapestry-exceptionpage functionality to the core.
>
> Kalle
>
>
> > Currently, Tapestry's JSON response for partial page updates includes
> > a special key for performing a redirect.
> >
> > On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen
> >  wrote:
> >> On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
> >>  wrote:
> >>> I just rewrote my very old ProtectedPageGateKeeper that implemented
> >>> Dispatcher with a new one
> >>> inspired by Howard's blog
> >>> http://tapestryjava.blogspot.com/search/label/security
> >>> The new one implements ComponentRequestFilter and is better suited for
> >>> protecting ajax enabled pages.
> >>> So I thought ...
> >>> Now to my problem:
> >>> The redirect that takes place after an ajax call seems to disappear
> into
> >>> thin air. I.e. the page displaying
> >>> a rollling ajax loader is not redirected to my /noacess page. I have to
> hit
> >>> a full page refresh for the redirect to work.
> >>> Is there some trick needed in order to get the redirect to work for an
> ajax
> >>> call.
> >>> Sorry for asking stupid newbie questions ... of course I have missed
> >>> something again!
> >>
> >> I don't think it's a stupid newbie question but obviously you cannot
> >> just send 302 uri as a response to an ajax request. If you want a full
> >> page refresh, you can handle it similarly how the tynamo-exceptionpage
> >> module (http://tynamo.org/tapestry-exceptionpage+guide) handles
> >> exceptions in ajax responses
> >> (
> http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java
> ).
> >> Or, take a look at T5.3's new ajax error handler, rendering an iframe
> >> on the fly in response to an ajax error.
> >>
> >> Kalle
> >>
> >>
> >>> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
> u.s.UtskicketModule.RequestLogger
> >>> - Request: /group/members.grid.pager/1/grid (Method=POST,
> >>> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101
> Firefox/5.0,
> >>> isXHR=true)
> >>> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
> >>> u.services.ProtectedPageGateKeeper2 - Page path:
> >>> /group/members.grid.pager/1/grid
> >>>
> >>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >>> - Request: /group/members.grid.pager/7/grid (Method=POST,
> >>> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101
> Firefox/5.0,
> >>> isXHR=true)
> >>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> >>> u.services.ProtectedPageGateKeeper2 - Page path:
> >>> /group/members.grid.pager/7/grid
> >>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >>> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
> >>> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> >>>
> >>> Note: The return from the request above does not show up in the browser
> ...
> >>>
> >>> 2011-08-22 22:01:56.956 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >>> - Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows
> NT
> >>> 6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> >>> 2011-08-22 22:01:56.960 [btpool0-10] DEBU

Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-23 Thread Gunnar Eketrapp
Thanks a lot!

I think I found what I needed in
ConfigurableRequestExceptionHa<http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java>
ndler.java<http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java>
and
will try it out this evening ...

I also like this a lot ...
*Actually, perhaps Tapestry's client-side support should, by default,*
*handle 302 correctly.*

2011/8/23 Howard Lewis Ship 

> Actually, perhaps Tapestry's client-side support should, by default,
> handle 302 correctly.
>
> Currently, Tapestry's JSON response for partial page updates includes
> a special key for performing a redirect.
>
> On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen
>  wrote:
> > On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
> >  wrote:
> >> I just rewrote my very old ProtectedPageGateKeeper that implemented
> >> Dispatcher with a new one
> >> inspired by Howard's blog
> >> http://tapestryjava.blogspot.com/search/label/security
> >> The new one implements ComponentRequestFilter and is better suited for
> >> protecting ajax enabled pages.
> >> So I thought ...
> >> Now to my problem:
> >> The redirect that takes place after an ajax call seems to disappear into
> >> thin air. I.e. the page displaying
> >> a rollling ajax loader is not redirected to my /noacess page. I have to
> hit
> >> a full page refresh for the redirect to work.
> >> Is there some trick needed in order to get the redirect to work for an
> ajax
> >> call.
> >> Sorry for asking stupid newbie questions ... of course I have missed
> >> something again!
> >
> > I don't think it's a stupid newbie question but obviously you cannot
> > just send 302 uri as a response to an ajax request. If you want a full
> > page refresh, you can handle it similarly how the tynamo-exceptionpage
> > module (http://tynamo.org/tapestry-exceptionpage+guide) handles
> > exceptions in ajax responses
> > (
> http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java
> ).
> > Or, take a look at T5.3's new ajax error handler, rendering an iframe
> > on the fly in response to an ajax error.
> >
> > Kalle
> >
> >
> >> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
> u.s.UtskicketModule.RequestLogger
> >> - Request: /group/members.grid.pager/1/grid (Method=POST,
> >> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
> >> isXHR=true)
> >> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
> >> u.services.ProtectedPageGateKeeper2 - Page path:
> >> /group/members.grid.pager/1/grid
> >>
> >> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >> - Request: /group/members.grid.pager/7/grid (Method=POST,
> >> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
> >> isXHR=true)
> >> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> >> u.services.ProtectedPageGateKeeper2 - Page path:
> >> /group/members.grid.pager/7/grid
> >> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
> >> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> >>
> >> Note: The return from the request above does not show up in the browser
> ...
> >>
> >> 2011-08-22 22:01:56.956 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >> - Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows NT
> >> 6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> >> 2011-08-22 22:01:56.960 [btpool0-10] DEBUG
> >> u.services.ProtectedPageGateKeeper2 - Page path: /group/members/3
> >> 2011-08-22 22:01:56.964 [btpool0-10] DEBUG
> u.s.UtskicketModule.RequestLogger
> >> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
> >> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> >>
> >> Note: Now we get to the /noaccess page
> >>
> >
> > -
> > 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Gunnar Eketrapp
I just rewrote my very old ProtectedPageGateKeeper that implemented
Dispatcher with a new one
inspired by Howard's blog
http://tapestryjava.blogspot.com/search/label/security

The new one implements ComponentRequestFilter and is better suited for
protecting ajax enabled pages.
So I thought ...

Now to my problem:

The redirect that takes place after an ajax call seems to disappear into
thin air. I.e. the page displaying
a rollling ajax loader is not redirected to my /noacess page. I have to hit
a full page refresh for the redirect to work.

Is there some trick needed in order to get the redirect to work for an ajax
call.

Sorry for asking stupid newbie questions ... of course I have missed
something again!

Thanks in advance!
Gunnar Eketrapp

2011-08-22 21:54:53.243 [btpool0-11] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members.grid.pager/1/grid (Method=POST,
browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
isXHR=true)
2011-08-22 21:54:53.243 [btpool0-11] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path:
/group/members.grid.pager/1/grid

2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members.grid.pager/7/grid (Method=POST,
browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
isXHR=true)
2011-08-22 22:01:06.500 [btpool0-10] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path:
/group/members.grid.pager/7/grid
2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)

Note: The return from the request above does not show up in the browser ...

2011-08-22 22:01:56.956 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows NT
6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
2011-08-22 22:01:56.960 [btpool0-10] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path: /group/members/3
2011-08-22 22:01:56.964 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)

Note: Now we get to the /noaccess page


Re: Ajax loader vs ProgressiveDisplay ...

2011-08-18 Thread Gunnar Eketrapp
Great! That was exactly what I was looking for!

2011/8/18 Taha Hafeez 

> Hi
>
> ProgressiveDisplay is used in case you page take some time to load
> (because of some processing or database intense activity etc)
>
> I use the Tapestry.ZONE_UPDATED_EVENT event to hide and
> Tapestry.FORM_PROCESS_SUBMIT_EVENT and
> Tapestry.TRIGGER_ZONE_UPDATE_EVENT event to show the loader.
>
> Tapestry.onDOMLoaded(function() {
>$("showLoading").hide();
>Event.observe(document, Tapestry.ZONE_UPDATED_EVENT, function() {
>Element.hide("showLoading");
>});
>
>var showLoading = function() {
>$("showLoading").show();
>};
>
>Event.observe(document, Tapestry.FORM_PROCESS_SUBMIT_EVENT,
> showLoading);
>Event.observe(document, Tapestry.TRIGGER_ZONE_UPDATE_EVENT,
> showLoading);
> });
>
> On Thu, Aug 18, 2011 at 12:23 PM, Gunnar Eketrapp
>  wrote:
> > Hi!
> >
> > I need to add some ajax loader to my zone updates.
> >
> > Is it right that ProgressiveDisplay is not for this!?
> >
> > If right what is the "recommended" way of how to add an ajax loader to my
> T5
> > zone updates?
> >
> > Thanks in advance!
> >
>
>
>
> --
> Regards
>
> Taha Hafeez Siddiqi (tawus)
> http://tawus.wordpress.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Ajax loader vs ProgressiveDisplay ...

2011-08-17 Thread Gunnar Eketrapp
Hi!

I need to add some ajax loader to my zone updates.

Is it right that ProgressiveDisplay is not for this!?

If right what is the "recommended" way of how to add an ajax loader to my T5
zone updates?

Thanks in advance!


Re: Zone inside a form with fadeout works each second time ...

2011-08-14 Thread Gunnar Eketrapp
And the solution is 

2011/8/14 Taha Hafeez 

> It took me an hour to figure it out (Watching avatar at the same time
> didn't help)
>
> When the zone div is invisible, 'show' method is called and if it is
> visible then 'update' method is called. When you first submit, the
> zone is visible so 'update' is called which fades it away and sets its
> style to display:none. So it works first time. Now it is invisible and
> the next submit results in a 'show' which make it appear. Next submit
> is called with the div visible so 'update' is called which causes it
> to disappear. So that is why after first submit, it appears and
> disappears ...
>
> On Sun, Aug 14, 2011 at 12:33 PM, Gunnar Eketrapp
>  wrote:
> > I took some time to reproduce this as a small T5 example ...
> >
> > The fadeout only works first time after page just has been loaded.
> >
> > *TML*
> >  > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> >
> > http://www.w3.org/1999/xhtml"; xmlns:t="
> > http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> > xmlns:p="tapestry:parameter">
> >
> > 
> >
> >Fadeout test
> > 
> >
> > 
> >
> > 
> >
> >
> >
> >Zone fadeout test
> >
> >
> > > class="input-form">
> >
> >
> > > t:update="fade">
> > > class="notice">${notice}
> >
> >
> >
> >
> >
> VerMotpartDatumBeloppTyp
> >
> > > value="transaction.verification" />
> > > name="counterpart" size="20" value="transaction.counterpart" />
> > > value="transaction.date" />
> > > size="12" value="transaction.amount" />
> > > model="literal:,BBB,CCC" value="transaction.type" />
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 
> >
> > 
> > 
> >
> >
> > *JAVA*
> > package utskicket.pages.economy;
> >
> > import org.apache.tapestry5.annotations.Component;
> > import org.apache.tapestry5.annotations.Log;
> > import org.apache.tapestry5.annotations.Persist;
> > import org.apache.tapestry5.annotations.Property;
> > import org.apache.tapestry5.corelib.components.Zone;
> >
> > public class ZoneFadeout2  {
> >
> >public static class Transaction {
> >public String amount;
> >public String verification;
> >public String counterpart;
> >public String date;
> >public String type;
> >};
> >
> >@Component(id = "transactionZone")
> >private Zone transactionZone;
> >
> >@SuppressWarnings("unused")
> >@Property
> >private Transaction transaction;
> >
> >@SuppressWarnings("unused")
> >@Property
> >@Persist
> >private String notice;
> >
> >@Log
> >    void onActivate() {
> >transaction = new Transaction();
> >}
> >
> >@Log
> >void onPassivate() {
> >}
> >
> >@Log
> >void pageDetached() {
> >notice = null;
> >}
> >
> >@Log
> >public Object onSuccessFromTransactionForm() {
> >notice = "I should fade out each time but only works once after
> page
> > has been loaded.";
> >return transactionZone.getBody();
> >}
> > }
> >
> > 2011/8/13 Taha Tapestry 
> >
> >> How are you persisting your message ?
> >>
> >> For a post request tapestry uses redirect after post and so if  you
> don't
> >> persist the message it will be lost. For such situations we have
> >> @Persist(PersistenceConstants.Flash) which stores the value in a session
> >> till it is read for the first time
> >>
> >> Regards
> >> Taha
> >>
> >> On Aug 13, 2011, at 4:11 PM, Gunnar Eketrapp  >
> >> wrote:
> >>
> >> > Hi!
> >&

Re: Zone inside a form with fadeout works each second time ...

2011-08-14 Thread Gunnar Eketrapp
I took some time to reproduce this as a small T5 example ...

The fadeout only works first time after page just has been loaded.

*TML*
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>

http://www.w3.org/1999/xhtml"; xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
xmlns:p="tapestry:parameter">



Fadeout test








Zone fadeout test






${notice}




VerMotpartDatumBeloppTyp





















*JAVA*
package utskicket.pages.economy;

import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.annotations.Log;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.corelib.components.Zone;

public class ZoneFadeout2  {

public static class Transaction {
public String amount;
public String verification;
public String counterpart;
public String date;
public String type;
};

@Component(id = "transactionZone")
private Zone transactionZone;

@SuppressWarnings("unused")
@Property
private Transaction transaction;

@SuppressWarnings("unused")
@Property
@Persist
private String notice;

@Log
void onActivate() {
transaction = new Transaction();
}

@Log
void onPassivate() {
}

@Log
void pageDetached() {
notice = null;
}

@Log
public Object onSuccessFromTransactionForm() {
notice = "I should fade out each time but only works once after page
has been loaded.";
return transactionZone.getBody();
}
}

2011/8/13 Taha Tapestry 

> How are you persisting your message ?
>
> For a post request tapestry uses redirect after post and so if  you don't
> persist the message it will be lost. For such situations we have
> @Persist(PersistenceConstants.Flash) which stores the value in a session
> till it is read for the first time
>
> Regards
> Taha
>
> On Aug 13, 2011, at 4:11 PM, Gunnar Eketrapp 
> wrote:
>
> > Hi!
> >
> > I have zone inside a form in which I intend to give a response message to
> > the user whereafter it is faded out.
> >
> > I.e. "Your changes where saved ..."
> >
> > Everything works like a charm except the fact that the message is only
> faded
> > out each second time.
> >
> > There are no javascript error reported in the console.
> >
> > Surely I am missing something ...
> >
> > T5 rocks by the way!  As if you didn't already know 
> >
> > Thanks in advance!
> > Gunnar Eketrapp
> >
> >
> >
> > > class="input-form">
> >
> >
> > > t:update="fade">
> > > class="notice">${notice}
> >
> >
> >
> >
> >
> VerMotpartDatumBeloppTyp
> >
> > > value="transaction.verification" />
> > > name="counterpart" size="20" value="transaction.counterpart" />
> > > size="10" value="transaction.date" />
> > > size="12" value="transaction.amount" />
> > > value="transaction.type" encoder="typeEncoder" />
> >
> >
> > > colspan="5">Notering:  > size="80" value="transaction.note" />
> >
> >
> >
> >
> >
> > value="Tillbaka"
> > />
> >
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Zone inside a form with fadeout works each second time ...

2011-08-13 Thread Gunnar Eketrapp
Hi!

I have zone inside a form in which I intend to give a response message to
the user whereafter it is faded out.

I.e. "Your changes where saved ..."

Everything works like a charm except the fact that the message is only faded
out each second time.

There are no javascript error reported in the console.

Surely I am missing something ...

T5 rocks by the way!  As if you didn't already know 

Thanks in advance!
Gunnar Eketrapp







${notice}




VerMotpartDatumBeloppTyp








Notering: 











Adding in place editing ...

2011-08-04 Thread Gunnar Eketrapp
Hi!

I would like to add in place editing for some of my pages.

I found a jQuery plugin named jEditable that looks promising.
See http://www.appelsiini.net/projects/jeditable

Has anyone out there used this plugin in combination with T5 ?

Are there things I should know before diving into it. The trick should be to
submit
changes the way T5 wants them i suppose ...

Gunnar Eketrapp


Re: T5.2.4 / ActionLink's dead in IE

2011-08-03 Thread Gunnar Eketrapp
Or even better ...

jQuery(document).ready(function($) {
$('a button').click(function() {
 location.href=$(this).closest("a").attr("href");
});
});


2011/8/3 Gunnar Eketrapp 

> I found a javascript solution 
>
> jQuery(document).ready(function($) {
> $('.actionbutton').click(function() {
> location.href=$(this).closest("a").attr("href");
> });
>  });
>
>
> 2011/8/3 Gunnar Eketrapp 
>
>> Just found ...
>>
>>
>> http://www.expertsguide.info/2010/07/button-tag-inside-anchor-not-working-in-i/
>>
>> .. but now i need some smart way of adding this fix my actionlink's 
>>
>>
>>
>>
>> 2011/8/3 Gunnar Eketrapp 
>>
>>> Oops forgot to mention that I  am using version 8.0 of the unmentionable
>>> browser :-)
>>>
>>>
>>> 2011/8/3 Gunnar Eketrapp 
>>>
>>>> Hi all!
>>>>
>>>> I have some actionlink's that works fine in Chrome but in IE they do
>>>> absolutely nothing.
>>>>
>>>> There are no javascript errors.
>>>>
>>>> Has anyone else had the same problems?
>>>>
>>>> Note: The actionlink's encloses a button element.
>>>>
>>>> Thanks in advance!
>>>>
>>>> Gunnar Eketrapp
>>>>
>>>> =
>>>>
>>>> Tml extract 
>>>>
>>>> 
>>>> Anmärkning: >>> time="rejection.created"/> av ${rejection.validator.name}
>>>>  >>> t:context="[rejection.id]">Radera
>>>>  >>> t:context="[rejection.id]">Redigera
>>>>  ${rejection.validatorComment}
>>>> 
>>>> 
>>>>
>>>> ==
>>>>
>>>> Html extract ...
>>>>
>>>> Anmärkning: Idag 14:45 av Bengt Modig
>>>>
>>>> >>> href="/meeting/view.delete2remark/4?t:ac=1/2">Radera
>>>>  >>> href="/meeting/view.editremark/4?t:ac=1/2">Redigera
>>>>  Usch o fy
>>>>
>>>> 
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
>>> Allévägen 2A, 132 42 Saltsjö-Boo
>>>
>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: T5.2.4 / ActionLink's dead in IE

2011-08-03 Thread Gunnar Eketrapp
I found a javascript solution 

jQuery(document).ready(function($) {
$('.actionbutton').click(function() {
location.href=$(this).closest("a").attr("href");
});
});


2011/8/3 Gunnar Eketrapp 

> Just found ...
>
>
> http://www.expertsguide.info/2010/07/button-tag-inside-anchor-not-working-in-i/
>
> .. but now i need some smart way of adding this fix my actionlink's 
>
>
>
>
> 2011/8/3 Gunnar Eketrapp 
>
>> Oops forgot to mention that I  am using version 8.0 of the unmentionable
>> browser :-)
>>
>>
>> 2011/8/3 Gunnar Eketrapp 
>>
>>> Hi all!
>>>
>>> I have some actionlink's that works fine in Chrome but in IE they do
>>> absolutely nothing.
>>>
>>> There are no javascript errors.
>>>
>>> Has anyone else had the same problems?
>>>
>>> Note: The actionlink's encloses a button element.
>>>
>>> Thanks in advance!
>>>
>>> Gunnar Eketrapp
>>>
>>> =
>>>
>>> Tml extract 
>>>
>>> 
>>> Anmärkning: >> time="rejection.created"/> av ${rejection.validator.name}
>>>  >> t:context="[rejection.id]">Radera
>>>  >> t:context="[rejection.id]">Redigera
>>>  ${rejection.validatorComment}
>>> 
>>> 
>>>
>>> ==
>>>
>>> Html extract ...
>>>
>>> Anmärkning: Idag 14:45 av Bengt Modig
>>>
>>> >> href="/meeting/view.delete2remark/4?t:ac=1/2">Radera
>>>  >> href="/meeting/view.editremark/4?t:ac=1/2">Redigera
>>>  Usch o fy
>>>
>>> 
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
>> Allévägen 2A, 132 42 Saltsjö-Boo
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: T5.2.4 / ActionLink's dead in IE

2011-08-03 Thread Gunnar Eketrapp
Just found ...

http://www.expertsguide.info/2010/07/button-tag-inside-anchor-not-working-in-i/

.. but now i need some smart way of adding this fix my actionlink's 



2011/8/3 Gunnar Eketrapp 

> Oops forgot to mention that I  am using version 8.0 of the unmentionable
> browser :-)
>
>
> 2011/8/3 Gunnar Eketrapp 
>
>> Hi all!
>>
>> I have some actionlink's that works fine in Chrome but in IE they do
>> absolutely nothing.
>>
>> There are no javascript errors.
>>
>> Has anyone else had the same problems?
>>
>> Note: The actionlink's encloses a button element.
>>
>> Thanks in advance!
>>
>> Gunnar Eketrapp
>>
>> =
>>
>> Tml extract 
>>
>> 
>> Anmärkning: > time="rejection.created"/> av ${rejection.validator.name}
>>  > t:context="[rejection.id]">Radera
>>  > t:context="[rejection.id]">Redigera
>>  ${rejection.validatorComment}
>> 
>> 
>>
>> ==
>>
>> Html extract ...
>>
>> Anmärkning: Idag 14:45 av Bengt Modig
>>
>> > href="/meeting/view.delete2remark/4?t:ac=1/2">Radera
>>  > href="/meeting/view.editremark/4?t:ac=1/2">Redigera
>>  Usch o fy
>>
>> 
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 070-991 86 42]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: T5.2.4 / ActionLink's dead in IE

2011-08-03 Thread Gunnar Eketrapp
Oops forgot to mention that I  am using version 8.0 of the unmentionable
browser :-)

2011/8/3 Gunnar Eketrapp 

> Hi all!
>
> I have some actionlink's that works fine in Chrome but in IE they do
> absolutely nothing.
>
> There are no javascript errors.
>
> Has anyone else had the same problems?
>
> Note: The actionlink's encloses a button element.
>
> Thanks in advance!
>
> Gunnar Eketrapp
>
> =
>
> Tml extract 
>
> 
> Anmärkning:  time="rejection.created"/> av ${rejection.validator.name}
>   t:context="[rejection.id]">Radera
>   t:context="[rejection.id]">Redigera
>  ${rejection.validatorComment}
> 
> 
>
> ==
>
> Html extract ...
>
> Anmärkning: Idag 14:45 av Bengt Modig
>
>  href="/meeting/view.delete2remark/4?t:ac=1/2">Radera
>   href="/meeting/view.editremark/4?t:ac=1/2">Redigera
>  Usch o fy
>
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>


-- 
[Hem: 08-715 59 57, Mobil: 070-991 86 42]
Allévägen 2A, 132 42 Saltsjö-Boo


T5.2.4 / ActionLink's dead in IE

2011-08-03 Thread Gunnar Eketrapp
Hi all!

I have some actionlink's that works fine in Chrome but in IE they do
absolutely nothing.

There are no javascript errors.

Has anyone else had the same problems?

Note: The actionlink's encloses a button element.

Thanks in advance!

Gunnar Eketrapp

=

Tml extract 


Anmärkning:  av ${rejection.validator.name}
 Radera
 Redigera
 ${rejection.validatorComment}



==

Html extract ...

Anmärkning: Idag 14:45 av Bengt Modig

Radera
Redigera
 Usch o fy




onValidate called multiple times ...

2011-07-27 Thread Gunnar Eketrapp
Hi!

Maybe a newbie question but I have been on vacation for a month.

Why does onValidate get's called four times when I submit form below.

Thank's in advance!

/Gunnar Eketrapp

Form looks like ...




Mötesordförande:



Sekreterare:



Justerare:



Justerare:












And log looks like ...

2011-07-28 08:08:57.666 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onActivate(2, 19)
2011-07-28 08:08:57.900 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onActivate [null]
2011-07-28 08:08:57.903 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
2011-07-28 08:08:57.903 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
2011-07-28 08:08:57.903 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
2011-07-28 08:08:57.903 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
2011-07-28 08:08:57.903 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
2011-07-28 08:08:57.904 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
2011-07-28 08:08:57.904 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
2011-07-28 08:08:57.904 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
2011-07-28 08:08:57.906 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onValidate()
2011-07-28 08:08:57.906 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onValidate [null]
2011-07-28 08:08:57.907 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ENTER] onSuccessFromForm()
2011-07-28 08:08:57.907 [btpool0-29] DEBUG
u.pages.meeting.MeetingParticipants - [ EXIT] onSuccessFromForm [null]


Re: Logging enhancement / URLEventContext

2011-04-17 Thread Gunnar Eketrapp
Done!

Se https://issues.apache.org/jira/browse/TAP5-1505

2011/4/17 Igor Drobiazko 

> Please post a jira issue.
>
> On Sat, Apr 16, 2011 at 8:15 AM, Gunnar Eketrapp
> wrote:
>
> > Hi T5:ers!
> >
> > A suggestion ...
> >
> > Wouldn't it be nice if URLEventContext implemented its own toString
> method
> > !?
> >
> > I am using event contexts quite a lot and would like them to be displayed
> > properly by the @Log annotation.
> >
> > I.e. now i get ...
> >
> > [ENTER] onActivate(org.apache.tapestry5.internal.URLEventContext@10537e4
> )
> >
> > .. but would like this ...
> >
> > [ENTER] onActivate(1,7)
> >
> >
> > T5 rocks!
> >
>
>
>
> --
> Best regards,
>
> Igor Drobiazko
> http://tapestry5.de
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Logging enhancement / URLEventContext

2011-04-15 Thread Gunnar Eketrapp
Hi T5:ers!

A suggestion ...

Wouldn't it be nice if URLEventContext implemented its own toString method
!?

I am using event contexts quite a lot and would like them to be displayed
properly by the @Log annotation.

I.e. now i get ...

[ENTER] onActivate(org.apache.tapestry5.internal.URLEventContext@10537e4)

.. but would like this ...

[ENTER] onActivate(1,7)


T5 rocks!


Re: T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
I found a solution ...

1down voteaccepted

You need a more specific selector to override... BP is pretty general though
so that shouldnt be an issue for example:

table.no-zebra tbody tr:nth-child(even) td,
table.no-zebra tbody tr.even td {
  background: transparent;
}

you can replace transparent with whatever color to make all rows a solid
color.

2011/1/20 Gunnar Eketrapp 

> Aha ! Thanks for the info ...
>
> Then it must be the Blueprint CSS framework that does this ... but striped
> they are ...
>
> I added a beautiful picture and I hope that is not against the list rules
> .-)
>
>
> /Gunnar
>
> 2011/1/20 Thiago H. de Paula Figueiredo 
>
> On Thu, 20 Jan 2011 11:53:41 -0200, Gunnar Eketrapp <
>> gunnar.eketr...@gmail.com> wrote:
>>
>>  Hi!
>>>
>>
>> Hi!
>>
>>  I have used rowClass to mark "bad" rows in one of my grids applied the
>>> following css
>>>
>>> .invalid  {
>>>background-color: #FBE3E4;
>>> }
>>>
>>> It works but only  for the rows with white background 
>>>
>>> How does T5 do the striping ? I guess with some smart .js cause when
>>> inspecting the page with chrome everything seems fine.
>>>
>>
>> I've never seen T5 do striping by itself. I haven't used 5.2 yet (sigh),
>> so I think it's done by CSS.
>>
>> --
>> 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
>>
>>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
Aha ! Thanks for the info ...

Then it must be the Blueprint CSS framework that does this ... but striped
they are ...

I added a beautiful picture and I hope that is not against the list rules
.-)


/Gunnar

2011/1/20 Thiago H. de Paula Figueiredo 

> On Thu, 20 Jan 2011 11:53:41 -0200, Gunnar Eketrapp <
> gunnar.eketr...@gmail.com> wrote:
>
>  Hi!
>>
>
> Hi!
>
>  I have used rowClass to mark "bad" rows in one of my grids applied the
>> following css
>>
>> .invalid  {
>>background-color: #FBE3E4;
>> }
>>
>> It works but only  for the rows with white background 
>>
>> How does T5 do the striping ? I guess with some smart .js cause when
>> inspecting the page with chrome everything seems fine.
>>
>
> I've never seen T5 do striping by itself. I haven't used 5.2 yet (sigh), so
> I think it's done by CSS.
>
> --
> 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
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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

T5 / Grid / Striping + Marking rows with red background ....

2011-01-20 Thread Gunnar Eketrapp
Hi!

I have used rowClass to mark "bad" rows in one of my grids applied the
following css

.invalid  {
background-color: #FBE3E4;
}

It works but only  for the rows with white background 

How does T5 do the striping ? I guess with some smart .js cause when
inspecting the page with chrome everything seems fine.

I.e. the  should have this red/pink background but it doesn't ... it has
this blue/gray background that is applied to each second row in the grid.

Is there some easy way to fix this?

Thanks in advance,
Gunnar Eketrapp


Re: Can I disable template proessing for a section of my TML file ?

2011-01-17 Thread Gunnar Eketrapp
It's just to include some javascript that includes a < or a >.

E.g.

...
if (counter > 1)  {
...
}
...

This will be rendered by T5 as ..

...
if (counter > 1)  {
...
}
...

.. which is broken.
2011/1/17 Josh Canfield 

> Putting it in an html comment didn't work? Can you share a snippet that is
> broken? The smallest possible.
> On Jan 17, 2011 3:34 AM, "Gunnar Eketrapp" 
> wrote:
> > I encountered this problem again ..
> >
> > I.e. am adding javascript dynamically but expresions such as
> >
> > foo < bar
> >
> > ... gets translated into ...
> >
> > foo < bar
> >
> > ... and fails to execute ...
> >
> > I tried the hide from parser method as Josh mentioned but T5 was not that
> > easy to fool ...
> >
> > Is there any easy way to turn off the template parsing for a portion of
> the
> > .tml file !?
> >
> > The DOCTYPE as mentioned by Borut didn't help either.
> >
> > Thanks in advance
> > Gunnar Eketrapp
> >
> >
> >
> > That system created javascript dynamiucally which fails in T5
> >
> > 2010/12/22 Josh Canfield 
> >
> >> Use the good old html/xml comment, used for years to hide javascript
> from
> >> old browsers.
> >>
> >> 
> >> var fromPage = '${pojo.property }';
> >> //<-- hide javascript from xml parser.
> >>
> >> // -->
> >> 
> >> On Dec 21, 2010 11:13 PM, "Gunnar Eketrapp" 
> >> wrote:
> >> > Hi!
> >> >
> >> > I am in the process of adding some jquery-ui controls.
> >> >
> >> > For testing purposes I added a javascript section in my TML file but I
> >> then
> >> > got errors like ...
> >> >
> >> > Failure parsing template
> >> classpath:utskicket/pages/group/SelectMembers.tml:
> >> > The entity name must immediately follow the '&' in the entity
> reference
> >> >
> >> > 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field on
> >> tab
> >> > when selecting an item47 .bind( "keydown", function( event ) {48 if (
> >> > event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data( "autocomplete"
> >> > ).menu.active ) {50 event.preventDefault();51 }52 })53 .autocomplete({
> >> >
> >> >
> >> > So my question is can I insert a bigger chunk of javascript and tell
> T5
> >> not
> >> > to parse it !?
> >> >
> >> > Or do I have to move it to a separate .js file !?
> >> >
> >> > Btw T5 rocks!
> >> >
> >> > Thanks in Advance,
> >> > Gunnar Eketrapp
> >>
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> > Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Can I disable template proessing for a section of my TML file ?

2011-01-17 Thread Gunnar Eketrapp
Yea it can be solved but the code that I ported generated javascript inside
template code so the easy way was to just do the same in T5 ...


2011/1/17 Luke Wilson 

> Perhaps you can you engineer it so you use addScript and pass all dynamic
> items to a constructor, keeping your JS in a separate file.
>
> Luke
>
> On 17 Jan 2011, at 12:33, Gunnar Eketrapp wrote:
>
> > No that didn't work either.
> >
> > 2011/1/17 Luke Wilson 
> >
> >> Does enclosing the JS in a CData  section help?
> >>
> >> http://en.wikipedia.org/wiki/CDATA
> >>
> >> Luke
> >>
> >> On 17 Jan 2011, at 11:40, Gunnar Eketrapp wrote:
> >>
> >>> This ugly hack solved the problem but is far from what we want :-)
> >>>
> >>>   if (counter  1) {
> >>>
> >>> /Gunnar
> >>>
> >>> 2011/1/17 Gunnar Eketrapp 
> >>>
> >>>> I encountered this problem again ..
> >>>>
> >>>> I.e. am adding javascript dynamically but expresions such as
> >>>>
> >>>> foo < bar
> >>>>
> >>>> ... gets translated into ...
> >>>>
> >>>> foo < bar
> >>>>
> >>>> ... and fails to execute ...
> >>>>
> >>>> I tried the hide from parser method as Josh mentioned but T5 was not
> >> that
> >>>> easy to fool ...
> >>>>
> >>>> Is there any easy way to turn off the template parsing for a portion
> of
> >> the
> >>>> .tml file !?
> >>>>
> >>>> The DOCTYPE as mentioned by Borut didn't help either.
> >>>>
> >>>> Thanks in advance
> >>>> Gunnar Eketrapp
> >>>>
> >>>>
> >>>>
> >>>> That system created javascript dynamiucally which fails in T5
> >>>>
> >>>> 2010/12/22 Josh Canfield 
> >>>>
> >>>> Use the good old html/xml comment, used for years to hide javascript
> >> from
> >>>>> old browsers.
> >>>>>
> >>>>> 
> >>>>> var fromPage = '${pojo.property }';
> >>>>> //<-- hide javascript from xml parser.
> >>>>>
> >>>>> // -->
> >>>>> 
> >>>>> On Dec 21, 2010 11:13 PM, "Gunnar Eketrapp" <
> gunnar.eketr...@gmail.com
> >>>
> >>>>> wrote:
> >>>>>> Hi!
> >>>>>>
> >>>>>> I am in the process of adding some jquery-ui controls.
> >>>>>>
> >>>>>> For testing purposes I added a javascript section in my TML file but
> I
> >>>>> then
> >>>>>> got errors like ...
> >>>>>>
> >>>>>> Failure parsing template
> >>>>> classpath:utskicket/pages/group/SelectMembers.tml:
> >>>>>> The entity name must immediately follow the '&' in the entity
> >> reference
> >>>>>>
> >>>>>> 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field
> on
> >>>>> tab
> >>>>>> when selecting an item47 .bind( "keydown", function( event ) {48 if
> (
> >>>>>> event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data(
> "autocomplete"
> >>>>>> ).menu.active ) {50 event.preventDefault();51 }52 })53
> .autocomplete({
> >>>>>>
> >>>>>>
> >>>>>> So my question is can I insert a bigger chunk of javascript and tell
> >> T5
> >>>>> not
> >>>>>> to parse it !?
> >>>>>>
> >>>>>> Or do I have to move it to a separate .js file !?
> >>>>>>
> >>>>>> Btw T5 rocks!
> >>>>>>
> >>>>>> Thanks in Advance,
> >>>>>> Gunnar Eketrapp
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> >>>> Allévägen 2A, 132 42 Saltsjö-Boo
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> >>> Allévägen 2A, 132 42 Saltsjö-Boo
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> > Allévägen 2A, 132 42 Saltsjö-Boo
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Can I disable template proessing for a section of my TML file ?

2011-01-17 Thread Gunnar Eketrapp
No that didn't work either.

2011/1/17 Luke Wilson 

> Does enclosing the JS in a CData  section help?
>
> http://en.wikipedia.org/wiki/CDATA
>
> Luke
>
> On 17 Jan 2011, at 11:40, Gunnar Eketrapp wrote:
>
> > This ugly hack solved the problem but is far from what we want :-)
> >
> >if (counter  1) {
> >
> > /Gunnar
> >
> > 2011/1/17 Gunnar Eketrapp 
> >
> >> I encountered this problem again ..
> >>
> >> I.e. am adding javascript dynamically but expresions such as
> >>
> >> foo < bar
> >>
> >> ... gets translated into ...
> >>
> >> foo < bar
> >>
> >> ... and fails to execute ...
> >>
> >> I tried the hide from parser method as Josh mentioned but T5 was not
> that
> >> easy to fool ...
> >>
> >> Is there any easy way to turn off the template parsing for a portion of
> the
> >> .tml file !?
> >>
> >> The DOCTYPE as mentioned by Borut didn't help either.
> >>
> >> Thanks in advance
> >> Gunnar Eketrapp
> >>
> >>
> >>
> >> That system created javascript dynamiucally which fails in T5
> >>
> >> 2010/12/22 Josh Canfield 
> >>
> >> Use the good old html/xml comment, used for years to hide javascript
> from
> >>> old browsers.
> >>>
> >>> 
> >>> var fromPage = '${pojo.property }';
> >>> //<-- hide javascript from xml parser.
> >>>
> >>> // -->
> >>> 
> >>> On Dec 21, 2010 11:13 PM, "Gunnar Eketrapp"  >
> >>> wrote:
> >>>> Hi!
> >>>>
> >>>> I am in the process of adding some jquery-ui controls.
> >>>>
> >>>> For testing purposes I added a javascript section in my TML file but I
> >>> then
> >>>> got errors like ...
> >>>>
> >>>> Failure parsing template
> >>> classpath:utskicket/pages/group/SelectMembers.tml:
> >>>> The entity name must immediately follow the '&' in the entity
> reference
> >>>>
> >>>> 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field on
> >>> tab
> >>>> when selecting an item47 .bind( "keydown", function( event ) {48 if (
> >>>> event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data( "autocomplete"
> >>>> ).menu.active ) {50 event.preventDefault();51 }52 })53 .autocomplete({
> >>>>
> >>>>
> >>>> So my question is can I insert a bigger chunk of javascript and tell
> T5
> >>> not
> >>>> to parse it !?
> >>>>
> >>>> Or do I have to move it to a separate .js file !?
> >>>>
> >>>> Btw T5 rocks!
> >>>>
> >>>> Thanks in Advance,
> >>>> Gunnar Eketrapp
> >>>
> >>
> >>
> >>
> >> --
> >> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> >> Allévägen 2A, 132 42 Saltsjö-Boo
> >>
> >
> >
> >
> > --
> > [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> > Allévägen 2A, 132 42 Saltsjö-Boo
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Can I disable template proessing for a section of my TML file ?

2011-01-17 Thread Gunnar Eketrapp
This ugly hack solved the problem but is far from what we want :-)

if (counter  1) {

/Gunnar

2011/1/17 Gunnar Eketrapp 

> I encountered this problem again ..
>
> I.e. am adding javascript dynamically but expresions such as
>
> foo < bar
>
> ... gets translated into ...
>
> foo < bar
>
> ... and fails to execute ...
>
> I tried the hide from parser method as Josh mentioned but T5 was not that
> easy to fool ...
>
> Is there any easy way to turn off the template parsing for a portion of the
> .tml file !?
>
> The DOCTYPE as mentioned by Borut didn't help either.
>
> Thanks in advance
> Gunnar Eketrapp
>
>
>
> That system created javascript dynamiucally which fails in T5
>
> 2010/12/22 Josh Canfield 
>
> Use the good old html/xml comment, used for years to hide javascript from
>> old browsers.
>>
>> 
>> var fromPage = '${pojo.property }';
>> //<-- hide javascript from xml parser.
>>
>> // -->
>> 
>> On Dec 21, 2010 11:13 PM, "Gunnar Eketrapp" 
>> wrote:
>> > Hi!
>> >
>> > I am in the process of adding some jquery-ui controls.
>> >
>> > For testing purposes I added a javascript section in my TML file but I
>> then
>> > got errors like ...
>> >
>> > Failure parsing template
>> classpath:utskicket/pages/group/SelectMembers.tml:
>> > The entity name must immediately follow the '&' in the entity reference
>> >
>> > 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field on
>> tab
>> > when selecting an item47 .bind( "keydown", function( event ) {48 if (
>> > event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data( "autocomplete"
>> > ).menu.active ) {50 event.preventDefault();51 }52 })53 .autocomplete({
>> >
>> >
>> > So my question is can I insert a bigger chunk of javascript and tell T5
>> not
>> > to parse it !?
>> >
>> > Or do I have to move it to a separate .js file !?
>> >
>> > Btw T5 rocks!
>> >
>> > Thanks in Advance,
>> > Gunnar Eketrapp
>>
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Can I disable template proessing for a section of my TML file ?

2011-01-17 Thread Gunnar Eketrapp
I encountered this problem again ..

I.e. am adding javascript dynamically but expresions such as

foo < bar

... gets translated into ...

foo < bar

... and fails to execute ...

I tried the hide from parser method as Josh mentioned but T5 was not that
easy to fool ...

Is there any easy way to turn off the template parsing for a portion of the
.tml file !?

The DOCTYPE as mentioned by Borut didn't help either.

Thanks in advance
Gunnar Eketrapp



That system created javascript dynamiucally which fails in T5

2010/12/22 Josh Canfield 

> Use the good old html/xml comment, used for years to hide javascript from
> old browsers.
>
> 
> var fromPage = '${pojo.property }';
> //<-- hide javascript from xml parser.
>
> // -->
> 
> On Dec 21, 2010 11:13 PM, "Gunnar Eketrapp" 
> wrote:
> > Hi!
> >
> > I am in the process of adding some jquery-ui controls.
> >
> > For testing purposes I added a javascript section in my TML file but I
> then
> > got errors like ...
> >
> > Failure parsing template
> classpath:utskicket/pages/group/SelectMembers.tml:
> > The entity name must immediately follow the '&' in the entity reference
> >
> > 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field on
> tab
> > when selecting an item47 .bind( "keydown", function( event ) {48 if (
> > event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data( "autocomplete"
> > ).menu.active ) {50 event.preventDefault();51 }52 })53 .autocomplete({
> >
> >
> > So my question is can I insert a bigger chunk of javascript and tell T5
> not
> > to parse it !?
> >
> > Or do I have to move it to a separate .js file !?
> >
> > Btw T5 rocks!
> >
> > Thanks in Advance,
> > Gunnar Eketrapp
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: Discussion- the verdict

2011-01-12 Thread Gunnar Eketrapp
George that's your problem not ours ..

And the title verdict indicates that you have som legal authority ...

I think we T5:ers have a competitive advantage and really see no need for
spreading the light ... :-)

T5 - Code less - Deliver more

One could add Gossip less and shut down TSS

Gunnar Eketrapp


2011/1/12 George Banus 

> Hi Guys,
>
> I gave up on Tapestry. This was based on the overwhelmingly negative
> comments I've been reading about Tapestry on the Internet. Outside of this
> forum, I see no positive message about Tapestry anywhere. And that makes me
> very suspicious about the viability of this framework, besides all the nice
> and charming messages I have heard from you guys in this thread.
> So, I'm sorry I have to say that I'm saving my time and effort in learning
> Tapestry for something else. This is my decision for now, though I might
> change it in 3 or 4 years time after I notice some stability and
> consistencies in Tapestry releases.
>
> Again, sorry for this news :-(
>
> Bye,
> George
>
> On Tue, Dec 21, 2010 at 11:48 AM, George Banus  >wrote:
>
> > Hi,
> >
> > I am a newbie to Tapestry and while googling to learn more about
> tapestry,
> > I found this discussion going on at
> > http://www.theserverside.com/news/thread.tss?thread_id=61537. Some of
> the
> > comments look very disappointing.
> > Is Tapestry really used for serious projects?
> >
> > George
> >
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


Re: and user types ...

2011-01-10 Thread Gunnar Eketrapp
Great and thanks for the info! Now it works without writing any
conduit classes ...

2011/1/10 Yohan Yudanara :
> Oops.. sorry, Gunnar. Thiago is right. You don't need PropertyConduit.
> We need PropertyConduit if we add non-property column on Grid.
>
> So, you just need this on setupRender:
> void setupRender() {
>      beanModel = beanModelSource.createEditModel(,
> messages);
>      beanModel.add("");
>   }
>
> Best Regards,
> Yohan
>
> On 1/10/11, Thiago H. de Paula Figueiredo  wrote:
>> On Mon, 10 Jan 2011 06:13:33 -0200, Gunnar Eketrapp
>>  wrote:
>>
>>> Thanks Yohan !
>>> I now got it to work with my Money type in the grid + sorting.
>>> I created a TransactionAmountPropertyConduit as you advised ...
>>> But it's less then ideal to have to write a
>>> PropertyConduit class every time you use an own defined
>>> type in a grid.
>>
>> You don't need to write your own PropertyConduit unless the value you want
>> to show or edit isn't a a property, as you have the PropertyConduitSource
>> to do that. It's exactly the same service that is used by BeanModelSource
>> to create the PropertyConduit's.
>>
>> --
>> 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
>
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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



Re: and user types ...

2011-01-10 Thread Gunnar Eketrapp
Thanks Yohan !

I now got it to work with my Money type in the grid + sorting.

I created a TransactionAmountPropertyConduit as you advised ...

But it's less then ideal to have to write a
PropertyConduit class every time you use an own defined
type in a grid.

Have I missed something ...

Thanks anyhow !!!

Gunnar


2011/1/9 Yohan Yudanara :
> If you want simpler solution, just add property with java type that
> can represent your user type in your bean class.
>
> On 1/9/11, Yohan Yudanara  wrote:
>> You can take a look at
>> http://tapestry.1045711.n5.nabble.com/Grid-sortable-additionnal-column-td2433091.html.
>>
>> On .tml file, you need to use beanModel attribute on the Grid component:
>> > t:model="beanModel" >
>>
>> On .java file, you need to add your "amount" property to the beanModel:
>>     @Inject
>>     private BeanModelSource beanModelSource;
>>
>>     @Inject
>>     private Messages messages;
>>
>>     private BeanModel beanModel;
>>
>>     public BeanModel getBeanModel() {
>>       return beanModel;
>>     }
>>
>>     void setupRender() {
>>        beanModel = beanModelSource.createEditModel(,
>> messages);
>>        beanModel.add("", );
>>     }
>>
>> If your user type implements Comparable, then your property will be
>> displayed as sortable column.
>>
>> Best regards,
>> Yohan Yudanara
>>
>>
>> On 1/9/11, Gunnar Eketrapp  wrote:
>>> Hi Thiago and others ...
>>>
>>> I still haven't managed to display and sort user types in the grid. If
>>> I do the cell rendering on my own as in ...
>>>
>>>             
>>>                 ${transaction.amount.format()}
>>>             
>>>
>>> .. the sorting goes away 
>>>
>>> I have added a MoneyTranslator but that one is only used by forms I
>>> guess.
>>>
>>> Your last advice was ...
>>>
>>>>  You can also provide a view block for your own types:
>>>> http://tapestry.apache.org/beaneditform-guide.html, section Adding New
>>>> Property Editors. This option is better suited when you use the same
>>>> property types in many grids. If it's just one, a >  cell override is
>>>> the
>>>> best option.
>>>
>>> ... which I have read but dont understand how to use. (To stupid I guess
>>> ...)
>>>
>>> Do you mean that I by adding a property editor for my Money class I
>>> will be able to display and sort my money type in grid's.
>>>
>>> Thanks in advance !!!
>>> Gunnar Eketrapp,
>>>
>>> 2010/12/17 Thiago H. de Paula Figueiredo :
>>>> On Fri, 17 Dec 2010 12:42:14 -0200, Stephan Windmüller
>>>>  wrote:
>>>>
>>>>> You have to define the layout of the cell by yourself. Have a look at
>>>>>
>>>>> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>>>
>>>> You can also provide a view block for your own types:
>>>> http://tapestry.apache.org/beaneditform-guide.html, section Adding New
>>>> Property Editors. This option is better suited when you use the same
>>>> property types in many grids. If it's just one, a cell override is the
>>>> best
>>>> option.
>>>>
>>>> --
>>>> 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
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
>>> Allévägen 2A, 132 42 Saltsjö-Boo
>>>
>>> -
>>> 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
>
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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



Re: datefield - no option to cancel?

2011-01-09 Thread Gunnar Eketrapp
I gave up on datefield and switched to jQuery datepicker ...

2011/1/9 Paul Stanton :
> further to this, say your date format is m/d/ and the initial value is
> 1/1/2011 and you want to change it to 2/1/2011.. that is not possible.
> changing month, the selected 'day' is still selected and therefore not
> selectable.
>
> use case:
>
> initial date is 2/1/2011
> 1. open date picker
> 2. change month to feb
> 3. try to click on 1st of feb
> - nothing happens.
>
> On 9/01/2011 9:50 AM, Paul Stanton wrote:
>>
>> hi all,
>>
>> using the datefield component, if a user changes their mind there seems to
>> be no way for them to close the popup without changing the value in some way
>>
>>
>> http://tapestry.apache.org/tapestry5.2-dev/tapestry-core/ref/org/apache/tapestry5/corelib/components/DateField.html
>>
>> once the icon has been clicked, there's no option to close the popup
>> explicitly and selecting the current value is disabled so the user has to
>> select another date to close the popup.
>>
>> am i missing something or should i log an issue?
>>
>> p.
>>
>> -
>> 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
>
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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



Re: and user types ...

2011-01-09 Thread Gunnar Eketrapp
Hi Thiago and others ...

I still haven't managed to display and sort user types in the grid. If
I do the cell rendering on my own as in ...


${transaction.amount.format()}


.. the sorting goes away 

I have added a MoneyTranslator but that one is only used by forms I guess.

Your last advice was ...

>  You can also provide a view block for your own types: 
> http://tapestry.apache.org/beaneditform-guide.html, section Adding New 
> Property Editors. This option is better suited when you use the same property 
> types in many grids. If it's just one, a >  cell override is the best option.

... which I have read but dont understand how to use. (To stupid I guess ...)

Do you mean that I by adding a property editor for my Money class I
will be able to display and sort my money type in grid's.

Thanks in advance !!!
Gunnar Eketrapp,

2010/12/17 Thiago H. de Paula Figueiredo :
> On Fri, 17 Dec 2010 12:42:14 -0200, Stephan Windmüller
>  wrote:
>
>> You have to define the layout of the cell by yourself. Have a look at
>>
>> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>
> You can also provide a view block for your own types:
> http://tapestry.apache.org/beaneditform-guide.html, section Adding New
> Property Editors. This option is better suited when you use the same
> property types in many grids. If it's just one, a cell override is the best
> option.
>
> --
> 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
>
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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



Re: Problems with passing event context from a form ...

2011-01-08 Thread Gunnar Eketrapp
Hi again!

I had mixed the onPassivate() with the t:context parameter ...

Question: What is the relationship between these ?

TIA, Gunnar

2011/1/8 Gunnar Eketrapp :
> Hi all!
>
> I have a form declared as ...
>
>         
>
> When the form is submitted both of these are added to the request path .. i.e.
>
> Request Path:
>
> /group/economy/edittransaction.form/5/1
>
> But for some reason the event context passed to
> onActivate(EventContext ctx) when the form is submitted does only
> contain the first parameter (i.e. the 5)
>
> What am I missing !!!
>
> TIA,
> Gunnar Eketrapp
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo

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



Problems with passing event context from a form ...

2011-01-08 Thread Gunnar Eketrapp
Hi all!

I have a form declared as ...

        

When the form is submitted both of these are added to the request path .. i.e.

Request Path:

/group/economy/edittransaction.form/5/1

But for some reason the event context passed to
onActivate(EventContext ctx) when the form is submitted does only
contain the first parameter (i.e. the 5)

What am I missing !!!

TIA,
Gunnar Eketrapp

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



Forms and Grid questions ....

2010-12-28 Thread Gunnar Eketrapp
Hi!

I am using a grid inside a form to display a list of name + checkbox.

The user can then select a number of names and press OK (or cancel).

My questions are:

1) How do I disable the sorting functionality of the grid.

2) If I would like to suppport sorting and paging then I need some way to
first submit what's been checked.

Or should I skip the grid !?

Thanks in advance,
Gunnar Eketrapp


Re: Can I disable template proessing for a section of my TML file ?

2010-12-21 Thread Gunnar Eketrapp
Hi and thanks for the tip!

I tried it but got the same error ...

Question: Wich doctype is the preferred one when using T5.2.

I am using

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

TIA, Gunnar

2010/12/22 Borut Bolčina 

> Hi,
>
> might be unrelated, but add the following DOCTYPE at the very top of your
> TML:
>
>  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
>
> -Borut
>
> 2010/12/22 Gunnar Eketrapp 
>
> > Hi!
> >
> > I am in the process of adding some jquery-ui controls.
> >
> > For testing purposes I added a javascript section in my TML file but I
> then
> > got errors like ...
> >
> > Failure parsing template
> classpath:utskicket/pages/group/SelectMembers.tml:
> > The entity name must immediately follow the '&' in the entity reference
> >
> > 43 }44 45 jQuery( "#tags" )46 // don't navigate away from the field on
> tab
> > when selecting an item47 .bind( "keydown", function( event ) {48 if (
> > event.keyCode === $.ui.keyCode.TAB &&49 $( this ).data( "autocomplete"
> > ).menu.active ) {50 event.preventDefault();51 }52 })53 .autocomplete({
> >
> >
> > So my question is can I insert a bigger chunk of javascript and tell T5
> not
> > to parse it !?
> >
> > Or do I have to move it to a separate .js file !?
> >
> > Btw T5 rocks!
> >
> > Thanks in Advance,
> > Gunnar Eketrapp
> >
>



-- 
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo


  1   2   3   >