Re: Tap4.1.2 - DirectLink updateComponents EventListener not supported by Safari?

2007-02-15 Thread Daniel Tabuenca

The closest you can get to Safari without a Mac is Konqueror. But why
can't Mac people just use  Firefox like normal people do?

On 2/13/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:

I've no idea. I don't currently have a mac and couldn't think of a
generally good use for one off the top of my head other than testing
safari support.

I'd love to be able to test things on Safari, but can't really afford
to get one. Maybe you can find more users who want safari support and
send me one? ;)

On 2/12/07, Anna Vo [EMAIL PROTECTED] wrote:
 I have some DirectLinks using updateComponents and also some links that
 use @EventListener that work great on Win FF 1.5+, Win IE6+, Mac FF1.5+,
 but not Safari 1.3+ or 2. Is anyone having the same issue? Is this a
 known bug or is the Safari browser simply not supported?





 Example code using @EventListener (in case something is setup funky):



 a jwcid=[EMAIL PROTECTED] href=javascript:void(0);View Hibernate
 Session Entities/a

 div id=theSessionDatatext jwcid=[EMAIL PROTECTED]
 value=prop:theSessionData
 mode=ognl:@[EMAIL PROTECTED] //div



   @EventListener(targets=sessionData, events=onclick)

   public void sessionDataClicked(IRequestCycle cycle)

   {

 setShowSessionData(true);


 cycle.getResponseBuilder().updateComponent(theSessionData);

   }



 Note: The above works with -Dorg.apache.tapestry.disable-caching=true.
 If I set to false I get NPE's in console for all browsers except Safari,
 which does nothing whether true or false.



 Example code using @DirectLink with updateComponents:

 a jwcid=@DirectLink listener=ognl:listeners.addToCartClicked
 parameters=ognl:{kit.id} name=addToCart
 updateComponents=ognl:{'cartArea', 'cartArea2', 'cartLinks'Link/a



 The above refreshes the entire page in Safari. Any input would be great.
 Thanks!





 Anna




--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Javascript function call after Ajax component update?

2007-02-15 Thread Andreas Pardeike

Hi,

I can't figure out how to trigger a simple js function after a
component was asynchrony updated. What's the best way to do it?

All I want is to is to visually flash my shopping basket status
after it was refreshed with the new number of items so the user
gets a better feedback after she clicked on a Buy button.

Anyone?
Andreas Pardeike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Javascript function call after Ajax component update?

2007-02-15 Thread Markus Joschko

Hi Andreas,
Use a script file in which you specify the javascript call. You can
inject it into your code and call it within renderComponent:

@InjectScript(SampleJavascript.script)
public abstract IScript getJavascript();

.. and ...

if (cycle.getResponseBuilder().isDynamic()) {
getJavascript().execute(this, cycle,
TapestryUtils.getPageRenderSupport(cycle, this), null);
}

The javascript will be send within the response and gets executed on the client.

Regards,
Markus


On 2/15/07, Andreas Pardeike [EMAIL PROTECTED] wrote:

Hi,

I can't figure out how to trigger a simple js function after a
component was asynchrony updated. What's the best way to do it?

All I want is to is to visually flash my shopping basket status
after it was refreshed with the new number of items so the user
gets a better feedback after she clicked on a Buy button.

Anyone?
Andreas Pardeike

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Invoking a listener

2007-02-15 Thread Andrea Chiumenti

Hello,
I've seen that if I write a @Submit into my template:
say: input jwcid=[EMAIL PROTECTED] value=addNew
action=listener:addNewListener

a script is rendered as follow:



dojo.event.browser.stopEvent(e);
tapestry.form.submit(thisForm, addNew,
{async:true,json:false,url:/Home,thisForm.direct?updateParts=tableForm});
..

Is it possible call via javascript the addNewListener without @Submit
or other components ?

Thx,
kiuma


Re: [WARNING] Invoking a listener

2007-02-15 Thread jiju

yes, its possible
i had tried to call it via script, but the @Submit component is also present
in my page


Andrea Chiumenti wrote:
 
 Hello,
 I've seen that if I write a @Submit into my template:
 say: input jwcid=[EMAIL PROTECTED] value=addNew
 action=listener:addNewListener
 
 a script is rendered as follow:
 
 
 
 dojo.event.browser.stopEvent(e);
 tapestry.form.submit(thisForm, addNew,
 {async:true,json:false,url:/Home,thisForm.direct?updateParts=tableForm});
 ..
 
 Is it possible call via javascript the addNewListener without @Submit
 or other components ?
 
 Thx,
 kiuma
 
 

-- 
View this message in context: 
http://www.nabble.com/Invoking-a-listener-tf3232630.html#a8983950
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WARNING] Javascript function call after Ajax component update?

2007-02-15 Thread jiju

you can try effects in tacos:submit



Markus Joschko wrote:
 
 Hi Andreas,
 Use a script file in which you specify the javascript call. You can
 inject it into your code and call it within renderComponent:
 
 @InjectScript(SampleJavascript.script)
   public abstract IScript getJavascript();
 
 .. and ...
 
 if (cycle.getResponseBuilder().isDynamic()) {
   getJavascript().execute(this, cycle,
 TapestryUtils.getPageRenderSupport(cycle, this), null);
   }
 
 The javascript will be send within the response and gets executed on the
 client.
 
 Regards,
  Markus
 
 
 On 2/15/07, Andreas Pardeike [EMAIL PROTECTED] wrote:
 Hi,

 I can't figure out how to trigger a simple js function after a
 component was asynchrony updated. What's the best way to do it?

 All I want is to is to visually flash my shopping basket status
 after it was refreshed with the new number of items so the user
 gets a better feedback after she clicked on a Buy button.

 Anyone?
 Andreas Pardeike

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Javascript-function-call-after-Ajax-component-update--tf3232388.html#a8984007
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WARNING] Invoking a listener

2007-02-15 Thread Andrea Chiumenti

jiju,
Thank you, yes I know it's possible the way you described, but my request is
if it is possible to call a listener without a @Submit or any other similar
component.

On 2/15/07, jiju [EMAIL PROTECTED] wrote:



yes, its possible
i had tried to call it via script, but the @Submit component is also
present
in my page


Andrea Chiumenti wrote:

 Hello,
 I've seen that if I write a @Submit into my template:
 say: input jwcid=[EMAIL PROTECTED] value=addNew
 action=listener:addNewListener

 a script is rendered as follow:

 

 dojo.event.browser.stopEvent(e);
 tapestry.form.submit(thisForm, addNew,
 {async:true,json:false,url:/Home,thisForm.direct
?updateParts=tableForm});
 ..

 Is it possible call via javascript the addNewListener without @Submit
 or other components ?

 Thx,
 kiuma



--
View this message in context:
http://www.nabble.com/Invoking-a-listener-tf3232630.html#a8983950
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [WARNING] Javascript function call after Ajax component update?

2007-02-15 Thread Renat Zubairov

It's very simple thank to the excellent tapestry.fx support.
You just need to do following:

Insert this in to your HTML template

script type=text/javascript
  dojo.require(tapestry.fx);
  dojo.require(dojo.lfx);
  tapestry.fx.attachPostEffect(tabs, function(){return
dojo.lfx.highlight([tabContentPanel, selectedTabHeader], [255,
255, 180]) });
/script


Where tabs - id of the component after which update you want to
trigger highlight effect.
tabContentPanel, selectedTabHeader - id of the components that
should be highlighted
[255, 255, 180] - starting color for highligh (it's light yellow in the example)

That's all.


On 15/02/07, jiju [EMAIL PROTECTED] wrote:


you can try effects in tacos:submit



Markus Joschko wrote:

 Hi Andreas,
 Use a script file in which you specify the javascript call. You can
 inject it into your code and call it within renderComponent:

 @InjectScript(SampleJavascript.script)
   public abstract IScript getJavascript();

 .. and ...

 if (cycle.getResponseBuilder().isDynamic()) {
   getJavascript().execute(this, cycle,
 TapestryUtils.getPageRenderSupport(cycle, this), null);
   }

 The javascript will be send within the response and gets executed on the
 client.

 Regards,
  Markus


 On 2/15/07, Andreas Pardeike [EMAIL PROTECTED] wrote:
 Hi,

 I can't figure out how to trigger a simple js function after a
 component was asynchrony updated. What's the best way to do it?

 All I want is to is to visually flash my shopping basket status
 after it was refreshed with the new number of items so the user
 gets a better feedback after she clicked on a Buy button.

 Anyone?
 Andreas Pardeike

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
View this message in context: 
http://www.nabble.com/Javascript-function-call-after-Ajax-component-update--tf3232388.html#a8984007
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Best regards,
Renat Zubairov

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WARNING] Invoking a listener

2007-02-15 Thread Renat Zubairov

I guess you just need to have a URL you wan't to call and that's all,
you can call any URL wich is related to direct link for example.

On 15/02/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:

jiju,
Thank you, yes I know it's possible the way you described, but my request is
if it is possible to call a listener without a @Submit or any other similar
component.

On 2/15/07, jiju [EMAIL PROTECTED] wrote:


 yes, its possible
 i had tried to call it via script, but the @Submit component is also
 present
 in my page


 Andrea Chiumenti wrote:
 
  Hello,
  I've seen that if I write a @Submit into my template:
  say: input jwcid=[EMAIL PROTECTED] value=addNew
  action=listener:addNewListener
 
  a script is rendered as follow:
 
  
 
  dojo.event.browser.stopEvent(e);
  tapestry.form.submit(thisForm, addNew,
  {async:true,json:false,url:/Home,thisForm.direct
 ?updateParts=tableForm});
  ..
 
  Is it possible call via javascript the addNewListener without @Submit
  or other components ?
 
  Thx,
  kiuma
 
 

 --
 View this message in context:
 http://www.nabble.com/Invoking-a-listener-tf3232630.html#a8983950
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






