Re: Workflow Engine for tapestry

2010-01-04 Thread Toby Hobson
Yeah jBPM is both appserver and web agnostic. It uses hibernate for ORM so
if you're already using hibernate in your app you can use the same session
factory and take advantage of caching, transaction management etc. Unlike
the commercial workflow products (Oracle etc) its very lightweight so
integration is a breeze

Toby

2010/1/4 abangkis 

> Hi juan,
>
> thanks a lot for the Info :)
>
> cheers,
>
> Abangkis
>
> On Mon, Jan 4, 2010 at 11:21 PM, Juan E. Maya  wrote:
> > I have used Jboss on tomcat and jetty without any problems. It should
> > run fine with any other app server. U just need to put the jar inside
> > ur classpath and start playing with it.
> >
> > To integrate with tapestry i guess u could have a tapestry service to
> > control the movement of the token between the workflow. Basically U
> > will use the service to move around the workflow graph.
> >
> > This article on TSS is a bit old but should give u a feeling of how is
> > to work with jbpm. It uses spring but it's practically the same with
> > tapestry.
> >
> > http://www.theserverside.com/tt/articles/article.tss?l=jBPMandSpring
> >
> >
> > On Mon, Jan 4, 2010 at 11:10 AM, abangkis  wrote:
> >> Hi toby, thanks for the info. jBPM is very popular, its a jboss
> >> product right. Are you deploying under jboss ? Can it be deployed in a
> >> different app server like Glassfish or Weblogic ?
> >>
> >> Can you give me some hint how you integrate it with tapestry. I'm
> >> still in the inception process between using a workflow engine or not.
> >>
> >>
> >> Thanks a lot,
> >> Cheers,
> >>
> >> Abangkis
> >>
> >>
> >> On Mon, Jan 4, 2010 at 10:52 PM, Toby Hobson <
> toby.hob...@googlemail.com> wrote:
> >>> If it's pure workflow (as opposed to SOA orchestration) I would
> recommend
> >>> jBPM, I have used it alongside T5 with great success.
> >>>
> >>> Toby
> >>>
> >>> 2010/1/4 abangkis 
> >>>
> >>>> Dear all, i have a questions.
> >>>>
> >>>> Is there any recommendation for a workflow engine that would work well
> >>>> with tapestry. Or is it using the Tapestry IOC is enough ?
> >>>>
> >>>>
> >>>> TIA
> >>>>
> >>>> Abangkis
> >>>>
> >>>> -
> >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >>>> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>>>
> >>>>
> >>>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Workflow Engine for tapestry

2010-01-04 Thread Toby Hobson
If it's pure workflow (as opposed to SOA orchestration) I would recommend
jBPM, I have used it alongside T5 with great success.

Toby

2010/1/4 abangkis 

> Dear all, i have a questions.
>
> Is there any recommendation for a workflow engine that would work well
> with tapestry. Or is it using the Tapestry IOC is enough ?
>
>
> TIA
>
> Abangkis
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [Tapestry Central] Securing Tapestry pages with Annotations, Part 1

2009-12-31 Thread Toby Hobson
Just to add my 2 cents ... imho it's best to build on an exiting framework
like spring-security rather than trying to re-invent the wheel.
acegi/spring-security has great traction in the market and it's very well
documented. Recent versions are becoming much simpler due to sensible
defaults but more esoteric use-cases are still supported.

Toby

2009/12/31 Sven Homburg 

> Hi Allesandro,
>
> i totally agree with you.
> The documentation of the ChenilleKit-Modules
> is bad or lacks at some points.
>
> One of our good intentions for 2010 is to
> write more and better docs.
>
>
> with regards
> Sven Homburg
> Founder of the Chenille Kit Project
> http://chenillekit.codehaus.org
>
>
>
>
> 2009/12/31 Alessandro Bottoni 
>
> > Il 29/12/2009 21:32, Alex Kotchnev ha scritto:
> > > approach. As Thiago already mentioned, there are at least a few more
> > > solutions that attempt to provide this (e.g. Thiago's own,
> > > chenillekit-access, and a bunch more).
> >
> > Let's me play the Devil's advocate for a moment...
> >
> > ChenilleKit-Access is an example of why the typical new user (like me)
> > will NOT use such a solution, no matter how good and elegant it could
> > be. The reason is that the ONLY official documentation you can find
> > using Google is the following
> >
> > 
> > Introduction
> >
> > ChenilleKit Access module sits in between your page processing logic and
> > the client HTTP request, doing so it is able to decide when and how the
> > request can pass through or not.
> >
> > For doing so it needs two different steps. First it put RestrictedWorker
> > into the ComponentClassTranformWorker pipeline, this class is
> > responsible to read the annotation class and store various meta
> > information needed by AccessValidator. Second it put two Dispatcher into
> > two different pipelines for intercepting page render and component event
> > action requests to check if they're directed to restricted class/events
> > and to apply the needed constraints.
> > 
> >
> > I'm sorry but I have to say that many (or most?) new users will not have
> > neither the time nor the patience to study the JavaDoc or the source
> > code just to figure out how to use this (or any other) library, no
> > matter how simple it can be.
> >
> > Moreover, in many cases it would be very hard to convince the project
> > leader or the end user to accept a (sorry Thiago ) not-canonical,
> > little known, little documented, maybe-risky library like this one.
> >
> > For what regards me, for example, I would be forced to look for a
> > widely-recognized, well-tested, well-documented, standard module, inside
> > or outside the Tapestry world (Acegi?) or, as an alternative, to
> > demonstrate that ChenilleKit is the right tool for the task at hand
> > (being ready to pay for any possible error about my judgment...).
> >
> > Just the voice of the Devil, anyway... ;-)
> >
> > PS: Yes, I'm aware of this article:
> > http://www.equanda.org/templates/login.html .
> >
> > --
> >
> > Alessandro Bottoni
> > Website: http://www.alessandrobottoni.it/
> >
> > "They say if you play a Microsoft CD backwards,
> > you hear satanic messages.
> > That's nothing, cause if you play it forwards,
> > it installs Windows."
> > -- Unknown
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
>


Re: Best server for development and for production?

2009-11-19 Thread Toby Hobson
For development I use jetty along with JRebel. Jetty, JRebel and T5's
dynamic class reloading make a perfect combination ... I can change pages,
components, model objects, even spring beans on the fly. For production I
used to deploy on Tomcat or Weblogic although I've recently moved across to
Glassfish and have been very happy so far. Incidentally we don't bother with
the various appserver plugin's for IDEs ... running weblogic/glassfish on a
development machine seems crazy to me ... that's what the staging/test
environment is for!

Toby

2009/11/18 Juan E. Maya 

> I use tomcat with the sysdeo plugin
> (http://www.eclipsetotale.com/tomcatPlugin.html), although as pointed
> out by Tiago tapestry reduces the need of deploy-on-change, still the
> code in the business layer of the application requires a redeploy.
> Sysdeo although not perfect, reduces the deploys to changes Hibernate
> mappings or when u add new methods to ur classes (Non-Managed by
> tapestry)
>
> I have never used glassfish so i couldn;t say how they compare
>
> U could also check JRebel (http://www.zeroturnaround.com/jrebel/) for
> a more robust solution
>
>
> On Wed, Nov 18, 2009 at 7:04 PM, Thiago H. de Paula Figueiredo
>  wrote:
> > Em Wed, 18 Nov 2009 15:54:04 -0200, Alessandro Bottoni
> >  escreveu:
> >
> >> Hi All,
> >
> > Hi!
> >
> >> in your opinion, which is the best server (servlet container, actually)
> >> for Tapestry?
> >
> > Definitely, Jetty, at least for development, maybe also for production.
> > Small, easy to configure, fast. That's what I use for development and
> > production.
> >
> >> It seems that Glassfish has an advantage over other solutions in the
> >> development environment because of the deploy-on-change feature supplied
> >> by NetBeans and Eclipse plug-ins but...
> >
> > I have a bad experience about it: deploys on change failed seemingly
> > randomly. I just run Jetty over an exploded WAR. Works like a charm.
> > By the way, deploy-on-change doesn't make any sense when used with
> > Tapestry's live class realoading.
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and
> > instructor
> > Owner, software architect and developer, Ars Machina Tecnologia da
> > Informação Ltda.
> > http://www.arsmachina.com.br
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: simulate form submission events without Submit component

2009-11-18 Thread Toby Hobson
I do something similar ... in fact I have created a mixin which I call
AjaxDelegate ... it basically wires up elements so that a client side event
on one component invokes a click event on a hidden submit button

Toby

2009/11/18 Thiago H. de Paula Figueiredo 

> Em Wed, 18 Nov 2009 11:22:03 -0200, Ilya Obshadko 
> escreveu:
>
>  ... anybody?
>>
>
> I would add a non-visible submit button (not the Submit component, an
> ordinary ) and then invoke submit.click(). That's what
> worked with AJAX submissions for me.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, software architect and developer, Ars Machina Tecnologia da
> Informação Ltda.
> http://www.arsmachina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Same page, two different content-types

2009-11-03 Thread Toby Hobson
Hi Alfie

I guess you could use a url rewrite:

public class MyAccount {
 ...
}

@ContentType("text/xml")
public class MyAccountXML extends MyAccount {

}

public static void
contributeURLRewriter(OrderedConfiguration configuration) {
URLRewriterRule rule = new URLRewriterRule() {

public Request process(Request request, URLRewriteContext context) {
if (request.getHeader("User-Agent").indexOf("XML only browser")
> 0) {
final String path = request.getPath();
request = new SimpleRequestWrapper(request, path + "XML");
}
return request;
}

public RewriteRuleApplicability applicability() {
return RewriteRuleApplicability.INBOUND;
}

};

configuration.add("rule", rule);
}

Not very nice but it might work for you!

Toby

2009/11/3 Alfie Kirkpatrick 

> Hi, I'd like to have the same page class return two different content
> types depending on circumstances. Is this possible? The existing
> ContentTypeWorker modifies the component model which is immutable at
> runtime.
>
>
>
> In particular (and I realise this is a hack), I want to use locale to
> decide between HTML and XML rendering for a page.
>
>
>
> Thanks,
>
> Alfie.
>
>


Re: Tapestry seems to delete object data

2009-10-23 Thread Toby Hobson
Sorry you spent an hour on that. In future please don't suffer in silence
... if you hit problems let us know and we'll try to help ... the guys on
the mailing list don't bite ;-)

2009/10/23 Mite 

>
> Thank you guys. The problem is solved.
> I am beginner in this, and really like the concept of Tapestry. This
> problem
> gave me an hour of troubles, but now my love for the framework is back to
> 100%. :)
>
> Thanks again.
> Mite
>
> --
> View this message in context:
> http://www.nabble.com/Tapestry-seems-to-delete-object-data-tp26033218p26033406.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Tapestry seems to delete object data

2009-10-23 Thread Toby Hobson
Sorry Thiago .. you just beat me ;-)

2009/10/23 Thiago H. de Paula Figueiredo 

> Em Fri, 23 Oct 2009 19:05:25 -0200, Mite  escreveu:
>
>  import org.apache.tapestry5.annotations.InjectPage;
>>
>> public class Index
>> {
>>private String message;
>>
>
> Tapestry uses redirect-after-post, so the action request is not the same as
> the request that generates HTML. You'll need to persist the field value in
> some way.
> You can do that adding the @Persist(PersistenceConstants.FLASH) annotation
> to the message field:
>
> @Persist(PersistenceConstants.FLASH)
> private String message;
>
> More details here:
> http://tapestry.apache.org/tapestry5.1/guide/persist.html
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Tapestry seems to delete object data

2009-10-23 Thread Toby Hobson
Hi Mike

You need to make the param persistent. By default properties are not
persisted between requests and what's actually happening here is a redirect
after post, i.e. two requests

This should get you on the right track:

public class Second
{
   @Persist("session") // or use @Persist("flash") or @Persist("client")
   private String param;

   public String getParam() {
   return param;
   }

   public void setParam(String param) {
   this.param = param;
   }
}


2009/10/23 Mite 

>
> Hello to everyone on the forum.
>
> I have these two pages:
>
> -
>
> import org.apache.tapestry5.annotations.InjectPage;
>
> public class Index
> {
>private String message;
>
>@InjectPage
>private Second second;
>
>public String getMessage() {
>return message;
>}
>
>public void setMessage(String textField) {
>this.message = textField;
>}
>
>Object onSubmitFromUserInputForm(){
>second.setParam(message);
>return second;
>}
>
> }
>
>   t:sidebarTitle="Current Time"
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>  xmlns:p="tapestry:parameter">
>
>
>
>
>
>
>
> 
>
>
> --
>
> public class Second
> {
>private String param;
>
>public String getParam() {
>return param;
>}
>
>public void setParam(String param) {
>this.param = param;
>}
> }
>
>
>   t:sidebarTitle="Current Time"
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>  xmlns:p="tapestry:parameter">
>
>
>1
>${param}
>3
>
>
> 
>
>
> The problem that occurs is the following. Every time I  submit the form
> from
> the Index page and get redirected to the Second page, the data from the
> form
> is not transfered. I get blank space instead of the data. It seems like
> Tapestry creates a new object after it redirects me to Second.
>
> Can somebody point me to where is the problem?
>
> Thank you in advance
>
> --
> View this message in context:
> http://www.nabble.com/Tapestry-seems-to-delete-object-data-tp26033218p26033218.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5: Weird problem with browser cache and component event redirect

2009-10-23 Thread Toby Hobson
I've had similar problems (caching in general). I was running a mixed
T5/Spring MVC app so in the end I wrote a filter which set the various http
headers and I then mapped certain requests to that filter. In the end I
found that I needed to set quite a few cache related headers to get things
working across all browsers:


NoCacheFilter
com.thc.util.servlet.ResponseHeaderFilter

cache-control

private,no-cache,no-store,must-revalidate,max-age=-1


pragma
no-cache,no-store


expires
-1
 


As you see I needed to set the cache-control, pragma and expires headers to
get it to play nicely

You might want to try something along those lines, of course if you have a
pure T5 app you could you a Tapestry filter instead of a standard servlet
filter as I did

2009/10/23 Felix Gonschorek 

> Hi all,
>
> we're experiencing a weird problem here with a live system (big b2b
> enterprise shop frontend): Some users report that nothing happens when they
> click on links.
>
> We narrowed things down and found out that only component event links are
> affacted that do not redirect to another page, for example:
>
> Page is: "/productlist". The page contains a product listing with a pager -
> users can navigate with the pager (switch pages, sort products)
>
> When the user clicks on an pager event link to go for example to the second
> page, the link looks like this: "/productlist.pager:gotopage/2".
>
> The event handler sets the page number session variable to the value "2"
> and returns null - the same page ("/productlist") should be rendered again -
> but this time page two of the paged product list should be rendered.
>
> On most browsers and clients this works, but as mentioned: Some browsers do
> not follow the header "Location" - i can see it in the logfiles on the
> server. The PageRendering request ("header: Location") is not executed and
> the client loads the page from the browser cache - and page 1 of the paged
> products is displayed. So the users experience that "nothing happens".
>
> We heard from users using internet explorer 7 on the live system (tomcat 6
> behind apache with mod_jk) experiencing this problem and we could reproduce
> this with one system on our test environment (jetty 6, firefox 3.0.14) - the
> browser does not follow the Location header. If we deactivate the browser
> cache completely on firefox the problem does not occur.
>
> Only thing special we have is a "X-Ua-Compatible" header to force internet
> explorer 8 to be IE7 compatible. In the meanwhile we added the
> "last-modified","expires","pragma" and "cache-control" header to modify the
> browser cache behaviour, but so far with no success.
>
>
> This are the server response headers for the component event request:
>
> HTTP/1.x 302 Found
> Location: http://localhost:8080/drw/en/productlist/$N
> Content-Length: 0
> Server: Jetty(6.1.16)
>
>
> This are the server response headers for the page render request:
>
> HTTP/1.x 200 OK
> Last-Modified: Fri, 23 Oct 2009 12:51:42 GMT
> Expires: Mon, 26 Jul 1997 05:00:00 GMT
> Content-Type: text/html; charset=utf-8
> X-Ua-Compatible: IE=EmulateIE7
> Pragma: no-cache
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
> Transfer-Encoding: chunked
> Server: Jetty(6.1.16)
>
>
> Has anybody experienced similar problems? Does anybody have a hint how we
> could force all browsers to do the page render request after the component
> event request, even if we do not change the page? As the problem occured on
> jetty and tomcat, firefox and internetexplorer we assume that some headers
> are incorrect, but we don't know which.
>
> Any help is much appreciated!
>
> Felix
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Taåestry.debug() toggles blackbird console ... newbiew quest ...

2009-10-19 Thread Toby Hobson
try Tapestry.Logging.debug("message")

2009/10/19 Gunnar Eketrapp 

