Re: Frontend Frameworks / Libraries

2015-09-14 Thread George Christman
Very nice Arve, do you have any experience making these angular pages SEO
friendly?

On Sun, Sep 6, 2015 at 11:08 AM, Arve Klev  wrote:

>  Hello.
> Yes it is VERY easy to to use AngularJS (or eg. Highchart/Raphael/JChart)
> with Tapestry 5.4.
> Use Tapestry as usual and let different pages do what you want (eg. one
> page as an AngularJS SPA).
> Every page use the same Layout component.
>
> 1. Place angular.js in src/main/resources/META-INF/modules/angular.js
> 2. Create a file src/main/resources/META-INF/modules/angular-bootstrap.js
> that bootstrap angular and your own angular code
> 3. Create a file src/main/resources/META-INF/modules/my-angular-code.js
> 4. Create a file src/main/resources/META-INF/assets/my-angular-code.css for
> decoration
> 5. Import angular-bootstrap.js and my-angular-code.css in your class-file:
> @Import(module = { "angular-bootstrap" }, stylesheet = {
> "my-angular-code.css" })
>
> I have a running example here: http://tap54-arvek.rhcloud.com
> The code at GitHub:
> https://github.com/arvek-xx/tapestry54-javascript-examples
>
> In the "NgPhones"-page, I use a rest-service to retrieve data.
>
>
> Sincerely, Arve Klev
>
> 2015-08-10 19:59 GMT+02:00 Taha Siddiqi :
>
> > Well my way is to spend sometime on anything I find interesting...
> > (Usually  Saturday mornings)
> >
> > That is how I found tapestry and now Clojure/clojusescript, mongo, Titan
> > graphs etc... So exciting !!
> >
> > Sent from my iPhone
> >
> > > On Aug 10, 2015, at 9:01 PM, George Christman  >
> > wrote:
> > >
> > > I think the choices these days are starting to become very
> overwhelming,
> > I
> > > wish there was a magic bullet eliminating all these choices. I'd like
> to
> > > pick a new frontend framework, but with all the advise from the
> different
> > > sources, I don't think I know enough anymore to make an educated
> > decision.
> > >
> > > On Sat, Aug 8, 2015 at 5:18 AM, Taha Siddiqi  >
> > > wrote:
> > >
> > >> For me it is om(or reactjs). I am currently in the process of
> replacing
> > >> JavaScript  in one of my JavaScript intense Tapestry project with
> > >> om/ClojureScript.
> > >>
> > >> Sent from my iPhone
> > >>
> >  On Aug 8, 2015, at 11:41 AM, Kalle Korhonen <
> > kalle.o.korho...@gmail.com>
> > >>> wrote:
> > >>>
> >  On Fri, Aug 7, 2015 at 3:40 PM, françois facon  >
> > >> wrote:
> > 
> >  About Ember, I looking for an equivalent of
> >  https://docs.angularjs.org/tutorial.
> > >>>
> > >>> I haven't found anything quite as comprehensive for Ember. One issue
> > with
> > >>> Ember is that many of these tutorials are outdated because its
> changed
> > so
> > >>> fast. The official documentation is often too simplistic when you are
> > new
> > >>> to it but trying to build something real. However, this one is fairly
> > >>> up-to-date and helped me quite a bit when I started out:
> > >>> http://www.fnaweso.me/ember-js-nested-routing-with-multiple-outlets/
> > >>>
> > >>> At least for me, working with AngularJS feels more like working with
> T5
> > >>> services and its IoC whereas working with Ember feels more like
> writing
> > >> T5
> > >>> components and I felt right at home with all the Ember conventions.
> And
> > >>> while it's relatively easy to bootstrap AngularJS to run as part of
> T5
> > >> app,
> > >>> it really doesn't make sense with all the bits and pieces of Ember
> > >> tooling,
> > >>> the CLI etc (there was an earlier thread about that and I followed
> > >> Andreas
> > >>> Andreou's advice). Ember is more comprehensive than AngularJS and its
> > >>> router is incredibly useful for mapping out a structure for larger
> > spas.
> > >>>
> > >>> Kalle
> > >>>
> > >>>
> > >>>
> >  2015-08-07 22:18 GMT+02:00 Kalle Korhonen <
> kalle.o.korho...@gmail.com
> > >:
> > 
> > > It's pretty easy. Don't build component event requests but just
> send
> > > REST(-like) requests that are either processed by plain Tapestry
> > pages
> >  and
> > > its EventContext. If you are building a more comprehensive spa then
> > > consider pairing the client with JAX-WS resource backend (i.e.
> > > http://www.tynamo.org/tapestry-resteasy+guide/ for T5).
> > Incidentally,
> >  I've
> > > been working with spas lately as well, and moved from AngularJS to
> > >> Ember.
> > >
> > > Kalle
> > >
> > >> On Fri, Aug 7, 2015 at 12:46 PM, Bob Harner 
> > >> wrote:
> > >>
> > >> Yes a page/event. As long as the URL looks like a tapestry event
> >  request,
> > >> you can handle the request in an event handler method within the
> > >> page's
> > >> Java class, and return JSON.
> > >>
> > >> On Fri, Aug 7, 2015 at 2:40 PM, George Christman <
> > > gchrist...@cardaddy.com>
> > >> wrote:
> > >>
> > >>> Hi guys, I've been playing around with AngularJS and 

Re: Custom ValueEncoder & IOC

2015-09-14 Thread Chris Poulsen
Can't you could just bind it in your app module?

--
Chris


On Mon, Sep 14, 2015 at 3:35 PM, Damon Childs  wrote:

> How do i get a custom ValueEncoder under control of IOC?
>
> I have a ValueEncoder that translates a id to a Object from a db.
>
> public class PropertyTypeEncoder implements
> ValueEncoder {
>
> @Inject
> private Session session;
>
> public  PropertyTypeEncoder(Session session) {
> this.session = session;
> }
>
> public String toClient(LookupPropertyType value) {
> return String.valueOf(value.getId());
> }
>
> public LookupPropertyType toValue(String id) {
> Criteria criteria =
> session.createCriteria(LookupPropertyType.class);
> criteria.add(Restrictions.eq("id", Long.parseLong(id)));
> LookupPropertyType type =
> (LookupPropertyType)criteria.uniqueResult();
> return type;
> }
> }
>
> To get it created of the web form I have:
>  @Property
> private final PropertyTypeEncoder propertyTypeEncoder = new
> PropertyTypeEncoder(this.session);
>
> Im passing the Hibernate session via the constructer since this would not
> be under the IOC’s control.
>
> Is there a way to create this using the IOC so the inject works?
>
> Thanks,
> Damon
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Custom ValueEncoder & IOC

2015-09-14 Thread Damon Childs
How do i get a custom ValueEncoder under control of IOC?  

I have a ValueEncoder that translates a id to a Object from a db.  

public class PropertyTypeEncoder implements ValueEncoder {

@Inject
private Session session;

public  PropertyTypeEncoder(Session session) {
this.session = session;
}

public String toClient(LookupPropertyType value) {
return String.valueOf(value.getId());
}

public LookupPropertyType toValue(String id) {
Criteria criteria = session.createCriteria(LookupPropertyType.class);
criteria.add(Restrictions.eq("id", Long.parseLong(id)));
LookupPropertyType type = (LookupPropertyType)criteria.uniqueResult();
return type;
}
}

To get it created of the web form I have:
 @Property
private final PropertyTypeEncoder propertyTypeEncoder = new 
PropertyTypeEncoder(this.session);

Im passing the Hibernate session via the constructer since this would not be 
under the IOC’s control. 

Is there a way to create this using the IOC so the inject works?

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



Re: Frontend Frameworks / Libraries

2015-09-14 Thread Kalle Korhonen
React and Ember Fastboot solve the SEO problem by rendering the first load
on server, but Angular doesn't offer the same functionality natively.
There's https://prerender.io/ though, but it's another component you need
to deploy.

Kalle

On Mon, Sep 14, 2015 at 6:20 AM, George Christman 
wrote:

> Very nice Arve, do you have any experience making these angular pages SEO
> friendly?
>
> On Sun, Sep 6, 2015 at 11:08 AM, Arve Klev  wrote:
>
> >  Hello.
> > Yes it is VERY easy to to use AngularJS (or eg. Highchart/Raphael/JChart)
> > with Tapestry 5.4.
> > Use Tapestry as usual and let different pages do what you want (eg. one
> > page as an AngularJS SPA).
> > Every page use the same Layout component.
> >
> > 1. Place angular.js in src/main/resources/META-INF/modules/angular.js
> > 2. Create a file src/main/resources/META-INF/modules/angular-bootstrap.js
> > that bootstrap angular and your own angular code
> > 3. Create a file src/main/resources/META-INF/modules/my-angular-code.js
> > 4. Create a file src/main/resources/META-INF/assets/my-angular-code.css
> for
> > decoration
> > 5. Import angular-bootstrap.js and my-angular-code.css in your
> class-file:
> > @Import(module = { "angular-bootstrap" }, stylesheet = {
> > "my-angular-code.css" })
> >
> > I have a running example here: http://tap54-arvek.rhcloud.com
> > The code at GitHub:
> > https://github.com/arvek-xx/tapestry54-javascript-examples
> >
> > In the "NgPhones"-page, I use a rest-service to retrieve data.
> >
> >
> > Sincerely, Arve Klev
> >
> > 2015-08-10 19:59 GMT+02:00 Taha Siddiqi :
> >
> > > Well my way is to spend sometime on anything I find interesting...
> > > (Usually  Saturday mornings)
> > >
> > > That is how I found tapestry and now Clojure/clojusescript, mongo,
> Titan
> > > graphs etc... So exciting !!
> > >
> > > Sent from my iPhone
> > >
> > > > On Aug 10, 2015, at 9:01 PM, George Christman <
> gchrist...@cardaddy.com
> > >
> > > wrote:
> > > >
> > > > I think the choices these days are starting to become very
> > overwhelming,
> > > I
> > > > wish there was a magic bullet eliminating all these choices. I'd like
> > to
> > > > pick a new frontend framework, but with all the advise from the
> > different
> > > > sources, I don't think I know enough anymore to make an educated
> > > decision.
> > > >
> > > > On Sat, Aug 8, 2015 at 5:18 AM, Taha Siddiqi <
> tawus.tapes...@gmail.com
> > >
> > > > wrote:
> > > >
> > > >> For me it is om(or reactjs). I am currently in the process of
> > replacing
> > > >> JavaScript  in one of my JavaScript intense Tapestry project with
> > > >> om/ClojureScript.
> > > >>
> > > >> Sent from my iPhone
> > > >>
> > >  On Aug 8, 2015, at 11:41 AM, Kalle Korhonen <
> > > kalle.o.korho...@gmail.com>
> > > >>> wrote:
> > > >>>
> > >  On Fri, Aug 7, 2015 at 3:40 PM, françois facon <
> fra.fa...@gmail.com
> > >
> > > >> wrote:
> > > 
> > >  About Ember, I looking for an equivalent of
> > >  https://docs.angularjs.org/tutorial.
> > > >>>
> > > >>> I haven't found anything quite as comprehensive for Ember. One
> issue
> > > with
> > > >>> Ember is that many of these tutorials are outdated because its
> > changed
> > > so
> > > >>> fast. The official documentation is often too simplistic when you
> are
> > > new
> > > >>> to it but trying to build something real. However, this one is
> fairly
> > > >>> up-to-date and helped me quite a bit when I started out:
> > > >>>
> http://www.fnaweso.me/ember-js-nested-routing-with-multiple-outlets/
> > > >>>
> > > >>> At least for me, working with AngularJS feels more like working
> with
> > T5
> > > >>> services and its IoC whereas working with Ember feels more like
> > writing
> > > >> T5
> > > >>> components and I felt right at home with all the Ember conventions.
> > And
> > > >>> while it's relatively easy to bootstrap AngularJS to run as part of
> > T5
> > > >> app,
> > > >>> it really doesn't make sense with all the bits and pieces of Ember
> > > >> tooling,
> > > >>> the CLI etc (there was an earlier thread about that and I followed
> > > >> Andreas
> > > >>> Andreou's advice). Ember is more comprehensive than AngularJS and
> its
> > > >>> router is incredibly useful for mapping out a structure for larger
> > > spas.
> > > >>>
> > > >>> Kalle
> > > >>>
> > > >>>
> > > >>>
> > >  2015-08-07 22:18 GMT+02:00 Kalle Korhonen <
> > kalle.o.korho...@gmail.com
> > > >:
> > > 
> > > > It's pretty easy. Don't build component event requests but just
> > send
> > > > REST(-like) requests that are either processed by plain Tapestry
> > > pages
> > >  and
> > > > its EventContext. If you are building a more comprehensive spa
> then
> > > > consider pairing the client with JAX-WS resource backend (i.e.
> > > > http://www.tynamo.org/tapestry-resteasy+guide/ for T5).
> > > Incidentally,
> > >  I've
> > > > been working with spas lately as well, and moved 

Re: Handling a bad context and component events

2015-09-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Sep 2015 07:11:13 -0300, Carlos Montero Canabal  
 wrote:



Hi,


Hi!

I'd say the recommended way of dealing with ma dynamic list of activation  
context values is to use a single onActivate(EventContenxt context) method  
and no other onActivate() methods.


By the way, if you just want to let rendering continue (i.e. not  
redirecting), return null instead of Boolean.TRUE.


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



Re: Frontend Frameworks / Libraries

2015-09-14 Thread Thiago H de Paula Figueiredo
On Mon, 14 Sep 2015 14:21:46 -0300, Kalle Korhonen  
 wrote:


React and Ember Fastboot solve the SEO problem by rendering the first  
load

on server, but Angular doesn't offer the same functionality natively.
There's https://prerender.io/ though, but it's another component you need
to deploy.


I like the concept of isomorphic webapps: the same JavaScript used in the  
client-side is used in the server-side for doing an initial rendering.


The links above demonstrate it for Spring MVC, but I believe it could be  
very easily done with Tapestry too:

http://winterbe.com/posts/2015/02/16/isomorphic-react-webapps-on-the-jvm/
https://speakerdeck.com/sdeleuze/isomorphic-templating-with-spring-boot-nashorn-and-react



Kalle

On Mon, Sep 14, 2015 at 6:20 AM, George Christman  


wrote:

Very nice Arve, do you have any experience making these angular pages  
SEO

friendly?

On Sun, Sep 6, 2015 at 11:08 AM, Arve Klev  wrote:

>  Hello.
> Yes it is VERY easy to to use AngularJS (or eg.  
Highchart/Raphael/JChart)

> with Tapestry 5.4.
> Use Tapestry as usual and let different pages do what you want (eg.  
one

> page as an AngularJS SPA).
> Every page use the same Layout component.
>
> 1. Place angular.js in src/main/resources/META-INF/modules/angular.js
> 2. Create a file  
src/main/resources/META-INF/modules/angular-bootstrap.js

> that bootstrap angular and your own angular code
> 3. Create a file  
src/main/resources/META-INF/modules/my-angular-code.js
> 4. Create a file  
src/main/resources/META-INF/assets/my-angular-code.css

for
> decoration
> 5. Import angular-bootstrap.js and my-angular-code.css in your
class-file:
> @Import(module = { "angular-bootstrap" }, stylesheet = {
> "my-angular-code.css" })
>
> I have a running example here: http://tap54-arvek.rhcloud.com
> The code at GitHub:
> https://github.com/arvek-xx/tapestry54-javascript-examples
>
> In the "NgPhones"-page, I use a rest-service to retrieve data.
>
>
> Sincerely, Arve Klev
>
> 2015-08-10 19:59 GMT+02:00 Taha Siddiqi :
>
> > Well my way is to spend sometime on anything I find interesting...
> > (Usually  Saturday mornings)
> >
> > That is how I found tapestry and now Clojure/clojusescript, mongo,
Titan
> > graphs etc... So exciting !!
> >
> > Sent from my iPhone
> >
> > > On Aug 10, 2015, at 9:01 PM, George Christman <
gchrist...@cardaddy.com
> >
> > wrote:
> > >
> > > I think the choices these days are starting to become very
> overwhelming,
> > I
> > > wish there was a magic bullet eliminating all these choices. I'd  
like

> to
> > > pick a new frontend framework, but with all the advise from the
> different
> > > sources, I don't think I know enough anymore to make an educated
> > decision.
> > >
> > > On Sat, Aug 8, 2015 at 5:18 AM, Taha Siddiqi <
tawus.tapes...@gmail.com
> >
> > > wrote:
> > >
> > >> For me it is om(or reactjs). I am currently in the process of
> replacing
> > >> JavaScript  in one of my JavaScript intense Tapestry project with
> > >> om/ClojureScript.
> > >>
> > >> Sent from my iPhone
> > >>
> >  On Aug 8, 2015, at 11:41 AM, Kalle Korhonen <
> > kalle.o.korho...@gmail.com>
> > >>> wrote:
> > >>>
> >  On Fri, Aug 7, 2015 at 3:40 PM, françois facon <
fra.fa...@gmail.com
> >
> > >> wrote:
> > 
> >  About Ember, I looking for an equivalent of
> >  https://docs.angularjs.org/tutorial.
> > >>>
> > >>> I haven't found anything quite as comprehensive for Ember. One
issue
> > with
> > >>> Ember is that many of these tutorials are outdated because its
> changed
> > so
> > >>> fast. The official documentation is often too simplistic when  
you

are
> > new
> > >>> to it but trying to build something real. However, this one is
fairly
> > >>> up-to-date and helped me quite a bit when I started out:
> > >>>
http://www.fnaweso.me/ember-js-nested-routing-with-multiple-outlets/
> > >>>
> > >>> At least for me, working with AngularJS feels more like working
with
> T5
> > >>> services and its IoC whereas working with Ember feels more like
> writing
> > >> T5
> > >>> components and I felt right at home with all the Ember  
conventions.

> And
> > >>> while it's relatively easy to bootstrap AngularJS to run as  
part of

> T5
> > >> app,
> > >>> it really doesn't make sense with all the bits and pieces of  
Ember

> > >> tooling,
> > >>> the CLI etc (there was an earlier thread about that and I  
followed

> > >> Andreas
> > >>> Andreou's advice). Ember is more comprehensive than AngularJS  
and

its
> > >>> router is incredibly useful for mapping out a structure for  
larger

> > spas.
> > >>>
> > >>> Kalle
> > >>>
> > >>>
> > >>>
> >  2015-08-07 22:18 GMT+02:00 Kalle Korhonen <
> kalle.o.korho...@gmail.com
> > >:
> > 
> > > It's pretty easy. Don't build component event requests but  
just

> send
> > > REST(-like) requests that are either processed by plain  
Tapestry

> > pages
> >  and
> > > 

Re: Frontend Frameworks / Libraries

2015-09-14 Thread françois facon
It's a powerful feature. The best of both worlds!

François

2015-09-14 19:21 GMT+02:00 Kalle Korhonen :

> React and Ember Fastboot solve the SEO problem by rendering the first load
> on server, but Angular doesn't offer the same functionality natively.
> There's https://prerender.io/ though, but it's another component you need
> to deploy.
>
> Kalle
>


Re: Ajax issue in beta35

2015-09-14 Thread françois facon
I would suggest you to do a project->clean  under eclipse and also to do a
mvn clean before the build of your war.
I would also try to clean the remote server.



2015-09-13 19:54 GMT+02:00 Christine :

> On 13-09-15 19:34, françois facon wrote:
>
>> Good news!
>>
>> I had to face  the same problem with some tapestry5-jquery components
>> Your issue is related to TAP5-2463.
>> This should be fix in next version.
>>
>> Anyway, if you don't have any legacy code that use prototype.js, it is
>> better to only use jQuery.
>>
>
> :-)
> I didn't have javascript, I don't like it. Only thing I do is use a simple
> script to update a zone without having to refresh a page.
>
> But I still have this issue, when I put the application in a war file. It
> used to work before I added the js code. The app works in Eclipse with
> RunJettyRun, but not with Jetty in a .war file.
>
>
> 2015-09-13 17:24:17.619:WARN:oejw.WebAppContext:Failed startup of context
> o.e.j.w.WebAppContext{/mgnl,file:/var/cache/jetty8/data/jetty-0.0.0.0-8080-mgnl.war-_mgnl-any-/webapp/},/var/lib/jetty8/webapps/mgnl.war
>
> javax.servlet.UnavailableException: org.apache.tapestry5.TapestryFilter
> at org.eclipse.jetty.servlet.Holder.doStart(Holder.java:114)
> at
> org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:90)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:768)
> at
> org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)
> at
> org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1270)
> at
> org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:719)
> at
> org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
> at
> org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
> at
> org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
> at
> org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
> at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
> at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
> at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:615)
> at
> org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
> at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
> at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
> at
> org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
> at
> org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
> at org.eclipse.jetty.server.Server.doStart(Server.java:282)
> at
> org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
> at
> org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1274)
> at java.security.AccessController.doPrivileged(Native Method)
> at
> org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1197)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.eclipse.jetty.start.Main.invokeMain(Main.java:473)
> at org.eclipse.jetty.start.Main.start(Main.java:615)
> at org.eclipse.jetty.start.Main.main(Main.java:96)
>
>
>
>
>
>
>> Best regards
>> François
>>
>> 2015-09-13 17:46 GMT+02:00 Christine :
>>
>> On 13-09-15 11:12, françois facon wrote:
>>>
>>> Hi Christine,

 Did you try to force the use of jQuery whithout prototype  

Handling a bad context and component events

2015-09-14 Thread Carlos Montero Canabal
Hi,

I would like to know if I develop the best option to handle a bad context in my 
webapp.

I have a website (http://www.ryalive.com ) with a form 
where you have to put various values. When you search, webapp redirect to 
http://page/arg0/arg1/arg2/arg3  . I have an 
onActivate method with (pseudocode):

Object onActivate(arg0, arg1, arg2, arg3){

if (arg0 == null)
record error;

if (arg1 == null || arg1 is not valid)
record error

…

if (!errors.isEmpty())
return IndexPage.class;

else
return Boolean.TRUE; // And then setupRender method is executed.

}

Problem: if a user remove some parameter from url, onActivate didn´t call it 
because does´t match the number of parameters. So I program another method:

Object onActivate(EventContext ec){

Object[] params = new Object[4];
for(int i=0; i I don’t have to 
validate the params
return Boolean.TRUE;
}

Object[] params = new Object[4];
for(int i=0; i