Geoff Callender | 22 May 22:58
Picon

[ANN] JumpStart upgraded to Tomcat 7, JBoss 7, and Glassfish 3

Hi all,

JumpStart 6.1 has been released. You can still test in Jetty and now you can deploy to:

	* JBoss 7.1.1
	* Tomcat 7.0
	* Glassfish 3.1.2

That's because it now works with:

	* Hibernate 4.1 (upgraded from 3.3)
	* Java EE 6 (upgraded from 5)
	* OpenEJB 4.0.0 (upgraded from 3.1.4).

Incidentally, the newly released OpenEJB and TomEE are very cool. Have a look at
http://openejb.apache.org/ .

JumpStart is running in the usual place…

	http://jumpstart.doublenegative.com.au/jumpstart/

...and of course comments and critiques are always welcome.

Cheers,

Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
For additional commands, e-mail: users-help <at> tapestry.apache.org
(Continue reading)

Dimitris Zenios | 22 May 17:43
Picon

Tapestry JPA Bug

Hi guys i think there is a bug in tapestry-jpa and value encoder

In a discussion i was reading, Howard changed valueEncoder of
tapestry-hibernate to return null in toClient if the id of the object
was null.That was use full in cases where we wanted to have the same
page for save/edit.

Quote from Howard
"I recently changed Tapestry 5.3 so that the Hibernate ValueEncoder
(used implicitly by @PageActivationContext) will encode a transient
entity as null.  This makes it possible to use the same page for add
and edit, with a bit of smart logic in your onActivate() event handler
method.
"

Unfortunately the same doesn't happen in Tapestry-jpa.Is this a real
bug or there should be another way to have same page for save/edit.