> Tapestry.debug('Message');
>
> 2009/10/19 Toby Hobson 
>
> > Are you using Tapestry.Logging.debug() ?
> >
> > 2009/10/19 Gunnar Eketrapp 
> >
> > > Hi!
> > >
> > > I entered some debug loggings into some javascript code but the
> blackbird
> > > console keeps toogling each time I call Tapestry.debug().
> > >
> > > Hum ... the page is reloaded  how do I get the blackbird console to
> > > persistent across multiple pages ...
> > >
> > > Or am I stupid 
> > >
> >
>
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>


Re: Taåestry.debug() toggles blackbird console ... newbiew quest ...

2009-10-19 Thread Toby Hobson
Are you using Tapestry.Logging.debug() ?

2009/10/19 Gunnar Eketrapp 

> Hi!
>
> I entered some debug loggings into some javascript code but the blackbird
> console keeps toogling each time I call Tapestry.debug().
>
> Hum ... the page is reloaded  how do I get the blackbird console to
> persistent across multiple pages ...
>
> Or am I stupid 
>


Re: Ajax fileupload

2009-10-19 Thread Toby Hobson
I've built a component that uses aurigma's image upload tool. It works
pretty nicely but it's specifically for bulk image uploads not general file
uploading. Having said that it's easy enough to write a tapestry wrapper
around any flash upload library, although licensing issues would probably
prevent it from being included in the T5 distribution

Toby

2009/10/19 Harald Geritzer 

>
> interesting question...has anybody been successful including/using some
> flash upload component with tapestry 5?
>
> Toby Hobson schrieb:
>
>> Tapestry's file upload component is not ajax based. Actually GMAIL's file
>> upload uses flash, not ajax because ajax does not work with multipart form
>> data
>>
>> Toby
>>
>> 2009/10/18 Argo Vilberg 
>>
>>  hi
>>> Is in tapestry such component like GMAIL fileupload. Choose file and
>>> after
>>> that, uploading started automatically?
>>>
>>>
>>> Argo
>>>
>>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Ajax fileupload

2009-10-18 Thread Toby Hobson
Tapestry's file upload component is not ajax based. Actually GMAIL's file
upload uses flash, not ajax because ajax does not work with multipart form
data

Toby

2009/10/18 Argo Vilberg 

> hi
> Is in tapestry such component like GMAIL fileupload. Choose file and after
> that, uploading started automatically?
>
>
> Argo
>


Re: t5: calling action link from a javascript

2009-10-12 Thread Toby Hobson
You may get away with using an expansion as explained here:
http://wiki.apache.org/tapestry/Tapestry5HowToIncludeJavaScript but I think
RenderSupport is still the better option

2009/10/12 Toby Hobson 

> You can't really rely on Tapestry expansions inside JS code ... it's best
> to use the RenderSupport to pass data to the Javascript. You may find this
> wiki post helpful:
> http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained
>
>
> 2009/10/12 Angelo Chen 
>
>>
>> Hi Toby,
>>
>> It got called in the firefox but not in safari, here is what I do:
>>
>> in the .tml file:
>>  < script type="text/javascript">
>>
>>function updateItem() {
>>return "${updateItem}";
>>}
>>
>>
>> in the .js file:
>>
>> jQuery.post(updateItem(), { item_no : ino  }, function(data){
>>  alert("Data Loaded: " + data.status), "json";
>>});
>>
>>
>>
>> Toby Hobson-3 wrote:
>> >
>> > Are you sure you're javascript is using the correct url? I don't know
>> what
>> > your updateItem() JS function does, but generally you need to construct
>> > the
>> > actionlink url (as you have done) then pass this to the javascript using
>> > RenderSupport's addScript() method
>> >
>> > Toby
>> >
>> > 2009/10/12 Angelo Chen 
>> >
>> >>
>> >> Hi,
>> >>
>> >> I'm trying to call an actionlink from a javascript, but i'm getting:
>> >>
>> >> Remote server closed the connection before sending response header
>> >>
>> >> and I never see the pop up dialog in the javascript,
>> >>
>> >> any idea how to avoid errors like this? Thanks.
>> >>
>> >> A.C.
>> >>
>> >> sample code:
>> >>
>> >> in java:
>> >>
>> >> public String getUpdateItem() {
>> >>return resources.createActionLink("updateItem", false).toURI()
>> >> }
>> >>
>> >>
>> >> Object onUpdateItem() {
>> >>   return new TextStreamResponse("text/html", "ok");
>> >> }
>> >>
>> >> in javascript:
>> >>
>> >> jQuery.post(updateItem(), { item_no : ino  }, function(data){
>> >>   alert("Data Loaded: " + data);
>> >>  });
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.html
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> >> For additional commands, e-mail: users-h...@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849812.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Re: t5: calling action link from a javascript

2009-10-12 Thread Toby Hobson
You can't really rely on Tapestry expansions inside JS code ... it's best to
use the RenderSupport to pass data to the Javascript. You may find this wiki
post helpful:
http://wiki.apache.org/tapestry/Tapestry5AndJavaScriptExplained

2009/10/12 Angelo Chen 

>
> Hi Toby,
>
> It got called in the firefox but not in safari, here is what I do:
>
> in the .tml file:
>  < script type="text/javascript">
>
>function updateItem() {
>return "${updateItem}";
>}
>
>
> in the .js file:
>
> jQuery.post(updateItem(), { item_no : ino  }, function(data){
>  alert("Data Loaded: " + data.status), "json";
>});
>
>
>
> Toby Hobson-3 wrote:
> >
> > Are you sure you're javascript is using the correct url? I don't know
> what
> > your updateItem() JS function does, but generally you need to construct
> > the
> > actionlink url (as you have done) then pass this to the javascript using
> > RenderSupport's addScript() method
> >
> > Toby
> >
> > 2009/10/12 Angelo Chen 
> >
> >>
> >> Hi,
> >>
> >> I'm trying to call an actionlink from a javascript, but i'm getting:
> >>
> >> Remote server closed the connection before sending response header
> >>
> >> and I never see the pop up dialog in the javascript,
> >>
> >> any idea how to avoid errors like this? Thanks.
> >>
> >> A.C.
> >>
> >> sample code:
> >>
> >> in java:
> >>
> >> public String getUpdateItem() {
> >>return resources.createActionLink("updateItem", false).toURI()
> >> }
> >>
> >>
> >> Object onUpdateItem() {
> >>   return new TextStreamResponse("text/html", "ok");
> >> }
> >>
> >> in javascript:
> >>
> >> jQuery.post(updateItem(), { item_no : ino  }, function(data){
> >>   alert("Data Loaded: " + data);
> >>  });
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849812.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: jumploader integration help

2009-10-11 Thread Toby Hobson
There's also an excellent commercial tool called Aurigma image uploader (
http://www.aurigma.com ) that I've used with Tapestry in the past. I've
actually wrapped this as a T5 component so if you consider using it let me
know and I'll send you the code

Toby

2009/10/12 Daniel Jones 

>
> I should add that if you search for 'swfupload' in the mailing list there
> are
> some threads that might be useful.
>
> Daniel
>
>
> blueboy6 wrote:
> >
> > Hi all,
> >
> > I have some big questions for today, i found this java applet
> > http://jumploader.com/index.html http://jumploader.com/index.html  that
> is
> > made for uploading multiple photos.
> >
> > Did anyone had any experience with it, and can you share how to integrate
> > it in tapestry.
> >
> > PS it uses multipart
> >
>
> --
> View this message in context:
> http://www.nabble.com/jumploader-integration-help-tp25848774p25849220.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: t5: calling action link from a javascript

2009-10-11 Thread Toby Hobson
Are you sure you're javascript is using the correct url? I don't know what
your updateItem() JS function does, but generally you need to construct the
actionlink url (as you have done) then pass this to the javascript using
RenderSupport's addScript() method

Toby

2009/10/12 Angelo Chen 

>
> Hi,
>
> I'm trying to call an actionlink from a javascript, but i'm getting:
>
> Remote server closed the connection before sending response header
>
> and I never see the pop up dialog in the javascript,
>
> any idea how to avoid errors like this? Thanks.
>
> A.C.
>
> sample code:
>
> in java:
>
> public String getUpdateItem() {
>return resources.createActionLink("updateItem", false).toURI()
> }
>
>
> Object onUpdateItem() {
>   return new TextStreamResponse("text/html", "ok");
> }
>
> in javascript:
>
> jQuery.post(updateItem(), { item_no : ino  }, function(data){
>   alert("Data Loaded: " + data);
>  });
> --
> View this message in context:
> http://www.nabble.com/t5%3A-calling-action-link-from-a-javascript-tp25849523p25849523.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Hi from a simple tapestry user!

2009-10-08 Thread Toby Hobson
I'm trying Wicket at the moment. I've used Tapestry 4 and 5 for some years,
along with struts, jsf, spring mvc ... all the usual suspects. I won't get
into the "which is better" argument but I will say that the guys on the
Tapestry mailing list are incredibly helpful. For me this trumps everything
else.

Toby

2009/10/8 Howard Lewis Ship 

> You'll get a richer response from the Tapestry user's mailing list.
>
> Many things are easier in Tapestry, some things are easier in Wicket.
>
> On the whole, the Tapestry code you write will be shorter. You will
> not be extending base classes. Unit testing is easier.  Integration
> testing is the same (using Selenium or a similar tool).
>
> Live class reloading trumps virtually all other considerations. Try
> it, you can't go back.
>
> I don't even know what to make of item #3.
>
> Any framework is going to require some learning and adjustment. In
> wicket, you need to make decisions about: What class to I extend from?
> What methods to I override? If I override, do I call the base class
> method? If I do, first or last or in the middle? Etc. Etc. Etc.
>
> My basic problem with Wicket & GWT is that they want you to code a UI
> in Java using mechanisms derived from Swing ... one of the most
> complicated and least succesful UI toolkits out there (yes it's
> powerful, no nobody really uses it, they created a new dynamic
> language, JavaFx, just to make it palatable).
>
> Tapestry allows your Java code to be structured and used more like a
> dynamic programming language. Where you have to identify types,
> Tapestry uses a carrot-and-stick approach (you need to define the
> type, but it makes it worth your while with smart defaults). It's also
> very smart about converting types for you (i.e., you have an int, it
> wants a long, no problem).
>
>
> On Wed, Oct 7, 2009 at 6:46 AM, Matias Blasi 
> wrote:
> > Hello Howard!
> >
> > I finally encourage me to write you...
> >
> > Introducing me
> >
> > I am Matías Blasi, from Buenos Aires, Argentina. I have developed in
> > tapestry 4 for 2 years in my last job, and now I am developing in
> tapestry 5
> > in my current job, and the most important thing I am trying now, is to
> set
> > Tapestry as our main web framework to write java applications. I am
> working
> > at Business Vision, and we build solutions for several clients.
> >
> > I would like to interchange with you, some comments, and surely, improve
> my
> > knowledge
> >
> > We have a big discussion here, a sector of the company is trying to push
> > Wicket, their force is based on the 'pure java object oriented model' in
> > terms of web applications building. With all pros you could imagine
> related
> > to that.
> > I am more interested on productivity, scalability, robust and
> full-featured
> > based frameworks, they are my arguments to propose Tapestry5.
> >
> > I have problems trying to defend the following arguments:
> >
> > 1 - "The real object oriented model of wicket allows you to exploit all
> the
> > java architecture features"
> >
> > 2 - Talking about the bindings expressions they complains about the
> > difficulty of doing refactoring, specially in terms of changing some
> binding
> > expression; so they say that it is more complex to implement scrum...
> >
> > Here I think the class and template reloading help you a lot.
> >
> > 3 - Another example they argue, is the impossibility of building
> components
> > with a polimorphycal behavior in terms of render-phase event's
> handlers
> > they say that tapestry IS NOT object oriented about that!
> >
> > I am convinced about although you cant do that in tapestry by that way,
> you
> > have mechanisms to resolve all you need following another approach with
> no
> > loss of elegance...
> >
> > 4 - They reply that you have too much to learn and remember...
> mechanisms,
> > contributions, conventions...
> >
> > It could be right, but I see all very consistent, easy to learn, and very
> > powerful... perhaps the size of all the tapestry framework, and the great
> > quantity of features scare them...
> >
> > Finally, all the tapestry features are consistent, and well thought
> > solutions for typical web application problems, which should be
> implemented
> > in wicket by hand if we use it.
> >
> >
> > I would like, if it is possible, to know your opinion.
> >
> >
> > Thanks in advance,
> > Matias.
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Problems using upload inside an ajax zone

2009-10-06 Thread Toby Hobson
One option is to use a hidden iframe, not technically ajax but it achieves
the same result

2009/10/6 Pete Poulos 

> Ok, so if what you are saying is correct, then unless I want to use
> yet another technology on this project (which i don't) I will have to
> forget using ajax and reload the whole page?
>
> Can does anyone else have a work around on the problem?  Can anyone
> shed some light on what's going on?
>
> Thanks,
> Pete Poulos
>
> On Mon, Oct 5, 2009 at 8:35 PM, Toby Hobson 
> wrote:
> > Its about 12 months since I used Tapestry but if I remember correctly
> file
> > uploads and ajax don't play well together ... it's not specific to T5,
> ajax
> > and multipart forms just don't work together. If I remember correctly I
> used
> > a flash based solution to handle ajax style file uploads ... I'll dig
> > through some of my old code and report back
> >
> > Toby
> >
> > 2009/10/6 Pete Poulos 
> >
> >> I'm trying to create an ImageUpload component using tapestry-upload.
> >> Once the user selects a file and submits the form, I want to replace
> >> that form with the image itself.  However, I have found an issue where
> >> the form starts behaving differently when I place the tapestry-upload
> >> field inside the form.
> >>
> >> In the code below, when the upload component is NOT present, the
> >> onSuccess() method/event is called when the user presses the submit
> >> button.  However, when the upload component is added to the form, the
> >> form no longer generates the onSuccess() method/event but begins
> >> generating the onSubmit() method/event (which it wasn't previously
> >> doing).
> >>
> >> If you remove the zone parameter from the form, it works as expected
> >> (the form generates onSuccess() while the upload component is
> >> present).
> >>
> >> I am at a complete loss as to what is going on.  Am I doing something
> >> wrong, or is this a bug of some sort?
> >>
> >> Here is some sample code to reproduce the problem.
> >>
> >> Thanks,
> >> Pete Poulos
> >>
> >> .tml file
> >> 
> >>
> >>  >> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> >> xmlns:p="tapestry:parameter">
> >> 
> >>   
> >>
> >>   
> >>   
> >>
> >>   
> >> 
> >> 
> >>
> >>
> >> Java File
> >> ---
> >>
> >> public class ImageUpload {
> >>
> >>   @Property
> >>   private UploadedFile file;
> >>
> >> }
> >>
> >>   public void onSubmit() {
> >>  System.out.println( "SUBMIT" );
> >>   }
> >>
> >>   public Object onSuccess() {
> >>   System.out.println( "SUCCESS" );
> >>   return this;
> >>   }
> >> }
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> >> For additional commands, e-mail: users-h...@tapestry.apache.org
> >>
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 / Creating a form insides a loop ...

2009-10-06 Thread Toby Hobson
Hi Gunnar

Maybe you could give us a higher level explanation of what you are trying to
achieve i.e. what is the business logic driving this? In my experience when
migrating from a technology like struts or servlets to tapestry it's best to
rethink your whole strategy, instead of thinking in terms of "i did this in
a servlet, how do I do it in tapestry"

Toby

2009/10/6 Gunnar Eketrapp 

> Hi!
>
> Ok the ${} was a typo ... I havent tested the page yeat you know!
>
> My problem is that each form pass a context (in three hidden fields) back
> to
> the server and how is this best done!
>
> But I just saw that I could pass a t:context attribute to my form so I will
> try that solution.
>
> E.g I will now try something like ...
>
> 
> 
>
>
> Base percentage:  name="payoutPercentage" value="0.40" />
> class="nicebutton"/>
>
>
>
> ..
>
>
>
>
> 2009/10/6 Thiago H. de Paula Figueiredo 
>
> > Em Tue, 06 Oct 2009 11:51:17 -0300, Gunnar Eketrapp <
> > gunnar.eketr...@gmail.com> escreveu:
> >
> >  Hi !
> >>
> >
> > Hi!
> >
> >  The problem is that I would like  to take one property as the
> >> inparameter and another as the out parameter.
> >>
> >
> > Why?
> >
> >  
> >>
> >
> > Never use ${} as a component parameter. Never!
> >
> > --
> > Thiago H. de Paula Figueiredo
> > Independent Java consultant, developer, and instructor
> > http://www.arsmachina.com.br/thiago
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
>
> --
> [Hem: 08-715 59 57, Mobil: 0708-52 62 90]
> Allévägen 2A, 132 42 Saltsjö-Boo
>


Re: T5 clientIds for elements in a block/zone

2009-10-06 Thread Toby Hobson
typo ... should have been $$('.billing') ... i need some new glasses!

2009/10/6 Toby Hobson 

