upgrading to 5.3

2011-11-29 Thread angelochen
Hi,

got quite a number of IncludeJavaScriptLibrary/IncludeStylesheet in the
code, is there an easy way to find and replace in IntelliJ for this task?

Thanks,

Angelo

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/upgrading-to-5-3-tp5031567p5031567.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry, hibernate and timeout

2011-11-29 Thread bdm
Thanks, but I already use the C3P0 connection pool without success ... maybe
it's a configuration problem but I can not figured out what is it !

I have move the post to the Tapestry - User forum as suggested !

I'll still digging ...

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028844p5031673.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tapestry 5 and Mobile

2011-11-29 Thread Peter Stavrinides
Howard that would be awesome from my point of view at least. I am still 
researching, but jQuery Mobile seems like a natural fit for Tapestry. If I 
understand what you are contemplating then this would be an enabler for 
seamless content adaptation. 

Cheers,
Peter


- Original Message -
From: Howard Lewis Ship hls...@gmail.com
To: Tapestry users users@tapestry.apache.org
Sent: Monday, 28 November, 2011 11:00:01 PM
Subject: Re: Tapestry 5 and Mobile

One thing I've been thinking about is to have greater control over the
core stack on a request-by-request basis, so that a single app can
skin one way for a desktop browser, and skin another way (with changes
to the core stack) for a mobile device (i.e., include JS  CSS from
jQuery Mobile, for example).

On Mon, Nov 28, 2011 at 11:08 AM, SeleniuM invest-in...@hotmail.com wrote:
 Also, you can always implement your own Chain of Command builder directly
 implemented from Tapestry IOC.
 The thing is to make parameteres width and height of your own web
 application, and to make a selection when detected what device is
 approaching your web applications using just variable HTTP_USER_AGENT. On
 the knowledge of what device is detected, it parses values width and height
 ( and many others if implemented so) to it. :) If you want, I will make some
 code tips here. Cheers.

 P.S. Sorry on my English.

 ~SeleniuM

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-and-Mobile-tp5028089p5029782.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

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





-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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


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



RE: tapestry, hibernate and timeout

2011-11-29 Thread bdm
Thanks ! I keep your solution if I can not configure properly C3P0 ...

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028844p5031723.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Tapestry 5 and Mobile

2011-11-29 Thread François Facon
This would be great!

we did some experiments on jquery mobile.
The lib is under construction at
https://github.com/got5/tapestry5-jquery-mobile  (based on Beta 1 not
the latest version)
and a sample at  https://github.com/got5/techforum.
(Ajax Page load disabled)

the integration will be even better, if we had support for ajax form
validation and ajax render request.

Next generate PhoneGap application from Tapestry WebApp ;)

the list of JS toolkit show at Phone Gap web site is amazing
http://phonegap.com/tools

Regards
François

2011/11/28 Howard Lewis Ship hls...@gmail.com:
 One thing I've been thinking about is to have greater control over the
 core stack on a request-by-request basis, so that a single app can
 skin one way for a desktop browser, and skin another way (with changes
 to the core stack) for a mobile device (i.e., include JS  CSS from
 jQuery Mobile, for example).

 On Mon, Nov 28, 2011 at 11:08 AM, SeleniuM invest-in...@hotmail.com wrote:
 Also, you can always implement your own Chain of Command builder directly
 implemented from Tapestry IOC.
 The thing is to make parameteres width and height of your own web
 application, and to make a selection when detected what device is
 approaching your web applications using just variable HTTP_USER_AGENT. On
 the knowledge of what device is detected, it parses values width and height
 ( and many others if implemented so) to it. :) If you want, I will make some
 code tips here. Cheers.

 P.S. Sorry on my English.

 ~SeleniuM

 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/Tapestry-5-and-Mobile-tp5028089p5029782.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.

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





 --
 Howard M. Lewis Ship

 Creator of Apache Tapestry

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

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

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



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



hosting