--
Best regards,
Renat Zubairov

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Example tapestry 4.1 with ajax style calls

2007-02-15 Thread Renat Zubairov

Hello Murray,

One of the basic classes in the AJAX support is ResponseBuilder

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/services/ResponseBuilder.html

There you can call a method updateComponent(String) with id of the
component you want to update. That's all you don't need to use
updateComponents parameter.

Renat

On 15/02/07, Murray Collingwood [EMAIL PROTECTED] wrote:

Hi all

I hunted for ages and haven't been able to find any simple examples of how to
use the Ajax features of Tapestry 4.1.  Sorry guys, it's just not obvious from
the documentation how it works.

You would think a basic @DirectLink with updateComponents and async=true would
do it - nah, didn't work for me:

a jwcid=@DirectLink listener=listener:changeTab
   parameters=2
   updateComponents=orderarea
   async='true'
   class=tab
Text/a

public void changeTab(IRequestCycle cycle) {
Object[] parameters = cycle.getListenerParameters();
Integer iix = (Integer) parameters[0];
setCurrentTab(iix);
System.err.println(Set tab to  + iix.intValue());
}

The page displays but when I click the above link it disappears and I see part
of an exception output display.

If somebody can point me at a simple Ajax enabled app using Tap 4.1 would
probably help me greatly.

Cheers
mc


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Best regards,
Renat Zubairov

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WARNING] Invoking a listener

2007-02-15 Thread Andrea Chiumenti

No, I need to do what @Submit exctly does with its listener, but without a
@Submit (I neet that the call is done in async mode)

On 2/15/07, Renat Zubairov [EMAIL PROTECTED] wrote:


I guess you just need to have a URL you wan't to call and that's all,
you can call any URL wich is related to direct link for example.

On 15/02/07, Andrea Chiumenti [EMAIL PROTECTED] wrote:
 jiju,
 Thank you, yes I know it's possible the way you described, but my
request is
 if it is possible to call a listener without a @Submit or any other
similar
 component.

 On 2/15/07, jiju [EMAIL PROTECTED] wrote:
 
 
  yes, its possible
  i had tried to call it via script, but the @Submit component is also
  present
  in my page
 
 
  Andrea Chiumenti wrote:
  
   Hello,
   I've seen that if I write a @Submit into my template:
   say: input jwcid=[EMAIL PROTECTED] value=addNew
   action=listener:addNewListener
  
   a script is rendered as follow:
  
   
  
   dojo.event.browser.stopEvent(e);
   tapestry.form.submit(thisForm, addNew,
   {async:true,json:false,url:/Home,thisForm.direct
  ?updateParts=tableForm});
   ..
  
   Is it possible call via javascript the addNewListener without
@Submit
   or other components ?
  
   Thx,
   kiuma
  
  
 
  --
  View this message in context:
  http://www.nabble.com/Invoking-a-listener-tf3232630.html#a8983950
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



--
Best regards,
Renat Zubairov

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [WARNING] Ajax Loading Indicator (google style)

2007-02-15 Thread scv

Hi Daniel,

I was searching for a solution for this problem too. Now I have found a
solution.
Just put this code in you HTMLtemplate.

---
div id=loading style=opacity: 0;loading.../div

script type=text/javascript
  dojo.require(dojo.lfx);
  dojo.addOnLoad(function(e) {
   dojo.event.connect(tapestry, loadContent, function(){ 
document.body.style.cursor=default;
dojo.lfx.html.fadeOut(loading, 300).play(); 
   });
   dojo.event.connect(tapestry, linkOnClick, function(){
document.body.style.cursor=wait;
dojo.lfx.html.fadeIn(loading, 300).play(); 
   });
   });
/script
---

Best regards,
Christian Grail


Daniel Anguita O. wrote:
 
 Hello all.
 
 I'm using Tapestry 4.1.1 and i'm learning to use ajax with it.
 Now i'm trying to make a loading indicator for ajax request when are 
 loading, like google. So i make a simple div like this:
 
 div id=loader class=loaderLoading.../div
 
 and i want to make it visible when i run an EventListener and when it's 
 finish, make it invisible. In other frameworks making this was very 
 easy, but i dont know how to make it with Dojo, using something like
  
 Dojo.byId(loader).Show - when i get onloading ajax thing.
 Dojo.byId(loader).Hide - and whern i get oncomplete ajax thing.
 
 Anyone knows any way to do this? Theres is something like 
 updateComponent to make it visible and invisible?
 
 Cheers
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Ajax-Loading-Indicator-%28google-style%29-tf3020804.html#a8985370
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Daniel Honig

Murray,
 I really enjoyed using Jetty with the Eclipse startup plugin on a
project I did a while back.  I would highly reccomend abandoing tomcat
for development and using Jetty during your development.  If you have
dependencies to tomcat functionality you might want to mock it out
during dev., it will definetly save you time.Get the Jetty plugin
and I think you'll have alot of your issues resolved.

best,
-dh


On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
Hi all


I have suffered long and hard under Eclipse and Tomcat.  Is it really necessary
for me to wait so long while a file is saved or an application is published???

Saving a .java file: 15 seconds
Saving a .html file: 15 seconds
Saving a .jwc file: 28 seconds

Stopping the tomcat server: 2 seconds (acceptable)
Publishing to the tomcat server: 45 seconds
Starting the tomcat server: 54 seconds (it insists on publishing first)

Does everybody else experience these delays or is it just me?

It was suggested that I use maven2 - however I looked through the maven2
flash presentation and it didn't mention anything about making my development
work in Eclipse faster - it was more focused on pulling dependencies and
easing the build process.  And if I were to install maven2 would it change any
of the above anyway???

Cheers
mc


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: My crap development environment

2007-02-15 Thread Joe Trewin
If you want to use the JettyLauncher plugin for Eclipse - I think it
only works with Jetty 5, not Jetty 6.

If you want to use Jetty 6 then you can't use the plugin, but you can
launch from Eclipse easily enough just by making your own little
launcher class - for example:

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.handler.ContextHandlerCollection;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

public class JettyLauncher {

public static void main(String[] args) throws Exception {
String path = (args.length  0 ? args[0] : web);
Server server = new Server();

Connector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });

HandlerCollection handlers = new HandlerCollection();
ContextHandlerCollection contexts = new
ContextHandlerCollection();
handlers.setHandlers(new Handler[] { contexts, new
DefaultHandler() });
server.setHandler(handlers);

new WebAppContext(contexts, path, /);

server.setStopAtShutdown(true);
server.setSendServerVersion(true);

server.start();
server.join();
}
}
 

 -Original Message-
 From: Daniel Honig [mailto:[EMAIL PROTECTED] 
 Sent: 15 February 2007 14:33
 To: Tapestry users
 Subject: Re: My crap development environment
 
 Murray,
   I really enjoyed using Jetty with the Eclipse startup 
 plugin on a project I did a while back.  I would highly 
 reccomend abandoing tomcat for development and using Jetty 
 during your development.  If you have dependencies to tomcat 
 functionality you might want to mock it out
 during dev., it will definetly save you time.Get the Jetty plugin
 and I think you'll have alot of your issues resolved.
 
 best,
  -dh
 
 
 On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
 Hi all
 
  I have suffered long and hard under Eclipse and Tomcat.  Is 
 it really 
  necessary for me to wait so long while a file is saved or 
 an application is published???
 
  Saving a .java file: 15 seconds
  Saving a .html file: 15 seconds
  Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable) 
 Publishing to the 
  tomcat server: 45 seconds Starting the tomcat server: 54 
 seconds (it 
  insists on publishing first)
 
  Does everybody else experience these delays or is it just me?
 
  It was suggested that I use maven2 - however I looked through the 
  maven2 flash presentation and it didn't mention anything 
 about making 
  my development work in Eclipse faster - it was more focused 
 on pulling 
  dependencies and easing the build process.  And if I were 
 to install 
  maven2 would it change any of the above anyway???
 
  Cheers
  mc
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread James Carman

The current jetty plugin uses jetty6.

On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:

If you want to use the JettyLauncher plugin for Eclipse - I think it
only works with Jetty 5, not Jetty 6.

If you want to use Jetty 6 then you can't use the plugin, but you can
launch from Eclipse easily enough just by making your own little
launcher class - for example:

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.handler.ContextHandlerCollection;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

public class JettyLauncher {

public static void main(String[] args) throws Exception {
String path = (args.length  0 ? args[0] : web);
Server server = new Server();

Connector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });

HandlerCollection handlers = new HandlerCollection();
ContextHandlerCollection contexts = new
ContextHandlerCollection();
handlers.setHandlers(new Handler[] { contexts, new
DefaultHandler() });
server.setHandler(handlers);

new WebAppContext(contexts, path, /);

server.setStopAtShutdown(true);
server.setSendServerVersion(true);