> I can confirm that both Thiago's and Christophe's approaches work. In the
> end I used Thiago's suggestion because although I gave the example of
> needing to copy one text field, in fact I needed to do this for 10 fields so
> passing 20 clientIds to a javascript function/constructor was less than
> ideal. Thiago's suggestion worked especially well because I could do
> something like
>
> 
> 
> ...
> 
> 
>
> function copyDetails() {
>   var techFields = $(('.tech');
>   var billingFields = $(('.billing');
>   for (var i = 0; i < techFields.length; i++) {
> // check field type
> ...
> // if field is textfield
> billingFields[i].value = techFields[i].value;
>   }
> }
>
> Thanks to Thiago and Christophe!
>
> Toby
>
> 2009/10/6 cordenier christophe 
>
>> Thanks Thiago, never thought about this approach.
>>
>> Even if class is not unique, we would be able to find my elements like
>> this
>> too.
>>
>
>


Re: T5 clientIds for elements in a block/zone

2009-10-06 Thread Toby Hobson
I can confirm that both Thiago's and Christophe's approaches work. In the
end I used Thiago's suggestion because although I gave the example of
needing to copy one text field, in fact I needed to do this for 10 fields so
passing 20 clientIds to a javascript function/constructor was less than
ideal. Thiago's suggestion worked especially well because I could do
something like



...



function copyDetails() {
  var techFields = $(('.tech');
  var billingFields = $(('.billing');
  for (var i = 0; i < techFields.length; i++) {
// check field type
...
// if field is textfield
billingFields[i].value = techFields[i].value;
  }
}

Thanks to Thiago and Christophe!

Toby

2009/10/6 cordenier christophe 

> Thanks Thiago, never thought about this approach.
>
> Even if class is not unique, we would be able to find my elements like this
> too.
>


Re: Problems using upload inside an ajax zone

2009-10-05 Thread Toby Hobson
Its about 12 months since I used Tapestry but if I remember correctly file
uploads and ajax don't play well together ... it's not specific to T5, ajax
and multipart forms just don't work together. If I remember correctly I used
a flash based solution to handle ajax style file uploads ... I'll dig
through some of my old code and report back

Toby

2009/10/6 Pete Poulos 

> I'm trying to create an ImageUpload component using tapestry-upload.
> Once the user selects a file and submits the form, I want to replace
> that form with the image itself.  However, I have found an issue where
> the form starts behaving differently when I place the tapestry-upload
> field inside the form.
>
> In the code below, when the upload component is NOT present, the
> onSuccess() method/event is called when the user presses the submit
> button.  However, when the upload component is added to the form, the
> form no longer generates the onSuccess() method/event but begins
> generating the onSubmit() method/event (which it wasn't previously
> doing).
>
> If you remove the zone parameter from the form, it works as expected
> (the form generates onSuccess() while the upload component is
> present).
>
> I am at a complete loss as to what is going on.  Am I doing something
> wrong, or is this a bug of some sort?
>
> Here is some sample code to reproduce the problem.
>
> Thanks,
> Pete Poulos
>
> .tml file
> 
>
>  xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
> xmlns:p="tapestry:parameter">
> 
>   
>
>   
>   
>
>   
> 
> 
>
>
> Java File
> ---
>
> public class ImageUpload {
>
>   @Property
>   private UploadedFile file;
>
> }
>
>   public void onSubmit() {
>  System.out.println( "SUBMIT" );
>   }
>
>   public Object onSuccess() {
>   System.out.println( "SUCCESS" );
>   return this;
>   }
> }
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Well done Thiago ... a good example of thinking "outside the box" :-)

Thanks!

2009/10/5 Thiago H. de Paula Figueiredo 

> Em Mon, 05 Oct 2009 19:38:59 -0300, Toby Hobson <
> toby.hob...@googlemail.com> escreveu:
>
>  Hi Thiago
>>
>
> Hi!
>
>  I tried that but unfortunately T5 is appending a random string at the end
>> of the id e.g.
>>
>> According to firebug the html generated is > name="techFirstName" id="techFirstName-12426d8b4d6"/>
>>
>
> You can use the class attribute instead then use Prototype (or jQuery) to
> get the elements.
>
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Hi Thiago

I tried that but unfortunately T5 is appending a random string at the end of
the id e.g.

@Component(id="techFirstName", paramaters={"value=order.techFirstName",
"clientId=techFirstName"}
private TextField techFirstName;



According to firebug the html generated is 

It's strange because there is no other element with a clientId of
techFirstName so I don't understand why Tapestry is appending the random
string

Toby

2009/10/5 Thiago H. de Paula Figueiredo 

> Em Mon, 05 Oct 2009 09:56:07 -0300, Toby Hobson <
> toby.hob...@googlemail.com> escreveu:
>
>  Hello Everyone
>>
>
> Hi!
>
>  Does anyone know what is the best way to get a clientId for an element
>> which is rendered via Ajax?
>>
>
> In this case, provide the ids yourself.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Thanks again ... I'll try that approach

2009/10/5 cordenier christophe 

> Hi
> As you have clearlay said id, the problem is to generate javascript
> initialization code once everything is rendered. I think that the
> AfterRender of the main page is not called in an Zone refresh. Only the
> block is rendered.
>
> Replacing the block by a 'component' will allow you to implement such a
> method.
>
> Christophe.
>
>
> 2009/10/5 Toby Hobson 
>
> > Sorry to clarify ...
> >
> > "I guess the problem is that the textField is nested in a block which is
> > rendered using AJAX so although the page has completed it's rendering the
> > textField has not yet being rendered therefore it doesn't have a
> clientId?"
> >
> > 2009/10/5 Toby Hobson 
> >
> > > Hi Christophe
> > >
> > > Unfortunately this doesn't seem to work, although maybe I have missed
> > > something. For example
> > >
> > > @Component
> > > private TextField techFirstName;
> > >
> > > void afterRender() {
> > >   logger.debug("techFirstName clientId: " +
> techFirstName.getClientId());
> > > }
> > >
> > > [DEBUG] pages.Order techFirstName clientId: null
> > >
> > > I guess the problem is that the textField is nested in a block which is
> > > rendered using javascript so although the page has completed it's
> > rendering
> > > the textField has not yet being rendered therefore it doesn't have a
> > > clientId?
> > >
> > > Toby
> > >
> > > 2009/10/5 cordenier christophe 
> > >
> > > Hello
> > >>
> > >> You'd better use a RenderSupport and @AfterRender to create a
> javascript
> > >> method call that will link your checkbox with the copyDetails()
> method.
> > >>
> > >> Something like this, i guess :
> > >>
> > >> In a separate JS file injected via @IncludeJavascript
> > >>
> > >> copyDetails : function(techFirstId) {
> > >> 
> > >> }
> > >>
> > >> linkDetails: function(checkBoxId){
> > >>   $(checkBoxId).observer('click', ...);
> > >> }
> > >>
> > >> And your page
> > >>
> > >> @Inject
> > >> private RenderSupport renderSupport;
> > >>
> > >> @InjectComponent
> > >> private TextField techFirstName;
> > >>
> > >> @AfterRender
> > >> private void linkDetails(){
> > >>   renderSupport.addScript('linkDetails(%s);'
> > techFirstName.getClientId());
> > >> }
> > >>
> > >> Regards.
> > >>
> > >
> > >
> >
>


Re: T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Sorry to clarify ...

"I guess the problem is that the textField is nested in a block which is
rendered using AJAX so although the page has completed it's rendering the
textField has not yet being rendered therefore it doesn't have a clientId?"

2009/10/5 Toby Hobson 

> Hi Christophe
>
> Unfortunately this doesn't seem to work, although maybe I have missed
> something. For example
>
> @Component
> private TextField techFirstName;
>
> void afterRender() {
>   logger.debug("techFirstName clientId: " + techFirstName.getClientId());
> }
>
> [DEBUG] pages.Order techFirstName clientId: null
>
> I guess the problem is that the textField is nested in a block which is
> rendered using javascript so although the page has completed it's rendering
> the textField has not yet being rendered therefore it doesn't have a
> clientId?
>
> Toby
>
> 2009/10/5 cordenier christophe 
>
> Hello
>>
>> You'd better use a RenderSupport and @AfterRender to create a javascript
>> method call that will link your checkbox with the copyDetails() method.
>>
>> Something like this, i guess :
>>
>> In a separate JS file injected via @IncludeJavascript
>>
>> copyDetails : function(techFirstId) {
>> 
>> }
>>
>> linkDetails: function(checkBoxId){
>>   $(checkBoxId).observer('click', ...);
>> }
>>
>> And your page
>>
>> @Inject
>> private RenderSupport renderSupport;
>>
>> @InjectComponent
>> private TextField techFirstName;
>>
>> @AfterRender
>> private void linkDetails(){
>>   renderSupport.addScript('linkDetails(%s);' techFirstName.getClientId());
>> }
>>
>> Regards.
>>
>
>


Re: T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Hi Christophe

Unfortunately this doesn't seem to work, although maybe I have missed
something. For example

@Component
private TextField techFirstName;

void afterRender() {
  logger.debug("techFirstName clientId: " + techFirstName.getClientId());
}

[DEBUG] pages.Order techFirstName clientId: null

I guess the problem is that the textField is nested in a block which is
rendered using javascript so although the page has completed it's rendering
the textField has not yet being rendered therefore it doesn't have a
clientId?

Toby

2009/10/5 cordenier christophe 

> Hello
>
> You'd better use a RenderSupport and @AfterRender to create a javascript
> method call that will link your checkbox with the copyDetails() method.
>
> Something like this, i guess :
>
> In a separate JS file injected via @IncludeJavascript
>
> copyDetails : function(techFirstId) {
> 
> }
>
> linkDetails: function(checkBoxId){
>   $(checkBoxId).observer('click', ...);
> }
>
> And your page
>
> @Inject
> private RenderSupport renderSupport;
>
> @InjectComponent
> private TextField techFirstName;
>
> @AfterRender
> private void linkDetails(){
>   renderSupport.addScript('linkDetails(%s);' techFirstName.getClientId());
> }
>
> Regards.
>


T5 clientIds for elements in a block/zone

2009-10-05 Thread Toby Hobson
Hello Everyone

It's about 12 months since I used Tapestry but its good to be back :-) I'm
currently writing an Ajax based order form for a client but I've hit a
little problem. Basically I have a series of blocks which are used to
represent 'pages' in the order form i.e. I have a block for product
selection one for shipping address etc. As the user moves through the
checkout process the different blocks are rendered inside a zone:

Order.java:

@Component(parameters={"value=order.techFirstName"})
@Property
private TextField techFirstName;

@Component(parameters={"value=order.billingFirstName"})
@Property
private TextField bilingFirstName;

@Inject
private Block productSelection;
@Inject
private Block userDetails;

Object onSuccess() {
 ...
return new MultiZoneUpdate("orderForm", userDetails);
}

Order.tml:


  



 


...



This is all working nicely but I now need to get the clientId of the
techFirstName element which in rendered inside the userDetails block. I'm
looking to perform a client side copy of the techFirstName element to
another form element within the block. My question is where do I put the
call to ${techFirstName.clientId} ? If I create a javascript function
outside the block getClientId returns null because the block hasn't yet been
rendered. If I put the javascript function inside the block it doesn't get
called. i.e. this doesn't work:


  





  function copyDetails() {
var techFirstNameElementId = '${techFirstName.clientId}';
   ...
 }

  


when i check the box i get an error because copyDetails() isn't defined

Does anyone know what is the best way to get a clientId for an element which
is rendered via Ajax?

Many Thanks

Toby


Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Toby Hobson
ok try



i.e. remove the leading /

Toby

2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>

> I've put
> configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, "true");
>
> and I have tags like
> 
> Release RES Session
>
> and what is rendering:
>
> 
>  shape="rect">Release RES Session
>
>
> So on the payment system they are rendering the html page exactly as above
> .. resulting in broken links and assets are not loading.
>
>
> On Tue, Nov 25, 2008 at 6:17 PM, Toby Hobson <[EMAIL PROTECTED]
> >wrote:
>
> > That's a little strange .. can you send an example of the urls T5 is
> > generating?
> >
> >
> > 2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>
> >
> > > Thanks, I already tried that. However this seems to be ignored and all
> > the
> > > assets are inserted with relative URIs.
> > >
> > > Any other options?
> > >
> > > On Tue, Nov 25, 2008 at 6:10 PM, Toby Hobson <
> [EMAIL PROTECTED]
> > > >wrote:
> > >
> > > > In your AppModule.java you need to tell T5 to use absolute uris e.g.
> > > >
> > > > public static void
> > > > contributeApplicationDefaults(MappedConfiguration > > > String> configuration)
> > > > {
> > > >...
> > > >configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, "true");
> > > > }
> > > >
> > > > Toby
> > > >
> > > > 2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>
> > > >
> > > > > Hi!
> > > > > I have a T5 webapp that has to provide a template page for a
> payment
> > > > > system,
> > > > > a page that contains assets like images, css, js files in the
> layout
> > > > > component. The template page is just a plain T5 page with a
> > placeholder
> > > > > like
> > > > > $inject_here$.
> > > > > The payment system (another website) is taking the template
> directly
> > > from
> > > > > my
> > > > > web application and than has to inject the payment options into the
> > > > > placeholder, resulting the payment page.
> > > > > All is working ok except the assets. They remain relative to the
> > > original
> > > > > webapp so they can't be found on the payment system.
> > > > >
> > > > > This should be fixed if the assets and links would have an absolute
> > > URLs.
> > > > > I've tried to set the tapestry.force-absolute-uris parameter to
> true
> > > but
> > > > > seems it doesn't have any effect.
> > > > >
> > > > > Also I've tried to place a  tag in the  with the webapp
> > > page
> > > > > location. No luck: with this only the images are showing. Css and
> Js
> > > > files
> > > > > are ignored.
> > > > >
> > > > > There is a possibility to force Tapestry to generate absolute paths
> > for
> > > > > assets? Can be done just for specific pages?
> > > > >
> > > > > Thanks so much,
> > > > >
> > > > > --Ovidiu
> > > > >
> > > >
> > >
> >
>


Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Toby Hobson
That's a little strange .. can you send an example of the urls T5 is
generating?


2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>

> Thanks, I already tried that. However this seems to be ignored and all the
> assets are inserted with relative URIs.
>
> Any other options?
>
> On Tue, Nov 25, 2008 at 6:10 PM, Toby Hobson <[EMAIL PROTECTED]
> >wrote:
>
> > In your AppModule.java you need to tell T5 to use absolute uris e.g.
> >
> > public static void
> > contributeApplicationDefaults(MappedConfiguration > String> configuration)
> > {
> >...
> >configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, "true");
> > }
> >
> > Toby
> >
> > 2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>
> >
> > > Hi!
> > > I have a T5 webapp that has to provide a template page for a payment
> > > system,
> > > a page that contains assets like images, css, js files in the layout
> > > component. The template page is just a plain T5 page with a placeholder
> > > like
> > > $inject_here$.
> > > The payment system (another website) is taking the template directly
> from
> > > my
> > > web application and than has to inject the payment options into the
> > > placeholder, resulting the payment page.
> > > All is working ok except the assets. They remain relative to the
> original
> > > webapp so they can't be found on the payment system.
> > >
> > > This should be fixed if the assets and links would have an absolute
> URLs.
> > > I've tried to set the tapestry.force-absolute-uris parameter to true
> but
> > > seems it doesn't have any effect.
> > >
> > > Also I've tried to place a  tag in the  with the webapp
> page
> > > location. No luck: with this only the images are showing. Css and Js
> > files
> > > are ignored.
> > >
> > > There is a possibility to force Tapestry to generate absolute paths for
> > > assets? Can be done just for specific pages?
> > >
> > > Thanks so much,
> > >
> > > --Ovidiu
> > >
> >
>


Re: [T5] - How to generate pages with absolute URIs?

2008-11-25 Thread Toby Hobson
In your AppModule.java you need to tell T5 to use absolute uris e.g.

public static void contributeApplicationDefaults(MappedConfiguration configuration)
{
...
configuration.add(SymbolConstants.FORCE_ABSOLUTE_URIS, "true");
}

Toby

2008/11/25 Ovidiu Hurducas <[EMAIL PROTECTED]>

> Hi!
> I have a T5 webapp that has to provide a template page for a payment
> system,
> a page that contains assets like images, css, js files in the layout
> component. The template page is just a plain T5 page with a placeholder
> like
> $inject_here$.
> The payment system (another website) is taking the template directly from
> my
> web application and than has to inject the payment options into the
> placeholder, resulting the payment page.
> All is working ok except the assets. They remain relative to the original
> webapp so they can't be found on the payment system.
>
> This should be fixed if the assets and links would have an absolute URLs.
> I've tried to set the tapestry.force-absolute-uris parameter to true but
> seems it doesn't have any effect.
>
> Also I've tried to place a  tag in the  with the webapp page
> location. No luck: with this only the images are showing. Css and Js files
> are ignored.
>
> There is a possibility to force Tapestry to generate absolute paths for
> assets? Can be done just for specific pages?
>
> Thanks so much,
>
> --Ovidiu
>


Re: How to use Tapestry with Flash components?

