Re: java.util.ConcurrentModificationException in portlet when trying to show ArrayList

2006-07-20 Thread Paul Cantrell
No idea of the exact cause in your case, but in general, this  
exception means that you modified a collection while iterating over it.


In your case, it looks like collection returned by getNewslist() is  
somehow getting modified. Try returning this instead:


return Collections.unmodifiableList(newslist);

...and then you'll get an exception at the point when the collection  
is modified, which will help you find the source of the problem.


Cheers,

Paul


On Jul 18, 2006, at 6:42 AM, [EMAIL PROTECTED] wrote:



Good day!

I've writed portlet application with tapestry 4.0.2 (using
TapestryApplicationPortlet). I have deployed it to our jetspeed-2  
portal

server. Sometimes exception is rised when some users navigates to my
portlet (exception is described bellow).

Any ideas why this would happen? Please, help me!

Thanks!

Sorry for my bad English.

With best regards,
Vitaly Baranovsky

*** EXCEPTION ***

org.apache.hivemind.ApplicationRuntimeException
component   [EMAIL PROTECTED]
context:/WEB-INF/View.page, line 7, column 63

2
location  3 4   "-//Apache Software Foundation//Tapestry  
Specification 4.0

//EN"
5   "http://jakarta.apache.org/tapestry/dtd/ 
Tapestry_4_0.dtd">

6
7 
8
9  
10   
11   
12   



java.util.ConcurrentModificationException
java.util.AbstractList$Itr.checkForComodification(Unknown Source)
java.util.AbstractList$Itr.next(Unknown Source)
org.apache.tapestry.components.ForBean.renderComponent(ForBean.java: 
125)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java: 
617)
org.apache.tapestry.BaseComponent.renderComponent 
(BaseComponent.java:92)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java: 
617)

org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
org.apache.tapestry.engine.RequestCycle.renderPage 
(RequestCycle.java:366)
org.apache.tapestry.portlet.PortletRendererImpl.renderPage 
(PortletRendererImpl.java:76)
$PortletRenderer_10c7c3c1767.renderPage 
($PortletRenderer_10c7c3c1767.java)
org.apache.tapestry.portlet.PortletHomeService.service 
(PortletHomeService.java:80)

$IEngineService_10c7c3c1751.service($IEngineService_10c7c3c1751.java)
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service 
(EngineServiceOuterProxy.java:66)
org.apache.tapestry.engine.AbstractEngine.service 
(AbstractEngine.java:248)
org.apache.tapestry.services.impl.InvokeEngineTerminator.service 
(InvokeEngineTerminator.java:60)
$WebRequestServicer_10c7c3c171f.service 
($WebRequestServicer_10c7c3c171f.java)
$WebRequestServicer_10c7c3c171d.service 
($WebRequestServicer_10c7c3c171d.java)
org.apache.tapestry.portlet.RenderRequestServicerToWebRequestServicerB 
ridge.service(RenderRequestServicerToWebRequestServicerBridge.java:49)
$RenderRequestServicer_10c7c3c1717.service 
($RenderRequestServicer_10c7c3c1717.java)
$RenderRequestServicer_10c7c3c1711.service 
($RenderRequestServicer_10c7c3c1711.java)
org.apache.tapestry.portlet.ApplicationPortlet.render 
(ApplicationPortlet.java:161)
org.apache.jetspeed.factory.JetspeedPortletInstance.render 
(JetspeedPortletInstance.java:102)
org.apache.jetspeed.container.JetspeedContainerServlet.doGet 
(JetspeedContainerServlet.java:230)

javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter 
(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter 
(ApplicationFilterChain.java:173)
org.apache.catalina.core.ApplicationDispatcher.invoke 
(ApplicationDispatcher.java:672)
org.apache.catalina.core.ApplicationDispatcher.doInclude 
(ApplicationDispatcher.java:574)
org.apache.catalina.core.ApplicationDispatcher.include 
(ApplicationDispatcher.java:499)
org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke 
(ServletPortletInvoker.java:215)
org.apache.jetspeed.container.invoker.ServletPortletInvoker.render 
(ServletPortletInvoker.java:126)
org.apache.pluto.PortletContainerImpl.renderPortlet 
(PortletContainerImpl.java:119)
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPo 
rtlet(JetspeedPortletContainerWrapper.java:120)
org.apache.jetspeed.aggregator.impl.RenderingJobImpl.execute 
(RenderingJobImpl.java:121)
org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow 
(PortletRendererImpl.java:120)
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRen 
der(PageAggregatorImpl.java:199)
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.aggregateAndRen 
der(PageAggregatorImpl.java:182)
org.apache.jetspeed.aggregator.impl.PageAggregatorImpl.build 
(PageAggregatorImpl.java:106)
org.apache.jetspeed.aggregator.AggregatorValve.invoke 
(AggregatorValve.java:48)
org.apache.jetspeed.pipeline.JetspeedPipeline$Invocation.invokeNext 
(JetspeedPipeline.java:166)
org.apa

Re: JSF-style bean access (JBoss) via HiveMind ?

2006-07-14 Thread Paul Cantrell

I don't know whether it works, but I presume you tried this:

@InjectObject("infrastructure:context.roleModule")
public abstract RoleModule getRoleModule();

...?

If that doesn't work, the first snippet seems like the way to do it.

P

On Jul 12, 2006, at 5:22 PM, Epstein, Ezra wrote:

The beans are actually available as attributes of the WebContext  
(which, in the context of a Portlet is actually an instance of  
org.apache.tapestry.portlet.PortletWebContext).  So I've figured  
out how to get what I want, now I'm looking to automate it.


This works, but is a bit cumbersome:


@InjectObject("infrastructure:context")
public abstract WebContext getWebContext();

public RoleModule getRoleModule() {
return (RoleModule)getWebContext().getAttribute("RoleModule");
}


And this fails:


@InjectObject("infrastructure:context.getAttribute(\"RoleModule\")")
public abstract RoleModule getRoleModule();


While I'm not surprised by the failing example, I do wonder: what  
are the rules for the @InjectObject annotation?  Can we use OGNL  
(or ognl-like) expressions within its parameter?  The docs state  
that the value is a "HiveMind object reference".  So, rephrasing  
the question:


How do I bind the results of something like the ognl expression:   
"infrastructure:context.getAttribute('RoleModule')" to an HiveMind  
object?  What's the hivemodule.xml incantation?



Thanks,

Ezra Epstein


-Original Message-
From: Paul Cantrell [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 11, 2006 4:00 PM
To: Tapestry users
Subject: Re: JSF-style bean access (JBoss) via HiveMind ?

I'm not entirely clear exactly what this code is doing, but is  
sounds like Tapestry's ASOs (application state objects) are what  
you want.
They are container-managed objects scoped to either the app or the  
user session.


 http://tapestry.apache.org/tapestry4/UsersGuide/state.html

If that doesn't do the trick, perhaps you can describe exactly what  
this JSF code does


Cheers, P

_
Piano music podcast: http://inthehands.com Other interesting stuff:  
http://innig.net



On Jul 11, 2006, at 2:01 PM, Epstein, Ezra wrote:


We're trying to write some admin/management code for JBoss Portal in
Tapestry.  Current code uses JSF. The relevant portion of the
faces-config.xml is:

   
  portalobjectmgr
  class>org.jboss.portal.core.portlet.management.PortalObjectManagerBea 
n


  session
  
 roleModule
 #{applicationScope.RoleModule}
  
  
 portalObjectContainer
 #{applicationScope.PortalObjectContainer}
  
   ...
   

I'd like to recreate this via HiveMind but am unclear what to put  
into

the hivemodule.xml file.  Any pointers to anything remotely related
is/are appreciated.

Thanks,

Ezra Epstein

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: JSF-style bean access (JBoss) via HiveMind ?

2006-07-11 Thread Paul Cantrell
I'm not entirely clear exactly what this code is doing, but is sounds  
like Tapestry's ASOs (application state objects) are what you want.  
They are container-managed objects scoped to either the app or the  
user session.


http://tapestry.apache.org/tapestry4/UsersGuide/state.html

If that doesn't do the trick, perhaps you can describe exactly what  
this JSF code does


Cheers, P

_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net


On Jul 11, 2006, at 2:01 PM, Epstein, Ezra wrote:

We're trying to write some admin/management code for JBoss Portal  
in Tapestry.  Current code uses JSF. The relevant portion of the  
faces-config.xml is:


   
  portalobjectmgr
  class>org.jboss.portal.core.portlet.management.PortalObjectManagerBean 


  session
  
 roleModule
 #{applicationScope.RoleModule}
  
  
 portalObjectContainer
 #{applicationScope.PortalObjectContainer}
  
   ...
   

I'd like to recreate this via HiveMind but am unclear what to put  
into the hivemodule.xml file.  Any pointers to anything remotely  
related is/are appreciated.


Thanks,

Ezra Epstein

-
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: form validation question

2006-07-03 Thread Paul Cantrell
I'll throw in my endorsement for (1). Often, we programmers get too  
wrapped up in try to use some clever framework feature for every  
minute detail ... when sometimes, it's simpler just to write a few  
lines of code.


A listener which first performs validation before processing is easy  
to write, easy to read, and extremely flexible. I'm not saying it's  
the best way to do everything; it's just an option people often  
overlook.


Here's a more complete example:

@Bean( value=ValidationDelegate.class )
public abstract IValidationDelegate getValidation();

@Component(
type="TextField", id="email",
bindings = { "value=email" } )
public abstract TextField getEmailComponent();
public abstract String getEmail();
public abstract void setEmail(String value);

@Component(
type="TextField", id="password",
bindings = { "value=password", "hidden=true" } )
public abstract TextField getPasswordComponent();
public abstract String getPassword();
public abstract void setPassword(String value);

public IPage logIn()
{
if(isBlank(getEmail()))
getValidation().record(
getEmailComponent(),
"Please enter the email address for your account.");

if(!matchPassword(getEmail(), getPassword()))
getValidation().record(
getPasswordComponent(),
"Sorry, this is the wrong password.");

if(getValidation().getHasErrors())
{
// take action to prevent commit if necessary
return this;
}

// --- Success ---

// ... do work ...
// ... commit work ...

return successPage;
}

Cheers, P


On Jul 3, 2006, at 1:46 PM, Richard Clark wrote:


You can either:
1) Do all the validation in your listener (on the Java side), or
2) Write your own client-side valdation code in JavaScript.