To Client of tapestry-jpa
    public String toClient(final E value)
    {
        if (value == null)
            return null;

        final Object id = propertyAdapter.get(value);

        if (id == null)
            throw new IllegalStateException(
                    String.format(
                            "Entity %s has an %s property of null;
(Continue reading)

George Christman | 22 May 15:51
Favicon

Two arguements in validate parameter

Hello, I'm trying add the following arguments to the tapestry validate
parameter. The first one being tapestry's built in email validator and the
second being my custom validator. 

t:validate="email, prop:getFieldValidator('shiptoContactEmail')"

which results in this exception. 

java.lang.RuntimeException
Unexpected character ':' at position 12 of input string: email,
prop:getFieldValidator('shiptoContactEmail')

In a previous post, Robert said 

"Specifying the property prefix (eg: prop:, component:, validate:, etc.)
only
works at the beginning of the expression, and it is applied to the entire
expression. "

which would explain the exception, however I'm wondering how this should be
done. Should I pass back email in the fieldValidator and handle it on the
backend or is there another way to handle this on the frontend. 

Thanks,

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Two-arguements-in-validate-parameter-tp5713312.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
(Continue reading)

bhorvat | 22 May 12:42
Picon
Gravatar

Tapestry Transactions

What is the best way to handle complex transaction in Tapestry?

Up to this point I had a bunch of services that have @CommitAfter annotation
on them, and then I have a method say addNewSomething() in which I call a
create a bunch of objects all conected to each other and then call
appropriate services to persist them. The obvious problem is that each
persist is not depended on the next one as it should be. 

So now I am trying to put @CommitAfter anotation on the method
addNewSomething and this works in some cases (for adding for example, but
not for deleting - when I have to delete some object/objects from DB). Not
really sure why is that

Anyway what whould be the best way to handle this? Should I maybe consider
spring and @Transactional annotation. 

Also is OpenSessionInViewFilter something that should be used in tapestry?
It is my understanding that this is used because we first load an object and
then when in the tml we have a call to list of objects that are not loaded
it will throw an exception. However this does not happen for me. What it
does happen is that if I load an object but in some method that is called on
say form submit I need a list it will then throw an exception, but
OpenSessionInViewFilter does not help with that, right? So I am right to
assume that tapestry-hibernate has its own version of
OpenSessionInViewFilter?

Cheers

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Transactions-tp5713299.html
(Continue reading)

llama-king | 21 May 11:08
Favicon

[t5.3.x] Potential Static Util Class Concurrency Issue

Hello,

First post! Woo!

While using various revisions of T5.3 we ran into a strange case as follows:

1. User A fills in text field, submits form.
2. User B fills in text field, submits form.
(Where 1 and 2 occur within milliseconds of each other.)

3. Events trigger, util class static method called.

4. User A's query is passed to util class, result returned to User B.
(User B has intercepted  User  A's result.)

This occurred a while ago and was rectified by stripping away the static.
I'm 
just wondering if anyone is familiar with this scenario and/or would have
any 
ideas of a potential work-around or fix?

Thanks!
Peter

--
View this message in context: http://tapestry.1045711.n5.nabble.com/t5-3-x-Potential-Static-Util-Class-Concurrency-Issue-tp5712809.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
(Continue reading)

sommeralex | 21 May 20:16
Picon
Gravatar

Javascript Image Cropper with Chrome

Hello!

I have embedded the Java Script Image Cropper Lib from
http://www.defusion.org.uk/code/javascript-image-cropper-ui-using-prototype-scriptaculous/

and it works fine.. except with google chrome. I have no idea why chrome
makes problem. How can i investigate such problems? Here is my (simplified)
code:

JAVA 

package com.airwriting.frontend.components.plugins;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Random;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.Import;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.internal.services.ContextResource;
import org.apache.tapestry5.ioc.Resource;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Context;
import org.apache.tapestry5.services.javascript.JavaScriptSupport;
import org.apache.tapestry5.upload.services.UploadedFile;
(Continue reading)

George Christman | 21 May 19:48
Favicon

Custom Validation with AjaxFormLoop component

hello, I've disabled client validation and currently going to rely on server
side validation. My validation is dynamic, so it's determined by the backend
at render and submit. The validation works perfectly, however when you add a
new row using AjaxFormLoop and click the submit button for the first time,
the error shows up in the error list, but does not outline the textfield or
mark the label red. If you click it a second time, the label and box are
outlined in red. 

I'm assuming this is being handled with some after render script, but isn't
being updated until the page has been refreshed. Does anybody know how to
fix this issue so all new fields in the AjaxFormLoop are marked in red when
validation errors are present?

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Custom-Validation-with-AjaxFormLoop-component-tp5713091.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
For additional commands, e-mail: users-help <at> tapestry.apache.org

Rural Hunter | 21 May 17:58
Picon

Is there a way to have Tapestry generate well-formatted html?

It's very hard to view what actually Tapestry generated at client side 
since the html source generated by Tapestry is almost in only one line.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
For additional commands, e-mail: users-help <at> tapestry.apache.org

George Christman | 21 May 17:11
Favicon

Pass component parameter back to method - Exception

Hello, I'm trying to pass back a component id to a backend method as Thiago
suggested in another post, however it's resulting in the following exception
before the method is even called. I have a work around passing back the id
as a String which works without any issues providing the field id's are
static. However it breaks if your using add row or any other dynamically
generated id's.  

java.lang.RuntimeException
Error parsing property expression
'getFieldValidatorTest(component:shiptoContactName)': line 1:21 no viable
alternative at input '('.
java.lang.RuntimeException
line 1:21 no viable alternative at input '('

The code I'm using is as followed. 

<t:TextField t:id="shiptoContactName" value="pr.shiptoContactName"
t:validate="prop:getFieldValidator(component:shiptoContactName)"/>

public FieldValidator getFieldValidatorTest(Field field) {
     return null;
}

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Pass-component-parameter-back-to-method-Exception-tp5712975.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
For additional commands, e-mail: users-help <at> tapestry.apache.org
(Continue reading)

captain_rhino | 21 May 14:19

memcached sticky session

Is there any thing I have to configure or add to my tapestry project if i
want to use memcached sticky sessions please with my apache tomcat server? 
Any experiances/general advice much appreciated.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/memcached-sticky-session-tp5712867.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe <at> tapestry.apache.org
For additional commands, e-mail: users-help <at> tapestry.apache.org

Michael Schmidt | 21 May 11:07

Beaneditform looses data of non visual fields.

Hi all,

I'm trying to use the BeanEditForm for editing the data of a object and 
persist it using hibernate.

Here are some code snippets:

Page Class:

public class AdministrationGroupsEdit
{
    @Inject
    Session session;

    @InjectPage
    AdministrationGroups redirectPage;

    private Integer groupId;

    @Property
    private Group group;

    void onActivate(Integer personId)
    {
       this.groupId = personId;
    }

    void setupRender()
    {
       this.group = (Group) this.session.createQuery("from Group where 
(Continue reading)


Gmane