2011-11-29 Thread csckid
Is it possible to host tapestry site on google app engine? Isn't there any
free java hosting site?

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

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



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

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

   t:textfield t:id=email name=email size=30 value=email
validate=email, required disabled=user /

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

Closest to success where

   t:textfield t:id=email name=email size=30 value=email
validate=email, required readonly=readonly /

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:

   - input readonly
   - input readonly=readonly
   - input readonly=


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 do.not.eat.yellow.s...@gmail.com

 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/readonlyhttp://reference.sitepoint.com/html/input/readonly

 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@tapestry.**apache.orgusers-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: Gave up on T5.3 for now ...

2011-11-29 Thread Thiago H. de Paula Figueiredo
On Tue, 29 Nov 2011 11:22:25 -0200, Gunnar Eketrapp  
gunnar.eketr...@gmail.com wrote:



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


Agreed. Please file a JIRA.

--
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



Re: hosting

2011-11-29 Thread Thiago H. de Paula Figueiredo

On Tue, 29 Nov 2011 11:17:49 -0200, csckid testnowsh...@gmail.com wrote:


Is it possible to host tapestry site on google app engine?


Yes. Search the mailing list archives.


Isn't there any free java hosting site?


Amazon AWS has a free tier (http://aws.amazon.com/free/), so does Red Hat  
(https://openshift.redhat.com/app/). I haven't tried any of them.


--
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



Re: T5: dynamically set disabled attribute

2011-11-29 Thread George Christman
Josh, Thanks a ton... very much appreciated. This is exactly what I was
looking for. My form consist of about 20/30 fields, so I don't think I'll
see much of a performance issue using option 1. As far as option two, I
wasn't aware tapestry allowed us to pass back a value through the parameter
variable. Great to know, you answered my question how to map a field with
the isDisabled method. Anyhow thanks again. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/T5-dynamically-set-disabled-attribute-tp2414476p5032387.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: hosting

2011-11-29 Thread Barry Books
I've used both Google and Amazon to host Tapestry sites. If you know
how to administer a Linux box then AWS is better if not Google might
be better. Google has some/many restrictions AWS has none and in fact
has many other useful services.

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



Re: 5.3 Bug AjaxFormLoop nested within Zone

2011-11-29 Thread George Christman
I have found you can add a new row, but if you try modifying an existing row,
the changes don't seem to take effect. I'm posting my code below to be
reviewed. 

.tml
t:Zone t:id=formZone
t:form t:id=admin zone=formZone
Current State
t:ActionLink t:id=test t:zone=testZonetest/t:ActionLink
t:Zone t:id=testZone id=testZone visible=false
div t:type=ajaxformloop t:id=formValidations
source=formValidations value=formValidation encoder=encoder
t:select t:id=currentState
value=formValidation.currentState model=stateModel blankLabel=Select
Current State/
t:removerowlinkremove/t:removerowlink
/div  
/t:Zone
t:Submit value=Update/
/t:form
/t:Zone

.class
@Property
private FormValidation formValidation;

@Property
@Persist
private ListFormValidation formValidations;

@Inject
private Session session;

@Property
@Persist
private SelectModel stateModel;

@Inject
private SelectModelFactory selectModelFactory;

@InjectComponent
private Zone testZone, formZone;

Object onActionFromTest() {
return testZone.getBody();
}

void onPrepareForRender() {
formValidations =
session.createCriteria(FormValidation.class).list();

ListPrState prStates =
session.createCriteria(PrState.class).list();
stateModel = selectModelFactory.create(prStates, Label);
}

@CommitAfter
Object onSuccess() {
for(FormValidation _formValidation : formValidations) {
session.saveOrUpdate(_formValidation);
}
return formZone.getBody();
}

Object onAddRow() {
formValidation = new FormValidation();
formValidations.add(formValidation);
return formValidation;
}

public ValueEncoderFormValidation getEncoder() {
return new ValueEncoderFormValidation() {
public String toClient(FormValidation formValidation) {
return String.valueOf(formValidation.getTempId());
}

public FormValidation toValue(String clientValue) {
Long key = new Long(clientValue);
for (FormValidation holder : formValidations) {
if (holder.getTempId() == key) {
return holder;
}
}
return null;
}
};
}

@CommitAfter
void onRemoveRow(FormValidation formValidation) {
formValidations.remove(formValidation);
session.delete(formValidation);
}  

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/5-3-Bug-AjaxFormLoop-nested-within-Zone-tp5029977p5032526.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: tapestry, hibernate and timeout

2011-11-29 Thread Lenny Primak
Are you using glassfish?  Glassfish has connection pools built in. You can use 
those. I use them with success with JPA but I am pretty sure hibernate is very 
similar in this manner. 



On Nov 29, 2011, at 4:31 AM, bdm b...@imageau.eu wrote:

 Thanks ! I keep your solution if I can not configure properly C3P0 ...
 
 --
 View this message in context: 
 http://tapestry.1045711.n5.nabble.com/tapestry-hibernate-and-timeout-tp5028844p5031723.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 

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



Re: 5.3 Bug AjaxFormLoop nested within Zone

2011-11-29 Thread George Christman
I filed a JIRA bug and reverted back to version 5.3.0 until someone gets a
chance to look at it. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/5-3-Bug-AjaxFormLoop-nested-within-Zone-tp5029977p5032840.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: hosting

2011-11-29 Thread Christian Köberl
2011-11-29 14:17, csckid:
 Isn't there any free java hosting site?
There are some:
http://www.cloudbees.com/
http://www.heroku.com/
https://openshift.redhat.com/app/
http://www.cloudfoundry.com/
and as you already noted GAE: http://appengine.google.com/
I guess there are some more, and there will be more in the next couple
of months.

All providers give you at least one free application to host.

I've run Tapestry apps successfully in Cloudbees, and GAE. I guess there
won't be many problems on the others.

Chris

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



[T5.2.6] Setting up IoC to allow ordered configuration of a pub/sub system

2011-11-29 Thread robert baker
Hi all,

I set up a service, UserEventHub, to send notifications of logon and
logoff application wide in our app.  Right now, one listener is wired
up to it, SessionTrackerImpl, an implementation class of another
service in my app, SessionTracker. (SessionTrackerImpl also implements
UserEventListener, the listener interface for the UserEventHub).  I
used a technique I saw in TapestryModule to wire the listener up;
here's what my AppModule.java looks like with regard to those two
services:


public class AppModule
{
public static void bind(ServiceBinder binder)
{
binder.bind(UserEventHub.class, UserEventHubImpl.class);
}

public static SessionTracker buildSessionTracker(
@Autobuild SessionTrackerImpl sessionTrackerImpl,
UserEventHub eventHub) {

eventHub.addUserEventListener(sessionTrackerImpl);

return sessionTrackerImpl;
}

// and so forth...
}


This works just fine.

However, let's say I wanted to have the ability to control the order
that objects get added, for example, as I add more objects to the hub,
I may want some listeners to get a log on notification before others
(say, for sake of argument, they were doing initialization where the
order of it was critical).  It seems like Tapestry IoC's configuration
facility would be the right solution for this.  Here's what I did:

public class AppModule
{
public static void bind(ServiceBinder binder)
{
binder.bind(SessionTracker.class, SessionTrackerImpl.class);
binder.bind(UserEventHub.class, UserEventHubImpl.class);
}

@Contribute(UserEventHub.class)
public static void contributeUserEventHub(
OrderedConfigurationUserEventListener configuration,
@Autobuild SessionTrackerImpl sessionTrackerImpl) {

configuration.add(SessionTracker, sessionTrackerImpl);
}
}


Now the service acts like it's getting built twice (which was causing
subtle, hair-tearing bugs).  I can kinda see how that is happening
(autobuilt parameter and the bind call), but how can I setup
contributions to UserEventHub that are also services themselves (that
need to be visible as such)?  Or is this even the right way to go
about this?

Does this make any sense?  Thanks so much in advance for any help provided.

Thanks,
Les Baker

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



Re: [T5.2.6] Setting up IoC to allow ordered configuration of a pub/sub system

2011-11-29 Thread Thiago H. de Paula Figueiredo
On Tue, 29 Nov 2011 18:04:33 -0200, robert baker les.baker1...@gmail.com  
wrote:



Hi all,


Hi!


public static SessionTracker buildSessionTracker(
@Autobuild SessionTrackerImpl sessionTrackerImpl,
UserEventHub eventHub) {

eventHub.addUserEventListener(sessionTrackerImpl);

return sessionTrackerImpl;
}
public static void bind(ServiceBinder binder)
{
binder.bind(SessionTracker.class, SessionTrackerImpl.class);
binder.bind(UserEventHub.class, UserEventHubImpl.class);
}


You shouldn't use @Autobuild for objects which are already configured as  
services, as @Autobuild will always instantiate a new instance. Without  
this annotation, this parameter will get the SessionTracker object from  
the Registry (i.e. the service registered in Tapestry-IoC).


Try
public static SessionTracker buildSessionTracker(SessionTracker  
sessionTracker,UserEventHub eventHub) (without @Autobuild)


--
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



Re: Tap 5.3 : Jboss 5.0.1 tmp/vfs-nested.tmp fill up fast

2011-11-29 Thread Shing Hing Man
Thanks for the url!


I have followed a suggestion at the given link and added 


entry
key${path of my deploy directory}/key
valueinject bean=VfsNamesExceptionHandler//value
/entry

to server/src/etc/conf/default/bootstrap/vfs.xml. 
The problem has been fixed. 


It is strange that I only have this problem after upgraded to Tap 5.3. 


Shing 




 From: Howard Lewis Ship hls...@gmail.com
To: Tapestry users users@tapestry.apache.org; Shing Hing Man 
mat...@yahoo.com 
Sent: Monday, November 28, 2011 9:01 PM
Subject: Re: Tap 5.3 : Jboss 5.0.1 tmp/vfs-nested.tmp fill up fast
 
A quick google search turned this up: http://community.jboss.org/message/614729

On Mon, Nov 28, 2011 at 12:34 PM, Shing Hing Man mat...@yahoo.com wrote:
 My  Tapestry applications have been running in Jboss 5.0.1 without any 
 problem before I upgraded to Tapestry 5.3.

 I have noticed, in Jboss 5.0.1,  the directory
    tmp/vfs-nested.tmp

 grows very quickly (about 20G a day), after I  upgraded to Tapestry 5.3.

 I wonder if it is caused  by Tapestry 5.3, and if someone else has the same 
 problem.

 Thanks in advance for any assistance!

 Shing



-- 
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

Badly formed JSON string error generated on linksubmit under 5.3

2011-11-29 Thread RyDel
Hello All,

I've attempted to make the switch to 5.3 and am facing an issue that
currently eludes me.  My attempts to use linksubmit leads to a javascript
error somewhere within the depths of the framework, with an error suggesting
that Tapestry is creating an incorrectly formated client redirect request.


Internally, the events are firing and all is well.  That is until Tapestry
attempts to perform the redirect behind my return value of PageName.class. 
(Or string literal PageName, same result).

I've dug into the underlying javascript error as far as I can, and it comes
down to these types of initial errors:



The first is the result of trying to return PageName.class and the other
was a later attempt to do the same through a multizone return - just for
comparison, not the desired behavior.


The offending code is simply:




This return value is working for other buttons on the very same page, just
not working at the end of the line.  The buttons that work are
actionlinks, the one that is still failing is linksubmit.  I've tried some
variations on the submit theme and they all lead to the exact same error,
when attempting to return Index.class.


The application structure is as follows:
  An Index page that displays a grid of reports with edit actionlinks that
lead to a wizard.
  A wizard parent page with one default zone and three blocks to anchor the
three-page configuration process
  Three pages with Continue/Back/Cancel actionlinks  linksubmits.
  The wizard child pages advance forward using linksubmit. *The leading
pages return a reference to the next page(embedded component references),
the last (which fails) tries to return the index page class.*

*So in summary, linksubmit works fine when returning embedded components but
not a page class reference.  Actionlinks on the same pages CAN return page
class references with no trouble.*

The error is client-side and is present under both IE 8 and FireFox. 
Nothing but success is ever logged on the server.  Can anyone suggest where
I might start to sort this out?  What further information can I share that
would be helpful?

Thank you,
Ryan


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Badly-formed-JSON-string-error-generated-on-linksubmit-under-5-3-tp5033566p5033566.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: [T5.2.6] Setting up IoC to allow ordered configuration of a pub/sub system

2011-11-29 Thread robert baker
Thiago,

I assume you were talking about the second part with the
contributeUserEventHub service contribution method?  The first snippet
of code works fine.

I had considered putting SessionTracker (the interface) in the
parameter list for the contribution method, but the consequences of
that is the SessionTracker interface must extend the UserEventListener
interface (the UserEventHub listener interface) to make the call to
addUserEventListener work without casting.

That means that SessionTracker clients have unnecessary methods in
their API that have to be documented not to be called by clients. I
didn't really want to do that.

I appreciate knowing that autobuild always makes a new instance,
though; that clarifies a few things.

Thanks again,
Les Baker

On Tue, Nov 29, 2011 at 3:09 PM, Thiago H. de Paula Figueiredo
thiag...@gmail.com wrote:
 On Tue, 29 Nov 2011 18:04:33 -0200, robert baker les.baker1...@gmail.com
 wrote:

 Hi all,


 Hi!

    public static SessionTracker buildSessionTracker(
            @Autobuild SessionTrackerImpl sessionTrackerImpl,
            UserEventHub eventHub) {

        eventHub.addUserEventListener(sessionTrackerImpl);

        return sessionTrackerImpl;
    }
    public static void bind(ServiceBinder binder)
    {
        binder.bind(SessionTracker.class, SessionTrackerImpl.class);
        binder.bind(UserEventHub.class, UserEventHubImpl.class);
    }


 You shouldn't use @Autobuild for objects which are already configured as
 services, as @Autobuild will always instantiate a new instance. Without this
 annotation, this parameter will get the SessionTracker object from the
 Registry (i.e. the service registered in Tapestry-IoC).

 Try
 public static SessionTracker buildSessionTracker(SessionTracker
 sessionTracker,UserEventHub eventHub) (without @Autobuild)

 --
 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



Re: Radio button inside ajaxformloop

2011-11-29 Thread Nefron
Hey, thanks for responding. 

You guessed correctly. I'm creating a tests and quizzes application that
should be used to test students at my university.

I already tried something similar to the stuff from your response,
unfortunately it doesn't work as expected. The row gets added this time, but
the radio buttons act like they aren't a part of the same radio group. I
guess this is because only one row is updated with the ajax request, so the
radio group and other boxes don't know about the change.

Anyway, I found a workaround that involves submitting the form. 

The addrow and remove links submit the whole form via ajax and I do the
stuff I need to differentiate between actions I should take in those
onSelected event handlers. 

The tml looks like this:


 t:zone t:id=loopZone id=loopZone
t:form t:id=questionForm zone=loopZone

t:beaneditor object=question t:id=questioneditor/

div
t:radiogroup t:id=correctAnswer encoder=encoder
value=correctAnswer validate=required

t:loop source=question.answers value=answer
t:id=answerLoop encoder=encoder

t:beaneditor object=answer t:id=answereditor
add=remove
p:answercorrect
t:radio id=radio value=answer/
t:label for=radioCorrect/t:label
/p:answercorrect
p:remove
t:linksubmit t:id=remove
context=answer Remove Row /t:linksubmit
/p:remove
/t:beaneditor
/t:loop

t:linksubmit t:id=addRow t:zone=loopzone Add Row
/t:linksubmit

/t:radiogroup
/div


t:submit t:id=save/

/t:form
/t:zone

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Radio-button-inside-ajaxformloop-tp5027367p5034294.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