2008-11-17 Thread Toby Hobson
As Thiago mentioned, tapestry-flash is unrelated to adobe flash, it relates
to a client persistence strategy - rails style "flash" persistence

Toby

2008/11/17 Gutemberg A. Da Silva <[EMAIL PROTECTED]>

> Hi,
>   I saw your tutorial about Tapestry/Adobe Flash. But I've still some
> doubts.
>   One of them is like to use the declaration of dependecies.
> For example:
>   
>  com.javaforge.*tapestry*
>  *tapestry*-*flash*
>   
>
>Is it just necessary this declaration?
>
> Thanks for attention.
>
> 2008/11/17 Toby Hobson <[EMAIL PROTECTED]>
>
> > I have developed several T5/Adobe Flash apps and as Peter mentions I
> wrote
> > a
> > couple of documents about it. I would be happy to answer any questions
> you
> > may have
> >
> > Toby
> >
> > 2008/11/17 Peter Stavrinides <[EMAIL PROTECTED]>
> >
> > > If you are interested there are two good articles on flash integration
> > with
> > > Tapestry here:
> > >
> > >
> > >
> >
> http://knol.google.com/k/knol/system/knol/pages/Search?q=+intitle%3A%22tapestry+5+flash+integration%22+inauthor%3A%22toby+hobson%22&restrict=general
> > >
> > >
> > > cheers,
> > > Peter
> > > - Original Message -
> > > From: "Thiago H. de Paula Figueiredo" <[EMAIL PROTECTED]>
> > > To: "Tapestry users" 
> > > Sent: Monday, 17 November, 2008 5:21:44 PM GMT +02:00 Athens, Beirut,
> > > Bucharest, Istanbul
> > > Subject: Re: How to use Tapestry with Flash components?
> > >
> > > Em Mon, 17 Nov 2008 10:48:32 -0300, Gutemberg A. Da Silva
> > > <[EMAIL PROTECTED]> escreveu:
> > >
> > > > I'd like to know how to use Tapestry framework with Flash components
> to
> > a
> > > > multimedia application.And what dependecies to use.
> > >
> > > Tapestry-flash isn't related to Adobe Flash. It is a field persistence
> > > strategy that removes its value from the session after it is read. It
> is
> > > meant to be used with redirect-after-post.
> > >
> > > --
> > > Thiago H. de Paula Figueiredo
> > > Independent Java consultant, developer, and instructor
> > > http://www.arsmachina.com.br/thiago
> > >
> > > -
> > > 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]
> > >
> > >
> >
>
>
>
> --
> Gutemberg A. Da Silva
>


Re: How to use Tapestry with Flash components?

2008-11-17 Thread Toby Hobson
I have developed several T5/Adobe Flash apps and as Peter mentions I wrote a
couple of documents about it. I would be happy to answer any questions you
may have

Toby

2008/11/17 Peter Stavrinides <[EMAIL PROTECTED]>

> If you are interested there are two good articles on flash integration with
> Tapestry here:
>
>
> http://knol.google.com/k/knol/system/knol/pages/Search?q=+intitle%3A%22tapestry+5+flash+integration%22+inauthor%3A%22toby+hobson%22&restrict=general
>
>
> cheers,
> Peter
> - Original Message -
> From: "Thiago H. de Paula Figueiredo" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Monday, 17 November, 2008 5:21:44 PM GMT +02:00 Athens, Beirut,
> Bucharest, Istanbul
> Subject: Re: How to use Tapestry with Flash components?
>
> Em Mon, 17 Nov 2008 10:48:32 -0300, Gutemberg A. Da Silva
> <[EMAIL PROTECTED]> escreveu:
>
> > I'd like to know how to use Tapestry framework with Flash components to a
> > multimedia application.And what dependecies to use.
>
> Tapestry-flash isn't related to Adobe Flash. It is a field persistence
> strategy that removes its value from the session after it is read. It is
> meant to be used with redirect-after-post.
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> http://www.arsmachina.com.br/thiago
>
> -
> 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: Javascript frameworks

2008-10-30 Thread Toby Hobson
I agree that it would be nice to be able to swap out the JS implementation
because I am not a great fan of Prototype. Personally I would go with YUI or
GWT. However I believe Prototype is pretty much ingrained into T5 :(

Just my 2c worth!

Toby

2008/10/30 Onno Scheffers <[EMAIL PROTECTED]>

> I just stumbled upon this link that lets you test the performance of
> selectors in different Javascript libraries:
>
> http://jamesdonaghue.com/static/peppy/profile/slickspeed/
>
> Prototype doesn't look very good from that tests and that's pretty much in
> line with my own feeling after having used JQuery for a while before being
> introduced to Prototype through Tapestry 5. This made me wonder if it would
> be possible to write a plugin for Tapestry that overrides the default
> Javascript library or wether Prototype is hardwired into the Tapestry
> internals?
>
> I haven't researched it in any way yet, but I'm aware that some mixins,
> client side validation and maybe even some core components would stop
> working since they depend on Prototype. Is there anything else that depends
> on it? Anything that cannot be overridden in a plugin?
> Could the client-side behaviors be abstracted away so that multiple
> implementations can be used?
>
> Just wondering if this would be possible and what it would entail, since
> tapestry 5 already allows so many other things to be configured, overridden
> or replaced.
>
>
> regards,
>
> Onno
>


Re: T5 force_relative_uris?

2008-10-29 Thread Toby Hobson
Yeah I tried that but the problem is that it's still generating urls that
dont contain the hostname i.e. assuming I have mapped my app to the root
context a pagelink renders as:

move to test page

Whereas I need it to be in the format  or http://www.server.com/test";>

Toby

2008/10/29 Thiago H. de Paula Figueiredo <[EMAIL PROTECTED]>

> Em Wed, 29 Oct 2008 18:21:04 -0300, Toby Hobson <
> [EMAIL PROTECTED]> escreveu:
>
>  I have an unusual requirement - I am developing a facebook application and
>> I would like to use Tapestry however I have hit a problem with the URLs T5
>> is generating. Basically I need the urls to be relative i.e. ../test or
>> absolute i.e. http://server.com/context/test, Facebook is falling over
>> when T5 generates URLs like /context/test
>>
>
> Take a look at http://tapestry.apache.org/tapestry5/guide/conf.html and
> search for "tapestry.force-absolute-uris".
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> Consultor, desenvolvedor e instrutor em Java
> http://www.arsmachina.com.br/thiago
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


T5 force_relative_uris?

2008-10-29 Thread Toby Hobson
I have an unusual requirement - I am developing a facebook application and I
would like to use Tapestry however I have hit a problem with the URLs T5 is
generating. Basically I need the urls to be relative i.e. ../test or
absolute i.e. http://server.com/context/test, Facebook is falling over when
T5 generates URLs like /context/test

Is there any way of telling Tapestry to always use relative URLs or
alternatively to tell it to include the hostname and context in the URLs?

Thanks

Toby


Grid with editable fields

2008-10-27 Thread Toby Hobson
Hi guys,

Currently I have a master-detail screen for some admin pages which uses the
grid and beaneditform components. It work nicely, however I would like to
implement a grid which can be edited in place. Specifically I have some
fields which I would like to display as drop down selection boxes so the
admin use can quickly change the properties for all the elements in the grid
without having to navigate between master-detail pages.

Has anyone implemented anything similar to this before? if so do you have
any pointers?

Thanks

Toby


Re: so much useless logging

2008-10-17 Thread Toby Hobson
I agree that this is a little annoying but it only happens when the page is
first loaded, subsequent requests will generate "cleaner" debug statements

Toby

2008/10/18 Fernando Padilla <[EMAIL PROTECTED]>

> alright, so we just upgraded from 5.0.11 to 5.0.16-SNAPSHOT, so sorry I was
> not able to complain earlier..  Please help:
>
> but tapestry is just spewing TONS of debug, that I still don't see any easy
> way to turn off.  Please help, this is just ridiculous!  First the
> contribution system is broken not allowing us to override defaults, then the
> debug is so superfluous that it's just so bad!
>
> 
> below is an example of rendering my Start page.. ONE page request. REALLY!
>  Sorry, I might be worked up, but really, wow this is just amazing me how no
> one has complained about this yet.
>
> And the issue is that we want debug turned on for OUR code (in development
> and production), NOT low level tapestry code that we trust.  But tapestry
> uses the same category as our classes, so there is NO easy way to filter
> that out using log4j.properties.  I know that people said before that we can
> setup fancy filter to match and filter out some log entries.  But these many
> log entries are just ridiculous.  And how am I supposed to filter against
> "Invoking: "  that's just such a broad filter term.  Users of tapestry
> should not be forced to jump through so many hoops!
>
>
> 
> I want:
> Tapestry MUST change the categories it logs against, so that they DO NOT
> match the pages ( tapestry.site.PAGECLASS )  or it SHOULD allow me to turn
> off all of this logging using a config setting..  Or I will have to maintain
> our own build of tapestry to fix this ourselves.. crazy.
>
>
>
>
> what do you think??  is this your pet peeve too??
>
>
>
>
>
>
> ---
> Debug output for a single rendering of my Start page:
>
> 2008-10-17 16:48:37,802 [btpool0-2] DEBUG
> com.protrade.fanwars.base.pages.Start - Dispatch event:
> ComponentEvent[activate from (self)]
> 2008-10-17 16:48:37,802 [btpool0-2] DEBUG
> com.protrade.fanwars.base.pages.Start - Invoking:
> com.protrade.fanwars.base.pages.Start.setupRender() (at Start.java:42)
> 2008-10-17 16:48:37,806 [btpool0-2] DEBUG
> com.protrade.fanwars.base.components.CanvasLayout - Invoking:
> com.protrade.fanwars.base.components.CanvasLayout.beginRender() (at
> CanvasLayout.java:19)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.unifiedsocial.tapestry.components.MakePageLinksAbsolute -
> Invoking:
> com.protrade.unifiedsocial.tapestry.components.MakePageLinksAbsolute.beginRender()
> (at MakePageLinksAbsolute.java:25)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.facebook.base.components.layout.LayoutDocFlex - Invoking:
> com.protrade.facebook.base.components.layout.LayoutDocFlex.setupRender() (at
> LayoutDocFlex.java:25)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.facebook.base.components.layout.LayoutDocFlex - Invoking:
> com.protrade.facebook.base.components.layout.LayoutDocBase.beginRender() (at
> LayoutDocBase.java:47)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.tapestry5.base.components.layout.LayoutIslandAdLeader -
> Invoking:
> com.protrade.tapestry5.base.components.layout.LayoutIslandAdLeader.beginRender(org.apache.tapestry5.MarkupWriter)
> (at LayoutIslandAdLeader.java:20)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.fanwars.base.components.ads.AdsFanwarsGamSlot - Invoking:
> com.protrade.fanwars.base.components.ads.AdsFanwarsGamSlot.setupRender() (at
> AdsFanwarsGamSlot.java:76)
> 2008-10-17 16:48:37,808 [btpool0-2] DEBUG
> com.protrade.facebook.base.components.ads.AdsGamSlotIframe - Invoking:
> com.protrade.facebook.base.components.ads.AdsGamSlotIframe.beginRender(org.apache.tapestry5.MarkupWriter)
> (at AdsGamSlotIframe.java:34)
> 2008-10-17 16:48:37,809 [btpool0-2] DEBUG
> com.protrade.facebook.base.components.ads.AdsGamSlotIframe - Invoking:
> com.protrade.facebook.base.components.ads.AdsGamSlotIframe.afterRender(org.apache.tapestry5.MarkupWriter)
> (at AdsGamSlotIframe.java:60)
> 2008-10-17 16:48:37,809 [btpool0-2] DEBUG
> com.protrade.tapestry5.base.components.layout.LayoutIslandAdLeader -
> Invoking:
> com.protrade.tapestry5.base.components.layout.LayoutIslandAdLeader.afterRender(org.apache.tapestry5.MarkupWriter)
> (at LayoutIslandAdLeader.java:30)
> 2008-10-17 16:48:37,813 [btpool0-2] DEBUG
> com.protrade.fanwars.base.components.team.TeamLogo - Invoking:
> com.protrade.fanwars.base.components.team.TeamLogo.setupRender() (at
> TeamLogo.java:56)
> 2008-10-17 16:48:37,814 [btpool0-2] DEBUG
> com.protrade.fanwars.base.components.team.TeamLogo - Invoking:
> com.protrade.fanwars.base.components.team.TeamLogo.beginRender(org.apache.tapestry5.MarkupWriter)
> (at TeamLogo.java:81)
> 2008-10-17 16:48:37,814 [btpool0-2] DEBUG
> com.protrade.fanwars.base.components.team.TeamLogo - Invoking:
> com.protrade.fanwars.base.components.team.TeamLogo.afterRender(org.apache.tapest

Re: Problem updating form using a zone

2008-10-09 Thread Toby Hobson
Thanks for clarifying that hugo ... all is working well now

2008/10/9 Hugo Palma <[EMAIL PROTECTED]>

> The event listener method has to return the component or block that you
> want to render inside the block. If the method returns nothing like your
> example than the whole contents of the zone will be empty, like you say.
>
> That's just how the zone works, it renders the returned component/block and
> places the rendered content inside the zone tag replacing the existing
> content.
>
>
> Toby Hobson wrote:
>
>> Can anyone see anything wrong with my code?
>>
>>
>>
>>> t:zone="formzone">
>>Public:
>>
>>> src="${asset:context:images/green_tick.png}" alt="yes"
>> style="vertical-align:middle;padding-left:5px" />
>>
>>
>>> src="${asset:context:images/red_cross.png}" alt="no"
>> style="vertical-align:middle;padding-left:5px" />
>>
>>
>>
>>
>>
>>void onSuccess() {
>>gallery.setPublicGallery(! gallery.isPublicGallery());
>>galleryService.update(gallery);
>>}
>>
>> Basically i display a tick if the gallery.publicGallery is true and a
>> cross
>> if it's false. Clicking on the tick/cross changes the state. This works
>> fine
>> using a conventional submit but adding the ajax stuff just gives me an
>> empty
>> div when the form is submitted
>>
>> I'm sure it's something simple i've missed
>>
>> Thanks!
>>
>>
>>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Problem updating form using a zone

2008-10-09 Thread Toby Hobson
Can anyone see anything wrong with my code?




Public:










void onSuccess() {
gallery.setPublicGallery(! gallery.isPublicGallery());
galleryService.update(gallery);
}

Basically i display a tick if the gallery.publicGallery is true and a cross
if it's false. Clicking on the tick/cross changes the state. This works fine
using a conventional submit but adding the ajax stuff just gives me an empty
div when the form is submitted

I'm sure it's something simple i've missed

Thanks!


Client side validation problem when using absolute positioning

2008-10-07 Thread Toby Hobson
I have just encountered a problem and wanted to run it by you guys before
reporting it as a bug:

have positioned an element using css absolute positioning but the validation
"bubble" appears in the wrong place. Here is my relevant code:


  

set name 

  


css:

#newSetPanel {
width:300px;
height:100px;
border:solid 1px black;
position: absolute;
top: 50%;
left: 50%;
margin-left:-150px;
margin-top:-50px;
background-color:white;
}

Page:

@Property
@Validate(value="required")
private String setName;

The bubble appears in the top left corner of the screen, not over the
textfield as I would expect

Toby


Re: type of Component

2008-10-07 Thread Toby Hobson
What errors do you see?

2008/10/7 Walid Iguer <[EMAIL PROTECTED]>

> Hi,
>
> I'm looking for a way to dynamically implement a "type" of Component.
>
> Do you have a solution?
>
> Currently, I do this: (the method does not like me)
>
>   ...
>  
>   
>   
>
>   
>   
>   
>   
>   
>   
>   
>
>
> Thanks,
>
> Wig
>


Re: T5: 5.0.14 Bizarre ClassNotFoundException

2008-09-25 Thread Toby Hobson
Hi Russel,

Just a thought but it might be worth checking your classpath. T5 will pull
SLF4 into the classpath anyway so you could have included it twice. Because
T5 uses a separate classloader for Pages and Components it may be getting
confused. I've run into similar problems before.

Cheers

Toby

2008/9/25 Russell Brown <[EMAIL PROTECTED]>

> Hi,
> Not sure if this is totally a T5 issue but I am just seeing if anyone has
> seen this. I have a page that uses the Form component but when I call the
> page I get a ClassNotFoundException for org.slf4j.Logger. Now I know that
> the class is on the classpath as I have Struts app running in the same
> container and Calling Class.forName("org.slf4j.Logger", true,
> this.getClass().getClassLoader()) in a struts action yields a class but the
> toClass method in
> org.apache.tapestry5.internal.services.InternalClassTransformationImpl
> throws a ClassNotFoundException.
>
> If I change the code in that class to use the parent of the parent class
> loader then the class is found.
>
> Any ideas? Is this a bug, is there some way to make Tapestry's class loader
> aware of the Class?
>
> Cheers
>
> Russell
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Updating maven from within eclipse

2008-09-09 Thread Toby Hobson
Hi Rob are you using the maven-eclipse plugin or just running mvn
eclipse:eclipse from the command line to generate the .project file?

Either way I think changing your pom to use the newer version should work.
If you are still having problems you can always delete the contents of your
.m2/repository directory. That seems to fix most things

Toby

2008/9/9 rdennett <[EMAIL PROTECTED]>

>
> I encountered an issue with building my project when I added a @Property
> annotation to one of my classes.  I found a post advising me to upgrade the
> properties/tapestry-release-version to 5.0.14 and do a maven update, but I
> was unclear as to how to do that from within eclipse.  Is it a matter of
> configuring an external tools maven configuration?  If so, I am not sure
> how
> to do that.
>
> Thanks for your help,
> Rob
> --
> View this message in context:
> http://www.nabble.com/Updating-maven-from-within-eclipse-tp19384589p19384589.html
> 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: [T5] t5components: how about a Button for PageLink?

2008-09-07 Thread Toby Hobson
Geoff

Did you try click me?

Toby

2008/9/7 Sven Homburg <[EMAIL PROTECTED]>

> just comitted
>
> 2008/9/7 Geoff Callender <[EMAIL PROTECTED]>
>
> > Hey Sven,
> >
> > Do you have plans for a variation on Button that does a render request
> like
> > PageLink? It would be really handy.
> > I ask because unfortunately the following doesn't work in IE - it
> displays
> > a button but clicking it does nothing:
> >
> > > href="#">Next
> >
> > Geoff
>
>
>
>
> --
> with regards
> Sven Homburg
> http://www.chenillekit.org
> http://tapestry5-components.googlecode.com
>


Re: How to implement Pagination in T5

2008-09-02 Thread Toby Hobson
You may want to look at the pagedLoop component from the t5components
project - 
here

Toby

2008/9/2 Howard Lewis Ship <[EMAIL PROTECTED]>

> You'll need to create your own component, a cross between Loop and Grid.
>
> On Tue, Sep 2, 2008 at 7:47 AM, Yeeswara Nadapana (HCL Financial
> Services) <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> >
> >
> > I have a bunch of records which I display using the . I am NOT
> > using the GRID component. Is there any way I can implement pagination on
> > the loop of data I display? Can anyone help on this?
> >
> >
> >
> > Regards,
> >
> > Yeeswar
> >
> >
> >
> >
> >
> > DISCLAIMER:
> >
> ---
> >
> > The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only.
> > It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in
> > this email are solely those of the author and may not necessarily reflect
> the opinions of HCL or its affiliates.
> > Any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and / or publication of
> > this message without the prior written consent of the author of this
> e-mail is strictly prohibited. If you have
> > received this email in error please delete it and notify the sender
> immediately. Before opening any mail and
> > attachments please check them for viruses and defect.
> >
> >
> ---
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Multiple file upload

2008-08-30 Thread Toby Hobson
I'm not sure what type of file you wish to upload but I have successfully
used the Aurigma image uploader with my T5 application

Toby

2008/8/30 ProAdmin Dariusz Dwornikowski <
[EMAIL PROTECTED]>

> Great ! Thanks. Tell me how to take filename from this to Page variable and
> Ill be happy.
>
> 2008/8/30 Imants Firsts <[EMAIL PROTECTED]>
>
> > If you don't mind introducing the dependency to a flash component, then
> > look at this:
> > http://www.swfupload.org/
> >
> > I have successfully created a tapestry component using SWFUpload, which
> > supports multiple file upload and degrades to default single file upload
> if
> > Flash is not present.
> >
> >
> > Quoting Thiago HP <[EMAIL PROTECTED]>:
> > > On Thu, Aug 28, 2008 at 3:27 PM, Chris Lewis
> > > <[EMAIL PROTECTED]> wrote:
> > > > The tricky part unfortunately is dealing with T5. I don't know how
> > > you
> > > > can create new components on the fly.
> > >
> > > You just cannot do that. Tapestry 5' mantra is "Static Structure,
> > > Dynamic Behavior".
> > > One way to do it would be putting your form inside a zone. Then submit
> > > the form to do the first file uploading. The form would show the list
> > > of already uploaded files (if any) and show the file upload component
> > > again.
> > >
> > > Thiago
> > >
> > > -
> > > 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]
> >
> >
>
>
> --
> Pozdrawiam,
> Dariusz Dwornikowski
> 
> ProAdmin
> ul. Królowej Jadwigi 44/2
> 61-872 Poznań
> tel: 061 623-20-92
> kom: 0601 59-64-74
> fax: 061 623-20-93
> www.proadmin.com.pl
> [EMAIL PROTECTED]
>


