You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Mukesh Chandra <mu...@opensolutions.com> on 2016/06/23 14:05:38 UTC

RE: Tapestry 4.1 Migration to Tapestry 5

Hi All

Can I have both the Tapestry 5 and Tapestry 4 pages in same project and build them using ANT?

I am new to Tapestry, your help is appreciated.

Regards
Mukesh

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Barry Books <bf...@trsvax.com>.
No it just means T5 will not process them and they will just pass on to T4


> On Jun 28, 2016, at 10:34 AM, Mukesh Chandra <mu...@opensolutions.com> wrote:
> 
> If I ignore the T4 urls, won't the T4 pages stop working?
> 
> -----Original Message-----
> From: Barry Books [mailto:bfb@trsvax.com]
> Sent: Tuesday, June 28, 2016 8:54 PM
> To: Mukesh Chandra
> Cc: Tapestry users; trsvax@gmail.com
> Subject: Re: Tapestry 4.1 Migration to Tapestry 5
> 
> You should be able to just add the T5 configuration to your existing web.xml. I think you also have to tell T5 to ignore the T4 urls. There is a T5 configuration for ignored urls
> 
> 
> 
>> On Jun 28, 2016, at 10:16 AM, Mukesh Chandra <mu...@opensolutions.com> wrote:
>> 
>> Thanks Barry!
>> 
>> One more thing, what changes do I need to make in the Web.Xml so that both T4 and T5 pages continue working.
>> Apparently my application has started working once I put in the
>> filters for T5
>> 
>> Regards
>> Mukesh
>> 
>> -----Original Message-----
>> From: Barry Books [mailto:trsvax@gmail.com]
>> Sent: Tuesday, June 28, 2016 5:34 PM
>> To: Tapestry users
>> Subject: Re: Tapestry 4.1 Migration to Tapestry 5
>> 
>> I dug up this code that allows T5 applications to access T4 sessions. I think the XXX is the app name in the T4 configuration.
>> 
>> @Deprecated
>> 
>> public class T4SessionStrategy extends
>> SessionApplicationStatePersistenceStrategy   implements
>> ApplicationStatePersistenceStrategy {
>> 
>>              private final String prefix = "state:XXX";
>> 
>>              private final Request request;
>> 
>>              private final Logger logger;
>> 
>> 
>> 
>>              public T4SessionStrategy(Request request, Logger logger)
>> {
>> 
>>                             super(request);
>> 
>>                             this.request = request;
>> 
>>                             this.logger = logger;
>> 
>>              }
>> 
>> 
>> 
>>              @Override
>> 
>>              public <T> boolean exists(Class<T> clazz) {
>> 
>>                             Session s = request.getSession(false);
>> 
>>                             if (s == null || clazz == null)
>> 
>>                                            return false;
>> 
>>                             return   s.getAttribute(prefix +
>> clazz.getSimpleName()) != null;
>> 
>>              }
>> 
>> 
>> 
>>              @Override
>> 
>>              public <T> T get(Class<T> clazz,
>> ApplicationStateCreator<T>
>> creator) {
>> 
>>                             Session s = request.getSession(true);
>> 
>> 
>> 
>>                             logger.info("find session {}{} ", prefix,
>> clazz.getSimpleName());
>> 
>>                             @SuppressWarnings("unchecked")
>> 
>>                             T state = (T) s.getAttribute(prefix +
>> clazz.getSimpleName());
>> 
>>                             if ( state == null ) {
>> 
>>                                            state = creator.create();
>> 
>>                                            set(clazz,state);
>> 
>>                             }
>> 
>>                             return state;
>> 
>>              }
>> 
>> 
>> 
>>              @Override
>> 
>>              public <T> void set(Class<T> clazz, T object) {
>> 
>>                             Session s = request.getSession(true);
>> 
>>                             s.setAttribute(prefix +
>> clazz.getSimpleName(), object);
>> 
>>              }
>> 
>> 
>> 
>> }
>> 
>> On Monday, June 27, 2016, Thiago H de Paula Figueiredo
>> <th...@gmail.com>
>> wrote:
>> 
>>> On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra <
>>> mukesh.chandra@opensolutions.com> wrote:
>>> 
>>> Hi Barry
>>>> 
>>>> Which service are you talking about? How do I create one. Is there
>>>> some class I need to inherit?
>>> 
>>> No.
>>> 
>>> Can I have a sample implementation for same?
>>> 
>>> The documentation for Tapestry-IoC, the replacement for HiveMind in
>>> Tapestry 5, is here: http://tapestry.apache.org/ioc.html.
>>> 
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Tapestry, Java and Hibernate consultant and developer
>>> http://machina.com.br
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> ________________________________
>> 
>> NOTICE:
>> This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.
> 
> ________________________________
> 
> NOTICE:
> This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

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


RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
If I ignore the T4 urls, won't the T4 pages stop working?

-----Original Message-----
From: Barry Books [mailto:bfb@trsvax.com]
Sent: Tuesday, June 28, 2016 8:54 PM
To: Mukesh Chandra
Cc: Tapestry users; trsvax@gmail.com
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

You should be able to just add the T5 configuration to your existing web.xml. I think you also have to tell T5 to ignore the T4 urls. There is a T5 configuration for ignored urls



> On Jun 28, 2016, at 10:16 AM, Mukesh Chandra <mu...@opensolutions.com> wrote:
>
> Thanks Barry!
>
> One more thing, what changes do I need to make in the Web.Xml so that both T4 and T5 pages continue working.
> Apparently my application has started working once I put in the
> filters for T5
>
> Regards
> Mukesh
>
> -----Original Message-----
> From: Barry Books [mailto:trsvax@gmail.com]
> Sent: Tuesday, June 28, 2016 5:34 PM
> To: Tapestry users
> Subject: Re: Tapestry 4.1 Migration to Tapestry 5
>
> I dug up this code that allows T5 applications to access T4 sessions. I think the XXX is the app name in the T4 configuration.
>
> @Deprecated
>
> public class T4SessionStrategy extends
> SessionApplicationStatePersistenceStrategy   implements
> ApplicationStatePersistenceStrategy {
>
>               private final String prefix = "state:XXX";
>
>               private final Request request;
>
>               private final Logger logger;
>
>
>
>               public T4SessionStrategy(Request request, Logger logger)
> {
>
>                              super(request);
>
>                              this.request = request;
>
>                              this.logger = logger;
>
>               }
>
>
>
>               @Override
>
>               public <T> boolean exists(Class<T> clazz) {
>
>                              Session s = request.getSession(false);
>
>                              if (s == null || clazz == null)
>
>                                             return false;
>
>                              return   s.getAttribute(prefix +
> clazz.getSimpleName()) != null;
>
>               }
>
>
>
>               @Override
>
>               public <T> T get(Class<T> clazz,
> ApplicationStateCreator<T>
> creator) {
>
>                              Session s = request.getSession(true);
>
>
>
>                              logger.info("find session {}{} ", prefix,
> clazz.getSimpleName());
>
>                              @SuppressWarnings("unchecked")
>
>                              T state = (T) s.getAttribute(prefix +
> clazz.getSimpleName());
>
>                              if ( state == null ) {
>
>                                             state = creator.create();
>
>                                             set(clazz,state);
>
>                              }
>
>                              return state;
>
>               }
>
>
>
>               @Override
>
>               public <T> void set(Class<T> clazz, T object) {
>
>                              Session s = request.getSession(true);
>
>                              s.setAttribute(prefix +
> clazz.getSimpleName(), object);
>
>               }
>
>
>
> }
>
> On Monday, June 27, 2016, Thiago H de Paula Figueiredo
> <th...@gmail.com>
> wrote:
>
>> On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra <
>> mukesh.chandra@opensolutions.com> wrote:
>>
>> Hi Barry
>>>
>>> Which service are you talking about? How do I create one. Is there
>>> some class I need to inherit?
>>
>> No.
>>
>> Can I have a sample implementation for same?
>>
>> The documentation for Tapestry-IoC, the replacement for HiveMind in
>> Tapestry 5, is here: http://tapestry.apache.org/ioc.html.
>>
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>
> ________________________________
>
> NOTICE:
> This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

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


Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Barry Books <bf...@trsvax.com>.
You should be able to just add the T5 configuration to your existing web.xml. I think you also have to tell T5 to ignore the T4 urls. There is a T5 configuration for ignored urls