The server-side validation would look like this:

ValidationDelegate delegate = (ValidationDelegate)getComponent 
("delegate");

if (!getCheckbox()) {
 String firstName = getFirstName(); // @Text component bound to  
firstName

 if (firstName == null || firstName.length() == 0) {
   delegate.setFormComponent((IFormComponent)getComponent 
("inputFirstName"));

   delegate.record("Please supply a first name",
ValidationConstraint.REQUIRED);
 }
}
if (delegate.getHasErrors()) return;


...Richard

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Listener delegating causes NullPointerException

2006-06-23 Thread Paul Cantrell
The basic problem: one page's listener calls another page's listener  
(after activating the other page). The other page records a  
validation error, and that causes a NullPointerException deep in  
Tapestry's guts.


The details:

I have two pages (Subscribe and SubscribeAlternateLink), both of  
which involve the user entering/selecting a URL. Once the URL is  
entered, they share the same logic -- and I want either one of them  
to end up on the Subscribe page in case of an error.


So I have this page delegate its subscribe() listener to the other page:

public abstract class SubscribeAlternateLink extends MyBasePage {
...
public IPage subscribe(String url) {
Subscribe subscribePage = getPage(Subscribe.class);
subscribePage.setUrl(url);
getRequestCycle().activate(subscribePage);
return subscribePage.subscribe();
}
...
}

And the other page has a URL field, which will show the URL the user  
entered, with an error:


public abstract class Subscribe
extends MyBasePage {

@Bean( value=ReaderValidation.class )
public abstract IValidationDelegate getFormValidation();

@Component(type="TextField", bindings = {
"value=ognl:url",
"validators=validators:required" } )
public abstract TextField getUrlField();
public abstract String getUrl();
public abstract void setUrl(String url);

public IPage subscribe() {

if(getFormValidation().getHasErrors())
return this;

try {
// ... do subscription ...
} catch(SubscriptionException e) {
getFormValidation().record(getUrlField(),  
e.getMessage()); // ***

return this;
}
// ... follow-up stuff ...
}
}

When submitting from the Subscribe page, errors get recorded fine.

When submitting from the SubscribeAlternateLink, I get an exception  
on the line marked ***:


java.lang.NullPointerException: Parameter fieldName must not be  
null.

• org.apache.hivemind.util.Defense.notNull(Defense.java:41)
• org.apache.tapestry.valid.FieldTracking.(FieldTracking.java:59)
	• org.apache.tapestry.valid.ValidationDelegate.findCurrentTracking 
(ValidationDelegate.java:279)
	• org.apache.tapestry.valid.ValidationDelegate.record 
(ValidationDelegate.java:225)
	• org.apache.tapestry.valid.ValidationDelegate.record 
(ValidationDelegate.java:207)
	• org.apache.tapestry.valid.ValidationDelegate.record 
(ValidationDelegate.java:240)

• com.dci.cyclonereader.web.Subscribe.subscribe(Subscribe.java:41)
	• com.dci.cyclonereader.web.SubscribeAlternateLink.subscribe 
(SubscribeAlternateLink.java:28)


It looks like the URL component on the Subscribe page isn't fully  
initialized. Is this a bug? Or do I need to do something more to  
initialize the Subscribe page?


Cheers,

Paul


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



Re: HTML editor for tapestry

2006-05-31 Thread Paul Cantrell
It is worth pointing out that neither of these works in Safari, the  
default browser on the Mac. FCK blames Safari:


http://www.fckeditor.net/safari.html

...but the bottom line is, it's probably not a good idea to use these  
for a public site.


Of course, if you're doing an internal app, it may not matter.

P

On May 31, 2006, at 1:04 PM, Shing Hing Man wrote:


There are a couple  (FCKEditor and JSEditor) in tassle


http://equalitylearning.org/Tassel/app

Both of them have online demos at the following
respectively.

http://www.hannebauer.org/jseditordemo/
http://lombok.demon.co.uk/tapestry4Demo/app


Shing




--- Carl Pelletier <[EMAIL PROTECTED]> wrote:


Hi everyone, I looking for a HTML editor component.
Someone can point me on where I can find that
information ? I search on google and found that
somebody have port FCK Editor to Tapestry, but The
link doesnt work anymore.

Thanks for any help !

Carl Pelletier




Home page :
  http://uk.geocities.com/matmsh/index.html

Send instant messages to your online friends http:// 
uk.messenger.yahoo.com


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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: TCP-IP Communication help

2006-05-30 Thread Paul Cantrell
I like to use a ServletContextListener to do this: start your  
service's thread in contextInitialized(), and end it in  
contextDestroyed(). Google "ServletContextListener" for more info.


On May 30, 2006, at 3:44 AM, Peter Dawn wrote:


i will try and have a look at it.

another way of looking at my question is, whats the best way of
running a program in the background as a service within the web app
without halting any other processes or programs.

any thought.

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Can't get Tapestry to work with UTF-8 encoding

2006-05-30 Thread Paul Cantrell
I specify the option in WEB-INF/tapestry.application. I see you  
already wrote that this didn't work for you ... don't know what to  
tell you! It works for me.



I would like to give it a try. Also, where can I find a complete of
 keys for Tapestry 4?


http://jakarta.apache.org/tapestry/UsersGuide/configuration.html



On May 28, 2006, at 9:37 PM, Galam wrote:


Hi Paul,

Can you tell me where you specify the following options?

  


I would like to give it a try. Also, where can I find a complete of
 keys for Tapestry 4?


Thanks!

Galam.


On 5/28/06, Paul Cantrell <[EMAIL PROTECTED]> wrote:


This option works for me:

 value="utf-8"/>


This has the advantage that you don't need control over the startup
params of the container's JVM.

P


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Does Tapestry work with XHTML?

2006-05-29 Thread Paul Cantrell
Right. And just to be clear: the ".xhtml" is not necessary for XHTML,  
not just for Tapestry, but in *any* content -- and I don't think the  
"text/xml" mime type is necessary either. It's the DOCTYPE that has  
the last word.


Use the W3C validator when in doubt! Use it when not in doubt, too.

Cheers,

Paul


On May 29, 2006, at 2:11 AM, Kristian Marinkovic wrote:


hi,

to use XHTML it is NOT necessary to rename the .html file  
to .xhtml. all

you
have to do is to add the dtd and the . the only reason i  
could

imagine you want to rename it to .xhtml is because you could configure
your webserver to set the correct mime-type (text/xml). but if you  
do so

IE6 (and before) won't be able to display your document correctly.