Re: T5 : Spring 2.5 support w/ tapestry-spring ?

2008-08-29 Thread Toby Hobson
me too

Toby

2008/8/29 Martijn Brinkers <[EMAIL PROTECTED]>

> Yes I am using Spring 2.5 with the Tapestry Spring module
>
> Martijn Brinkers
>
> On Fri, 2008-08-29 at 03:15 -0400, Alex Kotchnev wrote:
> > Is anyone successfully using spring 2.5 w/ the tapestry-spring module ?
> The
> > module main page talks about it being tested against 1.2.8.
> >
> > Cheers,
> >
> > Alex K
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tapestry query on URLs and Memcached

2008-08-27 Thread Toby Hobson
I'm not too familiar with the Tapestry pipeline/chain of command system
which is why I chose to use a servlet filter. Other's might like to comment
on the benefits of the Tapestry approach. It's certainly possible to cache
on a page level using the servlet filter through the filter-mapping element.

As for authentication and cookie interception: I haven't done this myself
because I use acegi, but acegi is basically a servlet filter which
intercepts requests so I guess it must be possible!

You may want to have a look at these excellent articles:
http://www.onjava.com/pub/a/onjava/2003/11/19/filters.html?page=1
http://www.onjava.com/pub/a/onjava/2004/03/03/filters.html

Toby

2008/8/27 codetester <[EMAIL PROTECTED]>

>
> Thanks Toby and others!
>
> Toby, is there a difference in using Servlet v/s tapestry filter for
> caching
> the page response? As in, is one of the method more preferred? Because, in
> my case, I want to cache the response on certain pages like
> www.myhost.com/category/cat1/ and not www.myhost.com/category/help etc .
>
> Also, is using T apestry filters the right way to port authentication and
> cookie interceptor ( the current code that I have in struts ) ?
>
> Thanks!
>
> Toby Hobson-3 wrote:
> >
> > Tapestry 5 supports the url structure you mentioned using the "activation
> > context". I'm not familiar with memcached but it is certainly possible to
> > cache the entire page response using either a servlet or tapestry filter
> > (i'm currently using a servlet filter for some high-load pages e.g. the
> > home
> > page)
> >
> > Toby
> >
> > 2008/8/26 codetester <[EMAIL PROTECTED]>
> >
> >>
> >> Hi,
> >>
> >> I am new to Tapestry and trying to evaluate it for a personal project (
> I
> >> am
> >> current using struts2). Could someone help me in the following queries?
> >>
> >> 1) Is it possible to support the following URL structures out of the
> box?
> >> www.myhost.com/
> >> www.myhost.com/category/
> >> www.myhost.com/category/cat1/page1/xyz ...
> >>
> >> 2) Is is possible to conditionally plug in some cache ( like memcached
> ),
> >> so
> >> that I can serve the entire processed HTML ( including the response
> >> header
> >> )
> >> directly to the servlet response stream? ( In case of a cache miss, then
> >> the
> >> normal flow would happen and I would conditionally cache the entire HTML
> >> output ).
> >>
> >> Thanks!
> >> --
> >> View this message in context:
> >>
> http://n2.nabble.com/Tapestry-query-on-URLs-and-Memcached-tp785361p785361.html
> >> Sent from the Tapestry Users mailing list archive at Nabble.com.
> >>
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/Tapestry-query-on-URLs-and-Memcached-tp785361p786126.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Tapestry query on URLs and Memcached

2008-08-26 Thread Toby Hobson
Tapestry 5 supports the url structure you mentioned using the "activation
context". I'm not familiar with memcached but it is certainly possible to
cache the entire page response using either a servlet or tapestry filter
(i'm currently using a servlet filter for some high-load pages e.g. the home
page)

Toby

2008/8/26 codetester <[EMAIL PROTECTED]>

>
> Hi,
>
> I am new to Tapestry and trying to evaluate it for a personal project ( I
> am
> current using struts2). Could someone help me in the following queries?
>
> 1) Is it possible to support the following URL structures out of the box?
> www.myhost.com/
> www.myhost.com/category/
> www.myhost.com/category/cat1/page1/xyz ...
>
> 2) Is is possible to conditionally plug in some cache ( like memcached ),
> so
> that I can serve the entire processed HTML ( including the response header
> )
> directly to the servlet response stream? ( In case of a cache miss, then
> the
> normal flow would happen and I would conditionally cache the entire HTML
> output ).
>
> Thanks!
> --
> View this message in context:
> http://n2.nabble.com/Tapestry-query-on-URLs-and-Memcached-tp785361p785361.html
> Sent from the Tapestry Users mailing list archive at Nabble.com.
>


Re: T5 : Let's write a book !

2008-08-25 Thread Toby Hobson
I'd be happy to help out

Toby

2008/8/25 marcelo_Java <[EMAIL PROTECTED]>

>
> I'm want to be part of this,
>
> I've use tapestry for over two years now and created many J2EE solutions
> with it.
> My most recently battle was when I wanted to create a CMS using a WYSIWYG
> editor called TinyMCE with tapestry and I was stuck until I discover the
> outputraw component.
>
> Regards,
> Marcelo Rodrigues
>
>
>
> Howard Lewis Ship wrote:
> >
> > It is certainly an interesting idea.
> >
> > I think HIbernate follows a similar approach; they have a Wiki
> > (Confluence, perhaps) and they "scrape" it to get the packaged
> > documentation.
> >
> > We could look into running a more involved Wiki, perhaps from
> > tapestry.formos.com.  Confluence would be reasonable, as I can get an
> > open-source project license for any of the Atlassian products.
> >
> > The problem with this is oversight; writing a book in any format
> > consists of a lot of dull work.  In an open community its hard to
> > motivate people, without a direct stake, to do that kind of dull work.
> >
> > On Mon, Aug 25, 2008 at 9:03 AM, Alex Kotchnev <[EMAIL PROTECTED]>
> wrote:
> >> First of all, I apologize for the long post in advance, I couldn't
> figure
> >> out how to make it shorter.
> >>
> >> I've been thinking about how much I miss the unborn "T5 in Action" book.
> >> I
> >> spoke to Howard a while back and he said that it's unlikely that a new
> >> revision of the "Tapestry In Action" (from Manning) would happen :
> >> understandably, he has the framework to worry about, not the books, and
> >> it's
> >> unlikely that he'd have 1 year to take away from work and write a book.
> >>
> >> Thus, I've been trying to figure out ways to substitute for the missing
> >> manuscript. Here are my impressions so far:
> >>
> >> * The T5 book from PacktPub is a nice intro, but it's out of date and
> >> it's
> >> kinda shallow
> >> * The wiki has some nice content on it, but it's disorganized and a
> >> little
> >> too random: you may find something useful on a subject, and then,  you
> >> may
> >> not
> >> * The project docs are often quite useful and often times quite deep,
> but
> >> they don't have enough examples to put things in context
> >> * The tutorials are all focused around "getting started", and don't have
> >> enough substance
> >> * Finally, the example apps (e.g. JumpStart, t5-acegi example, shams,
> >> etc)
> >> are extremely useful; however, (by design) there's little narrative
> >> surrounding them to explain how and why things work the way they do.
> >>
> >> Thus, the  bottom line is that one has to hunt down 5 different
> resources
> >> (possibly more) to pull together a coherent picture , especially when
> one
> >> goes deeper than the "getting started" stage.
> >>
> >> Now, I clearly don't know enough about T5 yet to write a book myself (as
> >> much as that sounds appealing to the ego) and it's unlikely that I could
> >> possibly dedicate the time and effort to do it all. So, I had the idea
> >> for a
> >> while that it would be extremely cool and useful if a bunch of the
> people
> >> interested in T5 could get together (incl. myself) and write a book on
> >> the
> >> subject. Tim Sweetser jumped in with the idea on the IRC channel that we
> >> could do a "collaborative online book" :  put together a rough outline
> of
> >> the potential content (chapter and section-wise), then let users
> >> contribute
> >> to the effort by filling in the blanks (with some editorial oversight).
> >> So,
> >> if something like this were possible, a bunch of people can get their
> >> minds
> >> together, each one contribute a chapter or two and kick off the effort.
> >> This
> >> way, each one person can focus on a subset of the problem, describe it
> in
> >> sufficient depth (e.g. research the areas that he/she is unfamiliar
> >> with),
> >> and not weigh down anyone in particular with an enormous amount of
> effort
> >> (such as writing a whole book).
> >>
> >> Surveying the landscape, similar things already exist. Tim Sweetser
> >> mentioned that Django did something like this. I know that Grails has
> >> quite
> >> a thorough user manual that covers most of the important areas of the
> >> framework. I also remember bumping into the PHP manual where people
> could
> >> comment and add relevant examples and such. So, in conclusion, this is
> >> possible, people have definitely done it, and it's HUGE for the
> community
> >> around the project.
> >>
> >> So, the next question is, how should something like this be done ?
> >> * The Wiki seems like a no brainer to start with, add the TOC and then
> >> allow
> >> people to contribute. The potential problem with it is that code and the
> >> examples can easily become stale. I know that the examples of the Grails
> >> user manual are somehow compiled and checked that they run before a new
> >> version of the manual is published.
> >> * Another option seems to be putting a bunch of Docbook files in SVN and

Re: prototype 1.6.0.2

2008-08-25 Thread Toby Hobson
ok thanks Howard

2008/8/24 Howard Lewis Ship <[EMAIL PROTECTED]>

> If you add an issue to JIRA, we can look into upgrading to 1.6.0.2.
> Hopefully 1.6.0.2 addresses the issue we originally had with Safari
> support.
>
> On Sun, Aug 24, 2008 at 6:54 AM, Toby Hobson <[EMAIL PROTECTED]>
> wrote:
> > Hi Guys,
> >
> > Does anyone know what's happening with 1.6.0.2? I understand T5 uses
> > 1.6.0.1because there are some issues in
> > 1.6.0.2 but I was hoping to use the prototip tooltip library which needs
> > 1.6.0.2
> >
> > Thanks
> >
> > Toby
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


prototype 1.6.0.2

2008-08-24 Thread Toby Hobson
Hi Guys,

Does anyone know what's happening with 1.6.0.2? I understand T5 uses
1.6.0.1because there are some issues in
1.6.0.2 but I was hoping to use the prototip tooltip library which needs
1.6.0.2

Thanks

Toby


Question about null environmental object

2008-08-21 Thread Toby Hobson
I have a two components: TabSet and Tab. TabSet retrieves the user who is
currently logged in (if the user has logged in) from acegi, does some
processing and makes it available to nested components via the environmental
service:

void beginRender() {
 if (loggedUser == null)
 return;
 // process user
 environment.push(User.class, loggedUser);
}

void afterRender() {
 if (environment.peek(User.class) != null)
  environment.pop(User.class);
}

The Tab uses this value to work out whether it should render itself:

@Environmental
private User loggedUser;

boolean setupRender() {
  if (loggedUser != null)
  // check if the user should see this tab
}

This all works nicely assuming the user has logged in, but if there is no
User object on the environment stack it all falls over. The line if
(loggedUser != null) causes T5 to throw an exception because no User object
is on the stack. So my question is what is the best way to handle a
situation in which an Environmental object could be null? I was thinking I
may have to inject the environment service into the Tab component and peek
at the stack like I do in TabSet.afterRender() but this seems a little
messy.

Thanks

Toby


Re: Complete newbie issue: Tapestry tutorial inside Eclipse?

2008-08-20 Thread Toby Hobson
Not exactly an answer to your problem but I debug "mvn jetty:run" through
eclipse as an external tool and it works nicely. If you can't get the jetty
launcher to work properly you might want to try this

Toby

2008/8/20 torput <[EMAIL PROTECTED]>