> On Jun 28, 2016, at 10:16 AM, Mukesh Chandra <mu...@opensolutions.com> wrote:
> 
> Thanks Barry!
> 
> One more thing, what changes do I need to make in the Web.Xml so that both T4 and T5 pages continue working.
> Apparently my application has started working once I put in the filters for T5
> 
> Regards
> Mukesh
> 
> -----Original Message-----
> From: Barry Books [mailto:trsvax@gmail.com]
> Sent: Tuesday, June 28, 2016 5:34 PM
> To: Tapestry users
> Subject: Re: Tapestry 4.1 Migration to Tapestry 5
> 
> I dug up this code that allows T5 applications to access T4 sessions. I think the XXX is the app name in the T4 configuration.
> 
> @Deprecated
> 
> public class T4SessionStrategy extends
> SessionApplicationStatePersistenceStrategy   implements
> ApplicationStatePersistenceStrategy {
> 
>               private final String prefix = "state:XXX";
> 
>               private final Request request;
> 
>               private final Logger logger;
> 
> 
> 
>               public T4SessionStrategy(Request request, Logger logger) {
> 
>                              super(request);
> 
>                              this.request = request;
> 
>                              this.logger = logger;
> 
>               }
> 
> 
> 
>               @Override
> 
>               public <T> boolean exists(Class<T> clazz) {
> 
>                              Session s = request.getSession(false);
> 
>                              if (s == null || clazz == null)
> 
>                                             return false;
> 
>                              return   s.getAttribute(prefix +
> clazz.getSimpleName()) != null;
> 
>               }
> 
> 
> 
>               @Override
> 
>               public <T> T get(Class<T> clazz, ApplicationStateCreator<T>
> creator) {
> 
>                              Session s = request.getSession(true);
> 
> 
> 
>                              logger.info("find session {}{} ", prefix, clazz.getSimpleName());
> 
>                              @SuppressWarnings("unchecked")
> 
>                              T state = (T) s.getAttribute(prefix + clazz.getSimpleName());
> 
>                              if ( state == null ) {
> 
>                                             state = creator.create();
> 
>                                             set(clazz,state);
> 
>                              }
> 
>                              return state;
> 
>               }
> 
> 
> 
>               @Override
> 
>               public <T> void set(Class<T> clazz, T object) {
> 
>                              Session s = request.getSession(true);
> 
>                              s.setAttribute(prefix + clazz.getSimpleName(), object);
> 
>               }
> 
> 
> 
> }
> 
> On Monday, June 27, 2016, Thiago H de Paula Figueiredo <th...@gmail.com>
> wrote:
> 
>> On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra <
>> mukesh.chandra@opensolutions.com> wrote:
>> 
>> Hi Barry
>>> 
>>> Which service are you talking about? How do I create one. Is there
>>> some class I need to inherit?
>> 
>> No.
>> 
>> Can I have a sample implementation for same?
>> 
>> The documentation for Tapestry-IoC, the replacement for HiveMind in
>> Tapestry 5, is here: http://tapestry.apache.org/ioc.html.
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Tapestry, Java and Hibernate consultant and developer
>> http://machina.com.br
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> ________________________________
> 
> NOTICE:
> This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

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


RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
Thanks Barry!

One more thing, what changes do I need to make in the Web.Xml so that both T4 and T5 pages continue working.
Apparently my application has started working once I put in the filters for T5

Regards
Mukesh

-----Original Message-----
From: Barry Books [mailto:trsvax@gmail.com]
Sent: Tuesday, June 28, 2016 5:34 PM
To: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

I dug up this code that allows T5 applications to access T4 sessions. I think the XXX is the app name in the T4 configuration.

@Deprecated