btw. if you put  into
your document IE6 will run in quirksmode and not in standard compliant
mode! this may cause some misbehaviours when using css :)  
(boxmodel...)

 although it is not absolutly correct you may omit

completly (or you generate it depending on the current
browser :)).


regards,
kris





 Galam
 <[EMAIL PROTECTED]
  
om>An

"Tapestry users"
 29.05.2006 04:32   
 K 
opie


  Bitte  
antwortenThema

an  Does Tapestry work with XHTML?
 "Tapestry users"
 <[EMAIL PROTECTED]
pache.org>







Hi all,

Does Tapestry work with XHTML?

I renamed "Home.html" to "Home.xhtml" in my test application, but I  
got an

exception saying that

"Could not find template for page Home in locale en_US."


---

org.apache.hivemind.ApplicationRuntimeException Could not find  
template for

page Home in locale en_US. component: [EMAIL PROTECTED]  location:
context:/WEB-INF/Home.page,
line 4, column 55
  1  2 specification
PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0// 
EN" 3 "

http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> 4
class="com.ttdev.HelloWorld.Home"> 5 type="Insert">

6  7  8




Thanks!



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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



@Meta doesn't allow different template extension

2006-05-28 Thread Paul Cantrell
I expected that adding this annotation would allow me to name the  
template "Foo.xml" instead of "Foo.html":


@Meta("org.apache.tapestry.template-extension=xml")
public class Foo extends BasePage { ... }

However, when I do this, Tapestry gives a PageNotFoundException. It  
looks like it never finds the class to find the annotation in the  
first place.


Am I missing something stupid, or should I file this in JIRA?

Cheers,

Paul

_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Can't get Tapestry to work with UTF-8 encoding

2006-05-28 Thread Paul Cantrell

This option works for me:



This has the advantage that you don't need control over the startup  
params of the container's JVM.


P

On May 27, 2006, at 1:16 AM, Galam wrote:


Hi Sam,


Thank you so much for the quick response.

The jvm option "-Dfile.encoding=UTF-8" works perfectly!


Galam.


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Template parser chokes on CDATA?

2006-05-24 Thread Paul Cantrell
This is the best thing to do. It buys you some excellent (though very  
poorly documented) functionality for doing substitutions in your JS  
code, too.


In spite of this good solution, it is really unfortunate that the  
Tapestry parser doesn't understand CDATA.


P

On May 24, 2006, at 2:59 PM, Erik Husby wrote:

Or choose the simple way out and put the javascript into a Tapestry  
Script file.



---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2192, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: [EMAIL PROTECTED] AIM: ErikAtBroad



_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: best development server for Tapestry

2006-05-23 Thread Paul Cantrell
Tomcat's deploy / undeploy tasks are quite speedy, but I've found  
that Tomcat starts going haywire after a few dozen hot deploys like  
that -- usually it runs out of memory; sometimes the old instance  
doesn't undeploy cleanly, and holds on to DB connections ...  
sometimes, it gets into a confused internal state where new deploys  
fail with mysterious errors, and I have to delete its temp directories.


For some reason, the hot deploy seems to work flawlessly for some and  
fail for others. I'm in the latter group -- I find that I have to  
restart Tomcat every hour or so. And since Jetty can start from cold  
in roughly the same time that it takes Tomcat to do a hot deploy


P


On May 23, 2006, at 9:11 AM, Claudiu Pîslaru wrote:

Hi! As for long stop/start process with Tomcat service, look at my  
solution below.


For development, I'm using Tomcat 5.5.9 on a Windows machine.

Initially my dev-test-cycle was:
   - create/modify a file in Eclipse
   - stop Tomcat
   - copy (with an ant task) files in Tomcat webapps
   - start Tomcat
   - see the changes

All this took me about one minute and a half. Pretty annoying...

So I begun to look for jetty, but I didn't like to have different  
config files for developlment (jetty) and production (tomcat).


Soon, after I found about the Tomcat Ant tasks (deploy/undeploy/ 
restart/etc.) I'm very satisfied with my new configuration:

   - create/modify a file in Eclipse
   - press one button in Eclipse*
   - see the changes

All this... in 13 seconds.

* I've created a build.xml for my application which uses Tomcat Ant  
tasks (undeploy/deploy) and the "magic" button is the "Run" one  
(which runs my ant default task on build.xml).


Just like that, clean and simple, I'm using Tomcat in the  
development process, without the need to install some Eclipse  
plugin/launcher.



Regards,
Claudiu Pislaru



Carl Pelletier wrote:
hi everyone, I'm just starting a new development projet with  
Tapestry 4.0 and Hibernate 3.1. I'm looking for the best local  
server to install on my computer to make my development.

 here are the important point for me:
 1- Must be easy to install
2- Easy to deploy with ant and Eclipse.
3- Quick to start and stop.
4- Less configuration possible.
5- Must support JNDI
 6- Not to much memory ungry...
 Right now, I use Tomcat 5.5.17 with the service installed and I  
have some problems. Use about 90mg of memory and is really long to  
start and stop.

 I'm considaring switching to Jetty 6, is a good idea?
 Maybe some theak in tomcat maybe anough..  Please, let me know  
what you think !

 Thanks
 Carl Pelletier
 P.S> Sorry for bad english, i'm french





_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: best development server for Tapestry

2006-05-22 Thread Paul Cantrell
I've had good luck developing with Jetty 6. Unlike Tomcat, it's quite  
easy to set up an "ant jetty" target which launches a server, then  
just kill the process and run ant again for the next dev cycle.


Tomcat's hot deploy ought to make this easy, but I've had too many  
resource leak, out of memory, and general "Tomcat goes haywire"  
issues with the hot deploy to make it good for development. I'm much  
happier with Jetty's clean restart approach.


That's not necessarily an endorsement / criticism of either in  
production, of course.


Cheers,

Paul

On May 22, 2006, at 1:00 PM, Carl Pelletier wrote:

hi everyone, I'm just starting a new development projet with  
Tapestry 4.0 and Hibernate 3.1. I'm looking for the best local  
server to install on my computer to make my development.


here are the important point for me:

1- Must be easy to install
2- Easy to deploy with ant and Eclipse.
3- Quick to start and stop.
4- Less configuration possible.
5- Must support JNDI
 6- Not to much memory ungry...

Right now, I use Tomcat 5.5.17 with the service installed and I  
have some problems. Use about 90mg of memory and is really long to  
start and stop.


I'm considaring switching to Jetty 6, is a good idea?

Maybe some theak in tomcat maybe anough..

Please, let me know what you think !

Thanks

Carl Pelletier

P.S> Sorry for bad english, i'm french


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Multiple skins with Tapestry

2006-05-22 Thread Paul Cantrell
Yes, CSS for sure, and a border component that swaps out different  
CSS files based on some parameter.


On May 22, 2006, at 9:16 AM, mike jones wrote:


css?

On 5/22/06, Sergey G. Kashin <[EMAIL PROTECTED]> wrote:


How to create multiple designs with tapestry for one application?

may be good idea to use folders for skins
design1/Home.html
design2/Home.html
design3/Home.html

but for all that pages will need create view
design1/Home.java
design2/Home.java
design3/Home.java

that not very nice.

Any ideas to resolve this problem?


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Google Web Toolkit

2006-05-21 Thread Paul Cantrell
Horrible, horrible, GridBagLayout I loathe it. What an awful  
mess. CSS is so many thousands of times nicer for doing layout


I am sympathetic to the "applets not Javascript" argument, though.  
"Applets with CSS layout" would be especially nice.


But applets don't integrate well with the flow of the web: like Flash- 
based sites, you can't bookmark them, search engines can't index  
them, etc. There are limits to what they're good for. If there were a  
good way to attach Java to a page's DOM, then we'd be cooking.


I wonder how limited GWT is in this respect? Tapestry works very hard  
to respect the client's control of their browser.


P


On May 21, 2006, at 12:47 PM, Konstantin Ignatyev wrote:


http://www.swixml.org/
http://www.java2s.com/Product/Swing/LookAndFeel.htm

And Swing can support any kind of layout managers but I have found  
GridBagLayout to be very flexible and good for nearly everything I  
do with Swing.


Therefore I think it does not make sense to try (re)creating Swing  
in browsers. Applets is what we really need :).



Norbert S�ndor <[EMAIL PROTECTED]> wrote:The good thing in  
GWT is to use the efficient development style of Swing

(I mean Java only, easy to debug/test) but allow to use the underlying
browser's HTML+CSS capatibilites for layout.



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)


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Adding form elements with Javascript