>
> I was trying this tutorial:
> http://tapestry.apache.org/tapestry5/tutorial1/env.html
>
> But with runjettyrun and also newer versions of other required tools.
>
> When I try to run the tutorial1 inside Eclipse, this is what I get. Any
> idea
> what I should do?
>
>
> [INFO] mortbay.log Logging to
> org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via
> org.mortbay.log.Slf4jLog
> [INFO] mortbay.log jetty-6.1.6
> [ERROR] mortbay.log failed app
> java.lang.RuntimeException: Error invoking service binder method
> org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:22): Unresolved compilation problem:
>
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
> at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
> at
>
> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
>
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at
>
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at runjettyrun.Bootstrap.main(Bootstrap.java:76)
> Caused by: java.lang.Error: Unresolved compilation problem:
>
> at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:390)
> ... 16 more
> [ERROR] mortbay.log Failed startup of context
> [EMAIL PROTECTED]/,src/main/webapp}
> java.lang.RuntimeException: Error invoking service binder method
> org.apache.tapestry5.tutorial.services.AppModule.bind(ServiceBinder) (at
> AppModule.java:22): Unresolved compilation problem:
>
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:417)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.(DefaultModuleDefImpl.java:107)
> at org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:121)
> at
>
> org.apache.tapestry5.internal.TapestryAppInitializer.(TapestryAppInitializer.java:92)
> at org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:79)
> at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
>
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589)
> at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
> at
>
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1216)
> at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:509)
> at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:447)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
> at org.mortbay.jetty.Server.doStart(Server.java:222)
> at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
> at runjettyrun.Bootstrap.main(Bootstrap.java:76)
> Caused by: java.lang.Error: Unresolved compilation problem:
>
> at org.apache.tapestry5.tutorial.services.AppModule.bind(AppModule.java:22)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
>
> org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl.bind(DefaultModuleDefImpl.java:390)
> ... 16 more
> [INFO] mortbay.log Started [EMAIL PROTECTED]:8080
> --
> View this message in context:
> http://www.nabble.com/Complete-newbie-issue%3A-

Re: Snapshot repository down - alternative?

2008-08-09 Thread Toby Hobson
The repo isn't working for me (in England) :-(

Toby

2008/8/9 Dragan Djuric <[EMAIL PROTECTED]>

>
> Hi,
>
> It seems that the repository at
> http://tapestry.formos.com/maven-snapshot-repository is down (at least I
> cannot access it). Due to other dependencies and code refactoring I cannot
> use versions earlier then the latest snapshot.
> Two short questions:
> 1. What is the problem with the repository and when you expect it to be
> available (maybe it's a matter of someone issuing one command to unblock
> it,
> or maybe it works for other people)?
> 2. Is there an alternative location (mirror)?
> --
> View this message in context:
> http://www.nabble.com/Snapshot-repository-down---alternative--tp18903369p18903369.html
> 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: T5: Trigger zone reload with just javascript?

2008-08-08 Thread Toby Hobson
Hi Mike,

Ok it soundsl like there are a few options here but the best option is
probably going to be an AJAX request that is fired when the field is
changed. The source code for the autocomplete mixin should give you some
idea how to do this. Basically I would make the ajax request which is then
handled by an event handler on your page/component. The handler could return
xml or JSON and the JS code on your page/component will use this data to
update the other values in the form.

Toby

2008/8/8 Mike Leonardo <[EMAIL PROTECTED]>

> Hey Toby,
>
> I did try that out and it works - but the problem is that I want the
> ability to actually submit the form normally with a submit button and do
> something else on that submit. If I use the form's zone parameter then there
> is no way to actually submit / reload the page. At least from what I
> understand.
>
> - Mike
>
>
> ----- Original Message -
> From: "Toby Hobson" <[EMAIL PROTECTED]>
> To: "Tapestry users" 
> Sent: Thursday, August 7, 2008 5:53:20 PM (GMT-0500) America/New_York
> Subject: Re: T5: Trigger zone reload with just javascript?
>
> Hi Mike,
>
> Have you tried using the t:zone parameter in your form? then you can
> perform
> a submit in your onchange handler e.g.
>
>
>
> onchange="document.forms[0].submit()" />
>
>
>
> Toby
>
> 2008/8/7 Mike Leonardo <[EMAIL PROTECTED]>
>
> > Hey All,
> >
> > I have a form where I want to be able to change one value and have the
> > other values in the form update. I have a zone around the whole form, and
> > I'd like to use the onchange event to reload the Zone, but what
> javascript I
> > use to trigger the reloading?
> >
> > Thanks for any help!
> > - Mike
> >
> >
> > -
> > 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: help with self developed imagemap component

2008-08-08 Thread Toby Hobson
Sorry Gregor ... I wrote my reply just as you wrote yours! It's a while
since I used T4 but I'll look through some of my old code and try to find
out how I did this

Toby

2008/8/8 Gregor Burger <[EMAIL PROTECTED]>

> Hi Toby,
>
> As i mentioned earlier I can't use Tapestry5 (old Servlet container) which
> would
> be a big help. So, is ComponentResource or anything equivalent
> available in Tapestry 4?
>
> thanks
> Gregor
>
> On Fri, Aug 8, 2008 at 3:32 PM, Toby Hobson <[EMAIL PROTECTED]>
> wrote:
> > Hi Gregor,
> >
> > Basically you inject ComponentResources into your page then use
> > componentResurces.createActionLink() method to generate a Link object.
> Then
> > call toAbsoluteURI() on the link to get the url.
> >
> > N.B. if you are planning to use ajax and zones you have to do a little
> bit
> > more ...  I'll happily explain it if you want to know.
> >
> > Toby
> >
> > 2008/8/8 Gregor Burger <[EMAIL PROTECTED]>
> >
> >> hi,
> >>
> >> I would like to develop a component which renders an imagemap
> >> produced by graphviz, so I can click on the graph elements.
> >> graphviz provides me the html map which i render using
> >> an raw Insert component. I've also developed a service which provides
> >>  me the images from graphviz. This works fine, which is really cool.
> >>
> >> BUT:
> >>
> >> I need to specify the link targets in the graphviz script before the
> >> component gets rendered. So my question: How could I generate
> >> DirectLinks so i can embed the urls of the links in the graphviz script.
> >>
> >> I hope my explanations aren't to confusing and that somebody can
> >> help me.
> >>
> >> thanks in advance
> >>
> >> gregor
> >>
> >> -
> >> 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: help with self developed imagemap component

2008-08-08 Thread Toby Hobson
Hi Gregor,

Basically you inject ComponentResources into your page then use
componentResurces.createActionLink() method to generate a Link object. Then
call toAbsoluteURI() on the link to get the url.

N.B. if you are planning to use ajax and zones you have to do a little bit
more ...  I'll happily explain it if you want to know.

Toby

2008/8/8 Gregor Burger <[EMAIL PROTECTED]>

> hi,
>
> I would like to develop a component which renders an imagemap
> produced by graphviz, so I can click on the graph elements.
> graphviz provides me the html map which i render using
> an raw Insert component. I've also developed a service which provides
>  me the images from graphviz. This works fine, which is really cool.
>
> BUT:
>
> I need to specify the link targets in the graphviz script before the
> component gets rendered. So my question: How could I generate
> DirectLinks so i can embed the urls of the links in the graphviz script.
>
> I hope my explanations aren't to confusing and that somebody can
> help me.
>
> thanks in advance
>
> gregor
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: T5: Trigger zone reload with just javascript?

2008-08-07 Thread Toby Hobson
Hi Mike,

Have you tried using the t:zone parameter in your form? then you can perform
a submit in your onchange handler e.g.







Toby

2008/8/7 Mike Leonardo <[EMAIL PROTECTED]>

> Hey All,
>
> I have a form where I want to be able to change one value and have the
> other values in the form update. I have a zone around the whole form, and
> I'd like to use the onchange event to reload the Zone, but what javascript I
> use to trigger the reloading?
>
> Thanks for any help!
> - Mike
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [T5]

2008-08-07 Thread Toby Hobson
Yes, I tried the jetty plugin for eclipse but it didn't work too well so I
played around with the maven plugin and managed to get it working nicely
with eclipse. The other nice thing is that because most of the config is in
pom.xml its easy for new team members to get started ... i.e. check out the
source code, run mvn eclipse:eclipse, import the project and away you go!

Toby

2008/8/7 Onno Scheffers <[EMAIL PROTECTED]>

> > It's sweet that in eclipse you just need to make the change and hit
> refresh
> > browser.  In saying that, the Index.tml file I have under /webapp/ does
> just
> > that but not for the .tml files in the source folders.
>
> I have that exact behavior in IntelliJ.
> Eclipse probably doesn't build complete war-files but configures Jetty to
> look in its exploded-folder or maybe even directly in its source
> web-context
> and you can configure IntelliJ and Jetty the same way.
> Just let IntelliJ build to an exploded folder instead of war-files and
> autobuild will only compile and copy over the files that have been changed
> since the last build. Should be near-instant.
> If you configure a Jetty context for the IntelliJ exploded folder you
> should
> be good to go.
>
> If the tml-files in your source-folder don't get picked up, it is probably
> because they aren't in an exploded folder that Jetty is watching. Either
> make Jetty watch your source-folders or auto-deploy to a folder that Jetty
> is watching. I did the last thing and it works very well.
>
>
> regards,
>
> Onno Scheffers
>
>
>
>
> 2008/8/7 kace <[EMAIL PROTECTED]>
>
> >
> > Thanks,
> >
> > I run process-resources for .tml files and process-classes for java
> classes
> > - I find it's quicker than autobuilding the project because it tends to
> > build the war files for every web moduile you have in your project.
> >
> > It's sweet that in eclipse you just need to make the change and hit
> refresh
> > browser.  In saying that, the Index.tml file I have under /webapp/ does
> > just
> > that but not for the .tml files in the source folders.
> >
> >
> > ..kace
> > --
> > View this message in context:
> > http://www.nabble.com/-T5--tp18858355p18872680.html
> > 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: [T5]

2008-08-07 Thread Toby Hobson
Hi Howard,

jetty:run seems to work pretty well for me. It can be configured for manual
or automatic reloading of the files. I run it from eclipse as an external
application and use remote debugging. The advantage I have found to this
approach is that I can configure maven lifecycle goals so for example when I
launch the app it will populate the DB with test data etc.

Just my 2 cents!

Toby

2008/8/7 Howard Lewis Ship <[EMAIL PROTECTED]>

> I'm not familiar with using jetty:run; I don't know if it copies the
> files to a new location or not.  Eclipse has the RunJetty plugin which
> is a better option for running directly against your workspace.
>
> On Thu, Aug 7, 2008 at 5:27 AM, kace <[EMAIL PROTECTED]>
> wrote:
> >
> > That's what I;m looking for but haven't been able to so far...
> >
> > I am using intelliJ but I run mvn jetty:run from the command line - how
> can
> > I make sure the changes to .tml files are picked up.  I use maven, anyone
> > have this setup right that can offer a snippet to get me going?
> >
> > Thanks
> >
> >
> >
> >
> > Howard Lewis Ship wrote:
> >>
> >> This is really dependent on your IDE.  The .tml files are NOT
> >> compiled; but in IntelliJ you have to make sure that changes to them
> >> are copied to the right folder (there are options for this in the
> >> Jetty launch configuration screen).
> >>
> >> On Wed, Aug 6, 2008 at 12:53 PM, kace <[EMAIL PROTECTED]>
> >> wrote:
> >>>
> >>> Hi fellas,
> >>>
> >>> Do you have to compile .tml files if you want the changes to be picked
> up
> >>> by
> >>> jetty?
> >>>
> >>> I know you have to for the java classes but I find that I dont have to
> >>> compile my Index.tml file which is located under /webapp/Index.tml for
> >>> the
> >>> changes to be picked up but I do for the Layout.tml file which is
> located
> >>> under /java/../components/
> >>>
> >>> If I move the .tml files to src/main/resources/../components I still
> have
> >>> to
> >>> compile and moving them to the same location as my Index.tml results in
> >>> the
> >>> Index.tml file not picking up the layout and css configuration from
> >>> Layout.tml
> >>>
> >>> Do I keep them in the same location as the java files and compile them
> >>> whenever I introduce a change? or is there something I can do here?
> >>>
> >>> Thanks
> >>>
> >>> ..kace
> >>>
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/-T5--tp18858355p18858355.html
> >>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>
> >>>
> >>> -
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>
> >>
> >>
> >> --
> >> Howard M. Lewis Ship
> >>
> >> Creator Apache Tapestry and Apache HiveMind
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> http://www.nabble.com/-T5--tp18858355p18869245.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [T5]

2008-08-07 Thread Toby Hobson
Hi

I use eclipse together with maven's jetty plugin - I dont have to compile
the files I just change the TML then refresh the page in my browser - easy!

Togy

2008/8/6 kace <[EMAIL PROTECTED]>

>
> Hi fellas,
>
> Do you have to compile .tml files if you want the changes to be picked up
> by
> jetty?
>
> I know you have to for the java classes but I find that I dont have to
> compile my Index.tml file which is located under /webapp/Index.tml for the
> changes to be picked up but I do for the Layout.tml file which is located
> under /java/../components/
>
> If I move the .tml files to src/main/resources/../components I still have
> to
> compile and moving them to the same location as my Index.tml results in the
> Index.tml file not picking up the layout and css configuration from
> Layout.tml
>
> Do I keep them in the same location as the java files and compile them
> whenever I introduce a change? or is there something I can do here?
>
> Thanks
>
> ..kace
>
> --
> View this message in context:
> http://www.nabble.com/-T5--tp18858355p18858355.html
> 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: Transmitting a javascript-value to the server using JSON

2008-08-05 Thread Toby Hobson
Does anyone know if something similar is available (or planned) for T5?

Toby

2008/8/5 Thiago Henrique de Carvalho <[EMAIL PROTECTED]>

> Hi,
>
> Take a look at @EventListener annotation. Docs show example of transmiting
> JSON from page to Tapestry.
>
> Thiago
>
> -Mensagem original-
> De: Peer Brink [mailto:[EMAIL PROTECTED]
> Enviada em: terça-feira, 5 de agosto de 2008 06:41
> Para: users@tapestry.apache.org
> Assunto: Transmitting a javascript-value to the server using JSON
>
> Hello,
>
> I try to transmit the users/browsers timezone-offset to the server.
> The timeZone-offset can easily be retrieved by
>
> 
> var offset = new Date().getTimezoneOffset();
> 
>
> But how can it be transmitted? Could this be done using a JSONObject
> by adding "Object.toJSON(offset);"?
>
> I found quite some conversations in the mailing-list about
> JSON-communication but they are all about transmitting data in the
> other direction (server to client).
>
> Where would the code go in the html-source and what java-code is
> needed to receive the value on the server-side?
>
> Or is there a complete other way to get this value?
>
> Sorry for this rookie-question. But I am not too familiar with
> java-script and JSON.
>
> Thanks for any help,
> Peer.
>
> -
> 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]
>
>


Second article re: T5-Flash integration

2008-08-05 Thread Toby Hobson
Hi Everyone,

I have just written a draft article re: client-server communication between
flash applications and tapestry pages/components:

http://knol.google.com/k/toby-hobson/tapestry-5-flash-integration-part-2

As always feedback (positive and negative!) is welcomed

Toby


Re: T5 getApplicationName

2008-08-05 Thread Toby Hobson
You don't actually need the underlying HttpServletRequest, you can use
Tapestry's abstraction org.apache.tapestry5.services.Request e.g.

@Inject
private Request request;

void method() {
  String context = request.getContextPath();
}

There's nothing wrong with using the HttpServletRequest, but keeping the
layer of abstraction in place may be a good idea .. particularly if you plan
to use your page/component in a portlet environment

Toby

2008/8/4 Lutz Hühnken <[EMAIL PROTECTED]>

> Hi Argo,
>
> if I understand you correctly, what you call application name is
> usually (or, in "java servlet speak") referred to as the "context". It
> is a property of the HttpServletRequest, which provides that
> information to you by the method "getContextPath()".
>
> Check the following pages:
>
> http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html#getContextPath()
> http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest
>
>
> Hth,
>
> Lutz
>
> On Mon, Aug 4, 2008 at 6:56 PM, Argo Vilberg <[EMAIL PROTECTED]> wrote:
> > hi,
> >
> >
> > How to get Application Name in tapestry framework.
> >
> > http://localost:8080/appname/start
> >
> > appname??
> >
> >
> >
> > Argo
> >
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Explorer like tree component

2008-08-05 Thread Toby Hobson
Sorry guys ... I'm writing it at the moment!

Toby

2008/8/4 Francisco Manzano <[EMAIL PROTECTED]>

> Yes, we are really waiting for it !!
>
> Thanks
>
> Hugo Palma wrote:
>
>> Hi again Toby,
>> please don't forget to add your code to the wiki.
>>
>> Thanks again.
>>
>> Toby Hobson wrote:
>>
>>> I have written a component based on treemenu. I'll happily send you the
>>> code but it comes with no warranty!!
>>>
>>> Toby
>>>
>>>
>>> - Original Message 
>>> From: Hugo Palma <[EMAIL PROTECTED]>
>>> To: Tapestry users 
>>> Sent: Friday, 25 July, 2008 6:41:02 PM
>>> Subject: Explorer like tree component
>>>
>>> I was wondering if anyone knows of a component for T5 that displays a
>>> tree with behaviour similar to this
>>> http://www.treemenu.net/treemenu/3fr_beenthere.html
>>> I just need expanded / collapsible nodes, with the plus / minus sign and
>>> configurable node icons.
>>>
>>> Thanks.
>>>
>>> -
>>> 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: Transmitting a javascript-value to the server using JSON

2008-08-05 Thread Toby Hobson
Hello Peer,