public class T4SessionStrategy extends
SessionApplicationStatePersistenceStrategy   implements
ApplicationStatePersistenceStrategy  {

               private final String prefix = "state:XXX";

               private final Request request;

               private final Logger logger;



               public T4SessionStrategy(Request request, Logger logger) {

                              super(request);

                              this.request = request;

                              this.logger = logger;

               }



               @Override

               public <T> boolean exists(Class<T> clazz) {

                              Session s = request.getSession(false);

                              if (s == null || clazz == null)

                                             return false;

                              return   s.getAttribute(prefix +
clazz.getSimpleName()) != null;

               }



               @Override

               public <T> T get(Class<T> clazz, ApplicationStateCreator<T>
creator) {

                              Session s = request.getSession(true);



                              logger.info("find session {}{} ", prefix, clazz.getSimpleName());

                              @SuppressWarnings("unchecked")

                              T state = (T) s.getAttribute(prefix + clazz.getSimpleName());

                              if ( state == null ) {

                                             state = creator.create();

                                             set(clazz,state);

                              }

                              return state;

               }



               @Override

               public <T> void set(Class<T> clazz, T object) {

                              Session s = request.getSession(true);

                              s.setAttribute(prefix + clazz.getSimpleName(), object);

               }



}

On Monday, June 27, 2016, Thiago H de Paula Figueiredo <th...@gmail.com>
wrote:

> On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra <
> mukesh.chandra@opensolutions.com> wrote:
>
> Hi Barry
>>
>> Which service are you talking about? How do I create one. Is there
>> some class I need to inherit?
>>
>
> No.
>
> Can I have a sample implementation for same?
>>
>
> The documentation for Tapestry-IoC, the replacement for HiveMind in
> Tapestry 5, is here: http://tapestry.apache.org/ioc.html.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Barry Books <tr...@gmail.com>.
I dug up this code that allows T5 applications to access T4 sessions. I
think the XXX is the app name in the T4 configuration.

@Deprecated

public class T4SessionStrategy extends
SessionApplicationStatePersistenceStrategy   implements
ApplicationStatePersistenceStrategy  {

               private final String prefix = "state:XXX";

               private final Request request;

               private final Logger logger;



               public T4SessionStrategy(Request request, Logger logger) {

                              super(request);

                              this.request = request;

                              this.logger = logger;

               }



               @Override

               public <T> boolean exists(Class<T> clazz) {

                              Session s = request.getSession(false);

                              if (s == null || clazz == null)

                                             return false;

                              return   s.getAttribute(prefix +
clazz.getSimpleName()) != null;

               }



               @Override

               public <T> T get(Class<T> clazz, ApplicationStateCreator<T>
creator) {

                              Session s = request.getSession(true);



                              logger.info("find session {}{} ", prefix,
clazz.getSimpleName());

                              @SuppressWarnings("unchecked")

                              T state = (T) s.getAttribute(prefix +
clazz.getSimpleName());

                              if ( state == null ) {

                                             state = creator.create();

                                             set(clazz,state);

                              }

                              return state;

               }



               @Override

               public <T> void set(Class<T> clazz, T object) {

                              Session s = request.getSession(true);

                              s.setAttribute(prefix +
clazz.getSimpleName(), object);

               }



}

On Monday, June 27, 2016, Thiago H de Paula Figueiredo <th...@gmail.com>
wrote:

> On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra <
> mukesh.chandra@opensolutions.com> wrote:
>
> Hi Barry
>>
>> Which service are you talking about? How do I create one. Is there some
>> class I need to inherit?
>>
>
> No.
>
> Can I have a sample implementation for same?
>>
>
> The documentation for Tapestry-IoC, the replacement for HiveMind in
> Tapestry 5, is here: http://tapestry.apache.org/ioc.html.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Mon, 27 Jun 2016 10:33:06 -0300, Mukesh Chandra  
<mu...@opensolutions.com> wrote:

> Hi Barry
>
> Which service are you talking about? How do I create one. Is there some  
> class I need to inherit?

No.

> Can I have a sample implementation for same?

The documentation for Tapestry-IoC, the replacement for HiveMind in  
Tapestry 5, is here: http://tapestry.apache.org/ioc.html.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
Hi Barry

Which service are you talking about? How do I create one. Is there some class I need to inherit?
Can I have a sample implementation for same?

Regards
Mukesh Chandra

From: Barry Books [mailto:trsvax@gmail.com]
Sent: Friday, June 24, 2016 9:32 PM
To: Mukesh Chandra
Cc: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