2006-05-20 Thread Paul Cantrell
Sorry to interject an actual Tapestry question into all the exciting  
talk about logos and GWT!


I have a form with a bunch of text fields inside a @For. I want my  
page to have a "new item" link that uses Javascript to add a new  
element to the form.


My Javascript works great on the client -- new TextFields appear just  
fine. But this adds unexpected components to my form, and of couse I  
get a stale link error.


How do I prevent the stale link? Do I use Javascript to manually  
modify the hidden field that lists the components in the form? i.e.  
use Javascript to turn this:




...into this:

 
value="items,Hidden,TextField,Hidden,TextField,Hidden,TextField,Submit"/ 
>


...? Yuck!

Is there a better way?

I'm sure this must have been covered on the list or in the docs, but  
I searched and couldn't find it. Any pointers in the right direct  
would be welcome.


Cheers,

Paul

_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Google Web Toolkit

2006-05-20 Thread Paul Cantrell
I completely agree with about 90% of what Todd writes. This is  
definitely not a flash in the pan, and the idea of using an  
intermediate language (Java, in this case) that compiles to client- 
side code is a brilliant and revolutionary one.


Finally, there was nothing wrong with the original MVCs. Swing (or  
any other traditional MVC) worked.


Actually, I think Swing kind of sucks, and looked good when it came  
out only because MFC, X, and AWT were so much worse. Swing ain't no  
Cocoa. And honestly, I still kind of miss Metrowerks Powerplant.


But my real concern about GWT is that it appears to bring us back to  
the world where everything is just a mess of one-size-fits-all  
widgets. Konstantin is right, of course -- there is no web text  
editor than can compare to a dedicated text editor rich GUI. The  
reason for that, however, is because people took a *lot* of time to  
work out all the minutiae of making a good UI for editing text.


By contrast, most desktop apps stick their domain into existing  
widgets (one of which is a text editor) instead of going to the  
enormous trouble of build a new, highly specialized UI with custom  
graphics.


DHTML+CSS is quite expressive, but much lower cost, than build a  
custom desktop UI component pixel by pixel. Right now, GWT seems to  
lead away from some of that flexibility, and put us back in the world  
of predefined widgets.


Note that this concern does *not* depend on GWT's fundamental  
architecture, which is quite promising. Rather, it's a complaint  
about GWT's emphasis on widgets and widgety UIs. One need only look  
at Google Maps to see that GWT does not imply ultra-modal widget  
overload hell But will GWT really lead us to fine apps like that?  
Or will it lead us to apps that look like the config dialogs for Word  
(bleah)?


Regardless, it's exciting to live in a world where all these great  
technologies are pushing and learning from one another. Compare that  
to the stagnant software world of ten years ago!


Cheers,

Paul


On May 20, 2006, at 4:12 PM, Todd Orr wrote:


This isn't really a Tapestry vs GWT thing. This is the latest
(greatest?) push to remove the application-web disconnect. If this
means that other frameworks are rendered less effective by comparison,
then so be it. This is evolution at work.

Some posts seem to indicate that this is just some flash in the pan
technology, but there is far more at work here. The development time
may be able to be accelerated to very a large degree thanks to the
traditional java based GUI paradigm being exploited here. This
technology also has the backing of google. At the end of the day, this
is more than just an ajaxy flash in the pan. Look around you. Apps
utilizing this technology are on a very sharp incline. Not because
they are flashy, or at least not just for that reason. These ajaxified
components allow developers to make better use of available bandwidth
at the same time as building more responsive GUIs. Yes, tacos (and
others) have been enabling this, but the leap here is in the learning
curve, time to market, and testability. These are where GWT seems to
be able to shine.

Whether you like the ajax stuff or you prefer the old webapp view is
immaterial. It is happening. It will likely shape the "web 2.0" world.
How you make use of these components is up to you, but there hasn't
been anything like this available in such a clean package with such a
major player backing it ever before. If you do not want to leverage
these types of (maybe rehashed) technologies, that's fine. There are a
lot of apps out there that do and there're not all just desktop app
imitators. Check out http://techcrunch.com. There are many, many very
interesting projects that are more than just desktop app wannabes.
Most of these wouldn't be what they are without the aid of ajax and
related technologies.

GWT is compelling and doesn't sit well with devs that have finally
mastered framework X. Sure, it is encouraging a change in design
paradigms. That's the best part. I see the same convo popping up on
many forums. Will there be competitors? Maybe, yes, who cares. IMHO,
one of jee's shortcomings is the lack of focus, but that's another
debate altogether. This is here. It's only in beta and it rocks
already. It hits at an ideal time when development focus is on writing
more efficient and more responsive, and more flashy apps. Few other
frameworks are addressing this. As good as Tacos is, it's clunky by
comparison.

The "code in java" ideal is the next logical step. I remember how hard
it was for my coworkers to deal with the abstractions that Tapestry
offered over dealing with the servlet api directly. Eventually, these
same people came to appreciate this. The technique that GWT employs is
the same level of shift. We're not only going to isolate you from the
servlet, we're going to isolate you from the web. This is a logical
evolution. The Web is just another view technology. I should be able
to work wi

Re: Google Web Toolkit

2006-05-20 Thread Paul Cantrell
For people writing single-page Ajaxy apps that look like Swing, GWT  
may well be the death knell for other frameworks. For other types of  
apps, I'm not so sure. And I'm not so sure that the former type of  
app is something I want to see more of.


I don't necessarily like the trend toward the single-page Ajax app  
that resembles a desktop app. Why? Desktop apps generally suck. They  
attempt to stuff any sort of data structure, any sort of interface  
semantics, into the same set of widgets provided by the platform. The  
result is a sort of widget soup, lots of dialogs with subdialogs, all  
highly modal (excessive modality being a bad thing.) See the Windows  
network config dialog for an extreme example.


Something I love about webapps is that they've broken the shackles of  
the widget set: people use creative markup to represent their data  
structures in all sort of inventive ways. Granted, many web UIs suck,  
but on the whole, I prefer the average webapp's UI to the average  
desktop (well, Windows) or Swing UI.


So don't get me wrong; it's still very, very cool -- but I have mixed  
feelings about GWT. Will it encourage a step backwards in UI design,  
back to the dark days of modal widget soup? Perhaps not, but such is  
my misgiving.


Cheers,

Paul


On May 20, 2006, at 11:35 AM, Todd Orr wrote:


The more I use the GWT, the more impressed I am. This could be the
killer framework java has needed. The ease of use and more traditional
GUI programming model approach plus the power of the resulting
components is a real winner. It will be interesting to see what T5 has
in store, but I've yet to hear a true road map - only hearsay about
ideas on a drawing board. This may be heresy, but as much as Tapestry
was an improvement over Struts (and many other MVCs), it seems that
GWT (IMO) is that much further towards the ideal solution over Tap.
Don't get me wrong, I love Tapestry for what it has done and the
impression it has made in the community. I fondly remember the feeling
of freedom from moving away from Struts. Yet, technology moves on at a
faster clip than everyone is able to keep up with. This may be the
death knoll for all previous next-gen frameworks.

On 5/19/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
Maybe on second thoughtSince I've already gone through all the  
trouble
of making sure and confirming how they've done it I'll just make  
sure it
gets into tap5 instead.(i've been working with Rhino a lot lately  
developing
various js tools) It's not very hard to compile java classes into  
javascript

using rhino so...I dunno.we'll see..

On 5/20/06, Jesse Kuhnert <[EMAIL PROTECTED]> wrote:
>
> It's definitely some very cool technology, as much as I hate to  
admit

> it
>
> I downloaded and took apart as much as I could when it came out,  
very
> clever stuff! They've basically created a sort of browser  
equivalent to
> java. Not literally, and not on their own of course. Rhino has  
been around
> for a fairly long time now, but what they did with it is just  
crazy. The
> deployed JS that comes with your "compiled" application is the  
exact amount

> needed to run it, no more and no less.
>
> Comparing my background history I'd have to say that I probably  
have more
> facless/native gui experience than web as well. The API's are of  
course

> familiar. A lot of rhino api stuff made it into the public facing
> portions(which is equivalent to saying the browser API.,.heh),  
along with

> normal GUI-ish type things you'd expect.
>
> So, I feel happy in knowing that the direction tap5 is going in  
is exactly
> where it should be, but sad at the same time because I almost  
don't know