server.start();
server.join();
}
}


 -Original Message-
 From: Daniel Honig [mailto:[EMAIL PROTECTED]
 Sent: 15 February 2007 14:33
 To: Tapestry users
 Subject: Re: My crap development environment

 Murray,
   I really enjoyed using Jetty with the Eclipse startup
 plugin on a project I did a while back.  I would highly
 reccomend abandoing tomcat for development and using Jetty
 during your development.  If you have dependencies to tomcat
 functionality you might want to mock it out
 during dev., it will definetly save you time.Get the Jetty plugin
 and I think you'll have alot of your issues resolved.

 best,
  -dh


 On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
 Hi all
 
  I have suffered long and hard under Eclipse and Tomcat.  Is
 it really
  necessary for me to wait so long while a file is saved or
 an application is published???
 
  Saving a .java file: 15 seconds
  Saving a .html file: 15 seconds
  Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable)
 Publishing to the
  tomcat server: 45 seconds Starting the tomcat server: 54
 seconds (it
  insists on publishing first)
 
  Does everybody else experience these delays or is it just me?
 
  It was suggested that I use maven2 - however I looked through the
  maven2 flash presentation and it didn't mention anything
 about making
  my development work in Eclipse faster - it was more focused
 on pulling
  dependencies and easing the build process.  And if I were
 to install
  maven2 would it change any of the above anyway???
 
  Cheers
  mc
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tap4.1.2 - DirectLink updateComponents EventListener not supported by Safari?

2007-02-15 Thread Anna Vo
I'm going to guess laziness since Safari is the default on a Mac. As for
normal people... I think it's normal for developers to use Firefox but
most people still use IE. Regardless, we have to support IE, Firefox,
and Safari here. Maybe the question should be why can't Safari play
nice? :)


-Original Message-
From: Daniel Tabuenca [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 2:02 AM
To: Tapestry users
Subject: Re: Tap4.1.2 - DirectLink updateComponents  EventListener not
supported by Safari?

The closest you can get to Safari without a Mac is Konqueror. But why
can't Mac people just use  Firefox like normal people do?

On 2/13/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:
 I've no idea. I don't currently have a mac and couldn't think of a
 generally good use for one off the top of my head other than testing
 safari support.

 I'd love to be able to test things on Safari, but can't really afford
 to get one. Maybe you can find more users who want safari support and
 send me one? ;)

 On 2/12/07, Anna Vo [EMAIL PROTECTED] wrote:
  I have some DirectLinks using updateComponents and also some links
that
  use @EventListener that work great on Win FF 1.5+, Win IE6+, Mac
FF1.5+,
  but not Safari 1.3+ or 2. Is anyone having the same issue? Is this a
  known bug or is the Safari browser simply not supported?
 
 
 
 
 
  Example code using @EventListener (in case something is setup
funky):
 
 
 
  a jwcid=[EMAIL PROTECTED] href=javascript:void(0);View Hibernate
  Session Entities/a
 
  div id=theSessionDatatext jwcid=[EMAIL PROTECTED]
  value=prop:theSessionData
  mode=ognl:@[EMAIL PROTECTED]
//div
 
 
 
@EventListener(targets=sessionData, events=onclick)
 
public void sessionDataClicked(IRequestCycle cycle)
 
{
 
  setShowSessionData(true);
 
 
  cycle.getResponseBuilder().updateComponent(theSessionData);
 
}
 
 
 
  Note: The above works with
-Dorg.apache.tapestry.disable-caching=true.
  If I set to false I get NPE's in console for all browsers except
Safari,
  which does nothing whether true or false.
 
 
 
  Example code using @DirectLink with updateComponents:
 
  a jwcid=@DirectLink listener=ognl:listeners.addToCartClicked
  parameters=ognl:{kit.id} name=addToCart
  updateComponents=ognl:{'cartArea', 'cartArea2',
'cartLinks'Link/a
 
 
 
  The above refreshes the entire page in Safari. Any input would be
great.
  Thanks!
 
 
 
 
 
  Anna
 
 


 --
 Jesse Kuhnert
 Tapestry/Dojo team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax Loading Indicator (google style)

2007-02-15 Thread andyhot

Well, that's a fresh one...
https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/fx.js

See the tapestry.fx.attachAjaxStatus function and its docs, I think 
you'll like it.


scv wrote:

Hi Daniel,

I was searching for a solution for this problem too. Now I have found a
solution.
Just put this code in you HTMLtemplate.

---
div id=loading style=opacity: 0;loading.../div

script type=text/javascript
  dojo.require(dojo.lfx);
  dojo.addOnLoad(function(e) {
   dojo.event.connect(tapestry, loadContent, function(){ 
   		document.body.style.cursor=default;
   		dojo.lfx.html.fadeOut(loading, 300).play(); 
   });

   dojo.event.connect(tapestry, linkOnClick, function(){
document.body.style.cursor=wait;
   		dojo.lfx.html.fadeIn(loading, 300).play(); 
   });

   });
/script
---

Best regards,
Christian Grail


Daniel Anguita O. wrote:
  

Hello all.

I'm using Tapestry 4.1.1 and i'm learning to use ajax with it.
Now i'm trying to make a loading indicator for ajax request when are 
loading, like google. So i make a simple div like this:


div id=loader class=loaderLoading.../div

and i want to make it visible when i run an EventListener and when it's 
finish, make it invisible. In other frameworks making this was very 
easy, but i dont know how to make it with Dojo, using something like
 
Dojo.byId(loader).Show - when i get onloading ajax thing.

Dojo.byId(loader).Hide - and whern i get oncomplete ajax thing.

Anyone knows any way to do this? Theres is something like 
updateComponent to make it visible and invisible?


Cheers

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tap4.1.2 - DirectLink updateComponents EventListener not supported by Safari?

2007-02-15 Thread andyhot
Well, since i'm the KDE guy here (Jesse is gnome), i can try to see what 
happens on

Konqueror - hoping that it fails the same way as Safari does !

Anna Vo wrote:

I'm going to guess laziness since Safari is the default on a Mac. As for
normal people... I think it's normal for developers to use Firefox but
most people still use IE. Regardless, we have to support IE, Firefox,
and Safari here. Maybe the question should be why can't Safari play
nice? :)


-Original Message-
From: Daniel Tabuenca [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 15, 2007 2:02 AM

To: Tapestry users
Subject: Re: Tap4.1.2 - DirectLink updateComponents  EventListener not
supported by Safari?

The closest you can get to Safari without a Mac is Konqueror. But why
can't Mac people just use  Firefox like normal people do?

On 2/13/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:
  

I've no idea. I don't currently have a mac and couldn't think of a
generally good use for one off the top of my head other than testing
safari support.

I'd love to be able to test things on Safari, but can't really afford
to get one. Maybe you can find more users who want safari support and
send me one? ;)

On 2/12/07, Anna Vo [EMAIL PROTECTED] wrote:


I have some DirectLinks using updateComponents and also some links
  

that
  

use @EventListener that work great on Win FF 1.5+, Win IE6+, Mac
  

FF1.5+,
  

but not Safari 1.3+ or 2. Is anyone having the same issue? Is this a
known bug or is the Safari browser simply not supported?





Example code using @EventListener (in case something is setup
  

funky):
  


a jwcid=[EMAIL PROTECTED] href=javascript:void(0);View Hibernate
Session Entities/a

div id=theSessionDatatext jwcid=[EMAIL PROTECTED]
value=prop:theSessionData
mode=ognl:@[EMAIL PROTECTED]
  

//div
  


  @EventListener(targets=sessionData, events=onclick)

  public void sessionDataClicked(IRequestCycle cycle)

  {

setShowSessionData(true);


cycle.getResponseBuilder().updateComponent(theSessionData);

  }



Note: The above works with
  

-Dorg.apache.tapestry.disable-caching=true.
  

If I set to false I get NPE's in console for all browsers except
  

Safari,
  

which does nothing whether true or false.



Example code using @DirectLink with updateComponents:

a jwcid=@DirectLink listener=ognl:listeners.addToCartClicked
parameters=ognl:{kit.id} name=addToCart
updateComponents=ognl:{'cartArea', 'cartArea2',
  

'cartLinks'Link/a
  


The above refreshes the entire page in Safari. Any input would be
  

great.
  

Thanks!





Anna


  

--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Daniel Tabuenca

I really don't think the Jetty plugin is going to solve his
performance problems. Jetty might or might not be faster but in any
case, not significantly enough to solve his problem. I am willing to
bet that his problem is due to an incremental compile issue where his
entire project is re-compiled every time he saves one file. He's
talking about 60 seconds before the server even begins starting up. I
had this issue while using the AJDT plugin in combination with Maven
because maven uses 2 output directories by default (one for the test
classes) and AJDT didn't handle this properly triggering a complete
rebuild. There is no reason it should take 15 seconds to SAVE an .html
file (Jetty plugin won't speed that up). From his numbers it looks
like after saving/compiling/publishing tomcat starts up in less than
10 seconds which sounds completely reasonable depending on his
application's initialization requirements.



Saving a .java file: 15 seconds
Saving a .html file: 15 seconds
Saving a .jwc file: 28 seconds

Stopping the tomcat server: 2 seconds (acceptable)
Publishing to the tomcat server: 45 seconds
Starting the tomcat server: 54 seconds (it insists on publishing first)

On 2/15/07, James Carman [EMAIL PROTECTED] wrote:

The current jetty plugin uses jetty6.

On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
 If you want to use the JettyLauncher plugin for Eclipse - I think it
 only works with Jetty 5, not Jetty 6.

 If you want to use Jetty 6 then you can't use the plugin, but you can
 launch from Eclipse easily enough just by making your own little
 launcher class - for example:

 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.Handler;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.handler.ContextHandlerCollection;
 import org.mortbay.jetty.handler.DefaultHandler;
 import org.mortbay.jetty.handler.HandlerCollection;
 import org.mortbay.jetty.nio.SelectChannelConnector;
 import org.mortbay.jetty.webapp.WebAppContext;

 public class JettyLauncher {

 public static void main(String[] args) throws Exception {
 String path = (args.length  0 ? args[0] : web);
 Server server = new Server();

 Connector connector = new SelectChannelConnector();
 connector.setPort(8080);
 server.setConnectors(new Connector[] { connector });

 HandlerCollection handlers = new HandlerCollection();
 ContextHandlerCollection contexts = new
 ContextHandlerCollection();
 handlers.setHandlers(new Handler[] { contexts, new
 DefaultHandler() });
 server.setHandler(handlers);

 new WebAppContext(contexts, path, /);

 server.setStopAtShutdown(true);
 server.setSendServerVersion(true);

 server.start();
 server.join();
 }
 }


  -Original Message-
  From: Daniel Honig [mailto:[EMAIL PROTECTED]
  Sent: 15 February 2007 14:33
  To: Tapestry users
  Subject: Re: My crap development environment
 
  Murray,
I really enjoyed using Jetty with the Eclipse startup
  plugin on a project I did a while back.  I would highly
  reccomend abandoing tomcat for development and using Jetty
  during your development.  If you have dependencies to tomcat
  functionality you might want to mock it out
  during dev., it will definetly save you time.Get the Jetty plugin
  and I think you'll have alot of your issues resolved.
 
  best,
   -dh
 
 
  On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
  Hi all
  
   I have suffered long and hard under Eclipse and Tomcat.  Is
  it really
   necessary for me to wait so long while a file is saved or
  an application is published???
  
   Saving a .java file: 15 seconds
   Saving a .html file: 15 seconds
   Saving a .jwc file: 28 seconds
  
   Stopping the tomcat server: 2 seconds (acceptable)
  Publishing to the
   tomcat server: 45 seconds Starting the tomcat server: 54
  seconds (it
   insists on publishing first)
  
   Does everybody else experience these delays or is it just me?
  
   It was suggested that I use maven2 - however I looked through the
   maven2 flash presentation and it didn't mention anything
  about making
   my development work in Eclipse faster - it was more focused
  on pulling
   dependencies and easing the build process.  And if I were
  to install
   maven2 would it change any of the above anyway???
  
   Cheers
   mc
  
  
  
  -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: 

Re: Tap4.1.2 - DirectLink updateComponents EventListener not supported by Safari?

2007-02-15 Thread Daniel Tabuenca

We need an IETab plugin for Safari... hehe


On 2/15/07, andyhot [EMAIL PROTECTED] wrote:

Well, since i'm the KDE guy here (Jesse is gnome), i can try to see what
happens on
Konqueror - hoping that it fails the same way as Safari does !

Anna Vo wrote:
 I'm going to guess laziness since Safari is the default on a Mac. As for
 normal people... I think it's normal for developers to use Firefox but
 most people still use IE. Regardless, we have to support IE, Firefox,
 and Safari here. Maybe the question should be why can't Safari play
 nice? :)


 -Original Message-
 From: Daniel Tabuenca [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 15, 2007 2:02 AM
 To: Tapestry users
 Subject: Re: Tap4.1.2 - DirectLink updateComponents  EventListener not
 supported by Safari?

 The closest you can get to Safari without a Mac is Konqueror. But why
 can't Mac people just use  Firefox like normal people do?

 On 2/13/07, Jesse Kuhnert [EMAIL PROTECTED] wrote:

 I've no idea. I don't currently have a mac and couldn't think of a
 generally good use for one off the top of my head other than testing
 safari support.

 I'd love to be able to test things on Safari, but can't really afford
 to get one. Maybe you can find more users who want safari support and
 send me one? ;)

 On 2/12/07, Anna Vo [EMAIL PROTECTED] wrote:

 I have some DirectLinks using updateComponents and also some links

 that

 use @EventListener that work great on Win FF 1.5+, Win IE6+, Mac

 FF1.5+,

 but not Safari 1.3+ or 2. Is anyone having the same issue? Is this a
 known bug or is the Safari browser simply not supported?





 Example code using @EventListener (in case something is setup

 funky):


 a jwcid=[EMAIL PROTECTED] href=javascript:void(0);View Hibernate
 Session Entities/a

 div id=theSessionDatatext jwcid=[EMAIL PROTECTED]
 value=prop:theSessionData
 mode=ognl:@[EMAIL PROTECTED]

 //div


   @EventListener(targets=sessionData, events=onclick)

   public void sessionDataClicked(IRequestCycle cycle)

   {

 setShowSessionData(true);


 cycle.getResponseBuilder().updateComponent(theSessionData);

   }



 Note: The above works with

 -Dorg.apache.tapestry.disable-caching=true.

 If I set to false I get NPE's in console for all browsers except

 Safari,

 which does nothing whether true or false.



 Example code using @DirectLink with updateComponents:

 a jwcid=@DirectLink listener=ognl:listeners.addToCartClicked
 parameters=ognl:{kit.id} name=addToCart
 updateComponents=ognl:{'cartArea', 'cartArea2',

 'cartLinks'Link/a


 The above refreshes the entire page in Safari. Any input would be

 great.

 Thanks!





 Anna



 --
 Jesse Kuhnert
 Tapestry/Dojo team member/developer

 Open source based consulting work centered around
 dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry 4 with MyEclipse?

2007-02-15 Thread Matthew Freedman

MyEclipse comes with support for Tapestry version 3 via the Spindle
plugin, but apparently that was never updated for Tapestry 4. We are 
having problems getting Tapestry 4 to work at all in MyEclipse, even 
without the extra IDE support offered by Spindle.


Is anybody successfully using Tapestry 4 with MyEclipse? If so, are there
instructions around for getting it set up?

 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 = Matthew M. Freedman Software Engineer
 = U. of Washington Information Systems   (206) 685-6234
 = 4545 15th Ave. NE[EMAIL PROTECTED]
 = Seattle, WA  98105  http://staff.washington.edu/mattf
 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Kalle Korhonen

Just out of interest, what's this publishing step? Compilation is the only
thing and occasional re-load of the context when hotswapping fails (like it
does with Tomcat most of the time)  that should be required. If you do
something else, I think you haven't set up your environment correctly for
development.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:


I really don't think the Jetty plugin is going to solve his
performance problems. Jetty might or might not be faster but in any
case, not significantly enough to solve his problem. I am willing to
bet that his problem is due to an incremental compile issue where his
entire project is re-compiled every time he saves one file. He's
talking about 60 seconds before the server even begins starting up. I
had this issue while using the AJDT plugin in combination with Maven
because maven uses 2 output directories by default (one for the test
classes) and AJDT didn't handle this properly triggering a complete
rebuild. There is no reason it should take 15 seconds to SAVE an .html
file (Jetty plugin won't speed that up). From his numbers it looks
like after saving/compiling/publishing tomcat starts up in less than
10 seconds which sounds completely reasonable depending on his
application's initialization requirements.



Saving a .java file: 15 seconds
Saving a .html file: 15 seconds
Saving a .jwc file: 28 seconds

Stopping the tomcat server: 2 seconds (acceptable)
Publishing to the tomcat server: 45 seconds
Starting the tomcat server: 54 seconds (it insists on publishing first)

On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
 The current jetty plugin uses jetty6.

 On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
  If you want to use the JettyLauncher plugin for Eclipse - I think it
  only works with Jetty 5, not Jetty 6.
 
  If you want to use Jetty 6 then you can't use the plugin, but you can
  launch from Eclipse easily enough just by making your own little
  launcher class - for example:
 
  import org.mortbay.jetty.Connector;
  import org.mortbay.jetty.Handler;
  import org.mortbay.jetty.Server;
  import org.mortbay.jetty.handler.ContextHandlerCollection;
  import org.mortbay.jetty.handler.DefaultHandler;
  import org.mortbay.jetty.handler.HandlerCollection;
  import org.mortbay.jetty.nio.SelectChannelConnector;
  import org.mortbay.jetty.webapp.WebAppContext;
 
  public class JettyLauncher {
 
  public static void main(String[] args) throws Exception {
  String path = (args.length  0 ? args[0] : web);
  Server server = new Server();
 
  Connector connector = new SelectChannelConnector();
  connector.setPort(8080);
  server.setConnectors(new Connector[] { connector });
 
  HandlerCollection handlers = new HandlerCollection();
  ContextHandlerCollection contexts = new
  ContextHandlerCollection();
  handlers.setHandlers(new Handler[] { contexts, new
  DefaultHandler() });
  server.setHandler(handlers);
 
  new WebAppContext(contexts, path, /);
 
  server.setStopAtShutdown(true);
  server.setSendServerVersion(true);
 
  server.start();
  server.join();
  }
  }
 
 
   -Original Message-
   From: Daniel Honig [mailto:[EMAIL PROTECTED]
   Sent: 15 February 2007 14:33
   To: Tapestry users
   Subject: Re: My crap development environment
  
   Murray,
 I really enjoyed using Jetty with the Eclipse startup
   plugin on a project I did a while back.  I would highly
   reccomend abandoing tomcat for development and using Jetty
   during your development.  If you have dependencies to tomcat
   functionality you might want to mock it out
   during dev., it will definetly save you time.Get the Jetty
plugin
   and I think you'll have alot of your issues resolved.
  
   best,
-dh
  
  
   On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
   Hi all
   
I have suffered long and hard under Eclipse and Tomcat.  Is
   it really
necessary for me to wait so long while a file is saved or
   an application is published???
   
Saving a .java file: 15 seconds
Saving a .html file: 15 seconds
Saving a .jwc file: 28 seconds
   
Stopping the tomcat server: 2 seconds (acceptable)
   Publishing to the
tomcat server: 45 seconds Starting the tomcat server: 54
   seconds (it
insists on publishing first)
   
Does everybody else experience these delays or is it just me?
   
It was suggested that I use maven2 - however I looked through the
maven2 flash presentation and it didn't mention anything
   about making
my development work in Eclipse faster - it was more focused
   on pulling
dependencies and easing the build process.  And if I were
   to install
maven2 would it change any of the above anyway???
   
Cheers
mc
   
   
   
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, 

Re: My crap development environment

2007-02-15 Thread Daniel Tabuenca

When using eclipse Web Standard Tools, eclipse sets up a temporary
Tomcat (or other app server) directory with configuration and your
project files. Tomcat is then started from this directory. This is
done so you can have more control of when your changes appear in
Tomcat. You can have it set so every time it detects changes in your
build it copies the affected files to the temporary directory, or you
can have it so you publish manually (For example I have auto-build
enabled so I don't necessarily want tomcat restarting every time it
detects a change, so I publish manually after I have made the set of
changes I want). So basically Publishing involves just synchronizing
the files tomcat sees with the contents of your eclipse biuld
directory.

On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:

Just out of interest, what's this publishing step? Compilation is the only
thing and occasional re-load of the context when hotswapping fails (like it
does with Tomcat most of the time)  that should be required. If you do
something else, I think you haven't set up your environment correctly for
development.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:

 I really don't think the Jetty plugin is going to solve his
 performance problems. Jetty might or might not be faster but in any
 case, not significantly enough to solve his problem. I am willing to
 bet that his problem is due to an incremental compile issue where his
 entire project is re-compiled every time he saves one file. He's
 talking about 60 seconds before the server even begins starting up. I
 had this issue while using the AJDT plugin in combination with Maven
 because maven uses 2 output directories by default (one for the test
 classes) and AJDT didn't handle this properly triggering a complete
 rebuild. There is no reason it should take 15 seconds to SAVE an .html
 file (Jetty plugin won't speed that up). From his numbers it looks
 like after saving/compiling/publishing tomcat starts up in less than
 10 seconds which sounds completely reasonable depending on his
 application's initialization requirements.



 Saving a .java file: 15 seconds
 Saving a .html file: 15 seconds
 Saving a .jwc file: 28 seconds

 Stopping the tomcat server: 2 seconds (acceptable)
 Publishing to the tomcat server: 45 seconds
 Starting the tomcat server: 54 seconds (it insists on publishing first)

 On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
  The current jetty plugin uses jetty6.
 
  On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
   If you want to use the JettyLauncher plugin for Eclipse - I think it
   only works with Jetty 5, not Jetty 6.
  
   If you want to use Jetty 6 then you can't use the plugin, but you can
   launch from Eclipse easily enough just by making your own little
   launcher class - for example:
  
   import org.mortbay.jetty.Connector;
   import org.mortbay.jetty.Handler;
   import org.mortbay.jetty.Server;
   import org.mortbay.jetty.handler.ContextHandlerCollection;
   import org.mortbay.jetty.handler.DefaultHandler;
   import org.mortbay.jetty.handler.HandlerCollection;
   import org.mortbay.jetty.nio.SelectChannelConnector;
   import org.mortbay.jetty.webapp.WebAppContext;
  
   public class JettyLauncher {
  
   public static void main(String[] args) throws Exception {
   String path = (args.length  0 ? args[0] : web);
   Server server = new Server();
  
   Connector connector = new SelectChannelConnector();
   connector.setPort(8080);
   server.setConnectors(new Connector[] { connector });
  
   HandlerCollection handlers = new HandlerCollection();
   ContextHandlerCollection contexts = new
   ContextHandlerCollection();
   handlers.setHandlers(new Handler[] { contexts, new
   DefaultHandler() });
   server.setHandler(handlers);
  
   new WebAppContext(contexts, path, /);
  
   server.setStopAtShutdown(true);
   server.setSendServerVersion(true);
  
   server.start();
   server.join();
   }
   }
  
  
-Original Message-
From: Daniel Honig [mailto:[EMAIL PROTECTED]
Sent: 15 February 2007 14:33
To: Tapestry users
Subject: Re: My crap development environment
   
Murray,
  I really enjoyed using Jetty with the Eclipse startup
plugin on a project I did a while back.  I would highly
reccomend abandoing tomcat for development and using Jetty
during your development.  If you have dependencies to tomcat
functionality you might want to mock it out
during dev., it will definetly save you time.Get the Jetty
 plugin
and I think you'll have alot of your issues resolved.
   
best,
 -dh
   
   
On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
Hi all

 I have suffered long and hard under Eclipse and Tomcat.  Is
it really
 necessary for me to wait so long while a file is saved or
an application is published???

 

Re: My crap development environment

2007-02-15 Thread Kalle Korhonen

Oh ok. Yea I never understood why WTP went with that approach. There's gotta
be some file locking issues though if that takes 45 seconds - luckily I'm on
Linux so I don't care. I use Sysdeo's Tomcat plugin that runs everything
in-place (I have Jetty as well but don't see much of a difference in
performance either way). And now with Discursive's sysdeo-tomcat-plugin it's
ah all so nicely automated.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:


When using eclipse Web Standard Tools, eclipse sets up a temporary
Tomcat (or other app server) directory with configuration and your
project files. Tomcat is then started from this directory. This is
done so you can have more control of when your changes appear in
Tomcat. You can have it set so every time it detects changes in your
build it copies the affected files to the temporary directory, or you
can have it so you publish manually (For example I have auto-build
enabled so I don't necessarily want tomcat restarting every time it
detects a change, so I publish manually after I have made the set of
changes I want). So basically Publishing involves just synchronizing
the files tomcat sees with the contents of your eclipse biuld
directory.

On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
 Just out of interest, what's this publishing step? Compilation is the
only
 thing and occasional re-load of the context when hotswapping fails (like
it
 does with Tomcat most of the time)  that should be required. If you do
 something else, I think you haven't set up your environment correctly
for
 development.

 Kalle

 On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
 
  I really don't think the Jetty plugin is going to solve his
  performance problems. Jetty might or might not be faster but in any
  case, not significantly enough to solve his problem. I am willing to
  bet that his problem is due to an incremental compile issue where his
  entire project is re-compiled every time he saves one file. He's
  talking about 60 seconds before the server even begins starting up. I
  had this issue while using the AJDT plugin in combination with Maven
  because maven uses 2 output directories by default (one for the test
  classes) and AJDT didn't handle this properly triggering a complete
  rebuild. There is no reason it should take 15 seconds to SAVE an .html
  file (Jetty plugin won't speed that up). From his numbers it looks
  like after saving/compiling/publishing tomcat starts up in less than
  10 seconds which sounds completely reasonable depending on his
  application's initialization requirements.
 
 
 
  Saving a .java file: 15 seconds
  Saving a .html file: 15 seconds
  Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable)
  Publishing to the tomcat server: 45 seconds
  Starting the tomcat server: 54 seconds (it insists on publishing
first)
 
  On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
   The current jetty plugin uses jetty6.
  
   On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
If you want to use the JettyLauncher plugin for Eclipse - I think
it
only works with Jetty 5, not Jetty 6.
   
If you want to use Jetty 6 then you can't use the plugin, but you
can
launch from Eclipse easily enough just by making your own little
launcher class - for example:
   
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.handler.ContextHandlerCollection;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
   
public class JettyLauncher {
   
public static void main(String[] args) throws Exception {
String path = (args.length  0 ? args[0] : web);
Server server = new Server();
   
Connector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });
   
HandlerCollection handlers = new HandlerCollection();
ContextHandlerCollection contexts = new
ContextHandlerCollection();
handlers.setHandlers(new Handler[] { contexts, new
DefaultHandler() });
server.setHandler(handlers);
   
new WebAppContext(contexts, path, /);
   
server.setStopAtShutdown(true);
server.setSendServerVersion(true);
   
server.start();
server.join();
}
}
   
   
 -Original Message-
 From: Daniel Honig [mailto:[EMAIL PROTECTED]
 Sent: 15 February 2007 14:33
 To: Tapestry users
 Subject: Re: My crap development environment

 Murray,
   I really enjoyed using Jetty with the Eclipse startup
 plugin on a project I did a while back.  I would highly
 reccomend abandoing tomcat for development and 

Re: My crap development environment

2007-02-15 Thread Daniel Tabuenca

I'll have to try the sysdeo plugin again. I used to use it but at some
point I decided I preferred the WTP plugin (I don't quite remember now
the reason). In any case, it's very possible it takes 45 seconds in
the initial build/publish  if he has a slow disk or a large set of
libraries to copy over. After the initial build, however, it should
take a second or so to copy over any incremental changes (that's why I
think he has an incremental builder problem).



On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:

Oh ok. Yea I never understood why WTP went with that approach. There's gotta
be some file locking issues though if that takes 45 seconds - luckily I'm on
Linux so I don't care. I use Sysdeo's Tomcat plugin that runs everything
in-place (I have Jetty as well but don't see much of a difference in
performance either way). And now with Discursive's sysdeo-tomcat-plugin it's
ah all so nicely automated.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:

 When using eclipse Web Standard Tools, eclipse sets up a temporary
 Tomcat (or other app server) directory with configuration and your
 project files. Tomcat is then started from this directory. This is
 done so you can have more control of when your changes appear in
 Tomcat. You can have it set so every time it detects changes in your
 build it copies the affected files to the temporary directory, or you
 can have it so you publish manually (For example I have auto-build
 enabled so I don't necessarily want tomcat restarting every time it
 detects a change, so I publish manually after I have made the set of
 changes I want). So basically Publishing involves just synchronizing
 the files tomcat sees with the contents of your eclipse biuld
 directory.

 On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
  Just out of interest, what's this publishing step? Compilation is the
 only
  thing and occasional re-load of the context when hotswapping fails (like
 it
  does with Tomcat most of the time)  that should be required. If you do
  something else, I think you haven't set up your environment correctly
 for
  development.
 
  Kalle
 
  On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
  
   I really don't think the Jetty plugin is going to solve his
   performance problems. Jetty might or might not be faster but in any
   case, not significantly enough to solve his problem. I am willing to
   bet that his problem is due to an incremental compile issue where his
   entire project is re-compiled every time he saves one file. He's
   talking about 60 seconds before the server even begins starting up. I
   had this issue while using the AJDT plugin in combination with Maven
   because maven uses 2 output directories by default (one for the test
   classes) and AJDT didn't handle this properly triggering a complete
   rebuild. There is no reason it should take 15 seconds to SAVE an .html
   file (Jetty plugin won't speed that up). From his numbers it looks
   like after saving/compiling/publishing tomcat starts up in less than
   10 seconds which sounds completely reasonable depending on his
   application's initialization requirements.
  
  
  
   Saving a .java file: 15 seconds
   Saving a .html file: 15 seconds
   Saving a .jwc file: 28 seconds
  
   Stopping the tomcat server: 2 seconds (acceptable)
   Publishing to the tomcat server: 45 seconds
   Starting the tomcat server: 54 seconds (it insists on publishing
 first)
  
   On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
The current jetty plugin uses jetty6.
   
On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
 If you want to use the JettyLauncher plugin for Eclipse - I think
 it
 only works with Jetty 5, not Jetty 6.

 If you want to use Jetty 6 then you can't use the plugin, but you
 can
 launch from Eclipse easily enough just by making your own little
 launcher class - for example:

 import org.mortbay.jetty.Connector;
 import org.mortbay.jetty.Handler;
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.handler.ContextHandlerCollection;
 import org.mortbay.jetty.handler.DefaultHandler;
 import org.mortbay.jetty.handler.HandlerCollection;
 import org.mortbay.jetty.nio.SelectChannelConnector;
 import org.mortbay.jetty.webapp.WebAppContext;

 public class JettyLauncher {

 public static void main(String[] args) throws Exception {
 String path = (args.length  0 ? args[0] : web);
 Server server = new Server();

 Connector connector = new SelectChannelConnector();
 connector.setPort(8080);
 server.setConnectors(new Connector[] { connector });

 HandlerCollection handlers = new HandlerCollection();
 ContextHandlerCollection contexts = new
 ContextHandlerCollection();
 handlers.setHandlers(new Handler[] { contexts, new
 DefaultHandler() });
 server.setHandler(handlers);

  

Re: My crap development environment

2007-02-15 Thread Kalle Korhonen

Sysdeo's plugin is no silver bullet, but I keep evaluating alternatives and
so far I haven't found anything better. The most common gotchas with Sysdeo
is installing devloader (which you will need) and maintaining the set of
libraries to load (for which sysdeo-tomcat-plugin is used), setting the
context path correctly and making sure you don't have servlet-api loaded
with the devloader. I have developers asking about these over and over
again.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:


I'll have to try the sysdeo plugin again. I used to use it but at some
point I decided I preferred the WTP plugin (I don't quite remember now
the reason). In any case, it's very possible it takes 45 seconds in
the initial build/publish  if he has a slow disk or a large set of
libraries to copy over. After the initial build, however, it should
take a second or so to copy over any incremental changes (that's why I
think he has an incremental builder problem).



On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
 Oh ok. Yea I never understood why WTP went with that approach. There's
gotta
 be some file locking issues though if that takes 45 seconds - luckily
I'm on
 Linux so I don't care. I use Sysdeo's Tomcat plugin that runs everything
 in-place (I have Jetty as well but don't see much of a difference in
 performance either way). And now with Discursive's sysdeo-tomcat-plugin
it's
 ah all so nicely automated.

 Kalle

 On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
 
  When using eclipse Web Standard Tools, eclipse sets up a temporary
  Tomcat (or other app server) directory with configuration and your
  project files. Tomcat is then started from this directory. This is
  done so you can have more control of when your changes appear in
  Tomcat. You can have it set so every time it detects changes in your
  build it copies the affected files to the temporary directory, or you
  can have it so you publish manually (For example I have auto-build
  enabled so I don't necessarily want tomcat restarting every time it
  detects a change, so I publish manually after I have made the set of
  changes I want). So basically Publishing involves just synchronizing
  the files tomcat sees with the contents of your eclipse biuld
  directory.
 
  On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
   Just out of interest, what's this publishing step? Compilation is
the
  only
   thing and occasional re-load of the context when hotswapping fails
(like
  it
   does with Tomcat most of the time)  that should be required. If you
do
   something else, I think you haven't set up your environment
correctly
  for
   development.
  
   Kalle
  
   On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
   
I really don't think the Jetty plugin is going to solve his
performance problems. Jetty might or might not be faster but in
any
case, not significantly enough to solve his problem. I am willing
to
bet that his problem is due to an incremental compile issue where
his
entire project is re-compiled every time he saves one file. He's
talking about 60 seconds before the server even begins starting
up. I
had this issue while using the AJDT plugin in combination with
Maven
because maven uses 2 output directories by default (one for the
test
classes) and AJDT didn't handle this properly triggering a
complete
rebuild. There is no reason it should take 15 seconds to SAVE an
.html
file (Jetty plugin won't speed that up). From his numbers it looks
like after saving/compiling/publishing tomcat starts up in less
than
10 seconds which sounds completely reasonable depending on his
application's initialization requirements.
   
   
   
Saving a .java file: 15 seconds
Saving a .html file: 15 seconds
Saving a .jwc file: 28 seconds
   
Stopping the tomcat server: 2 seconds (acceptable)
Publishing to the tomcat server: 45 seconds
Starting the tomcat server: 54 seconds (it insists on publishing
  first)
   
On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
 The current jetty plugin uses jetty6.

 On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
  If you want to use the JettyLauncher plugin for Eclipse - I
think
  it
  only works with Jetty 5, not Jetty 6.
 
  If you want to use Jetty 6 then you can't use the plugin, but
you
  can
  launch from Eclipse easily enough just by making your own
little
  launcher class - for example:
 
  import org.mortbay.jetty.Connector;
  import org.mortbay.jetty.Handler;
  import org.mortbay.jetty.Server;
  import org.mortbay.jetty.handler.ContextHandlerCollection;
  import org.mortbay.jetty.handler.DefaultHandler;
  import org.mortbay.jetty.handler.HandlerCollection;
  import org.mortbay.jetty.nio.SelectChannelConnector;
  import org.mortbay.jetty.webapp.WebAppContext;
 
  public class JettyLauncher {
 
  public static void main(String[] 

Re: About Tapestry 5 ?

2007-02-15 Thread Howard Lewis Ship

Yep, I haven't figured out the documentation angle. I'm thinking in
terms of a Maven plugin to generate the component documentation
directly from the source code  annotations  javadoc.

One advantage is that you have the source and the core components are
in org.apache.tapestry.corelib.components (effectively, by definition,
they can't live elsewhere).

The documentation is, yes, mostly conceptual/brain dump (but it does
exist!). I have a start on a tutorial but I may be shifting gears to
have the tutorials up on DeveloperWorks.  That's stil in an early
negotation stage.  As a last resort, the test suite shows how a lot of
things work.

On 2/14/07, DJ Gredler [EMAIL PROTECTED] wrote:

I've been trying it out over the past week or so, and my impression of the
documentation is that it's a brain dump of how things work in general, but
when you get down to basic questions like is there a label component? if
so, how does it work? is there a select component? if so, how does it work?
you end up having to go to google and search along the lines of label site:
tapestry.apache.org/tapestry5. I like what comes out once you figure out
how things work, though.

The one other thing I've had trouble with is contributing to the application
configuration... I have a search page which I want to render sometimes even
when the URL doesn't contain the page name, and I had to do some major
digging into the internal configuration to figure out how to do it. What I
ended up with made heavy use of internal Tapestry classes, so this seems
like an area that may not yet be complete.

Overall it reminds me of Maven 2 at this point... slightly aggravating to
figure out at first, but possibly a time saver in the long run.


On 2/14/07, Dwi Ardi Irawan [EMAIL PROTECTED] wrote:

 i've heard about tapestry 5 preview release,
 what i want to ask : is tapestry 5 ready to be used in production ?

 thnx.

 dwi ardi irawan

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: About Tapestry 5 ?

2007-02-15 Thread Howard Lewis Ship

preview == alpha == everything subject to change

In practice, what's existing and public is not changing, we're just
adding more and more.

On 2/13/07, Dwi Ardi Irawan [EMAIL PROTECTED] wrote:

i've heard about tapestry 5 preview release,
what i want to ask : is tapestry 5 ready to be used in production ?

thnx.

dwi ardi irawan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with user logout (Tapestry-Acegi)

2007-02-15 Thread jake123

Hi all,
I have a problem when a logged in user are about to logout. If I only empty
my user information in session object and using 
SecurityContextHolder.getContext().setAuthentication(null); to empty the
acegi part the user can still come back to the secured page using the
browsers back button. I need to make this not possible.

Does anybody know how to solve this?

Thanks,
Jacob

-- 
View this message in context: 
http://www.nabble.com/Problem-with-user-logout-%28Tapestry-Acegi%29-tf3236292.html#a8994383
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Multiple components error with an If component (Help!)

2007-02-15 Thread Daniel Anguita O.

Hi all,
I'm trying to show different components with the same id using an If 
component, but when I run the app it says that i have multiple 
components with the same id, so it throws exception error.


For example:

span jwcid=@If condition=ognl:isMale
   select jwcid=[EMAIL PROTECTED] model=ognl:person 
value=ognl:person/

/span
span jwcid=@Else
   span jwcid=[EMAIL PROTECTED] value=literal:notMale/
/span

Why i'm trying to do this? Becouse i'm refreshing this component with 
the same id with UpdateComponent from an EventListener.
In this example, if is not a Male, the user can click a button and ask 
again if it's a Male, so i'll update the same component if now it's male.


The problems rather in the eventlistener, becauso if I use diferent 
eventlisteners with diferents components id it will be necesary to have 
both components displayed and loaded, but i want that only one will... 
so i'm trying to use the same id, but tapestry doesn't let me.


Other clasic example is when i make a form with a Country and State 
ListBoxs. When you select the country it calls an eventlistener that 
will read from the database the States and update the state component, 
but if in one country haves regions and not states, the component if 
diferent (due to different objects), but you have to use the same id to 
receive the information in the form.


How do I do this?! Maybe my problem is that i'm using auto-generation 
dojo ajax code from tapestry with eventlistener.. so i have to make the 
dojo code by myself?

Any ideas?

Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Multiple components error with an If component (Help!)

2007-02-15 Thread Howard Lewis Ship

Component ids must be unique within a template (not within an element
such as that @If).  All of these components, regardless of how they
are enclosed by each other, are all contained by the page, and must
have a unique id within the page. So just given them different ids.

On 2/15/07, Daniel Anguita O. [EMAIL PROTECTED] wrote:

Hi all,
I'm trying to show different components with the same id using an If
component, but when I run the app it says that i have multiple
components with the same id, so it throws exception error.

For example:

span jwcid=@If condition=ognl:isMale
select jwcid=[EMAIL PROTECTED] model=ognl:person
value=ognl:person/
/span
span jwcid=@Else
span jwcid=[EMAIL PROTECTED] value=literal:notMale/
/span

Why i'm trying to do this? Becouse i'm refreshing this component with
the same id with UpdateComponent from an EventListener.
In this example, if is not a Male, the user can click a button and ask
again if it's a Male, so i'll update the same component if now it's male.

The problems rather in the eventlistener, becauso if I use diferent
eventlisteners with diferents components id it will be necesary to have
both components displayed and loaded, but i want that only one will...
so i'm trying to use the same id, but tapestry doesn't let me.

Other clasic example is when i make a form with a Country and State
ListBoxs. When you select the country it calls an eventlistener that
will read from the database the States and update the state component,
but if in one country haves regions and not states, the component if
diferent (due to different objects), but you have to use the same id to
receive the information in the form.

How do I do this?! Maybe my problem is that i'm using auto-generation
dojo ajax code from tapestry with eventlistener.. so i have to make the
dojo code by myself?
Any ideas?

Thanks!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry5: Passing parameters to pages

2007-02-15 Thread Dennis Kempin
Hi,

I am experimenting with the tapestry snapshot version and want to write a
little page class that takes an integer parameter to specify an content id
to show. Just like passing a context with an Action link, but just without
the HTTP redirect back to the Page URL.
I could make use of a persistent field to store the id passed with the
context of the ActionLink to show it after reloading, but well that seems
to a be very hacky solution.

Example:
/nopaste/4 is handled by the /nopaste page, but how do I get the integer
value after the slash?

(well i could use the good old ?id=4 GET parameters, but the above example
would look more consistent, IMHO)

regards
Dennis




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Murray Collingwood
Hi all

Does anybody else find this hellishly confusing?  It makes me want to throw
everything out and go back to a nice simple DOS system and a Turbo C compiler! 
How much simpler it was back then...

Okay, I downloaded the latest Eclipse system, copied my project into a fresh
workspace.  Saving a file was back to a sub-second response.  Actually I tried
saving a second file to make sure it wasn't a fluke the first time.  There was
definitely a problem somewhere and it has now gone away.

Okay, now the second part of the problem.

Tomcat or Jetty???

I don't want to package every time I make a small change to a config file or
HTML, so I want the servlet engine to use my files from my development area.  My
previous frustrations with restarting tomcat have encouraged me down the Jetty
track - I downloaded Jetty 6 yesterday and the test system was working in about
5 minutes, pretty good.  I then added a context.xml for my application and now
when I start Jetty it simple crashes and refuses to start the application.  I
get an error like:  'No class for Servlet or Filter'

I haven't been able to find any help on this error.

I did find information on a Jetty-Maven-Plugin but form my reading this is all
about packaging the application - I don't want to go there.  I also found a
number of recent comments about Maven2 saying it was still quite buggy.

Do I press ahead trying to solve the Jetty stuff or do I revert back to a Tomcat
system???

I'm developing in a Windows XP environment so this may limit me from some of the
options suggested here.

PS Thanks to everybody who has contributed so far - I really appreciate your
ideas and suggestions.  You really are a very friendly bunch of people.

PPS My computer is an Intel 2.8ghz processor with 1gb ram and 80gb harddrive. 
It's not slow with other stuff.

Cheers
Murray

Some of my understandings:
Sysdeo-tomcat-plugin - packages app and restarts Tomcat
WTP - packages app and restarts Tomcat
Web Standard Tools - I was using this
AJDT - never used it
Jetty6 plugin - is this the Jetty-maven-plugin referred above of different?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Konstantin Ignatyev
Confusion avoidance (my approach):

Eclipse - simply do not use. IntelliJ works more
reliably and predictably, it works as expected and
has controls where expected.

Jetty vs Tomcat vs ... - Tomcat, removing everything
from webapps/ and all the admin application context
configurations from conf/Catalina/localhost makes it
as fast as Jetty for all practical purposes.

Plugins, deployments etc. - one extra command line
window that has rinning command catalina.(sh|bat)
run takes care of everything. 


--- Murray Collingwood [EMAIL PROTECTED]
wrote:

 Hi all
 
 Does anybody else find this hellishly confusing?  It
 makes me want to throw
 everything out and go back to a nice simple DOS
 system and a Turbo C compiler! 
 How much simpler it was back then...
 
 Okay, I downloaded the latest Eclipse system, copied
 my project into a fresh
 workspace.  Saving a file was back to a sub-second
 response.  Actually I tried
 saving a second file to make sure it wasn't a fluke
 the first time.  There was
 definitely a problem somewhere and it has now gone
 away.
 
 Okay, now the second part of the problem.
 
 Tomcat or Jetty???
 
 I don't want to package every time I make a small
 change to a config file or
 HTML, so I want the servlet engine to use my files
 from my development area.  My
 previous frustrations with restarting tomcat have
 encouraged me down the Jetty
 track - I downloaded Jetty 6 yesterday and the test
 system was working in about
 5 minutes, pretty good.  I then added a context.xml
 for my application and now
 when I start Jetty it simple crashes and refuses to
 start the application.  I
 get an error like:  'No class for Servlet or Filter'
 
 I haven't been able to find any help on this error.
 
 I did find information on a Jetty-Maven-Plugin but
 form my reading this is all
 about packaging the application - I don't want to go
 there.  I also found a
 number of recent comments about Maven2 saying it was
 still quite buggy.
 
 Do I press ahead trying to solve the Jetty stuff or
 do I revert back to a Tomcat
 system???
 
 I'm developing in a Windows XP environment so this
 may limit me from some of the
 options suggested here.
 
 PS Thanks to everybody who has contributed so far -
 I really appreciate your
 ideas and suggestions.  You really are a very
 friendly bunch of people.
 
 PPS My computer is an Intel 2.8ghz processor with
 1gb ram and 80gb harddrive. 
 It's not slow with other stuff.
 
 Cheers
 Murray
 
 Some of my understandings:
 Sysdeo-tomcat-plugin - packages app and restarts
 Tomcat
 WTP - packages app and restarts Tomcat
 Web Standard Tools - I was using this
 AJDT - never used it
 Jetty6 plugin - is this the Jetty-maven-plugin
 referred above of different?
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 


Konstantin Ignatyev




PS: If this is a typical day on planet earth, humans will add fifteen million 
tons of carbon to the atmosphere, destroy 115 square miles of tropical 
rainforest, create seventy-two miles of desert, eliminate between forty to one 
hundred species, erode seventy-one million tons of topsoil, add 2,700 tons of 
CFCs to the stratosphere, and increase their population by 263,000

Bowers, C.A.  The Culture of Denial:  Why the Environmental Movement Needs a 
Strategy for Reforming Universities and Public Schools.  New York:  State 
University of New York Press, 1997: (4) (5) (p.206)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: My crap development environment

2007-02-15 Thread Daniel Tabuenca

I have nothing against Jetty, but honestly, for most users there is
not a terribly significant difference in performance or ease of use
between Jetty and Tomcat. Those who tell you that  changing from Jetty
to Tomcat to any other container  out there will make a significant
impact on your development time are selling false hope. The startup
time of both containers  is usually insignificantly small compared to
the startup and initialization time of your application classes. My
tomcat container takes 1 second to startup on my computer. So even if
Jetty were twice as fast, I would have gained half a second, the rest
of my application takes 9 seconds to startup so you can see that
changing containers won't help me much.

Now I am focusing just on startup time. From looking through the docs,
it doesn't seem like Jetty is any more magical in class loading such
that it would require less restarts than with tomcat. I'm not an
expert so if someone has information regarding Jetty and class loading
I'd be interested in hearing it.

I actually use both containers. I use Tomcat in eclipse because it
integrates extremely easily with WTP. I use Jetty to run from the
command-line because of it's dead-simple integration with maven. I
really can't tell any difference between them. They both seem to run
just as fast and startup just as quickly. If there's any difference at
all it is probably noticeable under a heavier load and not really
during development.




On 2/15/07, Murray Collingwood [EMAIL PROTECTED] wrote:

Hi all

Does anybody else find this hellishly confusing?  It makes me want to throw
everything out and go back to a nice simple DOS system and a Turbo C compiler!
How much simpler it was back then...

Okay, I downloaded the latest Eclipse system, copied my project into a fresh
workspace.  Saving a file was back to a sub-second response.  Actually I tried
saving a second file to make sure it wasn't a fluke the first time.  There was
definitely a problem somewhere and it has now gone away.

Okay, now the second part of the problem.

Tomcat or Jetty???

I don't want to package every time I make a small change to a config file or
HTML, so I want the servlet engine to use my files from my development area.  My
previous frustrations with restarting tomcat have encouraged me down the Jetty
track - I downloaded Jetty 6 yesterday and the test system was working in about
5 minutes, pretty good.  I then added a context.xml for my application and now
when I start Jetty it simple crashes and refuses to start the application.  I
get an error like:  'No class for Servlet or Filter'

I haven't been able to find any help on this error.

I did find information on a Jetty-Maven-Plugin but form my reading this is all
about packaging the application - I don't want to go there.  I also found a
number of recent comments about Maven2 saying it was still quite buggy.

Do I press ahead trying to solve the Jetty stuff or do I revert back to a Tomcat
system???

I'm developing in a Windows XP environment so this may limit me from some of the
options suggested here.

PS Thanks to everybody who has contributed so far - I really appreciate your
ideas and suggestions.  You really are a very friendly bunch of people.

PPS My computer is an Intel 2.8ghz processor with 1gb ram and 80gb harddrive.
It's not slow with other stuff.

Cheers
Murray

Some of my understandings:
Sysdeo-tomcat-plugin - packages app and restarts Tomcat
WTP - packages app and restarts Tomcat
Web Standard Tools - I was using this
AJDT - never used it
Jetty6 plugin - is this the Jetty-maven-plugin referred above of different?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry5: Passing parameters to pages

2007-02-15 Thread DJ Gredler

I'm interested in knowing the answer to this, as well. In fact, to take it
one step further:

Instead of parameters:

http://www.mysite.com/view?country=spain
http://www.mysite.com/view?country=usa
http://www.mysite.com/view?country=france

And instead of including the page name:

http://www.mysite.com/view/spain
http://www.mysite.com/view/usa
http://www.mysite.com/view/france

I'd like to have something like:

http://www.mysite.com/spain
http://www.mysite.com/usa
http://www.mysite.com/france


On 2/15/07, Dennis Kempin [EMAIL PROTECTED] wrote:


Hi,

I am experimenting with the tapestry snapshot version and want to write a
little page class that takes an integer parameter to specify an content id
to show. Just like passing a context with an Action link, but just without
the HTTP redirect back to the Page URL.
I could make use of a persistent field to store the id passed with the
context of the ActionLink to show it after reloading, but well that seems
to a be very hacky solution.

Example:
/nopaste/4 is handled by the /nopaste page, but how do I get the integer
value after the slash?

(well i could use the good old ?id=4 GET parameters, but the above example
would look more consistent, IMHO)

regards
Dennis




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Tapestry5: Passing parameters to pages

2007-02-15 Thread Howard Lewis Ship

Check out the documentation on the activate and passivate component events.

You can think of passivate and activate as a kind of very lightweight
persistent storage, where the values are stored positionally in the
render URL.

I'm still thinking about the relationship between PageLink component
and the LinkFactory.

Currently, PageLink doesn't have a context parameter, and the context
if any is collected by triggering the passivate event on the page
(this is inside LinkFactoryImpl).

That's great if the target page knows what its context should be, but
could involve repeatedly setting the value just before the PageLink
renders.

I'm thinking that PageLink should support a context parameter that
bypasses the target page's passivate event. This puts some
responsibility on the programmer to ensure that any such use of
PageLink provides the correct context that will be needed by the
target page's activate event handler.

On 2/15/07, DJ Gredler [EMAIL PROTECTED] wrote:

I'm interested in knowing the answer to this, as well. In fact, to take it
one step further:

Instead of parameters:

http://www.mysite.com/view?country=spain
http://www.mysite.com/view?country=usa
http://www.mysite.com/view?country=france

And instead of including the page name:

http://www.mysite.com/view/spain
http://www.mysite.com/view/usa
http://www.mysite.com/view/france

I'd like to have something like:

http://www.mysite.com/spain
http://www.mysite.com/usa
http://www.mysite.com/france


On 2/15/07, Dennis Kempin [EMAIL PROTECTED] wrote:

 Hi,

 I am experimenting with the tapestry snapshot version and want to write a
 little page class that takes an integer parameter to specify an content id
 to show. Just like passing a context with an Action link, but just without
 the HTTP redirect back to the Page URL.
 I could make use of a persistent field to store the id passed with the
 context of the ActionLink to show it after reloading, but well that seems
 to a be very hacky solution.

 Example:
 /nopaste/4 is handled by the /nopaste page, but how do I get the integer
 value after the slash?

 (well i could use the good old ?id=4 GET parameters, but the above example
 would look more consistent, IMHO)

 regards
 Dennis




 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry Bamboo Site

2007-02-15 Thread Howard Lewis Ship

Thanks to the great folks at Formos, Tapestry now has continuous integration.

Surf on over to http://tapestry.formos.com/bamboo/ to see the current
status of the T5 builds.  I expect we'll be adding in the T4 builds as
well.

This is a great way to see the progress of Tapestry over time and
track the changes that have been occuring.

--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Page Re-direction

2007-02-15 Thread Peter Dawn

guys,

i am using tap3 and have run into this problem.

i have this page, and this page contains a download button. when the
user clicks on the  download button, this current page, references
another class method. and when this other class finishes data
processing, it displays a PDF file which the user can download. the
user then selects save or cancel and the process is completed.

but what i really want to do is re-direct the user to another page
once this process is completed.

now within my original class i have formDownloadSubmit method and it contains,
ProcessingClass page = (ProcessingClass) cycle.getPage(PDFProcessingClass);
cycle.activate(page);
and PDFProcessingClass is a class which generates a PDF based on some
data processing I am doing.

now if i put,
cycle.activate(PreviousPage); after cycle.activate(page), it
redirects the user to the required page very quickly, before even the
PDF generation has happened.

all i want to do is after cycle.activate(page) and once that class
finishes its data processing and allows the user to save the file
somewhere, i want to redirect the user to the previous page.

and i am stuck. i hope i have explained my problem. any ideas.

thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tap 5 FormSupport Exception

2007-02-15 Thread Eugene Lozovan
Ok, thank you,  I had been also not able to use  Login class example 
from the


http://tapestry.apache.org/tapestry5/tapestry-core/guide/validation.html

until I added getters/setters for the _form and _passwordField  into the 
class:


   public Form getForm() {
   return _form;
   }
   public void setForm(Form _form) {
   this._form = _form;
   }
   public PasswordField getPasswordField() {
   return _passwordField;
   }
   public void setPasswordField(PasswordField field) {
   _passwordField = field;

So, if someone has a chance to correct the example, it would be create.

Regards,


Howard Lewis Ship wrote:

Thanks ... fixing it.

On 2/14/07, Eugene Lozovan [EMAIL PROTECTED] wrote:

Actually, there is an error in  reference html template, for password
field it's type isn't specified, so
instead of
label t:type=Label for=password/:
   input t:id=password t:validate=required,minlength=3

it should be something like

label t:type=Label for=password/:
   input t:type=PasswordField t:id=password
t:validate=required,minlength=3

Dave Kallstrom wrote:
 This is what I have
 form t:id=form
t:comp type=Errors/

label t:type=Label for=userName/:
input t:type=TextField t:id=userName
 t:validate=required,minlength=3 size=30/
br/
label t:type=Label for=password/:
input t:id=password t:validate=required,minlength=3
 size=30/
br/
input type=submit value=Login/
/form

 On 2/14/07, DJ Gredler [EMAIL PROTECTED] wrote:

 I think I got this error when I tried to use an input component
 (Select or
 TextField or something) without a containing Form component.

 On 2/14/07, Dave Kallstrom [EMAIL PROTECTED] wrote:
 
  I hope this user list is ready for tap5 questions if not please
 disregard.
  I am working on my first tap5 hello world page and am having a 
little

  trouble with form submission.
  I copied the code right of the tap5 page and I am getting the
 following
  error.
 
  No object of type org.apache.tapestry.services.FormSupport is
 available
  from the Environment. Available types are
 org.apache.tapestry.MarkupWriter
  ,
  org.apache.tapestry.ValidationDecorator,
 org.apache.tapestry.dom.Document,
  org.apache.tapestry.services.Heartbeat,
  org.apache.tapestry.services.PageRenderSupport.
 
  I am assuming I need to provide PageRenderSupport but could not 
find

  documentation on how to do so.
 
  Any help would be appreciated.
 
  --
  Dave Kallstrom
 






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tapestry 5-IoC will support Hivemind?

2007-02-15 Thread Dmitriy Vsekhvalnov

Hello,

will Tapestry 5 support hivemind integration? I.E. will it be able to
inject HiveMind services to the Tapestry5  pages?

 And if so, is it possible to make Registry instance to use to be
configurable? I mean to provide externally instantiated Registry to Tapestry
5 to inject services from?