You will no longer need any XML configuration for Tap5 (it's all just convention) so there is really nothing to do there. Just make sure your web.xml is correct and your pages are in the correct place.

I might be able to dig up some code but there is really not very much. The service to get T4 session state just gets the request and looks up the state in the session. T4 has naming conventions that are pretty obvious if you look at some examples. As I recall T4 services do not have constructors. I just added some to convert them to T5 or you could just convert them to T5 and build T4 shims which might be the best way. The T5 IOC layer is much nicer than T4

On Friday, June 24, 2016, Mukesh Chandra <mu...@opensolutions.com>> wrote:
Thanks Barry

Do we have any sample code for this purpose. It would help me great?

With Tapestry 4.1 we have a default.library XML file that has the library specification like as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<library-specification>

  <library id="contrib" specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
  <library id="tacos" specification-path="/net/sf/tacos/Tacos.library"/>
<page name="admin/user/ EditPRChallengeQuestions" specification-path="pages/admin/user/VerifyUser.page"/>

<component-type type="passwordrecovery/EditPRChallengeQuestionsForm" specification-path="components/passwordrecovery/EditPRChallengeQuestionsForm.jwc"/>

</library-specification>

Where do I store this mapping for tapestry 5.4 pages/components. I can build the project but when I try to access the page I get an exception for the page class missing.
Can you help with this?

Regards
Mukesh

-----Original Message-----
From: Barry Books [mailto:trsvax@gmail.com<javascript:;>]
Sent: Friday, June 24, 2016 6:05 PM
To: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

I migrated a pretty large application from 4 to 5. It's been a while and I perhaps I don't remember all the pain but I don't recall it being that difficult. First of all Tapestry 5 is much nicer to use than 4 but shares many of the same ideas. The basic structure is the same you have pages with templates and services.  The first thing you'll want to do is build a Tap5 service that allows access to the Tap4 session. I think the next thing I did was rework my Tap4 services in a way they could be used as both Tap5 and Tap4 services. Next pick a page and convert it. We converted all our non public pages first. The biggest issue will be maintaining a similar look and feel between old and new pages.

We also switched from ant to maven when we converted.

I think it took us a few months to do it but it was not really that disruptive. Since it's possible to run both in the same web app it's not an all or nothing proposition. Converting the non public pages first will allow you to get comfortable with Tap5 without too much risk.

As I recall most of the services did not require much work to convert.
Pages and components require more but they are not that bad.

Good luck

On Friday, June 24, 2016, Thiago H de Paula Figueiredo <thiagohp@gmail.com<javascript:;>>
wrote:

> On Fri, 24 Jun 2016 00:18:04 -0300, Mukesh Chandra <
> mukesh.chandra@opensolutions.com<javascript:;>> wrote:
>
> So they can share the session?
>>
>
> Yes. They're in the same webapp, same context.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org<javascript:;>
> For additional commands, e-mail: users-help@tapestry.apache.org<javascript:;>
>
>

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Barry Books <tr...@gmail.com>.
You will no longer need any XML configuration for Tap5 (it's all just
convention) so there is really nothing to do there. Just make sure your
web.xml is correct and your pages are in the correct place.

I might be able to dig up some code but there is really not very much. The
service to get T4 session state just gets the request and looks up the
state in the session. T4 has naming conventions that are pretty obvious if
you look at some examples. As I recall T4 services do not have
constructors. I just added some to convert them to T5 or you could just
convert them to T5 and build T4 shims which might be the best way. The T5
IOC layer is much nicer than T4

On Friday, June 24, 2016, Mukesh Chandra <mu...@opensolutions.com>
wrote:

> Thanks Barry
>
> Do we have any sample code for this purpose. It would help me great?
>
> With Tapestry 4.1 we have a default.library XML file that has the library
> specification like as follows:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE library-specification PUBLIC
>   "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
>   "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">
>
> <library-specification>
>
>   <library id="contrib"
> specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
>   <library id="tacos" specification-path="/net/sf/tacos/Tacos.library"/>
> <page name="admin/user/ EditPRChallengeQuestions"
> specification-path="pages/admin/user/VerifyUser.page"/>
>
> <component-type type="passwordrecovery/EditPRChallengeQuestionsForm"
> specification-path="components/passwordrecovery/EditPRChallengeQuestionsForm.jwc"/>
>
> </library-specification>
>
> Where do I store this mapping for tapestry 5.4 pages/components. I can
> build the project but when I try to access the page I get an exception for
> the page class missing.
> Can you help with this?
>
> Regards
> Mukesh
>
> -----Original Message-----
> From: Barry Books [mailto:trsvax@gmail.com <javascript:;>]
> Sent: Friday, June 24, 2016 6:05 PM
> To: Tapestry users
> Subject: Re: Tapestry 4.1 Migration to Tapestry 5
>
> I migrated a pretty large application from 4 to 5. It's been a while and I
> perhaps I don't remember all the pain but I don't recall it being that
> difficult. First of all Tapestry 5 is much nicer to use than 4 but shares
> many of the same ideas. The basic structure is the same you have pages with
> templates and services.  The first thing you'll want to do is build a Tap5
> service that allows access to the Tap4 session. I think the next thing I
> did was rework my Tap4 services in a way they could be used as both Tap5
> and Tap4 services. Next pick a page and convert it. We converted all our
> non public pages first. The biggest issue will be maintaining a similar
> look and feel between old and new pages.
>
> We also switched from ant to maven when we converted.
>
> I think it took us a few months to do it but it was not really that
> disruptive. Since it's possible to run both in the same web app it's not an
> all or nothing proposition. Converting the non public pages first will
> allow you to get comfortable with Tap5 without too much risk.
>
> As I recall most of the services did not require much work to convert.
> Pages and components require more but they are not that bad.
>
> Good luck
>
> On Friday, June 24, 2016, Thiago H de Paula Figueiredo <thiagohp@gmail.com
> <javascript:;>>
> wrote:
>
> > On Fri, 24 Jun 2016 00:18:04 -0300, Mukesh Chandra <
> > mukesh.chandra@opensolutions.com <javascript:;>> wrote:
> >
> > So they can share the session?
> >>
> >
> > Yes. They're in the same webapp, same context.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Tapestry, Java and Hibernate consultant and developer
> > http://machina.com.br
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> <javascript:;>
> > For additional commands, e-mail: users-help@tapestry.apache.org
> <javascript:;>
> >
> >
>
> ________________________________
>
> NOTICE:
> This e-mail is intended solely for the use of the individual to whom it is
> addressed and may contain information that is privileged, confidential or
> otherwise exempt from disclosure. If the reader of this e-mail is not the
> intended recipient or the employee or agent responsible for delivering the
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution, or copying of this communication is strictly
> prohibited. If you have received this communication in error, please
> immediately notify us by replying to the original message at the listed
> email address. Thank You.
>

RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
Thanks Barry

Do we have any sample code for this purpose. It would help me great?

With Tapestry 4.1 we have a default.library XML file that has the library specification like as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE library-specification PUBLIC
  "-//Apache Software Foundation//Tapestry Specification 3.0//EN"
  "http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd">

<library-specification>

  <library id="contrib" specification-path="/org/apache/tapestry/contrib/Contrib.library"/>
  <library id="tacos" specification-path="/net/sf/tacos/Tacos.library"/>
<page name="admin/user/ EditPRChallengeQuestions" specification-path="pages/admin/user/VerifyUser.page"/>

<component-type type="passwordrecovery/EditPRChallengeQuestionsForm" specification-path="components/passwordrecovery/EditPRChallengeQuestionsForm.jwc"/>

</library-specification>

Where do I store this mapping for tapestry 5.4 pages/components. I can build the project but when I try to access the page I get an exception for the page class missing.
Can you help with this?

Regards
Mukesh

-----Original Message-----
From: Barry Books [mailto:trsvax@gmail.com]
Sent: Friday, June 24, 2016 6:05 PM
To: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

I migrated a pretty large application from 4 to 5. It's been a while and I perhaps I don't remember all the pain but I don't recall it being that difficult. First of all Tapestry 5 is much nicer to use than 4 but shares many of the same ideas. The basic structure is the same you have pages with templates and services.  The first thing you'll want to do is build a Tap5 service that allows access to the Tap4 session. I think the next thing I did was rework my Tap4 services in a way they could be used as both Tap5 and Tap4 services. Next pick a page and convert it. We converted all our non public pages first. The biggest issue will be maintaining a similar look and feel between old and new pages.

We also switched from ant to maven when we converted.

I think it took us a few months to do it but it was not really that disruptive. Since it's possible to run both in the same web app it's not an all or nothing proposition. Converting the non public pages first will allow you to get comfortable with Tap5 without too much risk.

As I recall most of the services did not require much work to convert.
Pages and components require more but they are not that bad.

Good luck

On Friday, June 24, 2016, Thiago H de Paula Figueiredo <th...@gmail.com>
wrote:

> On Fri, 24 Jun 2016 00:18:04 -0300, Mukesh Chandra <
> mukesh.chandra@opensolutions.com> wrote:
>
> So they can share the session?
>>
>
> Yes. They're in the same webapp, same context.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Barry Books <tr...@gmail.com>.
I migrated a pretty large application from 4 to 5. It's been a while and I
perhaps I don't remember all the pain but I don't recall it being that
difficult. First of all Tapestry 5 is much nicer to use than 4 but shares
many of the same ideas. The basic structure is the same you have pages with
templates and services.  The first thing you'll want to do is build a Tap5
service that allows access to the Tap4 session. I think the next thing I
did was rework my Tap4 services in a way they could be used as both Tap5
and Tap4 services. Next pick a page and convert it. We converted all our
non public pages first. The biggest issue will be maintaining a similar
look and feel between old and new pages.

We also switched from ant to maven when we converted.

I think it took us a few months to do it but it was not really that
disruptive. Since it's possible to run both in the same web app it's not an
all or nothing proposition. Converting the non public pages first will
allow you to get comfortable with Tap5 without too much risk.

As I recall most of the services did not require much work to convert.
Pages and components require more but they are not that bad.

Good luck

On Friday, June 24, 2016, Thiago H de Paula Figueiredo <th...@gmail.com>
wrote:

> On Fri, 24 Jun 2016 00:18:04 -0300, Mukesh Chandra <
> mukesh.chandra@opensolutions.com> wrote:
>
> So they can share the session?
>>
>
> Yes. They're in the same webapp, same context.
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Fri, 24 Jun 2016 00:18:04 -0300, Mukesh Chandra  
<mu...@opensolutions.com> wrote:

> So they can share the session?

Yes. They're in the same webapp, same context.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
So they can share the session?

-----Original Message-----
From: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com]
Sent: Thursday, June 23, 2016 7:51 PM
To: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