> what to do now. Why try and re-invent the wheel? h
>
>
> On 5/19/06, Geoff Longman <[EMAIL PROTECTED]> wrote:
> >
> > Very sweet. If this had existed a few years ago the number of web
> > frameworks in java would be much less than it is today.
> >
> > I finally got it running yesterday (my fault - no free time) and
> > lickety split I had converted some simple Tapestry stuff we  
have a
> > work here. Nothing complete mind you but for myself, an old  
Java GUI

> > programmer, the learning curve is infinitesmal compared
> > toTapestry.
> >
> > Even the demos are easily modified without too much trouble.  
Being
> > able to debug it like a normal Java GUI program is simply  
amazing.

> >
> > Way back when I found the learning curve of Tapestry hard for  
reasons
> > that are probably different from those most find today. I was  
coming
> > out of Swing land and had only a few months experiences (ok a  
year)
> > with servlet/jsp programming (no struts). Sliding back into  
the GUI

> > model programming is nothing to me.
> >
> > It will be interesting to hear how developers with only web  
experience

> > find the GWT learning curve.
> >
> > But, all new things are cooler than the old things and it  
remains to
> > be seen if one will hit the wall once one reaches the limits  
o

Voting on the logos

2006-05-19 Thread Paul Cantrell
At the risk of opening yet *another* can of worms -- yes, I apologize  
in advance -- can we please use a Condorcet method for tallying the  
votes if we do have a logo contest?


Here are lots of technical details for those who don't know the term...

http://en.wikipedia.org/wiki/Condorcet_method
http://condorcet.org/rp/index.shtml

...but the bottom line is that Condorcet voting methods work *much*  
better than a normal plurality (vote for one) or instant runoff vote  
-- especially when there are many choices, as there clearly will be  
in this contest.


Debian and Gentoo have both been using Schultze's method, which is a  
type of Condorcet method, quite successfully for some time now. Free  
software is available for tallying the votes.


Cheers,

Paul

_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Persistence misbehavior in T4

2006-05-19 Thread Paul Cantrell
Is the Bean shared across pages? If it is a Tapestry @Bean, I really  
don't think you need to synchronize on it, either. You may, however,  
need to clear it out between requests.


Maybe others can clarify: does Tapestry pool bean instances?

P

On May 19, 2006, at 2:48 AM, Firas A. wrote:



Paul: "You should generally not need to synchronize access to instance
fields of a page."
Firas: The synchronized methods are in the JavaBean class  
containing the

subCategories field, not in a page class. Which answers your question.

A little clarification:
CategoryBrowser is a page class (typeof BasePage).
CategoryBrowser uses an instance field, ProductCategory (a javabean)
ProductCategory uses an instance field, subCategories of type List
All operations on subCategories (in ProductCategory!) are synchronized

It's the subCategories that's been kept in memory.

Regards,



-Original Message-
From: Paul Cantrell [mailto:[EMAIL PROTECTED]
Sent: den 18 maj 2006 19:39
To: Tapestry users
Subject: Re: Persistence misbehavior in T4

A few general points:

-- An "= null" initializer for a non-final field is redundant in  
all cases.
-- You should generally not need to synchronize access to instance  
fields of

a page.

Now a question:


In the CategoryBrowser.pageDetached() the ProductCategory property is
set to null.


Don't you mean subCategories is set to null? If it's not, then  
that's your

problem. Page objects get reused.

Cheers,

Paul

On May 18, 2006, at 12:26 PM, Firas A. wrote:


Hello Everyone!

I have a class, CategoryBrowser of type BasePage which has a  
transient
property, a JavaBean called ProductCategory. ProductCategory makes  
use

of an instance field:
private List subCategories = null;

This list is initialized in CategoryBrowser upon every request.
Every access
to subCategories is synchronized. In the
CategoryBrowser.pageDetached() the
ProductCategory property is set to null.

The problem:
The state of the subCategories field is retained between requests.
During
all subsequent requests after the 1st one, the initial value of
subCategories is not null (dispite the declaration above).

And when this happens the current state of subCategories may even be
observed in another browser/session. Here's the test that I  
performed:


1.  initiate the misbehavior in Firefox

2.  close Firefox and start Opera

3.  browse to the page where subCategories is first initialized

The result: the state of subCategories reflects the state it got in
Firefox (1), i.e. it is was not null upon first request and already
contained some values from the session in Firefox.

Any idea on what's going on?

My platform:
Tapestry 4.0.1 (started with -Dorg.apache.tapestry.disable-
caching=true)
JVM 1.5.0_06-b05 / WinXP SP2
Tomcat 5.5.9
Latest Firefox, Opera and MSIE


Thank you for your time!





_
Piano music podcast: http://inthehands.com Other interesting stuff:
http://innig.net




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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: new logo for Tapestry

2006-05-19 Thread Paul Cantrell
Hate to break it to you, but management has *no* idea what the Apache  
feather looks like or means. Sorry!


I do think the "tryout factor" for developers is a good point.

However, I think the more common approach of placing the Apache logo  
alongside ours serves all the purposes you mention, without burdening  
the logo.


And it *does* burden the logo. The Apache project logos attempting to  
integrate a feather generally don't look as good, IMO. Geronimo? Eh.  
Boring. Didn't even see the feathers until I was looking for them.  
Spamassasin? Tomcat? Ant? Slick! Looking sharp!


Cheers,

Paul

On May 19, 2006, at 2:12 AM, Peter Svensson wrote:

My reason for wanted an Apache reference (apart from the obvious  
fact the
Apache supports the project) is that, as someone recently  
mentioned, gets
the attention of management. Otherwise Tapestry is just another  
framework.
few have worked with it, and the only way you can feel the  
nejoyment , as it

were, is to try it out.

I'd wager that we would have easily twice the try-out factor if the  
Apache
refernce was clear rather than not, which would benefit Tapestry  
(and us) in

the end.

Then again, it doesn't have to be the feather, it might be tricky to
integrate in the "T" design tat forms the base of most proposals.  
Maybe just
the text "Apache" or "An Apache Project", perhaps as an option,  
sometimes

you have it, sometimes not, whatever, but still...

When in Rome, do as the Romulans  :)

Cheers,
PS

On 5/19/06, Schulte Marcus <[EMAIL PROTECTED]> wrote:


Actually, I think the spam assassin logo does a great
job in referencing Apache without just copy-pasting the feather -
and thus without sacrificing the integrity of the design.