Sure it can be done ... have a look at JSON.stringify() at
http://www.json.org/js.html, this will turn the Javascript object into JSON
text.

On the server-side you need to use JSONTokener and JSONObject see
http://www.json.org/java/index.html to convert back to a Java object

If you need more help let me know

Regards

Toby

2008/8/5 Peer Brink <[EMAIL PROTECTED]>

> Hello,
>
> I try to transmit the users/browsers timezone-offset to the server.
> The timeZone-offset can easily be retrieved by
>
> 
> var offset = new Date().getTimezoneOffset();
> 
>
> But how can it be transmitted? Could this be done using a JSONObject
> by adding "Object.toJSON(offset);"?
>
> I found quite some conversations in the mailing-list about
> JSON-communication but they are all about transmitting data in the
> other direction (server to client).
>
> Where would the code go in the html-source and what java-code is
> needed to receive the value on the server-side?
>
> Or is there a complete other way to get this value?
>
> Sorry for this rookie-question. But I am not too familiar with
> java-script and JSON.
>
> Thanks for any help,
> Peer.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: T5 beta. why so long..

2008-08-03 Thread Toby Hobson
There are still a few issues relating to AJAX which need to be sorted out. I
believe this is why T5 is still beta - although I think T5 beta is more
stable than many other production frameworks!

Toby

2008/8/4 Partogi, Joshua <[EMAIL PROTECTED]>

> As for me, I don't really care about the beta status/label because T5 is
> fully functional now and ready for production.
>
>
> Best regards,
>
> -Original Message-
> From: Angelo Chen [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 03, 2008 2:51 PM
> To: users@tapestry.apache.org
> Subject: Re: T5 beta. why so long..
>
>
> Hi,
>
> Features, quality of the code and others all are super except the
> preview/beta tag, there are people who are really particular about this,
> when you talk to them, they can simply do a google in the net and beta tag
> can be a big minus in the decision of which framework to use, or even who
> will be awarded with the project, time to release!
>
> Angelo
>
>
> cometta wrote:
> >
> > when will it be? will it be in this year? is in beta state means , some
> of
> > the
> > features/methods will be changes ..?
> >
>
> IMPORTANT NOTICE:
> The information in this email (and any attachments) is confidential. If you
> are not the intended recipient, you must not use or disseminate the
> information. If you have received this email in error, please immediately
> notify me by "Reply" command and permanently delete the original and any
> copies or printouts thereof.  Although this email and any attachments are
> believed to be free of any virus or other defect that might affect any
> computer system into which it is received and opened, it is the
> responsibility of the recipient to ensure that it is virus free and no
> responsibility is accepted by American International Group, Inc. or its
> subsidiaries or affiliates either jointly or severally, for any loss or
> damage arising in any way from its use.


Re: New article re: T5-Flash integration

2008-08-03 Thread Toby Hobson
Hi Francisco,

Google have changed the link to my article - now I know whey their code is
beta! please see:

http://knol.google.com/k/toby-hobson/tapestry-5-flash-integration

Thanks

Toby

2008/8/3 Massimo Lusetti <[EMAIL PROTECTED]>

> On Sun, Aug 3, 2008 at 6:51 AM, Toby Hobson <[EMAIL PROTECTED]>
> wrote:
>
> > Hi Francisco
> >
> > Yes you are right on both points! Thanks for taking the time to review my
> > article. I will update it to reflect your input
>
> Hitting your URL gives me 404 not found error... it's just me seeing this?
>
> Regards
> --
> Massimo
> http://meridio.blogspot.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: New article re: T5-Flash integration

2008-08-02 Thread Toby Hobson
Hi Francisco

Yes you are right on both points! Thanks for taking the time to review my
article. I will update it to reflect your input

Regards

Toby

2008/8/3 Francisco Manzano <[EMAIL PROTECTED]>

> Hi Hobson, thank you very much. The article is really good.
>
> Lamentably, I have not time to prove the RenderFlash component now, but
> seeing the code two doubts have arisen me:
>
> 1) When you use the RenderFlash component in /MyPage/.tml, the parameter
> /swfFile /(line 14) would not have to be equal to "/swfAsset/" instead of
> "/flashAsset/"?
>
> 2) When you present the complete code of the component, you would not have
> to store the generated-div-id (method /beginRender/(..),  line 17), how
> yourself  have explained before, to use it in  /afterRender/() method (line
> 23) instead of to pass a String to him?.Otherwise, the component always will
> render the same id for his div, being able to create conflicts, right?
>   Thanks again
>
>
> Toby Hobson wrote:
>
>> Hi Guys,
>>
>> I have just written an article re: T5-Adobe flash integration. It can be
>> found at
>> http://knol.google.com/k/toby-hobson/tapestry5-flash-integration/
>>
>> I would be grateful for any feedback
>>
>> I'm planning to write a few more articles on this subject so I'll keep you
>> all informed!
>>
>> Toby
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: [T5] Tapestry & FLASH Objects ?

2008-08-01 Thread Toby Hobson

I've just published the first article on this subject. You can find it at
http://knol.google.com/k/toby-hobson/tapestry-5-flash-integration/ The
second article (client-server interaction) is in progress!

Toby



Toby Hobson-2 wrote:
> 
> I've been using T5 and Flash  (OpenLaszlo) successfully, I'm currently
> writing a tutorial about it ... i'll let you know when i publish it. In
> the meantime if you have any specific questions feel free to email me
> 
> Toby
> 
> 
> - Original Message 
> From: Antonio Fernández - STAR Málaga <[EMAIL PROTECTED]>
> To: Francisco Manzano <[EMAIL PROTECTED]>; Angel Luis
> Martín Bandera <[EMAIL PROTECTED]>; Tapestry users
> ; [EMAIL PROTECTED]
> Sent: Wednesday, 23 July, 2008 11:55:42 AM
> Subject: [T5] Tapestry &  FLASH Objects ? 
> 
> 
> Hi all,   ! viva Tapestrón !
> 
> I´m looking for information about working with Tapestry 5 & FLASH, but 
> seems there aren´t so many information.
> 
> - Is Tapestry 5 really ready for supporting this tecnology ?
> 
> - Is there some JavaScript Toolkit Library ready for handling the Flash 
> object and it could be integrated with Tapestry 5 ?
> 
> - Any idea about the correct way for getting this integration ?
> 
> - Perhaps ... Flex, JQuery, red5  (http://osflash.org/red5) 
> 
> 
> Many thanks in advance & and have a nice day.
> DiPassi
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
View this message in context: 
http://n2.nabble.com/-T5--TapestryFLASH-Objects---tp578712p665524.html
Sent from the Tapestry Users mailing list archive at Nabble.com.


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



Re: t5 how to write response to file

2008-08-01 Thread Toby Hobson
Sorry ... i don't fully understand your question. Could you explain a little 
more

Thanks

Toby


- Original Message 
From: luna_guo <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Saturday, 2 August, 2008 4:07:55 AM
Subject: t5 how to write response to file


how to use t5 to write response to a html file?
is there any tutorial or example?
-- 
View this message in context: 
http://www.nabble.com/t5-how-to-write-response-to-file-tp18785645p18785645.html
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: Updating a zone within a form ?

2008-08-01 Thread Toby Hobson
Hi Hugues,

Which version of Tapestry are you using?

Toby



- Original Message 
From: Hugues Narjoux <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Friday, 1 August, 2008 9:00:48 AM
Subject: Updating a zone within a form ?

Hi,

I am trying to update a zone which is included in a form. Problem is : the
zone cannot be updated since the elements in the zone (such as checkboxes or
inputs) cannot find an enclosing t:form when rendering.

Is there a workaround for this ? Another way to do it ?

Thanks

Hugues


Re: New article re: T5-Flash integration

2008-07-31 Thread Toby Hobson
Yes you can ... I think I will update the article to reflect that.

Thanks for your feedback

Toby



- Original Message 
From: Jun Tsai <[EMAIL PROTECTED]>
To: Tapestry users ; Toby Hobson <[EMAIL PROTECTED]>
Sent: Friday, 1 August, 2008 2:40:18 AM
Subject: Re: New article re: T5-Flash integration

2008/8/1 Toby Hobson <[EMAIL PROTECTED]>

> Hi Guys,
>
> I have just written an article re: T5-Adobe flash integration. It can be
> found at http://knol.google.com/k/toby-hobson/tapestry5-flash-integration/
>
> I would be grateful for any feedback
>
> I'm planning to write a few more articles on this subject so I'll keep you
> all informed!
>
> Toby
>



Great,thanks.

But I think you can use JSONObject to marshall parameters.


-- 
regards,
Jun Tsai


New article re: T5-Flash integration

2008-07-31 Thread Toby Hobson
Hi Guys,

I have just written an article re: T5-Adobe flash integration. It can be found 
at http://knol.google.com/k/toby-hobson/tapestry5-flash-integration/

I would be grateful for any feedback

I'm planning to write a few more articles on this subject so I'll keep you all 
informed!

Toby


T5 possible AJAX bug

2008-07-31 Thread Toby Hobson
Hi everyone,

I may have found a bug in 5.0.14 but I wanted to run it by everyone before 
posting it:

If I have a component (lets call it component-a) which uses ajax zones to do a 
partial refresh and I include it on a page or other component through an ajax 
call the zones no longer work e.g.

MyPage.tml:


click me

MyPage.java:

@Component
private ComponentA componentA;

@OnEvent(component="clickMe")
ComponentA clickMe() {
return componentA;
}

ComponentA.tml:


click me

ComponentA.java:

@Component
private ComponentB componentB;

@OnEvent(component="clickMe")
ComponentB clickMe() {
return componentB;
}

When I click the actionLink on MyPage ComponentA is correctly rendered in the 
zone, but when I click the actionLink within ComponentA nothing is rendered 
although the clickMe method on componentA is called.

Toby


Re: [T5] Tapestry & FLASH Objects ?

2008-07-29 Thread Toby Hobson
Hi Steve

We're actually trailing red5 at the moment. So far we've had mixed results but 
these have been issues related to the server itself, nothing relating to T5 
integration. OpenLaszlo is a pretty compelling alternative to Flex because it's 
relatively mature and there is a large amount of documentation around. I can't 
say the same for red5 so we'll probably have to dip into our wallets and go for 
Adobe flash server

Toby


- Original Message 
From: Steven Woolley <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Monday, 28 July, 2008 5:50:15 PM
Subject: Re: [T5] Tapestry &  FLASH Objects ?

If anyone has experience using T5 with red5, I'm all ears (eyes  
rather).  Anyone?
Steve

On Jul 23, 2008, at 4:05 PM, Antonio wrote:

>
> Sounds great !
>
> First of all i´m going to learn more about this framework.
>
> The questions would be here in the  near future ... :-D
>
> Many thanks again & good luck with your tutorial
>
>
> Greetings,
> Passi
>
>>
>> - Original Message 
>> From: Antonio Fernández - STAR Málaga <[EMAIL PROTECTED] 
>> >
>> To: Francisco Manzano <[EMAIL PROTECTED]>; Angel  
>> Luis Martín Bandera <[EMAIL PROTECTED]>; Tapestry users 
>> > >; [EMAIL PROTECTED]
>> Sent: Wednesday, 23 July, 2008 11:55:42 AM
>> Subject: [T5] Tapestry &  FLASH Objects ?
>>
>> Hi all,   ! viva Tapestrón !
>>
>> I´m looking for information about working with Tapestry 5 & FLASH,  
>> but seems there aren´t so many information.
>>
>> - Is Tapestry 5 really ready for supporting this tecnology ?
>>
>> - Is there some JavaScript Toolkit Library ready for handling the  
>> Flash object and it could be integrated with Tapestry 5 ?
>>
>> - Any idea about the correct way for getting this integration ?
>>
>> - Perhaps ... Flex, JQuery, red5  (http://osflash.org/red5) 
>>
>>
>> Many thanks in advance & and have a nice day.
>> DiPassi
>>
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus  
>> Database: 270.5.5/1569 - Release Date: 23/07/2008 13:31
>>
>>
>>
>
>
> -
> 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: T5: HttpSession id. How to get it?

2008-07-28 Thread Toby Hobson
Hi Russel,

Have a look at 
http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest

Toby


- Original Message 
From: Russell Brown <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Monday, 28 July, 2008 12:17:25 PM
Subject: T5: HttpSession id. How to get it?

Hi,

I need to HttpSession id. When I call request.getSession(false) I get
back a org.apache.tapestry5.services.Session impl called
org.apache.tapestry5.internal.services.SessionImpl. This class delegates
to an HttpSession instance. But there is no way of getting the actual
HttpSession or a delegating method for HttpSession.getId(). Is this a
conscious design decision? If so does anyone know the rational?



Also...is there some other way to get to the actual id of the current
session?



Many thanks



Russell



Communications on or through ioko's computer systems may be monitored or 
recorded to secure effective system operation and for other lawful purposes.

Unless otherwise agreed expressly in writing, this communication is to be 
treated as confidential and the information in it may not be used or disclosed 
except for the purpose for which it has been sent. If you have reason to 
believe that you are not the intended recipient of this communication, please 
contact the sender immediately. No employee is authorised to conclude any 
binding agreement on behalf of ioko with another party by e-mail without prior 
express written confirmation.

ioko365 Ltd.  VAT reg 656 2443 31. Reg no 3048367. All rights reserved.


Re: Explorer like tree component

2008-07-25 Thread Toby Hobson
I have written a component based on treemenu. I'll happily send you the code 
but it comes with no warranty!!

Toby


- Original Message 
From: Hugo Palma <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Friday, 25 July, 2008 6:41:02 PM
Subject: Explorer like tree component

I was wondering if anyone knows of a component for T5 that displays a 
tree with behaviour similar to this 
http://www.treemenu.net/treemenu/3fr_beenthere.html
I just need expanded / collapsible nodes, with the plus / minus sign and 
configurable node icons.

Thanks.

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

Re: [T5] Tapestry & FLASH Objects ?

2008-07-23 Thread Toby Hobson
I've been using T5 and Flash  (OpenLaszlo) successfully, I'm currently writing 
a tutorial about it ... i'll let you know when i publish it. In the meantime if 
you have any specific questions feel free to email me

Toby


- Original Message 
From: Antonio Fernández - STAR Málaga <[EMAIL PROTECTED]>
To: Francisco Manzano <[EMAIL PROTECTED]>; Angel Luis Martín Bandera <[EMAIL 
PROTECTED]>; Tapestry users ; [EMAIL PROTECTED]
Sent: Wednesday, 23 July, 2008 11:55:42 AM
Subject: [T5] Tapestry &  FLASH Objects ? 


Hi all,   ! viva Tapestrón !

I´m looking for information about working with Tapestry 5 & FLASH, but 
seems there aren´t so many information.

- Is Tapestry 5 really ready for supporting this tecnology ?

- Is there some JavaScript Toolkit Library ready for handling the Flash 
object and it could be integrated with Tapestry 5 ?

- Any idea about the correct way for getting this integration ?

- Perhaps ... Flex, JQuery, red5  (http://osflash.org/red5) 


Many thanks in advance & and have a nice day.
DiPassi




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

t5-components ratingField within ajax partial replace

2008-07-22 Thread Toby Hobson
Hi

I have noticed some strange behavior with the ratingField component - if i use 
it within a block which is rendered inside a zone the star's no longer appear 
and it defaults back to a regular radio group e.g.








show rating


@Inject
private Block block;

Block onActionFromShowRating() {
return block;
}

The component still functions, it's as if the css/js cannot be rendered inside 
a block

Has anyone seen anything like this before?

Thanks

Toby


T5 component lifecycle

2008-07-21 Thread Toby Hobson
Hi

Could anyone tell point me to some docs about T5's component lifecycle? I know 
there are methods like pageLoaded and onActivate available to pages, I wondered 
if there was something similar for components

Thanks

Toby


T5 nested ajax partial replace

2008-07-14 Thread Toby Hobson
Hi

Is it possible to use ajax partial replace to include a component which also 
uses ajax, as in this scenario:

I create a custom component which uses zones to perform a partial update, I 
then use this custom component on a page:

MyComponent.tml


  hello world


click me

MyComponent.java

@Inject
private Block helloBlock;

Block onActionFromClickMe() {
  return helloBlock;
}

page.tml



this works well but ..

If i do something like this:

page.tml



show 
component

page.java

@Component
private MyComponent myComponent;

public MyComponent onActionFromShowComponent() {
  return myComponent;
}

What I have found is that clicking on the "showComponent" actionlink on the 
page causes the MyComponent to render but when I click the "click me" link I 
get an error about onActionFromClickMe returning a Block where it should be 
returning a link etc. It seems if I use ajax to include a component on a page 
and the included component also uses ajax it doesn't work.

Does this make any sense?

Thanks!

Toby

Re: T5 nested components within t:block

2008-07-14 Thread Toby Hobson
It seems the problem is that I had wrapped my block inside a form, removing the 
form fixed it!

Toby


- Original Message 
From: Toby Hobson <[EMAIL PROTECTED]>
To: tapestry 
Sent: Monday, 14 July, 2008 1:06:45 PM
Subject: T5 nested components within t:block

Hi

I have been experimenting with T5's ajax support which looks really nice! One 
problem I have hit is when I use a nested component within a block, simple 
properties are displayed but the nested components don't render e.g.

photo.tml



name:  ${photo.name}
rating: 

...
show details

photo.java

@Property
private Photo photo
...
@Inject
private Block block;
...
// rating is custom component which renders 1-5 stars based on photo.getRating()
@Component(id="rating", parameters={"user=user", "photo=photo"})
private Rating rating

Block onActionFromShowDetails() {
return block;
}

When I click the actionLink the block is rendered and it displays the photo's 
name etc. but it doesn't render the rating component. Do I have to modify the 
rating component to support ajax? The component works fine in a non-ajax way

Thanks!

Toby


T5 nested components within t:block

2008-07-14 Thread Toby Hobson
Hi

I have been experimenting with T5's ajax support which looks really nice! One 
problem I have hit is when I use a nested component within a block, simple 
properties are displayed but the nested components don't render e.g.

photo.tml



 name:  ${photo.name}
 rating: 

...
show details

photo.java

@Property
private Photo photo
...
@Inject
private Block block;
...
// rating is custom component which renders 1-5 stars based on photo.getRating()
@Component(id="rating", parameters={"user=user", "photo=photo"})
private Rating rating

Block onActionFromShowDetails() {
return block;
}

When I click the actionLink the block is rendered and it displays the photo's 
name etc. but it doesn't render the rating component. Do I have to modify the 
rating component to support ajax? The component works fine in a non-ajax way

Thanks!

Toby


t5-components ratingField validation

2008-06-17 Thread Toby Hobson
I am trying to add validation to a ratingField, I was assuming it bahaved 
similar to a radioGroup but I can't seem to add validation to the field.

I have a property on my page with getters and setters:

private Integer rating;

@validate("required")
public Integer getRating() {

}
...

my template looks like this:




 
...

However the rating field is not validated

Any ideas?

Thanks!

Toby

Re: T5 Setting selected option on Select component

2008-06-10 Thread Toby Hobson
Problem solved ... a typo in my code!

Sorry!

Toby


- Original Message 
From: Toby Hobson <[EMAIL PROTECTED]>
To: tapestry 
Sent: Tuesday, 10 June, 2008 12:19:28 PM
Subject: T5 Setting selected option on Select component

Hi

I have a page which allows a user to update his profile. This includes a select 
component to choose the user's state of residence:

public Enum State {
ALABAMA, ALASKA, ARIZONA ...
}

MyAccount.tml

// text fields etc.




User.java

public class User {
private State state;

public State getState() {
return state;
}

public void setState(State state) {
this.state = state;
}
}

public class MyAccount {
private User user;

void onActivate() {
this.user = loadUser();
}

public User getUser() {
return user;
}

public void setUser(User user) {
this.user = user;
}
}

As you can see I load the user's profile in the onActivate() method. Doing this 
pre-populates the form with the user's details but I need to set the state to 
the user's current state. Currently all the fields are pre-populated except the 
select fields. How do I tell T5 to set a select field to the current value?

Thanks

Toby


T5 Setting selected option on Select component

2008-06-10 Thread Toby Hobson
Hi

I have a page which allows a user to update his profile. This includes a select 
component to choose the user's state of residence:

public Enum State {
ALABAMA, ALASKA, ARIZONA ...
}

MyAccount.tml

// text fields etc.




User.java

public class User {
private State state;

public State getState() {
return state;
}

public void setState(State state) {
this.state = state;
}
}

public class MyAccount {
private User user;

void onActivate() {
this.user = loadUser();
}

public User getUser() {
return user;
}

public void setUser(User user) {
this.user = user;
}
}

As you can see I load the user's profile in the onActivate() method. Doing this 
pre-populates the form with the user's details but I need to set the state to 
the user's current state. Currently all the fields are pre-populated except the 
select fields. How do I tell T5 to set a select field to the current value?

Thanks

Toby


T5 - integrating with a RIA

2008-05-25 Thread Toby Hobson
I'm trying to integrate a flash application with my T5 code.  My flash app 
(built using OpenLaszlo) will make various http get and post requests to the 
server. Ideally I would like to write a custom component which will render the 
flash swf on the page and also handle all the callbacks from the swf to the 
server. Rendering the swf is easy but I'd like to know if there is a 
recommended pattern to follow for handling get and post requests which aren't 
generated by tapestry components i.e. I can't simply write an event handler.

I can access the underlying request and response objects so I guess I could do 
something like request.getParameter() etc. The problem is how do I tell the 
flash app which url to send requests to - the component could be embedded in 
any page so I can't be certain of the url. Is there some way I could find out 
the correct path and pass this into the swf when I render it?

Toby



Re: T5: prohibit directory listing

2008-05-25 Thread Toby Hobson
AH ... maybe it has been fixed in 5.0.12 ... I hope so!

- Original Message 
From: Filip S. Adamsen <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Sunday, 25 May, 2008 3:57:41 PM
Subject: Re: T5: prohibit directory listing

I'm on 5.0.12-SNAPSHOT.

-Filip

On 2008-05-25 16:55, Toby Hobson wrote:
> Hi Filip ... which version of T5 are you using? i'm using 5.0.11 and I can 
> browse my classpath!
> 
> - Original Message 
> From: Filip S. Adamsen <[EMAIL PROTECTED]>
> To: Tapestry users 
> Sent: Sunday, 25 May, 2008 3:45:32 PM
> Subject: Re: T5: prohibit directory listing
> 
> Hi,
> 
> On 2008-05-25 16:28, Toby Hobson wrote:
>> Sadly it's a bit more scary than that :( if you try 
>> http://myserver/contextRoot/assets you will get a (not very nice) surprise!
>>
> 
> You mean a 404 Not Found or blank page depending on whether or not I put 
> a slash at the end?
> 
>> [...]
>>
>> Toby
> 
> -Filip
> 
> -
> 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: T5: prohibit directory listing

2008-05-25 Thread Toby Hobson
Hi Filip ... which version of T5 are you using? i'm using 5.0.11 and I can 
browse my classpath!

- Original Message 
From: Filip S. Adamsen <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Sunday, 25 May, 2008 3:45:32 PM
Subject: Re: T5: prohibit directory listing

Hi,

On 2008-05-25 16:28, Toby Hobson wrote:
> Sadly it's a bit more scary than that :( if you try 
> http://myserver/contextRoot/assets you will get a (not very nice) surprise!
> 

You mean a 404 Not Found or blank page depending on whether or not I put 
a slash at the end?

> [...]
> 
> Toby

-Filip

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






Re: T5: prohibit directory listing

2008-05-25 Thread Toby Hobson
I think that setting TapestryConstants.PRODUCTION_MODE_SYMBOL, "true" should 
only allow clients to download *.css, *.js and *.jpg, *.gif etc. files from the 
asset service

What do you guys think?

Toby

- Original Message ----
From: Toby Hobson <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Sunday, 25 May, 2008 3:28:09 PM
Subject: Re: T5: prohibit directory listing

Sadly it's a bit more scary than that :( if you try 
http://myserver/contextRoot/assets you will get a (not very nice) surprise!

I'm using acegi to block access to everything except *.css, *.js and images 
under the assets path but I believe Robert has written a dispatcher which also 
controls access to files on the classpath - see

http://markmail.org/search/?q=t5%20directory%20listings#query:t5%20directory%20listings+page:1+mid:qptioejs3jbfyroz+state:results

The whole security aspect of T5 is a little worrying to be honest - I think at 
the very least there needs to be a note on the T5 home page about this stuff - 
I bet quite a few people will deploy T5 apps without knowing that most of their 
classpath can be viewed by anyone!

Toby

- Original Message 
From: Jesper Zedlitz <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Sunday, 25 May, 2008 2:32:03 PM
Subject: T5: prohibit directory listing

Hi, 

I hope someone can help me with this little problem:

In src/main/webapp folder I have a subdirectory user/ that contains a
Start.tml page. Everything works fine with the URL .../user/start. But when
a user tries to go to the parent directory .../user/ he can see all .tml
files. 

Any idea how to redirect .../user/ to .../user/start or show the content of
Start.tml immediately?

Jesper

-- 
Jesper Zedlitz   Dept. for Computer Science, CAU of Kiel
Room 1108Communication Systems Research Group
 Phone:+49-(0)431-880-7279
Christian-Albrechts-Platz 4  Fax:  +49-(0)431-880-7615
24098 Kiel - Germany [EMAIL PROTECTED]


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









Re: T5: prohibit directory listing

2008-05-25 Thread Toby Hobson
Sadly it's a bit more scary than that :( if you try 
http://myserver/contextRoot/assets you will get a (not very nice) surprise!

I'm using acegi to block access to everything except *.css, *.js and images 
under the assets path but I believe Robert has written a dispatcher which also 
controls access to files on the classpath - see

http://markmail.org/search/?q=t5%20directory%20listings#query:t5%20directory%20listings+page:1+mid:qptioejs3jbfyroz+state:results

The whole security aspect of T5 is a little worrying to be honest - I think at 
the very least there needs to be a note on the T5 home page about this stuff - 
I bet quite a few people will deploy T5 apps without knowing that most of their 
classpath can be viewed by anyone!

Toby

- Original Message 
From: Jesper Zedlitz <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Sunday, 25 May, 2008 2:32:03 PM
Subject: T5: prohibit directory listing

Hi, 

I hope someone can help me with this little problem:

In src/main/webapp folder I have a subdirectory user/ that contains a
Start.tml page. Everything works fine with the URL .../user/start. But when
a user tries to go to the parent directory .../user/ he can see all .tml
files. 

Any idea how to redirect .../user/ to .../user/start or show the content of
Start.tml immediately?

Jesper

-- 
Jesper Zedlitz   Dept. for Computer Science, CAU of Kiel
Room 1108Communication Systems Research Group
 Phone:+49-(0)431-880-7279
Christian-Albrechts-Platz 4  Fax:  +49-(0)431-880-7615
24098 Kiel - Germany [EMAIL PROTECTED]


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






Re: T5.0.11 + Hibernate

2008-05-25 Thread Toby Hobson
I'm pretty sure I got this error when I tried to use a newer version of 
hibernate, but 3.2.2.ga worked ok.

Btw the tapestry-hibernate stuff works brilliantly ... well done to all the T5 
and T5-Hibernate team!

Toby
- Original Message 
From: János Jarecsni <[EMAIL PROTECTED]>
To: Tapestry users 
Sent: Sunday, 25 May, 2008 12:33:50 PM
Subject: Re: T5.0.11 + Hibernate

Hi Howard,

thanks for the link, I'll have a look!
Below is the stack trace:


   - java.lang.RuntimeExceptionNo service implements the interface
   org.apache.tapestry.ioc.services.PerthreadManager.
   Stack trace
  -
  
org.apache.tapestry.ioc.internal.RegistryImpl.getService(RegistryImpl.java:517)
  -
  
org.apache.tapestry.ioc.internal.services.MasterObjectProviderImpl.provide(MasterObjectProviderImpl.java:46)
  -
  
org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:621)
  -
  
org.apache.tapestry.ioc.internal.RegistryImpl.getObject(RegistryImpl.java:675)
  -
  
org.apache.tapestry.ioc.internal.ObjectLocatorImpl.getObject(ObjectLocatorImpl.java:50)
  -
  
org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameterValue(InternalUtils.java:207)
  -
  
org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParameters(InternalUtils.java:237)
  -
  
org.apache.tapestry.ioc.internal.util.InternalUtils.calculateParametersForMethod(InternalUtils.java:216)
  -
  
org.apache.tapestry.ioc.internal.ServiceBuilderMethodInvoker.createObject(ServiceBuilderMethodInvoker.java:68)
  -
  
org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.initialValue(PerThreadServiceCreator.java:47)
  - java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:141)
  - java.lang.ThreadLocal.get(ThreadLocal.java:131)
  -
  
org.apache.tapestry.ioc.internal.services.PerThreadServiceCreator.createObject(PerThreadServiceCreator.java:53)
  -
  hu.intellynet.mojito.incubator.pages.HbAction.getList(HbAction.java:27)
  -
  org.apache.tapestry.internal.bindings.PropBinding.get(PropBinding.java:54)
  -
  
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:214)
  -
  
org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:229)
  -
  
org.apache.tapestry.corelib.components.Loop._$read_parameter_source(Loop.java)
  - org.apache.tapestry.corelib.components.Loop.setup(Loop.java:219)
  - org.apache.tapestry.corelib.components.Loop.setupRender(Loop.java)
  -
  
org.apache.tapestry.internal.structure.ComponentPageElementImpl$13$1.run(ComponentPageElementImpl.java:478)
  -
  
org.apache.tapestry.internal.structure.ComponentPageElementImpl.invoke(ComponentPageElementImpl.java:874)
  -
  
org.apache.tapestry.internal.structure.ComponentPageElementImpl.access$100(ComponentPageElementImpl.java:54)
  -
  
org.apache.tapestry.internal.structure.ComponentPageElementImpl$13.render(ComponentPageElementImpl.java:482)
  -
  
org.apache.tapestry.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:63)
  -
  
org.apache.tapestry.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:63)
  -
  
org.apache.tapestry.services.TapestryModule$19.renderMarkup(TapestryModule.java:1289)
  -
  
org.apache.tapestry.services.TapestryModule$23.renderMarkup(TapestryModule.java:1397)
  -
  
org.apache.tapestry.services.TapestryModule$22.renderMarkup(TapestryModule.java:1378)
  -
  
org.apache.tapestry.services.TapestryModule$21.renderMarkup(TapestryModule.java:1360)
  -
  
org.apache.tapestry.services.TapestryModule$20.renderMarkup(TapestryModule.java:1342)
  -
  
org.apache.tapestry.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:55)
  -
  
org.apache.tapestry.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:57)
  -
  
org.apache.tapestry.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:59)
  -
  
org.apache.tapestry.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:77)
  -
  
org.apache.tapestry.services.TapestryModule$13.service(TapestryModule.java:911)
  -
  
hu.intellynet.mojito.incubator.services.AppModule$1.service(AppModule.java:94)
  -
  
org.apache.tapestry.internal.services.LocalizationFilter.service(LocalizationFilter.java:43)
  -
  
org.apache.tapestry.services.TapestryModule$3.service(TapestryModule.java:529)
  -
  
org.apache.tapestry.services.TapestryModule$2.service(TapestryModule.java:504)
  -
  
org.apache.tapestry.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:79)
  -
  
org.apache.tapestry.internal.services.Che

Re: Tapestry Page Pool handling.

2008-05-23 Thread Toby Hobson
What application server are you using?

Toby

- Original Message 
From: zaxeer <[EMAIL PROTECTED]>
To: users@tapestry.apache.org
Sent: Friday, 23 May, 2008 1:40:54 PM
Subject: Tapestry Page Pool handling.


Hi All,
I am facing a problem in tapestry related to pages cache, when some html
page is changed its changes are not reflected until we restart server or set
the parameter 
-Dorg.apache.tapestry.disable-caching=true.

both cases are not good for me.

I want to ask that can i access tapestry page pool and set some specific
page cleared from pool or at least set the whole pool cleared.

i need your help please i am waiting

thanks

bye.
-- 
View this message in context: 
http://www.nabble.com/Tapestry-Page-Pool-handling.-tp17424724p17424724.html
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: T5 assets and trailing slash on urls

2008-05-22 Thread Toby Hobson
Yes, that works!

Thanks Thiago - I should have read your earlier post!

Toby

- Original Message 
From: Thiago HP <[EMAIL PROTECTED]>
To: Tapestry users ; Toby Hobson <[EMAIL PROTECTED]>
Sent: Friday, 23 May, 2008 2:08:36 AM
Subject: Re: T5 assets and trailing slash on urls

On 5/22/08, Toby Hobson <[EMAIL PROTECTED]> wrote:
>   type="text/css" />
>  This works fine when I access the app at http://localhost/app/start for 
> example.
> But when I try http://localhost/app/start/ the css and images are screwed. 
> I've
> noticed that in the generated html, T5 creates relative references i.e. 
> styles/
> style.css, not /app/styles/style.css

It seems to me that Tapestry is generating wrong relative URLs for
your assets. Try setting the tapestry.force-absolute-uris symbol to
true in your AppModule. Maybe it helps.

(copied from a post of mine from another thread, hehehe).

-- 
Thiago

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






T5 assets and trailing slash on urls

2008-05-22 Thread Toby Hobson
I have a slight problem using assets (images and css files) my app. within 
Layout.tml I have:



This works fine when I access the app at http://localhost/app/start for 
example. But when I try http://localhost/app/start/ the css and images are 
screwed. I've noticed that in the generated html, T5 creates relative 
references i.e. styles/style.css, not /app/styles/style.css

I've also tried to use the @IncludeStylesheet annotation in Layout.java but I 
get the same effect.

Has anyone else encountered this?

Thanks

Toby




  1   2   >