On Thu, 23 Jun 2016 11:05:38 -0300, Mukesh Chandra <mu...@opensolutions.com> wrote:

> Hi All

Hi!

>
> Can I have both the Tapestry 5 and Tapestry 4 pages in same project

Yes. Even in the same webapp.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer http://machina.com.br

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


________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

RE: Tapestry 4.1 Migration to Tapestry 5

Posted by Mukesh Chandra <mu...@opensolutions.com>.
Can you send a sample please.

I need to build this project using ANT

Regards
Mukesh Chandra

-----Original Message-----
From: Thiago H de Paula Figueiredo [mailto:thiagohp@gmail.com]
Sent: Thursday, June 23, 2016 7:51 PM
To: Tapestry users
Subject: Re: Tapestry 4.1 Migration to Tapestry 5

On Thu, 23 Jun 2016 11:05:38 -0300, Mukesh Chandra <mu...@opensolutions.com> wrote:

> Hi All

Hi!

>
> Can I have both the Tapestry 5 and Tapestry 4 pages in same project

Yes. Even in the same webapp.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer http://machina.com.br

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


________________________________

NOTICE:
This e-mail is intended solely for the use of the individual to whom it is addressed and may contain information that is privileged, confidential or otherwise exempt from disclosure. If the reader of this e-mail is not the intended recipient or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the original message at the listed email address. Thank You.

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

Re: Tapestry 4.1 Migration to Tapestry 5

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 23 Jun 2016 11:05:38 -0300, Mukesh Chandra  
<mu...@opensolutions.com> wrote:

> Hi All

Hi!

>
> Can I have both the Tapestry 5 and Tapestry 4 pages in same project

Yes. Even in the same webapp.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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