> -Original Message-
> From: Paul Cantrell [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 18, 2006 10:44 PM
> To: Tapestry users
> Subject: Re: new logo for Tapestry
>
>
> You mean like Ant, Tomcat, Cocoon, Excalibur, and SpamAssassin?
>
> Oh, wait, *none* of them do
>
> http://ant.apache.org/images/ant_logo_large.gif
> http://tomcat.apache.org/images/tomcat.gif
> http://cocoon.apache.org/images/cocoon-logo.gif
> http://excalibur.apache.org/logo.gif
> http://spamassassin.apache.org/images/arrowlogo.png
>
> I don't like the version with the feather. It's awkward.
>
> On May 18, 2006, at 3:26 PM, James Carman wrote:
>
> > Well, tapestry *is* an Apache top-level project now (and an  
Apache
> > "product").  I think it's very important that we include the  
"apache

> > feather."
> >
> > -Original Message-
> > From: Konstantin Ignatyev [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 18, 2006 4:22 PM
> > To: Tapestry users
> > Subject: Re: new logo for Tapestry
> >
> > I think the first image is just fine.
> >
> > IMO logo should be free of any references to Apache or any other
> > projects or
> > organizations for that matter. If there will be Apache
> feather then
> > why now
> > add that cup of cofee, or make it cup of ink and put the
> feather in
> > it ;).
> >
> >
> >
> > Borut Bolčina <[EMAIL PROTECTED]> wrote: Here, I took the liberty of
> > recreating
> > the background. Geoff, I hope you
> > dont't mind.
> > http://svarog.homeip.net/tapestry-logo/logo.png
> >
> > What do you say?
> >
> > -Borut
> >
> >
> > Geoff Longman pravi:
> >> Have a look at the Spindle logo at http://spindle.sf.net
> >>
> >> Behind the swoopy S is a version of the old T logo I like a  
lot -

> >> looks like an architectural drawing.
> >>
> >> Alas, I lost the original vector artwork for that logo long ago.
> >>
> >> Geoff
> >>
> >> On 5/17/06, Steven Bell  wrote:
> >>> I must say I like Dwi Ardi Irawan's logo for three main  
reasons.

> >>>
> >>> It's simple.
> >>> It scales nicely. (I think this is very important!)
> >>> It looks professional.
> >>>
> >>> And on top of that it looks really good.
> >>>
> >>> On 5/17/06, Fernando Padilla  wrote:
> >>>>
> >>>> I sort of like the basic T logo, this one is along the
> same lines.
> >>>>
> >>>> another brainstorm: take a weave pattern like old windows
> >>>> background,
> >>>> but highlight a few bits of the weave to have a T come out  
of it.
> >>>> Basically take the current logo, but add a weave pattern in  
the

> >>>> background in very light grey..
> >>>

Re: new logo for Tapestry

2006-05-18 Thread Paul Cantrell

You mean like Ant, Tomcat, Cocoon, Excalibur, and SpamAssassin?

Oh, wait, *none* of them do

http://ant.apache.org/images/ant_logo_large.gif
http://tomcat.apache.org/images/tomcat.gif
http://cocoon.apache.org/images/cocoon-logo.gif
http://excalibur.apache.org/logo.gif
http://spamassassin.apache.org/images/arrowlogo.png

I don't like the version with the feather. It's awkward.

On May 18, 2006, at 3:26 PM, James Carman wrote:


Well, tapestry *is* an Apache top-level project now (and an Apache
"product").  I think it's very important that we include the "apache
feather."

-Original Message-
From: Konstantin Ignatyev [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 18, 2006 4:22 PM
To: Tapestry users
Subject: Re: new logo for Tapestry

I think the first image is just fine.

IMO logo should be free of any references to Apache or any other  
projects or
organizations for that matter. If there will be Apache feather then  
why now
add that cup of cofee, or make it cup of ink and put the feather in  
it ;).




Borut Bolčina <[EMAIL PROTECTED]> wrote: Here, I took the liberty of  
recreating

the background. Geoff, I hope you
dont't mind.
http://svarog.homeip.net/tapestry-logo/logo.png

What do you say?

-Borut


Geoff Longman pravi:

Have a look at the Spindle logo at http://spindle.sf.net

Behind the swoopy S is a version of the old T logo I like a lot -
looks like an architectural drawing.

Alas, I lost the original vector artwork for that logo long ago.

Geoff

On 5/17/06, Steven Bell  wrote:

I must say I like Dwi Ardi Irawan's logo for three main reasons.

It's simple.
It scales nicely. (I think this is very important!)
It looks professional.

And on top of that it looks really good.

On 5/17/06, Fernando Padilla  wrote:


I sort of like the basic T logo, this one is along the same lines.

another brainstorm: take a weave pattern like old windows  
background,

but highlight a few bits of the weave to have a T come out of it.
Basically take the current logo, but add a weave pattern in the
background in very light grey..

Dwi Ardi Irawan wrote:

it's just my opinion.
tapestry logo

i think
tapestry logo competition just use for the best logo and

represent the

tapestry meaning

cmiiw






--- 
--

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





--
Regards,

Steven Bell








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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Persistence misbehavior in T4

2006-05-18 Thread Paul Cantrell

A few general points:

-- An "= null" initializer for a non-final field is redundant in all  
cases.
-- You should generally not need to synchronize access to instance  
fields of a page.


Now a question:

In the CategoryBrowser.pageDetached() the ProductCategory property  
is set to null.


Don't you mean subCategories is set to null? If it's not, then that's  
your problem. Page objects get reused.


Cheers,

Paul

On May 18, 2006, at 12:26 PM, Firas A. wrote:


Hello Everyone!

I have a class, CategoryBrowser of type BasePage which has a transient
property, a JavaBean called ProductCategory. ProductCategory makes  
use of an

instance field:
private List subCategories = null;

This list is initialized in CategoryBrowser upon every request.  
Every access
to subCategories is synchronized. In the  
CategoryBrowser.pageDetached() the

ProductCategory property is set to null.

The problem:
The state of the subCategories field is retained between requests.  
During

all subsequent requests after the 1st one, the initial value of
subCategories is not null (dispite the declaration above).

And when this happens the current state of subCategories may even be
observed in another browser/session. Here's the test that I performed:

1.  initiate the misbehavior in Firefox

2.  close Firefox and start Opera

3.  browse to the page where subCategories is first initialized

The result: the state of subCategories reflects the state it got in  
Firefox
(1), i.e. it is was not null upon first request and already  
contained some

values from the session in Firefox.

Any idea on what's going on?

My platform:
Tapestry 4.0.1 (started with -Dorg.apache.tapestry.disable- 
caching=true)

JVM 1.5.0_06-b05 / WinXP SP2
Tomcat 5.5.9
Latest Firefox, Opera and MSIE


Thank you for your time!





_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: how to subscribe or unsubscribe again

2006-05-18 Thread Paul Cantrell
Dude, mailing a stupid question like this over and over to the list  
is *exceptionally* rude. Considering a career in spam?


Good riddance to you.


On May 18, 2006, at 7:23 AM, Cypher ! wrote:


anyone know the correct email addresses?
_
Express yourself instantly with MSN Messenger! Download today it's  
FREE!

http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-
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: Setting system configuration for components

2006-05-15 Thread Paul Cantrell
If a value is only used by one component, put the default in the  
component spec.


If a value is shared across components, you could create an ASO with  
global scope and inject it into your components -- or you could go  
old-school, and just create a MyComponentSettings singleton and use it.


P

On May 15, 2006, at 3:04 PM, Dan Adams wrote:


I have a library of components that are used by a couple different
projects. One of the things I would like to do is to set system-wide
defaults for each project that would be used by the components so they
didn't have to be specified each time the component was used. I could
also create a wrapper component to set the properties but in this case
that is not optimal. Anyone know of a way other than setting system
properties that could do this? Something like setting it in a  
properties

or config file somewhere.

--
Dan Adams
Software Engineer
Interactive Factory
617.235.5857


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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: listeners in component

2006-05-15 Thread Paul Cantrell
Make your component accept the listener as a parameter. Listeners can  
be passed just like any other component parameter.


P

On May 15, 2006, at 3:23 PM, Carl Pelletier wrote:

Hi, How can I call the listener of a button in a form when I am in  
the listener of my component ?


Thanks !

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: I do not like the new tapestry logo

2006-05-15 Thread Paul Cantrell

I like the concept, but feel it needs adjustment.

Is the original vector art available?

P

On May 15, 2006, at 2:31 PM, Jesse Kuhnert wrote:


I like it, but I may be a minority.

The only thing I can say is that the old tapestry logo is most  
definitely

being killed off.

So, if someone has a better logo that everyone likes they should  
make it

known :)

On 5/15/06, Todd Orr <[EMAIL PROTECTED]> wrote:


I hate to say it, but unicorns have a wimpy connotation. It conjures
up images of 5 year olds' rooms with posters of rainbows and mythical
creatures adorning the walls. I don't mean to offend those of you  
that

had those on your walls growing up. If you still have them on your
walls, perhaps some offense is in order. ;)

On 5/15/06, Henri Dupre <[EMAIL PROTECTED]> wrote:
> I do actually like the new logo... I find it slick and it is  
nice to

have
> more than just a logo to identify the project.If the unicorn is  
picked

then
> there should be a little note somewhere in the project pages...
>
>
> On 5/15/06, liigo <[EMAIL PROTECTED]> wrote:
> >
> > I'm sorry if I hurt someone.
> > but i really like the old tapestry logo than the new one.
> > maybe we need redesign another much better one.
> >
> >
> > the new tapestry logo:
> >
> >
http://svn.apache.org/viewcvs/tapestry/tapestry-logo/ 
tapestry_logo_200x290.png?rev=406173&view=auto

> >
> > the old one:
> > http://jakarta.apache.org/tapestry/images/Tapestry-Banner.png
> >
> >
> >  
-

> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Thanks,
>
> Henri.
>
>

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





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: component that will get localized resources from database?

2006-05-15 Thread Paul Cantrell
There is no obligation to use Hivemind if it is not appropriate to  
your problem. Hivemind is useful for decoupling parts of the system,  
and for making "aspecty" customization that cut across the framework.  
If you don't need decoupling, and don't need to customize across the  
whole framework, perhaps you don't need to bother with Hivemind.


So there may be a Hivemind way to inject a different message worker  
into only certain classes, but I would guess overriding getMessages()  
is probably just fine. Did you try it? Does it work? Is it simple? If  
so, no worries!


Cheers, P

On May 15, 2006, at 10:57 AM, Lutz Hühnken wrote:


Hi there,

assume you want to create a localized tapestry application, but there
are localized messages that you don't want to store in a properties
file / text file.

