RE: [T4.1] Reading values from the app.properties file from a page class

2008-10-02 Thread Craig Spry
Sorry I RTFM and worked it out for myself.

Thanks,
Craig

-Original Message-
From: Craig Spry [mailto:[EMAIL PROTECTED]
Sent: Thursday, 2 October 2008 4:18 PM
To: Tapestry users
Subject: [T4.1] Reading values from the app.properties file from a page class

Hello List,

I want to be able to get to the localized strings stored in the app.properties 
file from my java page class, I've tried to use:
engine.getInfrastructure().getApplicationPropertySource().getPropertyValue(value)

This didn't seem to work.  Is what I'm trying to do achievable?  If so what do 
I do to get this to work.

Thanks,

Craig Spry

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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


If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



RE: T4.1:Event connect strangness

2008-09-24 Thread Craig Spry
Thanks for that.  It wasn't included, it is now and all is working.

Craig

-Original Message-
From: Andreas Andreou [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 24 September 2008 3:18 PM
To: Tapestry users
Subject: Re: T4.1:Event connect strangness

is the above script included in the ajax response?

Since the form is submitted and the new form markup replaces the old one,
the (new) taskSelect will not be monitored for changes

On Wed, Sep 24, 2008 at 7:32 AM, Craig Spry [EMAIL PROTECTED] wrote:
 Hello List,

 I have a form with a @PropertySelection component in it, when this changes 
 some elements on the page change.  The HTML looks like this:

 form jwcid=[EMAIL PROTECTED] style=display: inline; 
 updateComponents=ognl:{'allDetails'}
select jwcid=[EMAIL 
 PROTECTED] value=ognl:taskList.selection model=ognl:taskList 
 style=width:250px;/select
/form

 This is being listed to by a method like this:
 @EventListener(events = onchange, targets = taskSelect, submitForm = 
 taskSelection, async=true)
 public void taskSelectListener(IRequestCycle cycle)
 {
 }

 Now I also want the user to be notified that the application is doing 
 something so I have a script file with this code in it to show a loading 
 dialog:
 if(dojo.byId('taskSelect')!= null)
 {
dojo.event.connect(dojo.byId('taskSelect'),onchange,function(){
document.body.style.cursor='wait';
dojo.widget.byId(loadingD).show();
   });
 }

 Now this all works fine the first time the select is changed, but after that 
 the loading dialog isn't shown.  Is there something that I', doing wrong?

 By the way I'm using Tapestry 4.1.6

 Thanks,

 Craig

 If you are not an authorised recipient of this e-mail, please contact me at 
 Redflex immediately by return phone call or by email. In this case, you 
 should not read, print, retransmit, store or act in reliance on this e-mail 
 or any attachments, and should destroy all copies of them. This e-mail and 
 any attachments are confidential and may contain privileged information 
 and/or copyright material of Redflex or third parties. You should only 
 retransmit, distribute or commercialise the material if you are authorised to 
 do so. This notice should not be removed.


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





--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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


If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



T4.1:Event connect strangness

2008-09-23 Thread Craig Spry
Hello List,

I have a form with a @PropertySelection component in it, when this changes some 
elements on the page change.  The HTML looks like this:

form jwcid=[EMAIL PROTECTED] style=display: inline; 
updateComponents=ognl:{'allDetails'}
select jwcid=[EMAIL 
PROTECTED] value=ognl:taskList.selection model=ognl:taskList 
style=width:250px;/select
/form

This is being listed to by a method like this:
@EventListener(events = onchange, targets = taskSelect, submitForm = 
taskSelection, async=true)
public void taskSelectListener(IRequestCycle cycle)
{
}

Now I also want the user to be notified that the application is doing something 
so I have a script file with this code in it to show a loading dialog:
if(dojo.byId('taskSelect')!= null)
{
dojo.event.connect(dojo.byId('taskSelect'),onchange,function(){
document.body.style.cursor='wait';
dojo.widget.byId(loadingD).show();
   });
}

Now this all works fine the first time the select is changed, but after that 
the loading dialog isn't shown.  Is there something that I', doing wrong?

By the way I'm using Tapestry 4.1.6

Thanks,

Craig

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



RE: [T4.1] Application works fine with Jetty, doesn't work so good with Tomcat

2008-08-28 Thread Craig Spry
Hello All,

I've found out today that I have this setting in my jetty configuration:

systemProperty
nameorg.apache.tapestry.disable-caching/name
valuetrue/value
/systemProperty

When I remove this it behaves the same at it does when running under Tomcat.  
Now I've read in the documentation that it is not a good idea to do this in a 
production environment, is there another way that I can get this page to not be 
loaded from the cache other than turning this off.

Thanks,

Craig

-Original Message-
From: Craig Spry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 27 August 2008 5:01 PM
To: Tapestry users
Subject: [T4.1] Application works fine with Jetty, doesn't work so good with 
Tomcat

Hello All,

I have a Tapestry 4.1 application that uses a Tacos Tree, which is built from 
information in a database.  This tree isn't visible from all pages in our 
application.  Now when I go to the page that has the tree on it and then 
navigate to a page without the tree on it and make a change which should change 
the tree and then navigate back to the tree page, I get the following behavior:
Jetty:
Tree looks like it should.
Tomcat:
Tree looks the way it did before the change.

Now is there any setting in tomcat that would change the way the page with the 
tree on it loads?

Thanks,
Craig Spry

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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


If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



[T4.1] Application works fine with Jetty, doesn't work so good with Tomcat

2008-08-27 Thread Craig Spry
Hello All,

I have a Tapestry 4.1 application that uses a Tacos Tree, which is built from 
information in a database.  This tree isn't visible from all pages in our 
application.  Now when I go to the page that has the tree on it and then 
navigate to a page without the tree on it and make a change which should change 
the tree and then navigate back to the tree page, I get the following behavior:
Jetty:
Tree looks like it should.
Tomcat:
Tree looks the way it did before the change.

Now is there any setting in tomcat that would change the way the page with the 
tree on it loads?

Thanks,
Craig Spry

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



RE: @EventListener

2008-04-02 Thread Craig Spry
I think you have not set the update component, you need to put some code into 
watchText() like this:
cycle.getResponseBuilder().updateComponent(DialogContentSupplimental);

I have also had more success implementing my dialogs like this
div jwcid= [EMAIL PROTECTED] hidden=ognl:not showDlg class=dialogue

Then all you do is set showDlg to true in watchText(), but you may get 
different results.

I hope this helps,
Craig

-Original Message-
From: Kavya K [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 2 April 2008 7:53 PM
To: users@tapestry.apache.org
Subject: @EventListener

Hi..

My html code is..
 input   id=supplimentalId class=button  jwcid=@Submit value=Add/

and java code is
@EventListener(elements = supplimentalId, events = onclick)
public void watchText(IRequestCycle cycle)
  {
   //  do something

  ((Dialog)getComponent(DialogContentSupplimental)).show();
  }


ie .. when i click on add button this dialog box must open.
But the above method is not working.

Please if anybody could help me, I ll be thankfull.



Regards,
kavya

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



T4: @Eventlistener onchange with a select

2008-03-12 Thread Craig Spry

Hello All,

I have a page with 2 forms on it.  The first form only has a select in it and 
the contents of the second form depend on the selection of select in the first 
form.  No I tried to put an @EventListener to listen when the select changed 
its contents.  When I did this the index that was returned was not the value 
that was selected.  The only way that I could get this to be the correct value 
was to put in a submitForm attribute in the @EventListener and put a listener 
on that form.  I have included code snippets below and I'm using Tapestry 
4.1.5.  What I would like to know is this the correct way to do this?  Have I 
stumbled across a bug?

Craig

Page.java
*
@EventListener(events=onchange,elements=cameraList, 
submitForm=personListForm)
public void loadPerson(IRequestCycle cycle)
{
}

public void personformSubmit(IRequestCycle cycle)
{
int idx = getPersonSelectedIndex();
//do stuff to fill in form 2
}
*
Page.html
*
form jwcid=[EMAIL PROTECTED] style=display: inline; listener=listener: 
personformSubmit
  select jwcid=[EMAIL PROTECTED] style=width:250px;
span jwcid=@For source=ognl: personList 
value=ognl:currentPerson index=ognl:currentPersonIndex
  option jwcid=@Option selected=ognl: 
personSelection[currentPersonIndex] 
label=ognl:currentPerson.shortDescription/
/span
  /select
/form
*

If you are not an authorised recipient of this e-mail, please contact me at 
Redflex immediately by return phone call or by email. In this case, you should 
not read, print, retransmit, store or act in reliance on this e-mail or any 
attachments, and should destroy all copies of them. This e-mail and any 
attachments are confidential and may contain privileged information and/or 
copyright material of Redflex or third parties. You should only retransmit, 
distribute or commercialise the material if you are authorised to do so. This 
notice should not be removed.


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



T4.1:Overloaded Submit Button

2007-08-02 Thread Craig Spry

Hello All,

I'm trying to overload tapestries Submit with my own submit so I can have my 
code in the isDisabled() function.  I want to do this so I can check only in 
one place is a user has write access to any page in my application in one 
place, ie the isDisabled() function.  Since I'm having to do some strange 
things to get this going, copy the contents of the Submit.jwc from the Tapestry 
source into MySubmit.jwc and copy the SubmitBindings.script into my source 
directory, I was wondering if this is the best way to do this, or is there a 
better way.

Thanks,
Craig

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



RE: T4.1 List of pages

2007-07-31 Thread Craig Spry
Thanks

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 31 July 2007 4:47 PM
To: users@tapestry.apache.org
Subject: RE: T4.1 List of pages

Hi Craig,

most probably, you don't have your page-specifications listed in your
*.application (or *.library, if you're interested in a library's pages.)

Unfortunately, Tapestry's page-/component-lookup mechanism is
sufficiently complicated to make it hard to detect all pages before
usage -- unless they're listed in the specification.

Marcus

 -Original Message-
 From: Craig Spry [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 31, 2007 3:46 AM
 To: Tapestry users
 Subject: RE: T4.1 List of pages

 Hello,

 I tried to do getNamespace().getPageNames() and all I got was
 the name of the current page.  Then I tried this:
 ListString pages = new VectorString(); for ( Object id :
 getNamespace().getChildIds() ) {
 INamespace lib = getNamespace().getChildNamespace(
 id.toString() );
 pages.addAll(lib.getPageNames()); }

 This gave me a list of components.  Is there anything eles
 that I need to do?

 Craig

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 25 July 2007 4:16 PM
 To: users@tapestry.apache.org
 Subject: RE: T4.1 List of pages

 getNamespace().getPageNames()

 /Marcus

  -Original Message-
  From: Craig Spry [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, July 25, 2007 8:01 AM
  To: Tapestry users
  Subject: T4.1 List of pages
 
  Hello All,
 
  I'm currently adding user permissions to my application,
 this is going
  to be done on a per page basis.  I was wondering if it is
 possible to
  get tapestry to give me a list of pages so I can build the
 permissions
  page dynamically to save me having to manually up date this
 every time
  a new page is added.
 
  TIA,
  Craig
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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


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



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


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



RE: T4.1 List of pages

2007-07-30 Thread Craig Spry
Hello,

I tried to do getNamespace().getPageNames() and all I got was the name of the 
current page.  Then I tried this:
ListString pages = new VectorString();
for ( Object id : getNamespace().getChildIds() )
{
INamespace lib = getNamespace().getChildNamespace( id.toString() );
pages.addAll(lib.getPageNames());
}

This gave me a list of components.  Is there anything eles that I need to do?

Craig

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 25 July 2007 4:16 PM
To: users@tapestry.apache.org
Subject: RE: T4.1 List of pages

getNamespace().getPageNames()

/Marcus

 -Original Message-
 From: Craig Spry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 25, 2007 8:01 AM
 To: Tapestry users
 Subject: T4.1 List of pages

 Hello All,

 I'm currently adding user permissions to my application, this
 is going to be done on a per page basis.  I was wondering if
 it is possible to get tapestry to give me a list of pages so
 I can build the permissions page dynamically to save me
 having to manually up date this every time a new page is added.

 TIA,
 Craig

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



T4.1 List of pages

2007-07-25 Thread Craig Spry
Hello All,

I'm currently adding user permissions to my application, this is going to be 
done on a per page basis.  I was wondering if it is possible to get tapestry to 
give me a list of pages so I can build the permissions page dynamically to save 
me having to manually up date this every time a new page is added.

TIA,
Craig

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



RE: Cometd Implimentation

2007-06-07 Thread Craig Spry
Andy,

Although I haven't tested this yet I think this will work in other
servlet containers, because all the jar files from the Jetty will be
packaged up in the war file.  This is only a suspicion and I don't know
what other problems this would have.

Long term I'd like to write a tapestry service to do the cometd
functionality, so it would be independent of servlet container, but I
don't even know if this is feasible yet.  I imagine this service would
be an abstraction layer on top of what each container would offer as its
cometd implementation.

Craig

-Original Message-
From: Craig Spry [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 June 2007 9:08 AM
To: Tapestry users
Subject: RE: Cometd Implimentation

Thanks for your help, I'm actually trying to get it into Tacos at the
moment, when I told Andy what I had and that I wanted to put it into
Tacos, he made me a directory structure to put it in.  It should be in
its new home by the end of today.

Craig

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 June 2007 12:18 AM
To: Tapestry users
Subject: Re: Cometd Implimentation

Looks awesome so far Craig ! Keep up the good work.  :)

Sorry I've been a little busy to keep up with everything but your
efforts
are appreciated of course.

If you wanted a public svn repo I can give you access to the tacos repo
if
you send me your sourceforge username off-list . (assuming that Andy is
ok
with that) I think the documentation and actual site for tacos is out of
date but you should have free reign to do most of those things there if
you
want.

On 6/5/07, Craig Spry [EMAIL PROTECTED] wrote:

 I've allowed the addition of coments, so you can let me know what you
 think there.

 Craig

 -Original Message-
 From: Craig Spry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 6 June 2007 9:15 AM
 To: Tapestry users
 Subject: RE: Cometd Implimentation

 Thanks for your feedback, I'll try and add the ability to add comments
 to my site.  I would also like to contribute this to somewhere where
it
 can be worked on by more than just me and isn't so hidden away.  Can
 anyone tell me where the best place to put this would be?

 Thanks,

 Craig

 -Original Message-
 From: Alejandro Scandroli [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 5 June 2007 5:59 PM
 To: Tapestry users
 Subject: Re: Cometd Implimentation

 Hi Craig

 Nice component!.
 I've tested it with 6.1.0 version of maven-jetty-plugin and It works
 fine!
 I'm testing it on linux and at first Tapestry complained about not
 been able to find a template for the Cometd component, it was because
 the html template name is lowercase. Once I changed that it worked.

 Is there a way to let you comments directly on the site?

 Saludos.
 Alejandro.

 On 6/5/07, Craig Spry [EMAIL PROTECTED] wrote:
  Hello,
 
  I've managed to get a very rough implementation of cometd working
with
  tapestry/jetty/dojo.  I've implemented it as a component, you can
get
  the source from here:
  http://www.spry.net.au/?q=node/10
 
  To get the full effect open up 2 browsers and point them at the
 webapp.
 
  I'm putting this up for people to have a look at and it is by no way
  production ready, so please don't expect it to scale, work reliably
or
  even work at all.
 
  I have only run this using, using Sun's JDK 1.5.0_11 and Maven:
  mvn jetty:run
 
  So I don't know if it will work using other JSP containers or JDKs.
 
  Now for the nitty gritty, from here on in I assume you know
something
  about cometd.  To get this to work I have a function that is
 listening,
  when data needs to be pushed to the page, I get the sever to publish
 an
  event, on the client side the data is ignored and the function that
is
  listening calls the onclick() function of a component on the page,
 which
  does what ever you want.
 
  I tried to send through rendered content to the listening function,
 but
  I couldn't work out how to get tapestry to genterate a response
 without
  a request.
 
  To use this component in the .html file you will need a line that
 looks
  like this:
  span jwcid =cometd /
 
  In the .page file:
  component id=cometd type=Cometd
  binding name=webapp value=literal:cometchat/
  binding name=topic value=literal:/pages/test/
  binding name=clickComponent value=literal:clickMe/
  /component
 
  Where webapp is the containing web application, the topic is what
the
  server will be publishing on and the pages will be listening and
click
  component is the id of the component that will be called by the
  listening function, ie when a cometd event happens on topic
  '/pages/test' clickMe.onclick() will be called on your web page.
 
  I wouldn't recommend using what I have done to learn about cometd,
to
 do
  this get the jetty source code from subversion and look at the
  cometd-demo in the contrib directory.
 
  Well there it is, take it for what it is and I'll keep posting
  improvements to the above

RE: Cometd Implimentation

2007-06-07 Thread Craig Spry
Looks and works good, thanks for that, it always give me a good feeling
when someone else can use what I have done.  I also like the changes
that you have done.

Craig

-Original Message-
From: Andreas Andreou [mailto:[EMAIL PROTECTED] On Behalf Of andyhot
Sent: Friday, 8 June 2007 12:27 PM
To: Tapestry users
Subject: Re: Cometd Implimentation

You're right, it works in tomcat too...
The code is now in tacos (with minor changes) + there's a demo page in 
tacos-demo, so one
can easily do
mvn tomcat:run-war to see it working :)

Craig Spry wrote:
 Andy,

 Although I haven't tested this yet I think this will work in other
 servlet containers, because all the jar files from the Jetty will be
 packaged up in the war file.  This is only a suspicion and I don't
know
 what other problems this would have.

 Long term I'd like to write a tapestry service to do the cometd
 functionality, so it would be independent of servlet container, but I
 don't even know if this is feasible yet.  I imagine this service would
 be an abstraction layer on top of what each container would offer as
its
 cometd implementation.

 Craig

 -Original Message-
 From: Craig Spry [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 7 June 2007 9:08 AM
 To: Tapestry users
 Subject: RE: Cometd Implimentation

 Thanks for your help, I'm actually trying to get it into Tacos at the
 moment, when I told Andy what I had and that I wanted to put it into
 Tacos, he made me a directory structure to put it in.  It should be in
 its new home by the end of today.

 Craig

 -Original Message-
 From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, 7 June 2007 12:18 AM
 To: Tapestry users
 Subject: Re: Cometd Implimentation

 Looks awesome so far Craig ! Keep up the good work.  :)

 Sorry I've been a little busy to keep up with everything but your
 efforts
 are appreciated of course.

 If you wanted a public svn repo I can give you access to the tacos
repo
 if
 you send me your sourceforge username off-list . (assuming that Andy
is
 ok
 with that) I think the documentation and actual site for tacos is out
of
 date but you should have free reign to do most of those things there
if
 you
 want.

 On 6/5/07, Craig Spry [EMAIL PROTECTED] wrote:
   
 I've allowed the addition of coments, so you can let me know what you
 think there.

 Craig

 -Original Message-
 From: Craig Spry [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 6 June 2007 9:15 AM
 To: Tapestry users
 Subject: RE: Cometd Implimentation

 Thanks for your feedback, I'll try and add the ability to add
comments
 to my site.  I would also like to contribute this to somewhere where
 
 it
   
 can be worked on by more than just me and isn't so hidden away.  Can
 anyone tell me where the best place to put this would be?

 Thanks,

 Craig

 -Original Message-
 From: Alejandro Scandroli [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, 5 June 2007 5:59 PM
 To: Tapestry users
 Subject: Re: Cometd Implimentation

 Hi Craig

 Nice component!.
 I've tested it with 6.1.0 version of maven-jetty-plugin and It works
 fine!
 I'm testing it on linux and at first Tapestry complained about not
 been able to find a template for the Cometd component, it was because
 the html template name is lowercase. Once I changed that it worked.

 Is there a way to let you comments directly on the site?

 Saludos.
 Alejandro.

 On 6/5/07, Craig Spry [EMAIL PROTECTED] wrote:
 
 Hello,

 I've managed to get a very rough implementation of cometd working
   
 with
   
 tapestry/jetty/dojo.  I've implemented it as a component, you can
   
 get
   
 the source from here:
 http://www.spry.net.au/?q=node/10

 To get the full effect open up 2 browsers and point them at the
   
 webapp.
 
 I'm putting this up for people to have a look at and it is by no way
 production ready, so please don't expect it to scale, work reliably
   
 or
   
 even work at all.

 I have only run this using, using Sun's JDK 1.5.0_11 and Maven:
 mvn jetty:run

 So I don't know if it will work using other JSP containers or JDKs.

 Now for the nitty gritty, from here on in I assume you know
   
 something
   
 about cometd.  To get this to work I have a function that is
   
 listening,
 
 when data needs to be pushed to the page, I get the sever to publish
   
 an
 
 event, on the client side the data is ignored and the function that
   
 is
   
 listening calls the onclick() function of a component on the page,
   
 which
 
 does what ever you want.

 I tried to send through rendered content to the listening function,
   
 but
 
 I couldn't work out how to get tapestry to genterate a response
   
 without
 
 a request.

 To use this component in the .html file you will need a line that
   
 looks
 
 like this:
 span jwcid =cometd /

 In the .page file:
 component id=cometd type=Cometd
 binding name=webapp value=literal:cometchat

RE: Cometd Implimentation

2007-06-05 Thread Craig Spry
Thanks for your feedback, I'll try and add the ability to add comments
to my site.  I would also like to contribute this to somewhere where it
can be worked on by more than just me and isn't so hidden away.  Can
anyone tell me where the best place to put this would be?

Thanks,

Craig

-Original Message-
From: Alejandro Scandroli [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 5 June 2007 5:59 PM
To: Tapestry users
Subject: Re: Cometd Implimentation

Hi Craig

Nice component!.
I've tested it with 6.1.0 version of maven-jetty-plugin and It works
fine!
I'm testing it on linux and at first Tapestry complained about not
been able to find a template for the Cometd component, it was because
the html template name is lowercase. Once I changed that it worked.

Is there a way to let you comments directly on the site?

Saludos.
Alejandro.

On 6/5/07, Craig Spry [EMAIL PROTECTED] wrote:
 Hello,

 I've managed to get a very rough implementation of cometd working with
 tapestry/jetty/dojo.  I've implemented it as a component, you can get
 the source from here:
 http://www.spry.net.au/?q=node/10

 To get the full effect open up 2 browsers and point them at the
webapp.

 I'm putting this up for people to have a look at and it is by no way
 production ready, so please don't expect it to scale, work reliably or
 even work at all.

 I have only run this using, using Sun's JDK 1.5.0_11 and Maven:
 mvn jetty:run

 So I don't know if it will work using other JSP containers or JDKs.

 Now for the nitty gritty, from here on in I assume you know something
 about cometd.  To get this to work I have a function that is
listening,
 when data needs to be pushed to the page, I get the sever to publish
an
 event, on the client side the data is ignored and the function that is
 listening calls the onclick() function of a component on the page,
which
 does what ever you want.

 I tried to send through rendered content to the listening function,
but
 I couldn't work out how to get tapestry to genterate a response
without
 a request.

 To use this component in the .html file you will need a line that
looks
 like this:
 span jwcid =cometd /

 In the .page file:
 component id=cometd type=Cometd
 binding name=webapp value=literal:cometchat/
 binding name=topic value=literal:/pages/test/
 binding name=clickComponent value=literal:clickMe/
 /component

 Where webapp is the containing web application, the topic is what the
 server will be publishing on and the pages will be listening and click
 component is the id of the component that will be called by the
 listening function, ie when a cometd event happens on topic
 '/pages/test' clickMe.onclick() will be called on your web page.

 I wouldn't recommend using what I have done to learn about cometd, to
do
 this get the jetty source code from subversion and look at the
 cometd-demo in the contrib directory.

 Well there it is, take it for what it is and I'll keep posting
 improvements to the above site as I make them I think there is plenty
of
 room for improvements.

 Craig

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



4.1.2 Cometd Implimentation

2007-05-30 Thread Craig Spry
I'm looking at adding cometd type functionality to the tapestry
4.1.2-snapshot application that I'm currently developing.  I would like
to do it as follows:

Have only one cometd subscription per page.  This would be bound to a
javascript function that would have the updates sent to it, much like
XHR works at the moment, except in reverse.

Then in the Java code for that page I would have a thread that would
have code in it that would look something like this:

private void poll()
{
while(true)
{
Thread.sleep(1000)
{
if(some_condition)
{

MyTapestryCometdClient.updateComponent('component_id');
}
}
}
} 

Where MyTapestryCometdClient would be my implementation to send out the
cometd request to all the waiting javascript functions. 

I'm going to use Jetty's implementation of cometd.
 
What I would like to know is what I'm trying to achieve feasible, can
Tapestry 4.1.2 even be made work with comet?

Has anyone else already got Tapestry to work with cometd?

Or is there a better way to get events from the server to a waiting web
page that doesn't involve polling?

If no one has and I do manage to get it to work, would anyone else be
interested in how I got it to work?

Thanks,
Craig Spry

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