In a plain Java application, you could just write your own
implementation of ResourceBundle, that could take the messages from
anywhere, e.g., a database, and use that instead of
PropertyResourceBundle.

With Tapestry, it seems to be more complicated, though. If I
understand correctly, the "AbstractComponent" is "enhanced" by an
"InjectMessagesWorker", as defined in "tapestry.enhance.xml". The
"InjectMessagesWorker" will inject a getMessages() method that will
return the result of ComponentMessagesSource.getMessages(IComponent).

Now, that's not what I want...

A straight-forward approach would be to override "getMessages()" in my
own component. Would that work? To me it seems to collide with the
Hivemind enhancement/injection approach.

Alternatively, I could probably change the InjectMessagesWorker to
something of my own liking. But that would affect *all* components
(that inherit from AbstractComponent), while I would like the modified
behaviour just for my own. Plus, I don't really want to mess with the
"tapestry.enhance.xml", since it is part of the packaged Tapestry
distribution.

So what would be the proper way to do it? Can I override the
"inject-messages" command from "tapestry.enhance.xml" for my own
components? How?

Thanks in advance,

Lutz

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Integration With EJB3

2006-05-15 Thread Paul Cantrell
This project of mine (in early development) uses EJB3 annotations  
(though it uses Hibernate APIs, *not* EJB3's entity manager):


   http://sourceforge.net/projects/imre

View source here:

http://svn.sourceforge.net/viewcvs.cgi/imre/trunk/imre/
http://svn.sourceforge.net/viewcvs.cgi/innig-util/trunk/innig- 
framework/


Or check out a local copy if you have Subversion:

svn co https://svn.sourceforge.net/svnroot/imre/trunk/imre/
svn co https://svn.sourceforge.net/svnroot/innig-util/trunk/ 
innig-framework/


For the answer to your include question, read the docs and scan the  
list archives for directions on create components. Components are  
essentially includes that are optionally backed by additional code.


Cheers,

Paul


On May 12, 2006, at 5:14 AM, Ing.Stefano Girotti wrote:


Hi to all i'm new to the use of Tapestry,
i'm looking for someone/something about Java enterprise with  
Tapestry & EJB3,
cookbook, tutorial, examples, best practices, jsp equivalent... for  
example how
i can include a tapestry sub page in a tapestry page like i did in  
a jsp with:




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: I do not like the new tapestry logo

2006-05-15 Thread Paul Cantrell
Actually, Medieval tapestry was the first thing that came to mind  
when I saw the new logo. I do agree, however, that it's a little odd  
-- something about the proportioning, the position of the horn, or  
the pose of the unicorn...? It almost seems to be tipping backwards,  
out of balance or bent awkwardly.


I do, however, prefer something evoking the "heraldic imagery" to the  
bland old T, which was fine but boring. The concept seems good to me.



Then again, is that why Tapestry is named Tapestry?


I think the idea is that it weaves together all these components to  
make a page.


Cheers, P


On May 15, 2006, at 8:23 AM, James Carman wrote:

Well, it wasn't obvious to me.  Then again, is that why Tapestry is  
named
Tapestry?  I've never heard the etymology of the name.  If that's  
why it's

named Tapestry, then the logo is cool with me.  But, I would recommend
having some documentation on the site about its name, maybe.


-Original Message-
From: Nick Westgate [mailto:[EMAIL PROTECTED]
Sent: Monday, May 15, 2006 9:05 AM
To: Tapestry users
Subject: Re: I do not like the new tapestry logo

James Carman wrote:

I didn't understand what connection there was with unicorns either.


Google is your friend:
http://www.google.com/search?hl=en&q=ancient+tapestry 
+unicorn&btnG=Google+Se

arch

I suppose it's meant to invoke heraldic imagery, but people
probably aren't exposed to many such images these days. ;-)

Actually, the unicorn would look much better on a rectangular
background like the stamp in the first google hit. Just IMHO.

Cheers,
Nick.

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: JCaptcha Integration...

2006-05-12 Thread Paul Cantrell
Cool! Can you post a link? http://tapestry.javaforge.com/ is coming  
up blank from here.


On May 12, 2006, at 1:22 PM, James Carman wrote:


The application has changed a bit.  I've now made the JCaptcha stuff a
component library.  The example application uses it as a component  
library.
The code is available in the tapestry-javaforge project as a  
submodule.


-Original Message-
From: James Carman [mailto:[EMAIL PROTECTED]
Sent: Friday, May 12, 2006 11:50 AM
To: 'Tapestry users'
Subject: JCaptcha Integration...

Just for fun (man I need a life), I tried out integrating JCaptcha
(jcaptcha.sourceforge.net) into my "tapernate-example"  
application.  If

anyone's interested in the code, it's available via SVN at:

www.carmanconsulting.com/svn/public/tapernate-example

It defines a new validator type for input fields called "captcha"  
and a

JCaptchaImageService engine service for rendering the CAPTCHA images.
Enjoy!

James

p.s. I'll probably make this a component library and make it  
available at

the tapestry-javaforge project.



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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Creating a custom component

2006-05-12 Thread Paul Cantrell
A complete stack track trace might help; "NullPointerException" by  
itself doesn't say much


On May 12, 2006, at 10:31 AM, Rui Pacheco wrote:


Hi all again

I am trying to create a custom component for my menu, header and  
footer. I

created a Menu.html whose content is a simple html table.
I created a .jwc file in my WEB-INF directory with the following  
content:





But when I deploy my application, Tomcat starts dumping this error  
in an

endless loop:

May 12, 2006 4:29:41 PM
org.apache.catalina.core.ContainerBase 
$ContainerBackgroundProcessorprocessChildren

SEVERE: Exception invoking periodic operation:
java.lang.NullPointerException
...

I am following these pages on creating custom components, but I  
cant find

out what is it I'm doing wrong:
http://jakarta.apache.org/tapestry/UsersGuide/components.html
http://jakarta.apache.org/tapestry/tapestry/ComponentReference/ 
RenderBlock.html#Example

--
Cumprimentos,
Rui Pacheco


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: [Tapestry]

2006-05-10 Thread Paul Cantrell
Filter on the List-Id header (it should be  
"").


I'd rather not have the [Tapestry] prefix, since the header is there.

P

On May 10, 2006, at 10:48 AM, Mark Stang wrote:


Could we get a tag in the Subject for "Tapestry"?

All of my filters are looking for it and now that it is gone, my in- 
box is starting to look like a Tapestry Meeting Room.


thanks,

Mark


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Page files or annotations? [was: Validation]

2006-05-10 Thread Paul Cantrell

I think Sam has it right: it depends.

In my development, I never write page files -- but we don't have any  
separate person devoted to the page design. That seems like the only  
compelling case left for the page files, but it is somewhat  
compelling: it keeps as much as possible out of the page file, so the  
designed can focus on the HTML and not have to tiptoe over so much  
extra baggage.


(One can of course use annotations to achieve that, too, but it  
requires declaring tons of getXyzComponent() methods that clutter up  
classes.)


However, without the separate designed role, I find the annotations  
approach keeps things much cleaner. Unless you're keen on keeping the  
templates as pared-down as possible, then, I'd recommend that.


In Tap 5, it sounds like things are moving towards annotations only.  
Hopefully 5 will reduce the verbosity of some of the common cases.


Cheers,

Paul

On May 10, 2006, at 7:49 AM, Sam Gendler wrote:


On 5/10/06, Martijn Hinten <[EMAIL PROTECTED]> wrote:
 I have been wondering this for some time now: Is it the general  
consensus
to get rid of .page files and do all binding in the html (and  
injection via

annotations in the java classes)?



I think it depends on the size of your team and complexity of your
app.  With a fairly large team, including one person devoted to
layout, I prefer to keep all component declarations in .page files, so
that the layout templates are as clean as possible and least likely to
get screwed up by someone making edits without a clue about how
tapestry works.  I've generally got nothing but jwcid attributes in my
templates.  A simple macro in just about any editor will make it easy
to switch between .page and .html files in a single keystroke or mouse
click, so the complaint about having to switch files really isn't
valid, to my mind.

We also attempt to keep components in the same order in the .page file
as they are used in the .html template.  It is a couple of minutes of
developer time per page at the end of any release cycle on any pages
that have gotten out of whack and it keeps things easy to find.  In
fact, I have a macro in vim which will switch to a .page file and go
to the same location as I am currently at, as a percentage of the file
length, with two keystrokes.  Odds are usually good that I can see the
component that I am looking for as soon as the other file is visible,
and both files are so much more readable as a result.

The only thing I hate is when informal parameters are important to the
function of the component, since, as far as I know, they must appear
in the html file.  I really wish there were a way to bind informal
parameters to a component from within a .page file, overriding any
informal parameters of the same name that are in the .html template
which may be necessary for layout in the unrendered page.  That way, I
could put ALL of my parameter bindings in the .page file.

--sam

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




_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: publicnudity

2006-05-09 Thread Paul Cantrell

On May 9, 2006, at 2:04 PM, Martin Strand wrote:


One of the only websites on the internet with real public sex,


Hooray, is it Tapestry based?


The the website, or the public sex?

If the latter, this is a side of Tapestry I never knew about.

P

_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: How to set the focus on a form ?

2006-05-09 Thread Paul Cantrell
If you set focus=false, you can at least roll a little of your own  
javascript to do the trick. It doesn't take much.


On May 9, 2006, at 12:19 PM, Stephane Decleire wrote:


It seems that it doesn't let the developper much possibilities ...
Isn't there any possibilities to choose at the rendering a specific  
field to put the focus on ? :-(


Andreas Bulling wrote:


On 09. Mai 2006 - 18:51:21, Stephane Decleire wrote:
| Hi all,
| | I need to set the focus on a different element of a form than  
the | default one.
| I've tried to find this functionnality in the validationdelegate  
wihout | success.


-> http://jakarta.apache.org/tapestry/tapestry/ComponentReference/ 
Form.html


Parameter focus

Hope that helps,
 Andreas

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




--
Stéphane Decleire

05 56 57 99 20
06 63 78 69 06



_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



Re: Tapestry to generate mails ?

2006-05-08 Thread Paul Cantrell

I am interested in your EmailService, and I'm sure others would be, too.

Your point about dynamic content is a good one: it's quite likely  
that an email would contain ExternalLinks, PageLinks, and perhaps  
even stateless DirectLinks -- and it would be nice to generate those  
in the email exactly as we generate them in a page.


Cheers,

Paul

On May 8, 2006, at 4:36 PM, Henri Dupre wrote:


I don't agree on this... Also I don't see really differences between
"static" email and interactive HTML. In the emails we generate,  
there is
lots of dynamic content although there is no form handling, we use  
the same
components plus many other tapestry features. Velocity is fine, but  
not when
you start to have complex emails. What makes tapestry great for  
this task
are the templates. In addition, I rather not add another technology  
to our
project, Velocity is simple, but just *more* to learn and manage  
for our

other developers.

And I'll give you a very usefull usage of sending html pages: for
exceptions, we send the tapestry error page by email (in tapestry  
3) while
we give to the client a friendly error page. Logging is fine but it  
doesn't

give you all the detailed info of an error.

I've been working on an EmailService for T4, you can inject it in  
any page
and the interface is quite simple. It takes a list of properties  
(for email

headers, from/to/subject), a page (String or object) and eventually an
object map if you want to call the external interface of your page.
It is working 90% now and it is relying on a fresh request cycle,  
so it will

be possible to thread the whole thing. Getting a fresh request
cycle requires quite a bit of hacking, I may need to write a  
specific engine

object. I can post the code on the wiki once I'm done if anyone is
interested.







On 5/3/06, James Carman <[EMAIL PROTECTED]> wrote:


Tapestry is for creating interactive HTML, not a static HTML- 
formatted

email
(IMHO).  I think you're trying to use an elephant gun to hunt  
squirrel

here.
Velocity is perfect for generating email text.  You can still use  
your

architecture, you just put some helper beans in the VelocityContext.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 6:17 PM
To: Tapestry users; [EMAIL PROTECTED]
Subject: Re: Tapestry to generate mails ?

I had this related link over at my delicious (
http://del.icio.us/andyhot/tapestry ).
It's entitled 'Sending Tapestry-generated email with Spring' and  
it's at:

http://www.behindthesite.com/blog/C1931765677/E2094832857/index.html



>From  Stephane Decleire <[EMAIL PROTECTED]>:

> Hi,
>
> I would like to know if anybody use Tapestry to generate its  
email ?
> Indeed, generate mails based on templates is very similar to  
generate

> HTML pages ...
> As an exemple, i would like to implement the famous "I've forgot my
> password" by sending the user an email based on a template where  
the

> password should be inserted.
> I would be very interested in a Tapestry approach to do this in  
order to

> reuse all of my existent architecture (Tapestry/Spring/Hibernate).
>
> Thanks in advance.
>
> --
> Stιphane Decleire
>
> 05 56 57 99 20
> 06 63 78 69 06
>
>


--



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




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






--
Thanks,

Henri.


_
Piano music podcast: http://inthehands.com
Other interesting stuff: http://innig.net



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



A probably controversial attempt at improving template readability

2006-05-07 Thread Paul Cantrell
I decided that I've had it up the wazoo with typing (and looking at)  
"ognl:" all the time. Probably my least favorite things about  
Tapestry is the eye-bending verbosity of its template files -- the  
previewability is fantastic, but it comes at a *high* price in  
keystrokes and readability, IMO.


I have a new approach I'm somewhat happier with, and thought I'd  
share it so that everyone else can either try it out or decry my  
foolishness, as they see fit.


I added this to my hivemodule.xml:


	  id="tapestry.bindings.OGNLBindingFactory"/>
	  id="tapestry.bindings.MessageBindingFactory"/>
	  id="tapestry.bindings.LiteralBindingFactory"/>
	  id="tapestry.bindings.AssetBindingFactory"/>
	  id="tapestry.bindings.BeanBindingFactory"/>
	  id="tapestry.bindings.ListenerBindingFactory"/>
	  id="tapestry.bindings.ComponentBindingFactory"/>
	  id="tapestry.bindings.StateBindingFactory"/>
	  id="tapestry.bindings.HiveMindBindingFactory"/>



This makes allows me to write ":value" instead of "ognl:value" ...  
which seems like a very small thing until you see how it cleans up  
template files! It also creates one-letter prefixes for all the other  
bindings. (Specific choices here are a matter of taste -- I like the  
caps so that I don't have to twiddle the shift key back and forth to  
type quote - prefix - colon, but one could easily change this.)


Unfortunately, Tapestry is one step ahead of me, and actually seems  
to intentionally to prevent what I'm doing. (Sorry, HLS, if you are  
gritting your teeth as you read this!) In BindingSourceImpl:


public IBinding createBinding(IComponent component, String  
bindingDescription,

String reference, String defaultPrefix, Location location)
{
...
int colonx = reference.indexOf(':');

if (colonx > 1)
{
String pathPrefix = reference.substring(0, colonx);
...

In other words binding prefixes are customizable, but they must be at  
least two characters.


Soo, I just overrode the default binding factory:


  

	  id="tapestry.bindings.BindingFactories"/>


  


public class InnigBindingSourceImpl
implements BindingSource
{
private List contributions;
private Map factoriesByPrefix = new  
HashMap();


public void initializeService()
{
for(BindingPrefixContribution c : contributions)
factoriesByPrefix.put(c.getPrefix(), c.getFactory());
}

public IBinding createBinding(IComponent component, String  
bindingDescription, String reference,
  String defaultPrefix, Location  
location)

{
String prefix = defaultPrefix;
String path = reference;

int colonx = reference.indexOf(':');
if(colonx != -1)
{
String pathPrefix = reference.substring(0, colonx);

if(factoriesByPrefix.containsKey(pathPrefix))
{
prefix = pathPrefix;
path = reference.substring(colonx + 1);
}
else
throw new ApplicationRuntimeException(
"Unknown binding prefix \"" + pathPrefix + "\"  
in expression \"" + reference + '"');

}

return factoriesByPrefix.get(prefix).createBinding 
(component, bindingDescription, path, location);

}

public void setContributions(List  
contributions)

{ this.contributions = contributions; }
}

(Note that this code explicitly requires the use of "literal:" or  
"-:" if a binding contains a colon. This prevents me from having a  
literal accidentally turn into some other kind of binding in a future  
upgrade.)


Combined with this, I've abandoned the use of  as a generic  
"Tapestry-only" tag, and am now using  for @If,  for @For,  
and  for @Insert.


Before:


parameters="ognl:article">
value="ognl:article.title">Article Title





After:


parameters=":article">
Article  
Title





It's still not as concise as Velocity or Rails's ERB, but it *is*  
still code-free (unlike ERB) and browser-previewable (unlike both).  
I'm definitely happier with it. I still don't like the redundancy of  
, and don't like the verbosity of the @Insert


Cheers,

Paul

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