Re: [ANN] Tacos 4.1.0 release

2007-10-01 Thread andyhot

0.7.0-SNAPSHOT from
http://www.erinors.com/developer/maven2/com/erinors/tapestry/tapdoc-maven-plugin/0.7.0-SNAPSHOT

has been copied to  
https://tacos.svn.sourceforge.net/svnroot/tacos/tacos-4.1/trunk/tapdoc


and it already has some tweaks - you can easily build it from there and use it 
the
way tacos-core does to build the docs.

But there's no release yet, 
neither final (so as to exist in http://mirrors.ibiblio.org/pub/mirrors/maven2/net/sf/tacos/)

nor snapshot (those indeed go to http://tacos.sourceforge.net/nightly/)
cause i was wanting to merge (and fix) some (crappy) code i had that added 
support for
annotation only components. I'll post a followup later this week on any progress




Kalle Korhonen wrote:

Hey Andy,

you mentioned that tapdoc is merging with Tacos. Where's the snapshot repo
for tapdoc and which version should/could people be using? There's only
0.6.5-SNAPSHOT in Tacos nightly at:
http://tacos.sourceforge.net/nightly/and the latest
0.7.0-SNAPSHOT at
http://www.erinors.com/developer/maven2/com/erinors/tapestry/tapdoc-maven-plugin/0.7.0-SNAPSHOT/is
from May. If I specify tapdoc in reporting section, I cannot get it to
work because it's missing dependencies and in the reporting section it's not
allowed to declare plugin dependencies. Which repository and version of
tapdoc would you recommend using?

Kalle

On 9/6/07, Andreas Andreou [EMAIL PROTECTED] wrote:
  

Hi all,
It's a pleasure for me to announce the release of Tacos 4.1.0
(http://tacos.sourceforge.net/tacos4.1/) - the first stable tacos
release supporting Tapestry 4.1.x and offering:
* Dojo Widget - Generic component for (almost) all dojo widgets.
* script.aculo.us - brand new components based on script.aculo.us
* Comet component
* New Annotations - allow you to inject ILinks and easily check if
component parameters are bound.
* New binding prefixes - including 'template' that makes string
related ognl expressions easier, and 'absoluteAsset' which works like
the asset binding but makes sure that the created url is absolute.
* BeanForm - All-in-one, flexible bean editor BeanForm has become a
major part of Tacos. This update offers complete compatibility with
Tapestry 4.1.2.
* Tapdoc - though not yet properly released from within tacos, it
offers a maven plugin for component reference generation.

Furthermore:
- The jars have already been deployed over at ibiblio.org - more
installation instructions can be found at

http://tacos.sourceforge.net/tacos4.1/tacos-core/quick-start/downloading.html
- Beanform (http://beanform.sourceforge.net/) and Tapdoc
(http://www.erinors.com/developer/project/tapdoc/) have merged
with Tacos.
- Huge thanks to our latest committer Igor Drobiazko whose excitement
has shed new life to the project.
- Extra special thanks to all the people that contributed code, esp.
Daniel Gredler, Norbert Sandor, Patrick Moore, Ming Jiang and Craig Spry

Have fun with it!

--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting


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





  


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


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



Re: Questions for Tapestry 5

2007-10-01 Thread Hugo Palma
There are companies and individuals that provide Tapestry professional 
services.

You can find more info here http://tapestrysupport.com

BLIER, Jacques wrote:

Hi!

I am a Tapestry newbie and want to start directly by using Tapesry 5. I think 
that Tapestry have a lot of potential and that it can grow into a large 
community.

Here are a few questions:

*   When do you plan to release 5.0.6?
*   How can I modify the QuickStart archetype 
(http://tapestry.formos.com/nightly/tapestry5/quickstart/) to load in Meaven 
the 5.0.6 nightlies and not 5.0.5?
*   Do you plan to open a developer forum?
*   Is there a searchable archive of mailing list?
*   Finally, are there training available for Typestry 5? And if so, what 
are the costs and accomodations?

Regards,

Jacques R. Blier
RD
Airwide Solutions (Montréal)


  


T5: OnPassivate returning multiple variables

2007-10-01 Thread Angelo Chen

Hi,

I have this page that was activated with two parameters, as I understand
onPassivate is used to persist the parameters, how can u return two
parameters in this case? Thanks,
A.C.

http://localhost:8080/Show/3097/262

  public Class onActivate(Long id, Long usr_id) {
/* some process here */
  return null;   
  }

public Long onPassivate() {
return currentUser.getId();
}
-- 
View this message in context: 
http://www.nabble.com/T5%3A-OnPassivate-returning-multiple-variables-tf4546953.html#a12975321
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: OnPassivate returning multiple variables

2007-10-01 Thread Robin Helgelin
On 10/1/07, Angelo Chen [EMAIL PROTECTED] wrote:
 public Long onPassivate() {
 return currentUser.getId();
 }

I'm actually just guessing here, but public Long[] onPassivate() ?

-- 
regards,
Robin

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



Antwort: Re: T5: OnPassivate returning multiple variables

2007-10-01 Thread Kristian Marinkovic
you could also return a list of objects




Robin Helgelin [EMAIL PROTECTED] 
01.10.2007 11:12
Bitte antworten an
Tapestry users users@tapestry.apache.org


An
Tapestry users users@tapestry.apache.org
Kopie

Thema
Re: T5: OnPassivate returning multiple variables






On 10/1/07, Angelo Chen [EMAIL PROTECTED] wrote:
 public Long onPassivate() {
 return currentUser.getId();
 }

I'm actually just guessing here, but public Long[] onPassivate() ?

-- 
regards,
Robin

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




Re: Antwort: Re: T5: OnPassivate returning multiple variables

2007-10-01 Thread Angelo Chen

Hi,
Thanks to all, list of objects works, I do not try array, must be working as
well.


kristian.marinkovic wrote:
 
 you could also return a list of objects
 
 
 
 
 Robin Helgelin [EMAIL PROTECTED] 
 01.10.2007 11:12
 Bitte antworten an
 Tapestry users users@tapestry.apache.org
 
 
 An
 Tapestry users users@tapestry.apache.org
 Kopie
 
 Thema
 Re: T5: OnPassivate returning multiple variables
 
 
 
 
 
 
 On 10/1/07, Angelo Chen [EMAIL PROTECTED] wrote:
 public Long onPassivate() {
 return currentUser.getId();
 }
 
 I'm actually just guessing here, but public Long[] onPassivate() ?
 
 -- 
 regards,
 Robin
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-OnPassivate-returning-multiple-variables-tf4546953.html#a12976834
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: T3: Upload

2007-10-01 Thread Nick Westgate

I've tested the example code on the page. It works with the exception
of file.isTruncated(), which has been deprecated, I presume.

So the rest of the code, ie the code you post below, does work.

It must be a configuration issue. Are you running this example page
in isolation, or is it part of a larger project? Are you running
from inside Eclipse? If not, how is Tomcat started?

Cheers,
Nick.


Nazmul Bhuiyan wrote:

.page:
page-specification class=com.fujitsu.efi.web.pages.test.UploadPage
/page-specification

The .page file was missed spelled but after correcting the file name I'm
getting the following error:

Could not load class UploadPage from WebappClassLoader delegate: false
repositories: /WEB-INF/classes/ -- Parent Classloader:
[EMAIL PROTECTED] : UploadPage


But com.fujitsu.efi.web.pages.test.UploadPage class exists in
WEB-INF/classes directory.

Thanks

Naz


Nick Westgate wrote:

What about your .page file?

Cheers,
Nick.


Nazmul Bhuiyan wrote:

If you click on the link I've provided you will see the code. I've copied
the
code from there. This is from my Upload.html and formSubmit is as below:

private IUploadFile file;
private File serverFile;

public IUploadFile getFile() { return file; }

public void setFile(IUploadFile value) {
file = value;
}
public void formSubmit(IRequestCycle cycle) { 
InputStream fis = file.getStream(); 
FileOutputStream fos = null;
 
try { 
fos = new FileOutputStream(new  File(file.getFileName()));
byte[] buffer = new byte[1024];  
while (true) {
int length = fis.read(buffer);  
if (length   0) {

break;
}
fos.write(buffer, 0, length);   
}

fis.close();
fos.close();
serverFile = new File(file.getFileName());

} catch (IOException ioe) {
ioe.printStackTrace();
} finally {

if (fis != null) {
try { fis.close(); } catch (IOException ioe) {}
}   
if (fos != null) {

try { fos.close(); } catch (IOException ioe) {}
}
}
}


Nick Westgate wrote:

Ok. Is this in a page or a component?
And your Java code? Do you have a formSubmit listener?

Cheers,
Nick.


Nazmul Bhuiyan wrote:

I've copied the code from
http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

form jwcid=@Form listener=ognl:listeners.formSubmit
table bgcolor=#c0c0c0 cellpadding=4
tr
td colspan=2File:nbsp;input jwcid=@Upload 
file=ognl:file
type=file/input/td
/tr
tr
td colspan=2input type=submit 
value=Upload/input/td
/tr


Thanks

Naz


Nick Westgate wrote:

Please post the (relevant parts of) the code.

Cheers,
Nick.


Nazmul Bhuiyan wrote:

I'm getting an error when trying the Upload component example in
http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

Unable to resolve expression 'listeners.formSubmit' for
[EMAIL PROTECTED] 
binding: ExpressionBinding[UploadPage listeners.formSubmit
cachedValue=null] 


I've modified the listener.formSubmit to listeners.formSubmit
according
to
Nick and still getting the error.

Nick's answer for same issue in this forum:
http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

Is there anything missed?

Thanks

Naz

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



t5: mock-up templates with sample-content then replace in t5

2007-10-01 Thread Britske

Hi, 

in T4 it is possible to mock-up pages in your  favorite html-editor (say
dreamweaver) including sample-content (for tables for example). 
How can I achieve the same in T5. 

I mean, I can add a table (see below) with dynamic content, but is it
possible to add sample content (which is replaced by the actual dynamic
content on launch) to this same table definition so that the design aspect
is integrated as well?

Thanks in advance,
Geert-Jan

table
tr t:type=loop source=items value=item class=prop:rowClass
  td${item.id}/td
  td${item.name}/td
  td${item.quantity}/td
/tr
  /table
-- 
View this message in context: 
http://www.nabble.com/t5%3A-mock-up-templates-with-sample-content-then-replace-in-t5-tf4547816.html#a12977663
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua

Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. Components that inherit from AbstractComponent will render output in Java 
code, by implementing method renderComponent() .

I would like to build a component that operates combined semantics... or at 
least option 2 supporting the manipulation/usage of templates within JAVA. 
Option 1 only supports handlers not necessarily rendering + JSON.

WHY? Some component templates are lengthy and I would not like to implement all 
that rendering in the JAVA as it is too cluttered/cumbersome. Plus some 
components are best fit in just a template and others are better fit in JAVA... 
I have a component anatomy a bit complex that requires everything and I want to 
distribute the implementation efficiently across both models.

Can tapestry-4.1.2 deliver?

If I commit to model #1 then I end up missing what I need. Same if I commit to 
model #2. I need both.

Your feedback is appreciated.

Best regards
Ken in nashua
_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
don't know if it's what you are looking for but you can always
override renderComponent also in BaseComponent decorating the
component template with some additional html e.g.

/* (non-Javadoc)
 * @see 
org.apache.tapestry.BaseComponent#renderComponent(org.apache.tapestry.IMarkupWriter,
org.apache.tapestry.IRequestCycle)
 */
public void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
{

if (showComponent) {
writer.begin(div);
renderIdAttribute(writer, cycle);
writer.appendAttribute(class, getMyCSSClass());
renderInformalParameters(writer, cycle);
super.renderComponent(writer, cycle);
} else {
writer.begin(span);
renderIdAttribute(writer, cycle);
}

writer.end();
}


in this example, if the component is inheriting from BaseComponent ,
super.renderComponent(writer, cycle) , wil render the template
part of the component within
some other directly java manipulated html.

But it's not 100% clear to me what you mean with manipulation/usage
of templates within JAVA as in tapestry templates are manipulated
within java, meaning that you can change a template output quite a lot
using existing or custom components and ognl parameters binding.

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



RE: Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua

If it means anything... I am designing a Gallery.HTML here is my component 
layout...

--
auto-paging

--
content

--
auto-paging

--


1. auto-paging just operates auto-paging buttons top/bottom just like 
contrib:table AND both instances are anchored to the same instance
2. content is just a collection

Parameters for CONTENT:
 o tableSize - overrides default getcontentBox().width layout and forces 
scrollable number of rows in the Gallery equal to the tableSize

Parameters for AUTO-PAGING
 o begin - pages to front of collection
 o prev - pages to previous fittable amount of collection
 o next - pages to next fittable amount of collection
 o end - pages to end of collection

I intend to operate the persistence of the auto-paging parameters using JSON.

I'd like to retain the layout of these components using templates.

So I need JSON, Rendering overrides and listener handlers plus simplified 
layouts using templates... COMBINED.

Thanks for your feedback.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:14:37 -0400








Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. Components that inherit from AbstractComponent will render output in Java 
code, by implementing method renderComponent() .

I would like to build a component that operates combined semantics... or at 
least option 2 supporting the manipulation/usage of templates within JAVA. 
Option 1 only supports handlers not necessarily rendering + JSON.

WHY? Some component templates are lengthy and I would not like to implement all 
that rendering in the JAVA as it is too cluttered/cumbersome. Plus some 
components are best fit in just a template and others are better fit in JAVA... 
I have a component anatomy a bit complex that requires everything and I want to 
distribute the implementation efficiently across both models.

Can tapestry-4.1.2 deliver?

If I commit to model #1 then I end up missing what I need. Same if I commit to 
model #2. I need both.

Your feedback is appreciated.

Best regards
Ken in nashua
Discover the new Windows Vista Learn more!

_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

RE: T5: the scanner and JBoss

2007-10-01 Thread Ben Sommerville
Switching to the JBoss classloader also makes auto-loading of html
templates
work for me.

Have you tried the html auto-loading after making the classloader change?

cheers
Ben


 -Original Message-
 From: Geoff Callender [mailto:[EMAIL PROTECTED] 
 Sent: Monday, 1 October 2007 6:52 AM
 To: Tapestry users
 Subject: Re: T5: the scanner and JBoss
 
 Nice one, Ben.  For auto-reloading class files that works  
 beautifully, and it avoids the class-loading problems that I found  
 Tapestry5DevClassLoader introduced.
 
 Does anyone know how to auto-reload T5 html templates in JBoss???
 
 Alternatively, can someone point me to T5.0.5's template 
 scanning class?
 
 Thanks in advance,
 Geoff
 
 On 30/09/2007, at 10:01 PM, Ben Sommerville wrote:
 
  I found that using the JBoss UnifiedClassLoader instead of 
 the Tomcat
  class loader for web applications fixes the auto-reloading issues.
 
  To change this setting you need to edit the following file:
  JBoss 4.0.x
  server dir/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml
  JBoss 4.2.x
  server dir/deploy/jbossweb.deployer/META-INF/jboss-service.xml
 
  Search for the attribute UseJBossWebLoader and set it to true.
 
  Note: Changing this may affect how your web-app resolves classes.
  I think the Tomcat classloader always loads classes for the webapp
  libs first, even if the class exists in a parent classloader.
  The JBoss classloader says it follows standard behaviour 
 and will use
  classes from the parent classloader over classes from the webapp.
 
  cheers
  Ben
 
  -Original Message-
  From: Geoff Callender [mailto:[EMAIL PROTECTED]
  Sent: Sunday, 30 September 2007 12:07 AM
  To: Tapestry users
  Subject: Re: T5: the scanner and JBoss
 
  Nick, thanks for pointing out the earlier e-mail.
 
  Unfortunately, it doesn't deal with how to auto-reload html
  templates.  Tapestry5DevClassLoader only ensures class files
  are reloaded.
 
  Any other suggestions?
 
  On 28/09/2007, at 9:24 PM, Nick Westgate wrote:
 
  Geoff Callender wrote:
  T5 isn't picking up changes to templates and component
  classes in my
  environment.  T5.0.5 is a jar in an exploded WAR in an
  exploded EAR,
  which JBoss has been told to use (it's pointed to in
  jboss-service.xml).  When I make changes to the web app they are
  copied
  immediately to the exploded ear but T5 just isn't 
 picking them up.
 
  I saw on Howard's blog that he'd had a problem with
  JBoss/Tomcat...
 
   http://tapestryjava.blogspot.com/2007/02/fighting-with-
  tomcat.html
   http://issues.apache.org/bugzilla/show_bug.cgi?id=41664
 
  ...but the 5.0.5 source looks like it has the necessary fix.
  Besides,
  I'm using an ear that's already exploded so I shouldn't
  be getting
  Howard's problem.  True?
 
  Does anyone have a theory on why it isn't working?
  Alternatively can anyone point me to the scanner class so I can
  debug
  what it isn't doing?
 
  Geoff
 
 
  The problem with Tomcat was identified in the following email as a
  classloader caching issue. I've not tested this though.
 
  Cheers,
  Nick.
 
 
 
   Original Message 
  Subject: RE: T5 developing with WTP and TOMCAT
  Date: Wed, 5 Sep 2007 17:59:14 +0200
  From: Brysbaert Gregory [EMAIL PROTECTED]
  Reply-To: Tapestry users users@tapestry.apache.org
  To: Tapestry users users@tapestry.apache.org
 
  Hello,
 
  About this topic, I tried some investigations on my side,
  and I found
  out that the reason why classes don't auto-reload is that the
  WebappClassLoader of tomcat 5 (I currently use tomcat 5.0,
  but I guess
  it's the same on Tomcat 5.5) keeps in cache (in a Hashtable more
  precisely) all classes it already loaded once. And this
  cache is never
  cleared, except when the WebappClassLoader is stopped. 
 So, when the
  class file is modified on the disk, tapestry 5 clears its
  own cache,
  and then asks to the parent classloader (WebAppClassLoader)
  to reload
  the class, which then serves the previous version of the 
 class from
  its cache. The result is that the class is never actually updated
  until the next restart of tomcat.
 
 
  So, as a temporary solution, I tried to develop a class extending
  WebappClassLoader that does not cache classes for packages
  containing
  .pages. and .components.. The source of this class is :
 
 
  public class Tapestry5DevClassLoader extends WebappClassLoader{

 private static String[] noCacheElements={.pages.,/
  pages/,.components.,/components/};

public Tapestry5DevClassLoader() {
super();

}
 
public Tapestry5DevClassLoader(ClassLoader arg0) {
super(arg0);

}


 
@Override
protected InputStream findLoadedResource(String arg0) {
InputStream is=super.findLoadedResource(arg0);
if (is!=null){
if (isNoCacheElement(arg0))
return null;
}

RE: Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua








Here is another case...

I can set up listener handlers easily via template.

In
JAVA, I have to become on keyboard tapestry and determine what the
proper javascript:... () notation is for the rendering output... and
hope it will work? ID's ? guesswork? Sorry nah uh.

I am
seeing that in order to have listener:edit handlers then THAT is
suppose to be in a template so that it gets processed by tapestry
properly.

Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:41:38 -0400








I am assuming I cannot render the following directly from JAVA... as it will be 
output as just that text... and uninterpretted?

Can someone clarify what I can and cannot do in the JAVA with regard to 
template like text? I do not know if it will be interpretted along the request 
pipeline and processed or whether it will be spit out as-is.

div jwcid=[EMAIL PROTECTED]
collectionType=ognl:collectionType
tableSize=3
span jwcid=@RenderBody/
/div

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:37:49 -0400








If it means anything... I am designing a Gallery.HTML here is my component 
layout...

--
auto-paging

--
content

--
auto-paging

--


1. auto-paging just operates auto-paging buttons top/bottom just like 
contrib:table AND both instances are anchored to the same instance
2. content is just a collection

Parameters for CONTENT:
 o tableSize - overrides default getcontentBox().width layout and forces 
scrollable number of rows in the Gallery equal to the tableSize

Parameters for AUTO-PAGING
 o begin - pages to front of collection
 o prev - pages to previous fittable amount of collection
 o next - pages to next fittable amount of collection
 o end - pages to end of collection

I intend to operate the persistence of the auto-paging parameters using JSON.

I'd like to retain the layout of these components using templates.

So I need JSON, Rendering overrides and listener handlers plus simplified 
layouts using templates... COMBINED.

Thanks for your feedback.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:14:37 -0400








Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. Components that inherit from AbstractComponent will render output in Java 
code, by implementing method renderComponent() .

I would like to build a component that operates combined semantics... or at 
least option 2 supporting the manipulation/usage of templates within JAVA. 
Option 1 only supports handlers not necessarily rendering + JSON.

WHY? Some component templates are lengthy and I would not like to implement all 
that rendering in the JAVA as it is too cluttered/cumbersome. Plus some 
components are best fit in just a template and others are better fit in JAVA... 
I have a component anatomy a bit complex that requires everything and I want to 
distribute the implementation efficiently across both models.

Can tapestry-4.1.2 deliver?

If I commit to model #1 then I end up missing what I need. Same if I commit to 
model #2. I need both.

Your feedback is appreciated.

Best regards
Ken in nashua
Discover the new Windows Vista Learn more!

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it!

Explore the seven wonders of the world Learn more!

_
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vistamkt=en-USform=QBRE

T5: Using external Hibernate-mapped entities: the contribute method goes where?

2007-10-01 Thread Andy Buckley
Hi,

I'm trying to get Tapestry working with Hibernate - unfortunately there isn't
much guidance on this, but I found this tutorial handy:

http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate

My application differs from this template, though, because the mapped entities
are in an external library. This page:

http://tapestry.apache.org/tapestry5/tapestry-hibernate/conf.html

shows a way to deal with this, but I'm left with no idea where to put my
contributeHibernateSessionSource(...) method! It doesn't seem to work if added
to the page class (good: that would be inconvenient anyway!) so where should I
put it? Help! :-)

Thanks,
Andy

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



Re: T5: Using external Hibernate-mapped entities: the contribute method goes where?

2007-10-01 Thread Robin Helgelin
On 10/1/07, Andy Buckley [EMAIL PROTECTED] wrote:
 shows a way to deal with this, but I'm left with no idea where to put my
 contributeHibernateSessionSource(...) method! It doesn't seem to work if added
 to the page class (good: that would be inconvenient anyway!) so where should I
 put it? Help! :-)

In your AppModule-class or if it's defined as something else in your web.xml.

-- 
regards,
Robin

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



RE: Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua

Hi Martino... the component I need to extend from is AbstractFormWidget, as 
part of the demo Jesse made. 

import org.apache.tapestry.dojo.form.AbstractFormWidget;

It is not part of the BaseComponent hierarchy and does not support the 
processing of templates. he uses it in AutoCompleter and datepicker dropdown 
etc... examples

With regard to my mentioning usage/manipulation of templates in JAVA... well I 
guess I am referring to BaseComponent and whether users have the option to do 
what it does... or it all that tapestry no-touch.

From starting ground I would like to begin from template. But I need all the 
JSON widget stuff in order to properly process onclick re-calculations and 
persisting those parameters.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 10:01:13 -0400















Here is another case...

I can set up listener handlers easily via template.

In
JAVA, I have to become on keyboard tapestry and determine what the
proper javascript:... () notation is for the rendering output... and
hope it will work? ID's ? guesswork? Sorry nah uh.

I am
seeing that in order to have listener:edit handlers then THAT is
suppose to be in a template so that it gets processed by tapestry
properly.

Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:41:38 -0400








I am assuming I cannot render the following directly from JAVA... as it will be 
output as just that text... and uninterpretted?

Can someone clarify what I can and cannot do in the JAVA with regard to 
template like text? I do not know if it will be interpretted along the request 
pipeline and processed or whether it will be spit out as-is.

div jwcid=[EMAIL PROTECTED]
collectionType=ognl:collectionType
tableSize=3
span jwcid=@RenderBody/
/div

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:37:49 -0400








If it means anything... I am designing a Gallery.HTML here is my component 
layout...

--
auto-paging

--
content

--
auto-paging

--


1. auto-paging just operates auto-paging buttons top/bottom just like 
contrib:table AND both instances are anchored to the same instance
2. content is just a collection

Parameters for CONTENT:
 o tableSize - overrides default getcontentBox().width layout and forces 
scrollable number of rows in the Gallery equal to the tableSize

Parameters for AUTO-PAGING
 o begin - pages to front of collection
 o prev - pages to previous fittable amount of collection
 o next - pages to next fittable amount of collection
 o end - pages to end of collection

I intend to operate the persistence of the auto-paging parameters using JSON.

I'd like to retain the layout of these components using templates.

So I need JSON, Rendering overrides and listener handlers plus simplified 
layouts using templates... COMBINED.

Thanks for your feedback.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:14:37 -0400








Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. Components that inherit from AbstractComponent will render output in Java 
code, by implementing method renderComponent() .

I would like to build a component that operates combined semantics... or at 
least option 2 supporting the manipulation/usage of templates within JAVA. 
Option 1 only supports handlers not necessarily rendering + JSON.

WHY? Some component templates are lengthy and I would not like to implement all 
that rendering in the JAVA as it is too cluttered/cumbersome. Plus some 
components are best fit in just a template and others are better fit in JAVA... 
I have a component anatomy a bit complex that requires everything and I want to 
distribute the implementation efficiently across both models.

Can tapestry-4.1.2 deliver?

If I commit to model #1 then I end up missing what I need. Same if I commit to 
model #2. I need both.

Your feedback is appreciated.

Best regards
Ken in nashua
Discover the new Windows Vista Learn more!

Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy! Try it!

Explore the seven wonders of the world Learn more!

Discover the new Windows Vista Learn more!

_
Invite your mail contacts to join your friends list with Windows Live Spaces. 
It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=createwx_url=/friends.aspxmkt=en-us

Re: No redeploy, no restart ... --- yeah right

2007-10-01 Thread Christian Gruber
This is the thing.  You can even do this with Weblogic Server - the  
trick is just that you have to start it up from within eclipse, and  
eclipse's class loader hooks for that j2ee container provide the  
classes.  As long as you have a proper J2EE container starter that  
uses eclipse's own classpath locations, you should be able to do this.


Christian.

On 30-Sep-07, at 7:55 PM, Martin Reurings wrote:

With our developement team we're currently using maven to build/ 
deploy Tapestry 5. By using the latest Eclipse build and wtp we're  
able to run Tapestry 5 on Tomcat 6 without restarting or redeploying  
anything. It seems most of the functionality comes out of Eclipse in  
this case, but it works...


We're just using the default maven structure for our project, let  
maven build our eclipse project files (eclipse:eclipse) with wtp- 
compatibility enabled (-Dwtpversion=1.5) and in the Tomcat settings  
(dbl-click on the server definition inside eclipse) Serve modules  
without publishing enabled. In most situations this allows us to  
simply edit our files (java/html/css/gif) save them and go back to  
the browser to test them. Debugging doesn't work as smooth as this  
though, hot-deploying while debugging seems to fail and adding a new  
pages or component requires a server-restart as well :(.


Hope this helps,

Martin

Howard Lewis Ship wrote:
First off, developing locally using Jetty is a fine idea, even if  
you can't
deploy the same way.  In most any servlet container, updating the  
WAR causes

an undeploy/redeploy that is outside of Tapestry's scope to control.

Second, there's a whole lot more that Tapestry *could* do if it  
replaced the
servlet container entirely and acted as its own HTTP server  
(possibly built

on Jetty).  But this falls into the boilling the ocean category.

Third, there is unfortunately a lot of vaguness in the servlet API  
spec.
Remy (Tomcat) sees the class loader issue one way, Greg (Jetty)  
sees it the

correct way.

I can't emphasis enough: use Jetty for your tight, local write-test- 
fix
cycle (with no deploys, and fairly rare restarts).  But using Ant  
or Maven

to package your application normally for deployment.

On 9/30/07, Jan Vissers [EMAIL PROTECTED] wrote:

Yep, its me again asking a question on Tapestry 5 and support for  
other
web server containers than Jetty for the complete techical  
features as

depicted for T5. Up until now I have never had a real answer, so I'm
trying my luck again.

On the home page of T5 I read:
http://tapestry.apache.org/tapestry5/

It's more than what you can do with Tapestry ... it's also how  
you do it!

Tapestry is a vastly productive environment. Java developers love it
because they can make Java code changes and see them  
immediately ... no

redeploy, no restart!

But somewhere I else I read this (on Tomcat):
http://tapestry.apache.org/tapestry5/tomcat.html

Deploying Tapestry applications into Tomcat is relatively easy,  
with one

big caveat: you must not store your Tapestry component classes under
WEB-INF/classes.

At startup, Tapestry needs to locate all your page and component  
classes,
so that it can match page names in request URLs to page classes.  
Due to
the way Tomcat creates ClassLoaders, this information is not  
accessible to

Tapestry.

Fortunately, Maven has an option inside its war plugin,  
archiveClasses,

that changes the packaging; instead of putting compiled classes and
resource files in WEB-INF/classes, they are instead placed inside an
additional JAR inside WEB-INF/lib. This keeps Tapestry happy at  
runtime.



Doesn't this mean that Tomcat cannot use the great productivity  
booster of
No redeploy, no restart?  I was told (by Howard) that for OC4J  
(Oracle's
J2EE container) I had to do something similar as for Tomcat - so  
my guess
is that No redeploy, no restart is also not feasable on that  
platform.



So, can I conclude from this that T5 has improved a great deal -  
but not

everything will work on servlet containers that are actually used?

Thanks,
-J.



-
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: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
If inserted in a writer the following html will be split out as it is.
If you want to dynamically render components inside your component
(that is render different components depending on some conditions,
even dynamically with an ajax request) you can use block/renderblock
components.

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



Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato
Don't know why you need specifically to extend that class, it's not
compulsory to have ajax (er even dojo) features.

You can easily manage XHR/AJax requests using an EventListener
annotation and selecting which components to partially update with
ResponseBuilde.updateComponent(idOfTheComponentToUpdate)

Or have your component  (IComponent, it does not matter whether you
extend or not other classes) implement IJSonRender interface that will
return the JSON data structure to your javascript caller.


On 10/1/07, Martino Piccinato [EMAIL PROTECTED] wrote:
 If inserted in a writer the following html will be split out as it is.
 If you want to dynamically render components inside your component
 (that is render different components depending on some conditions,
 even dynamically with an ajax request) you can use block/renderblock
 components.


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



[T5]

2007-10-01 Thread Borut Bolčina
Hi,

is there a T5 way of sending and receiving cookies?

Cheers,
Borut


Re: T5: Using external Hibernate-mapped entities: the contribute method goes where?

2007-10-01 Thread Chris Lewis
Your AppModule is created with the same name used in web.xml (as Robin 
pointed out). By default its AppModule.java, as created by the 
quickstart archetype. You should find that to use Hibernate you need 
only to add it, annotations, and tapestry-hibernate to your pom.xml. 
After that you need only to @Ineject Session instances into 
classes/components/pages where you want to use it. For the record, I did 
a test with entities in a different package (not *.entities) and was 
able to use Hibernate fine. This is because the tapestry-hibernate 
module auto-loads (and maganges) sessions based on hibernate.hbm.xml, 
which also is responsible for loading entities (unless you configure via 
another method). I did not need to contribute as the documentation 
suggested.


sincerely,
chris

Andy Buckley wrote:

Hi,

I'm trying to get Tapestry working with Hibernate - unfortunately there isn't
much guidance on this, but I found this tutorial handy:

http://wiki.apache.org/tapestry/Tapestry5HowToUseTapestryHibernate

My application differs from this template, though, because the mapped entities
are in an external library. This page:

http://tapestry.apache.org/tapestry5/tapestry-hibernate/conf.html

shows a way to deal with this, but I'm left with no idea where to put my
contributeHibernateSessionSource(...) method! It doesn't seem to work if added
to the page class (good: that would be inconvenient anyway!) so where should I
put it? Help! :-)

Thanks,
Andy

-
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: Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua








Hi Martino...

 

Referring to your suggested RenderBlock usage...

 

Is the @RenderBlock specified from within the template or within the JAVA?

 

How would I rig up a listener=listener:edit within the JAVA?

 

I appreciate your help and just trying to grasp the concept of what can be 
cobbled together here.


Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 10:05:47 -0400








Hi Martino... the component I need to extend from is AbstractFormWidget, as 
part of the demo Jesse made. 

import org.apache.tapestry.dojo.form.AbstractFormWidget;

It is not part of the BaseComponent hierarchy and does not support the 
processing of templates. he uses it in AutoCompleter and datepicker dropdown 
etc... examples

With regard to my mentioning usage/manipulation of templates in JAVA... well I 
guess I am referring to BaseComponent and whether users have the option to do 
what it does... or it all that tapestry no-touch.

From starting ground I would like to begin from template. But I need all the 
JSON widget stuff in order to properly process onclick re-calculations and 
persisting those parameters.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 10:01:13 -0400















Here is another case...

I can set up listener handlers easily via template.

In
JAVA, I have to become on keyboard tapestry and determine what the
proper javascript:... () notation is for the rendering output... and
hope it will work? ID's ? guesswork? Sorry nah uh.

I am
seeing that in order to have listener:edit handlers then THAT is
suppose to be in a template so that it gets processed by tapestry
properly.

Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:41:38 -0400








I am assuming I cannot render the following directly from JAVA... as it will be 
output as just that text... and uninterpretted?

Can someone clarify what I can and cannot do in the JAVA with regard to 
template like text? I do not know if it will be interpretted along the request 
pipeline and processed or whether it will be spit out as-is.

div jwcid=[EMAIL PROTECTED]
collectionType=ognl:collectionType
tableSize=3
span jwcid=@RenderBody/
/div

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:37:49 -0400








If it means anything... I am designing a Gallery.HTML here is my component 
layout...

--
auto-paging

--
content

--
auto-paging

--


1. auto-paging just operates auto-paging buttons top/bottom just like 
contrib:table AND both instances are anchored to the same instance
2. content is just a collection

Parameters for CONTENT:
 o tableSize - overrides default getcontentBox().width layout and forces 
scrollable number of rows in the Gallery equal to the tableSize

Parameters for AUTO-PAGING
 o begin - pages to front of collection
 o prev - pages to previous fittable amount of collection
 o next - pages to next fittable amount of collection
 o end - pages to end of collection

I intend to operate the persistence of the auto-paging parameters using JSON.

I'd like to retain the layout of these components using templates.

So I need JSON, Rendering overrides and listener handlers plus simplified 
layouts using templates... COMBINED.

Thanks for your feedback.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:14:37 -0400








Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. Components that inherit from AbstractComponent will render output in Java 
code, by implementing method renderComponent() .

I would like to build a component that operates combined semantics... or at 
least option 2 supporting the manipulation/usage of templates within JAVA. 
Option 1 only supports handlers not necessarily rendering + JSON.

WHY? Some component templates are lengthy and I would not like to implement all 
that rendering in the JAVA as it is too cluttered/cumbersome. Plus some 
components are best fit in just a template and others are better fit in JAVA... 
I have a component anatomy a bit complex that requires everything and I want to 
distribute the implementation efficiently across both models.

Can tapestry-4.1.2 deliver?

If I commit to model #1 then I end up missing what I need. Same if I commit to 
model #2. I need both.

Your 

Re: Combined Component Model - Is it supported ?

2007-10-01 Thread Martino Piccinato

 Is the @RenderBlock specified from within the template or within the JAVA?



RenderBlock is a component, it's actually a component marking where
a specified Block component (could be chosen dynamically at runtime)
will be rendered.
As any component can be defined in the component definition java file
or with java annotations, neverthless it's position in html must be
specified in the html template.

What the Block/RenderBlock option gives you more with respect to other
solution is the fact that you can can choose completely different
Block to render at runtime (in fact any other component that can be
contained in a Block component), see the tab example in the user
guide: it's a non ajax example but could be easily turned in an ajax
update just using an EventListener and a
ResponseBuilder.updateComponent call.
http://tapestry.apache.org/tapestry4.1/components/general/renderblock.html




 How would I rig up a listener=listener:edit within the JAVA?



Why would you want to do that? Really I can't understand your case.
What you mean with rig up rig up a listener=listener:edit within java?

the writer you use inside a renderComponent just generate final output
for the browser, it's not meant to be parsed again in search of
components. If you want to add a link to your component I suggest you
to use a DIrectLink component in your component and use customer
components (with or without templates) for the rest. You can then
incorporate your components and other components in a super component.

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



Re: [T5]

2007-10-01 Thread Ned Jackson Lovely
On Mon, Oct 01, 2007 at 05:00:30PM +0200, Borut Bolčina wrote:
 is there a T5 way of sending and receiving cookies?

@Inject
private RequestGlobals _requestGlobals;

You can then call _requestGlobals.getHTTPServletRequest() and
_requestGlobals.getHTTPServletResponse() to get access to the Servlet
Request and Response.

-- 
njl

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



Re: [T5]

2007-10-01 Thread Robert Zeigler

Or...

@Inject
private Cookies _cookies;

You can then do:

readCookieValue(mycookie);
and there a variety of writeCookieValue methods offering control  
over the age, domain, path, etc.


Cheers,

Robert

On Oct 1, 2007, at 10/110:50 AM , Ned Jackson Lovely wrote:


On Mon, Oct 01, 2007 at 05:00:30PM +0200, Borut Bolčina wrote:

is there a T5 way of sending and receiving cookies?


@Inject
private RequestGlobals _requestGlobals;

You can then call _requestGlobals.getHTTPServletRequest() and
_requestGlobals.getHTTPServletResponse() to get access to the Servlet
Request and Response.

--
njl

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



T5: Newbie question - using a variable and replace it with a property

2007-10-01 Thread jblier

Newbie question:

I would like to replace the content of the title tag with a value read
from a .properties file.

How do I set the title tag?

title${applicationTitle}/title

How do I set a .properties files that would contain:

applicationTitle=Application Title version 1

Currently I get the error:

Class org.example.myapp.pages.Start does not contain a property named
'applicationTitle' (within property expression 'applicationTitle').
Available properties: class, componentResources, currentTime.

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Newbie-question---using-a-variable-and-replace-it-with-a-property-tf4549496.html#a12982886
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: Newbie question - using a variable and replace it with a property

2007-10-01 Thread Chris Lewis
Whatever your app/context name is (by default its App as created by the 
quickstart), create an App.properties file in WEB-INF. Assuming you've 
done that and you have your applicationTitle message, access it in 
templates using the message binding prefix:



title${message:applicationTitle}/title


When you use expansions (${}) Tapestry uses a binding prefix to know 
what it is and where to find it. The default prefix used in templates is 
prop, which instructs Tapestry to look for a property in the 
associated page class.


jblier wrote:

Newbie question:

I would like to replace the content of the title tag with a value read
from a .properties file.

How do I set the title tag?

title${applicationTitle}/title

How do I set a .properties files that would contain:

applicationTitle=Application Title version 1

Currently I get the error:

Class org.example.myapp.pages.Start does not contain a property named
'applicationTitle' (within property expression 'applicationTitle').
Available properties: class, componentResources, currentTime.

  



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



Re: T5: Using external Hibernate-mapped entities: the contribute method goes where?

2007-10-01 Thread Andy Buckley
Chris Lewis wrote:
 Your AppModule is created with the same name used in web.xml (as Robin
 pointed out). By default its AppModule.java, as created by the
 quickstart archetype. You should find that to use Hibernate you need
 only to add it, annotations, and tapestry-hibernate to your pom.xml.
 After that you need only to @Ineject Session instances into
 classes/components/pages where you want to use it. For the record, I did
 a test with entities in a different package (not *.entities) and was
 able to use Hibernate fine. This is because the tapestry-hibernate
 module auto-loads (and maganges) sessions based on hibernate.hbm.xml,
 which also is responsible for loading entities (unless you configure via
 another method). I did not need to contribute as the documentation
 suggested.

Thanks for your help: I'd forgotten that the archetype had made the services
directory. I had to comment out some references to
org.apache.tapestry.ioc.ServiceBinder which wouldn't compile, but otherwise
it's all good.

I think it didn't work automatically for me, since almost all of my Hibernate
configuration is done programmatically rather than via the hibernate.cfg.xml
file - but thanks for the suggestion anyway!

Cheers,
Andy

-- 
Andy Buckley: CEDAR @ IPPP, Durham
Work: www.cedar.ac.uk
www.insectnation.org

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



Re: T5: Newbie question - using a variable and replace it with a property

2007-10-01 Thread jblier

Thanks for your quick answer.

I changed the App.properties file name to app.properties and it works.
It looks like to be case sensitive.


Chris Lewis-5 wrote:
 
 Whatever your app/context name is (by default its App as created by the 
 quickstart), create an App.properties file in WEB-INF. Assuming you've 
 done that and you have your applicationTitle message, access it in 
 templates using the message binding prefix:
 

-- 
View this message in context: 
http://www.nabble.com/T5%3A-Newbie-question---using-a-variable-and-replace-it-with-a-property-tf4549496.html#a12983180
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: Combined Component Model - Is it supported ?

2007-10-01 Thread Ken nashua

Thanks Martino...

I am still confused...

The action handlers for each auto-paging button (or link) needs to dispatch to 
a handler. Handlers are normally assigned in forms.

Here is the layout of the auto-paging links

   1  2  3  4  5  6  7  8  9  10

 content goes here

   1  2  3  4  5  6  7  8  9  10




Upon click of these I need to dispatch to handler and recalculate metrics.

Then content lays out the collection.

I am seeking the simplest solution to make this a widget... or composite 
widget. My motivation to use JSON was it's use in script capabilities in 
persisting each actions state to the metrics across the request.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 11:23:22 -0400















Hi Martino...

 

Referring to your suggested RenderBlock usage...

 

Is the @RenderBlock specified from within the template or within the JAVA?

 

How would I rig up a listener=listener:edit within the JAVA?

 

I appreciate your help and just trying to grasp the concept of what can be 
cobbled together here.


Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 10:05:47 -0400








Hi Martino... the component I need to extend from is AbstractFormWidget, as 
part of the demo Jesse made. 

import org.apache.tapestry.dojo.form.AbstractFormWidget;

It is not part of the BaseComponent hierarchy and does not support the 
processing of templates. he uses it in AutoCompleter and datepicker dropdown 
etc... examples

With regard to my mentioning usage/manipulation of templates in JAVA... well I 
guess I am referring to BaseComponent and whether users have the option to do 
what it does... or it all that tapestry no-touch.

From starting ground I would like to begin from template. But I need all the 
JSON widget stuff in order to properly process onclick re-calculations and 
persisting those parameters.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 10:01:13 -0400















Here is another case...

I can set up listener handlers easily via template.

In
JAVA, I have to become on keyboard tapestry and determine what the
proper javascript:... () notation is for the rendering output... and
hope it will work? ID's ? guesswork? Sorry nah uh.

I am
seeing that in order to have listener:edit handlers then THAT is
suppose to be in a template so that it gets processed by tapestry
properly.

Best regards
Ken in nashua

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:41:38 -0400








I am assuming I cannot render the following directly from JAVA... as it will be 
output as just that text... and uninterpretted?

Can someone clarify what I can and cannot do in the JAVA with regard to 
template like text? I do not know if it will be interpretted along the request 
pipeline and processed or whether it will be spit out as-is.

div jwcid=[EMAIL PROTECTED]
collectionType=ognl:collectionType
tableSize=3
span jwcid=@RenderBody/
/div

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: RE: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:37:49 -0400








If it means anything... I am designing a Gallery.HTML here is my component 
layout...

--
auto-paging

--
content

--
auto-paging

--


1. auto-paging just operates auto-paging buttons top/bottom just like 
contrib:table AND both instances are anchored to the same instance
2. content is just a collection

Parameters for CONTENT:
 o tableSize - overrides default getcontentBox().width layout and forces 
scrollable number of rows in the Gallery equal to the tableSize

Parameters for AUTO-PAGING
 o begin - pages to front of collection
 o prev - pages to previous fittable amount of collection
 o next - pages to next fittable amount of collection
 o end - pages to end of collection

I intend to operate the persistence of the auto-paging parameters using JSON.

I'd like to retain the layout of these components using templates.

So I need JSON, Rendering overrides and listener handlers plus simplified 
layouts using templates... COMBINED.

Thanks for your feedback.

Best regards
Ken in nashua

From: [EMAIL PROTECTED]
To: users@tapestry.apache.org
Subject: Combined Component Model - Is it supported ?
Date: Mon, 1 Oct 2007 09:14:37 -0400








Folks... per doc text that follows...

1. Components that inherit from BaseComponent will use an HTML template.

2. 

T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread sunilmanu

Hello Everyone,

We are using Tapestry 4.0.2 . Recently we noticed a following issue :

We have a HTML page that has multiple COMPONENTS but are in IF conditional
block. No matter how the condition is evaluated to TRUE /FALSE, the
Components are getting called i.e. the PAGEBEGINRENDER method is being
called eventhough they are NOT rendered !!

HTML
=

 


  






In the above piece, it renders properly in the browser but the
PAGEBEGINRENDER method is fired 3 times even if the Condition is FALSE.

We can definitely pass one more parameter to the component telling it
whether to process the iteration or not but is there a better way to handle
this unwanted Component initialization ??

Thanks,
Sunil

-- 
View this message in context: 
http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized-even-if-its-in-IF-condition-block---tf4550131.html#a12984881
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: T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread Howard Lewis Ship
This is normal.  There are most specific methods that get called in the
lifecycle of the individual component.

pageBeginRender() means the Page is beginning to render, long before any of
the components render.

On 10/1/07, sunilmanu [EMAIL PROTECTED] wrote:


 Hello Everyone,

 We are using Tapestry 4.0.2 . Recently we noticed a following issue :

 We have a HTML page that has multiple COMPONENTS but are in IF conditional
 block. No matter how the condition is evaluated to TRUE /FALSE, the
 Components are getting called i.e. the PAGEBEGINRENDER method is being
 called eventhough they are NOT rendered !!

 HTML
 =











 In the above piece, it renders properly in the browser but the
 PAGEBEGINRENDER method is fired 3 times even if the Condition is FALSE.

 We can definitely pass one more parameter to the component telling it
 whether to process the iteration or not but is there a better way to
 handle
 this unwanted Component initialization ??

 Thanks,
 Sunil

 --
 View this message in context:
 http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized-even-if-its-in-IF-condition-block---tf4550131.html#a12984881
 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
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind


Re: T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread sunilmanu

Howard,
thanks for ur reply..but still my doubt is..

I can understand if the Component was to be Rendered, the pagebeingrender
method being fired.
But why the method is fired, if the component is NOT going to be rendered ?
HTML just has a reference to that Component inside a IF block, so is that
line enough to trigger the pageBeginRender of the component ?

Thanks,
Sunil


Howard Lewis Ship wrote:
 
 This is normal.  There are most specific methods that get called in the
 lifecycle of the individual component.
 
 pageBeginRender() means the Page is beginning to render, long before any
 of
 the components render.
 
 On 10/1/07, sunilmanu [EMAIL PROTECTED] wrote:


 Hello Everyone,

 We are using Tapestry 4.0.2 . Recently we noticed a following issue :

 We have a HTML page that has multiple COMPONENTS but are in IF
 conditional
 block. No matter how the condition is evaluated to TRUE /FALSE, the
 Components are getting called i.e. the PAGEBEGINRENDER method is being
 called eventhough they are NOT rendered !!

 HTML
 =











 In the above piece, it renders properly in the browser but the
 PAGEBEGINRENDER method is fired 3 times even if the Condition is FALSE.

 We can definitely pass one more parameter to the component telling it
 whether to process the iteration or not but is there a better way to
 handle
 this unwanted Component initialization ??

 Thanks,
 Sunil

 --
 View this message in context:
 http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized-even-if-its-in-IF-condition-block---tf4550131.html#a12984881
 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
 Partner and Senior Architect at Feature50
 
 Creator Apache Tapestry and Apache HiveMind
 
 

-- 
View this message in context: 
http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized-even-if-its-in-IF-condition-block---tf4550131.html#a12985833
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: T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread Robert Zeigler
That's correct; think of your component as a listener, listening, not  
for when /it/ is starting to be rendered, but when the /page/ is  
starting to render.
So, the component's pageBeginRender is always called, since the  
component is asking to be notified of when the /page/ starts to  
render, regardless of whether the component is rendered.

Basically, the order of events is along the lines of:

fire page validation events
fire page begin render events
  render component 1 in page
  ...
  render component n in page
fire page end render event

Robert

On Oct 1, 2007, at 10/12:17 PM , sunilmanu wrote:



Howard,
thanks for ur reply..but still my doubt is..

I can understand if the Component was to be Rendered, the  
pagebeingrender

method being fired.
But why the method is fired, if the component is NOT going to be  
rendered ?
HTML just has a reference to that Component inside a IF block, so  
is that

line enough to trigger the pageBeginRender of the component ?

Thanks,
Sunil


Howard Lewis Ship wrote:


This is normal.  There are most specific methods that get called  
in the

lifecycle of the individual component.

pageBeginRender() means the Page is beginning to render, long  
before any

of
the components render.

On 10/1/07, sunilmanu [EMAIL PROTECTED] wrote:



Hello Everyone,

We are using Tapestry 4.0.2 . Recently we noticed a following  
issue :


We have a HTML page that has multiple COMPONENTS but are in IF
conditional
block. No matter how the condition is evaluated to TRUE /FALSE, the
Components are getting called i.e. the PAGEBEGINRENDER method is  
being

called eventhough they are NOT rendered !!

HTML
=











In the above piece, it renders properly in the browser but the
PAGEBEGINRENDER method is fired 3 times even if the Condition is  
FALSE.


We can definitely pass one more parameter to the component  
telling it

whether to process the iteration or not but is there a better way to
handle
this unwanted Component initialization ??

Thanks,
Sunil

--
View this message in context:
http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized- 
even-if-its-in-IF-condition-block---tf4550131.html#a12984881

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
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind




--
View this message in context: http://www.nabble.com/T4%3A- 
Components-in-Page-get-Initialized-even-if-its-in-IF-condition- 
block---tf4550131.html#a12985833

Sent from the Tapestry - User mailing list archive at Nabble.com.


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



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



[T5] Entities (nbsp;, etc) are not preserved by template parser

2007-10-01 Thread Josh Canfield
Hi all,

I've noticed that entities are not preserved in the generated html output
(nbsp; becomes the actual character for a non-breaking space). This has not
shown up as a problem in any browsers that I have tried, but it has been a
problem when emailing the content of the page (I'm sure there is a
character encoding mismatch in the workflow somewhere).

Would anyone else consider this to be a defect?

Josh

By the way, as of this weekend http://www.thedailytube.com has left it's
Cold Fusion roots and been migrated to T5 on Tomcat. So far so good!

-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread sunilmanu

Thanks for the reply and information..

So is there any other method that could be used to initialize the properties
needed for the page other than pagebeginrender method .. ?
Or I have to pass in a parameter and check it's value inside the
pageBeginRender and see whether to process or not ?

thanks,
Sunil


Robert Zeigler wrote:
 
 That's correct; think of your component as a listener, listening, not  
 for when /it/ is starting to be rendered, but when the /page/ is  
 starting to render.
 So, the component's pageBeginRender is always called, since the  
 component is asking to be notified of when the /page/ starts to  
 render, regardless of whether the component is rendered.
 Basically, the order of events is along the lines of:
 
 fire page validation events
 fire page begin render events
render component 1 in page
...
render component n in page
 fire page end render event
 
 Robert
 
 On Oct 1, 2007, at 10/12:17 PM , sunilmanu wrote:
 

 Howard,
 thanks for ur reply..but still my doubt is..

 I can understand if the Component was to be Rendered, the  
 pagebeingrender
 method being fired.
 But why the method is fired, if the component is NOT going to be  
 rendered ?
 HTML just has a reference to that Component inside a IF block, so  
 is that
 line enough to trigger the pageBeginRender of the component ?

 Thanks,
 Sunil


 Howard Lewis Ship wrote:

 This is normal.  There are most specific methods that get called  
 in the
 lifecycle of the individual component.

 pageBeginRender() means the Page is beginning to render, long  
 before any
 of
 the components render.

 On 10/1/07, sunilmanu [EMAIL PROTECTED] wrote:


 Hello Everyone,

 We are using Tapestry 4.0.2 . Recently we noticed a following  
 issue :

 We have a HTML page that has multiple COMPONENTS but are in IF
 conditional
 block. No matter how the condition is evaluated to TRUE /FALSE, the
 Components are getting called i.e. the PAGEBEGINRENDER method is  
 being
 called eventhough they are NOT rendered !!

 HTML
 =











 In the above piece, it renders properly in the browser but the
 PAGEBEGINRENDER method is fired 3 times even if the Condition is  
 FALSE.

 We can definitely pass one more parameter to the component  
 telling it
 whether to process the iteration or not but is there a better way to
 handle
 this unwanted Component initialization ??

 Thanks,
 Sunil

 --
 View this message in context:
 http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized- 
 even-if-its-in-IF-condition-block---tf4550131.html#a12984881
 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
 Partner and Senior Architect at Feature50

 Creator Apache Tapestry and Apache HiveMind



 -- 
 View this message in context: http://www.nabble.com/T4%3A- 
 Components-in-Page-get-Initialized-even-if-its-in-IF-condition- 
 block---tf4550131.html#a12985833
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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

-- 
View this message in context: 
http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized-even-if-its-in-IF-condition-block---tf4550131.html#a12986629
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: Javascript in T5.0.3

2007-10-01 Thread jblier

Any development about JavaScript support with 5.0.5 or 5.0.6?

I haven't tried OutputRaw yet.

Currently I get this error when trying to link to a JS file:

div class=t-exception-messageUnable to resolve page 'js/effects' to a
known page name. Available page names: Start, core/ExceptionReport,
core/PropertyDisplayBlocks, core/PropertyEditBlocks./div


Alexandru Dragomir wrote:
 
 By now , as already mentioned several times , javascript  support in tap 5
 is not yet fully implemented.
 Till then , the way to go is using OutputRaw (i think.. ) for dinamic
 javascript and adding JS file links for  static jsvascript.
 For dinamic javascript it will be changed probably but can't say when ;)
 
 You can use both   or t:outputRaw  /
 starting with 5.0.3 onwards .
 
 Anyway , for what you tried to do ( linking the calendarJS.js to the page
 )
 : i'm not sure how you did it , but it should be used PageRenderSupport :
 
 @Environmental
 PageRenderSupport pageRenderSuport;
 
 void beginRender(MarkupWriter writer ) {
  pageRenderSupport.addScriptLink(calendarJS);
  
  ...
 }
 
 
  - tap 5.0.4 -
 @Inject
 @Path(...)
 private Asset getCalendarJS();
 
  - tap 5.0.3 -
 @Inject(...)
 private Asset getCalendarJS();
 
 
 Cheers ,
 Alex
 

-- 
View this message in context: 
http://www.nabble.com/Javascript-in-T5.0.3-tf3560612.html#a12986630
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: Javascript in T5.0.3

2007-10-01 Thread Josh Canfield
Where are you putting your js file? Are you trying to dynamically generate
the js?

I've been sticking my static js files here:
src/main/webapp/js/

and referencing them directly using script tags in my layout template with
no problems.

I haven't tried dynamic js outside of a specific page.

Josh


On 10/1/07, jblier [EMAIL PROTECTED] wrote:


 Any development about JavaScript support with 5.0.5 or 5.0.6?

 I haven't tried OutputRaw yet.

 Currently I get this error when trying to link to a JS file:

 div class=t-exception-messageUnable to resolve page 'js/effects' to a
 known page name. Available page names: Start, core/ExceptionReport,
 core/PropertyDisplayBlocks, core/PropertyEditBlocks./div


 Alexandru Dragomir wrote:
 
  By now , as already mentioned several times , javascript  support in tap
 5
  is not yet fully implemented.
  Till then , the way to go is using OutputRaw (i think.. ) for dinamic
  javascript and adding JS file links for  static jsvascript.
  For dinamic javascript it will be changed probably but can't say when ;)
 
  You can use both   or t:outputRaw  /
  starting with 5.0.3 onwards .
 
  Anyway , for what you tried to do ( linking the calendarJS.js to the
 page
  )
  : i'm not sure how you did it , but it should be used PageRenderSupport
 :
 
  @Environmental
  PageRenderSupport pageRenderSuport;
 
  void beginRender(MarkupWriter writer ) {
   pageRenderSupport.addScriptLink(calendarJS);
   
   ...
  }
 
 
   - tap 5.0.4 -
  @Inject
  @Path(...)
  private Asset getCalendarJS();
 
   - tap 5.0.3 -
  @Inject(...)
  private Asset getCalendarJS();
 
 
  Cheers ,
  Alex
 

 --
 View this message in context:
 http://www.nabble.com/Javascript-in-T5.0.3-tf3560612.html#a12986630
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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




-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.


Re: T5: the scanner and JBoss

2007-10-01 Thread Geoff Callender
Didn't work for me.  My html templates are in subdirectories of WEB- 
INF.  Where are yours?


On 01/10/2007, at 11:53 PM, Ben Sommerville wrote:


Switching to the JBoss classloader also makes auto-loading of html
templates
work for me.

Have you tried the html auto-loading after making the classloader  
change?


cheers
Ben



-Original Message-
From: Geoff Callender [mailto:[EMAIL PROTECTED]
Sent: Monday, 1 October 2007 6:52 AM
To: Tapestry users
Subject: Re: T5: the scanner and JBoss

Nice one, Ben.  For auto-reloading class files that works
beautifully, and it avoids the class-loading problems that I found
Tapestry5DevClassLoader introduced.

Does anyone know how to auto-reload T5 html templates in JBoss???

Alternatively, can someone point me to T5.0.5's template
scanning class?

Thanks in advance,
Geoff

On 30/09/2007, at 10:01 PM, Ben Sommerville wrote:


I found that using the JBoss UnifiedClassLoader instead of

the Tomcat

class loader for web applications fixes the auto-reloading issues.

To change this setting you need to edit the following file:
JBoss 4.0.x
server dir/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml
JBoss 4.2.x
server dir/deploy/jbossweb.deployer/META-INF/jboss-service.xml

Search for the attribute UseJBossWebLoader and set it to true.

Note: Changing this may affect how your web-app resolves classes.
I think the Tomcat classloader always loads classes for the webapp
libs first, even if the class exists in a parent classloader.
The JBoss classloader says it follows standard behaviour

and will use

classes from the parent classloader over classes from the webapp.

cheers
Ben


-Original Message-
From: Geoff Callender [mailto:[EMAIL PROTECTED]
Sent: Sunday, 30 September 2007 12:07 AM
To: Tapestry users
Subject: Re: T5: the scanner and JBoss

Nick, thanks for pointing out the earlier e-mail.

Unfortunately, it doesn't deal with how to auto-reload html
templates.  Tapestry5DevClassLoader only ensures class files
are reloaded.

Any other suggestions?

On 28/09/2007, at 9:24 PM, Nick Westgate wrote:


Geoff Callender wrote:

T5 isn't picking up changes to templates and component

classes in my

environment.  T5.0.5 is a jar in an exploded WAR in an

exploded EAR,

which JBoss has been told to use (it's pointed to in
jboss-service.xml).  When I make changes to the web app they are

copied

immediately to the exploded ear but T5 just isn't

picking them up.


I saw on Howard's blog that he'd had a problem with

JBoss/Tomcat...


 http://tapestryjava.blogspot.com/2007/02/fighting-with-

tomcat.html

 http://issues.apache.org/bugzilla/show_bug.cgi?id=41664

...but the 5.0.5 source looks like it has the necessary fix.

Besides,

I'm using an ear that's already exploded so I shouldn't

be getting

Howard's problem.  True?

Does anyone have a theory on why it isn't working?
Alternatively can anyone point me to the scanner class so I can

debug

what it isn't doing?

Geoff



The problem with Tomcat was identified in the following email as a
classloader caching issue. I've not tested this though.

Cheers,
Nick.



 Original Message 
Subject: RE: T5 developing with WTP and TOMCAT
Date: Wed, 5 Sep 2007 17:59:14 +0200
From: Brysbaert Gregory [EMAIL PROTECTED]
Reply-To: Tapestry users users@tapestry.apache.org
To: Tapestry users users@tapestry.apache.org

Hello,

About this topic, I tried some investigations on my side,

and I found

out that the reason why classes don't auto-reload is that the
WebappClassLoader of tomcat 5 (I currently use tomcat 5.0,

but I guess

it's the same on Tomcat 5.5) keeps in cache (in a Hashtable more
precisely) all classes it already loaded once. And this

cache is never

cleared, except when the WebappClassLoader is stopped.

So, when the

class file is modified on the disk, tapestry 5 clears its

own cache,

and then asks to the parent classloader (WebAppClassLoader)

to reload

the class, which then serves the previous version of the

class from

its cache. The result is that the class is never actually updated
until the next restart of tomcat.


So, as a temporary solution, I tried to develop a class extending
WebappClassLoader that does not cache classes for packages

containing

.pages. and .components.. The source of this class is :


public class Tapestry5DevClassLoader extends WebappClassLoader{

 private static String[] noCacheElements={.pages.,/
pages/,.components.,/components/};

public Tapestry5DevClassLoader() {
super();

}

public Tapestry5DevClassLoader(ClassLoader arg0) {
super(arg0);

}



@Override
protected InputStream findLoadedResource(String arg0) {
InputStream is=super.findLoadedResource(arg0);
if (is!=null){
if (isNoCacheElement(arg0))

Re: T3: Upload

2007-10-01 Thread Nazmul Bhuiyan

I've removed that deprecated method from my page.

I'm running this example page as part of my original project. And running
from inside Eclipse. All other pages working ok. That's how I normally test
any example before using into my real page.

In the example code there is no .page file. Is my .page file ok?

Thanks

Naz


Nick Westgate wrote:
 
 I've tested the example code on the page. It works with the exception
 of file.isTruncated(), which has been deprecated, I presume.
 
 So the rest of the code, ie the code you post below, does work.
 
 It must be a configuration issue. Are you running this example page
 in isolation, or is it part of a larger project? Are you running
 from inside Eclipse? If not, how is Tomcat started?
 
 Cheers,
 Nick.
 
 
 Nazmul Bhuiyan wrote:
 .page:
 page-specification class=com.fujitsu.efi.web.pages.test.UploadPage
 /page-specification
 
 The .page file was missed spelled but after correcting the file name I'm
 getting the following error:
 
 Could not load class UploadPage from WebappClassLoader delegate: false
 repositories: /WEB-INF/classes/ -- Parent Classloader:
 [EMAIL PROTECTED] : UploadPage
 
 
 But com.fujitsu.efi.web.pages.test.UploadPage class exists in
 WEB-INF/classes directory.
 
 Thanks
 
 Naz
 
 
 Nick Westgate wrote:
 What about your .page file?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 If you click on the link I've provided you will see the code. I've
 copied
 the
 code from there. This is from my Upload.html and formSubmit is as
 below:

 private IUploadFile file;
 private File serverFile;

 public IUploadFile getFile() { return file; }

 public void setFile(IUploadFile value) {
 file = value;
 }
 public void formSubmit(IRequestCycle cycle) { 
 InputStream fis = file.getStream(); 
 FileOutputStream fos = null;
  
 try { 
 fos = new FileOutputStream(new  File(file.getFileName()));
 byte[] buffer = new byte[1024];  
 while (true) {
 int length = fis.read(buffer);  
 if (length   0) {
 break;
 }
 fos.write(buffer, 0, length);   
 }
 fis.close();
 fos.close();
 serverFile = new File(file.getFileName());

 } catch (IOException ioe) {
 ioe.printStackTrace();
 } finally {
 if (fis != null) {
 try { fis.close(); } catch (IOException ioe) {}
 }   
 if (fos != null) {
 try { fos.close(); } catch (IOException ioe) {}
 }
 }
 }


 Nick Westgate wrote:
 Ok. Is this in a page or a component?
 And your Java code? Do you have a formSubmit listener?

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I've copied the code from
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html

 form jwcid=@Form listener=ognl:listeners.formSubmit
 table bgcolor=#c0c0c0 cellpadding=4
  tr
  td colspan=2File:nbsp;input jwcid=@Upload 
 file=ognl:file
 type=file/input/td
  /tr
  tr
  td colspan=2input type=submit 
 value=Upload/input/td
  /tr


 Thanks

 Naz


 Nick Westgate wrote:
 Please post the (relevant parts of) the code.

 Cheers,
 Nick.


 Nazmul Bhuiyan wrote:
 I'm getting an error when trying the Upload component example in
 http://tapestry.apache.org/tapestry3/doc/ComponentReference/Upload.html.

 Unable to resolve expression 'listeners.formSubmit' for
 [EMAIL PROTECTED] 
 binding: ExpressionBinding[UploadPage listeners.formSubmit
 cachedValue=null] 

 I've modified the listener.formSubmit to listeners.formSubmit
 according
 to
 Nick and still getting the error.

 Nick's answer for same issue in this forum:
 http://www.nabble.com/Form-upload-and-download-tf2236396.html#a6201542

 Is there anything missed?

 Thanks

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

-- 
View this message in context: 
http://www.nabble.com/T3%3A-Upload-tf4531396.html#a12987390
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: T4: Components in Page get Initialized even if its in IF condition block ?

2007-10-01 Thread andyhot

http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/AbstractComponent.html#prepareForRender(org.apache.tapestry.IRequestCycle)

sunilmanu wrote:

Thanks for the reply and information..

So is there any other method that could be used to initialize the properties
needed for the page other than pagebeginrender method .. ?
Or I have to pass in a parameter and check it's value inside the
pageBeginRender and see whether to process or not ?

thanks,
Sunil


Robert Zeigler wrote:
  
That's correct; think of your component as a listener, listening, not  
for when /it/ is starting to be rendered, but when the /page/ is  
starting to render.
So, the component's pageBeginRender is always called, since the  
component is asking to be notified of when the /page/ starts to  
render, regardless of whether the component is rendered.

Basically, the order of events is along the lines of:

fire page validation events
fire page begin render events
   render component 1 in page
   ...
   render component n in page
fire page end render event

Robert

On Oct 1, 2007, at 10/12:17 PM , sunilmanu wrote:



Howard,
thanks for ur reply..but still my doubt is..

I can understand if the Component was to be Rendered, the  
pagebeingrender

method being fired.
But why the method is fired, if the component is NOT going to be  
rendered ?
HTML just has a reference to that Component inside a IF block, so  
is that

line enough to trigger the pageBeginRender of the component ?

Thanks,
Sunil


Howard Lewis Ship wrote:
  
This is normal.  There are most specific methods that get called  
in the

lifecycle of the individual component.

pageBeginRender() means the Page is beginning to render, long  
before any

of
the components render.

On 10/1/07, sunilmanu [EMAIL PROTECTED] wrote:


Hello Everyone,

We are using Tapestry 4.0.2 . Recently we noticed a following  
issue :


We have a HTML page that has multiple COMPONENTS but are in IF
conditional
block. No matter how the condition is evaluated to TRUE /FALSE, the
Components are getting called i.e. the PAGEBEGINRENDER method is  
being

called eventhough they are NOT rendered !!

HTML
=











In the above piece, it renders properly in the browser but the
PAGEBEGINRENDER method is fired 3 times even if the Condition is  
FALSE.


We can definitely pass one more parameter to the component  
telling it

whether to process the iteration or not but is there a better way to
handle
this unwanted Component initialization ??

Thanks,
Sunil

--
View this message in context:
http://www.nabble.com/T4%3A-Components-in-Page-get-Initialized- 
even-if-its-in-IF-condition-block---tf4550131.html#a12984881

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
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind




--
View this message in context: http://www.nabble.com/T4%3A- 
Components-in-Page-get-Initialized-even-if-its-in-IF-condition- 
block---tf4550131.html#a12985833

Sent from the Tapestry - User mailing list archive at Nabble.com.


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

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






  


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


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



Re: [T5]

2007-10-01 Thread Ned Jackson Lovely
On Mon, Oct 01, 2007 at 10:56:56AM -0500, Robert Zeigler wrote:
 Or...
 
 @Inject
 private Cookies _cookies;
 
 You can then do:
 
 readCookieValue(mycookie);
 and there a variety of writeCookieValue methods offering control  
 over the age, domain, path, etc.

Excellent! Thank you. I need to poke around in the source more, eh?

Unfortunately, I found this:
https://issues.apache.org/jira/browse/TAPESTRY-1796

-- 
njl

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



RE: T5: the scanner and JBoss

2007-10-01 Thread Ben Sommerville
Ahh, that would be the difference.
My templates are under WEB-INF\classes. 

 -Original Message-
 From: Geoff Callender [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, 2 October 2007 6:23 AM
 To: Tapestry users
 Subject: Re: T5: the scanner and JBoss
 
 Didn't work for me.  My html templates are in subdirectories of WEB- 
 INF.  Where are yours?
 
 On 01/10/2007, at 11:53 PM, Ben Sommerville wrote:
 
  Switching to the JBoss classloader also makes auto-loading of html
  templates
  work for me.
 
  Have you tried the html auto-loading after making the classloader  
  change?
 
  cheers
  Ben
 


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



Re: T5: the scanner and JBoss

2007-10-01 Thread Howard Lewis Ship
We should probably update the deployment notes for JBoss then.  Perhaps
JBoss has changed recently because I tried a lot of variations before I
found one that worked properly.

On 10/1/07, Ben Sommerville [EMAIL PROTECTED] wrote:

 Switching to the JBoss classloader also makes auto-loading of html
 templates
 work for me.

 Have you tried the html auto-loading after making the classloader change?

 cheers
 Ben


  -Original Message-
  From: Geoff Callender [mailto:[EMAIL PROTECTED]
  Sent: Monday, 1 October 2007 6:52 AM
  To: Tapestry users
  Subject: Re: T5: the scanner and JBoss
 
  Nice one, Ben.  For auto-reloading class files that works
  beautifully, and it avoids the class-loading problems that I found
  Tapestry5DevClassLoader introduced.
 
  Does anyone know how to auto-reload T5 html templates in JBoss???
 
  Alternatively, can someone point me to T5.0.5's template
  scanning class?
 
  Thanks in advance,
  Geoff
 
  On 30/09/2007, at 10:01 PM, Ben Sommerville wrote:
 
   I found that using the JBoss UnifiedClassLoader instead of
  the Tomcat
   class loader for web applications fixes the auto-reloading issues.
  
   To change this setting you need to edit the following file:
   JBoss 4.0.x
   server dir/deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xml
   JBoss 4.2.x
   server dir/deploy/jbossweb.deployer/META-INF/jboss-service.xml
  
   Search for the attribute UseJBossWebLoader and set it to true.
  
   Note: Changing this may affect how your web-app resolves classes.
   I think the Tomcat classloader always loads classes for the webapp
   libs first, even if the class exists in a parent classloader.
   The JBoss classloader says it follows standard behaviour
  and will use
   classes from the parent classloader over classes from the webapp.
  
   cheers
   Ben
  
   -Original Message-
   From: Geoff Callender [mailto:[EMAIL PROTECTED]
   Sent: Sunday, 30 September 2007 12:07 AM
   To: Tapestry users
   Subject: Re: T5: the scanner and JBoss
  
   Nick, thanks for pointing out the earlier e-mail.
  
   Unfortunately, it doesn't deal with how to auto-reload html
   templates.  Tapestry5DevClassLoader only ensures class files
   are reloaded.
  
   Any other suggestions?
  
   On 28/09/2007, at 9:24 PM, Nick Westgate wrote:
  
   Geoff Callender wrote:
   T5 isn't picking up changes to templates and component
   classes in my
   environment.  T5.0.5 is a jar in an exploded WAR in an
   exploded EAR,
   which JBoss has been told to use (it's pointed to in
   jboss-service.xml).  When I make changes to the web app they are
   copied
   immediately to the exploded ear but T5 just isn't
  picking them up.
  
   I saw on Howard's blog that he'd had a problem with
   JBoss/Tomcat...
  
http://tapestryjava.blogspot.com/2007/02/fighting-with-
   tomcat.html
http://issues.apache.org/bugzilla/show_bug.cgi?id=41664
  
   ...but the 5.0.5 source looks like it has the necessary fix.
   Besides,
   I'm using an ear that's already exploded so I shouldn't
   be getting
   Howard's problem.  True?
  
   Does anyone have a theory on why it isn't working?
   Alternatively can anyone point me to the scanner class so I can
   debug
   what it isn't doing?
  
   Geoff
  
  
   The problem with Tomcat was identified in the following email as a
   classloader caching issue. I've not tested this though.
  
   Cheers,
   Nick.
  
  
  
    Original Message 
   Subject: RE: T5 developing with WTP and TOMCAT
   Date: Wed, 5 Sep 2007 17:59:14 +0200
   From: Brysbaert Gregory [EMAIL PROTECTED]
   Reply-To: Tapestry users users@tapestry.apache.org
   To: Tapestry users users@tapestry.apache.org
  
   Hello,
  
   About this topic, I tried some investigations on my side,
   and I found
   out that the reason why classes don't auto-reload is that the
   WebappClassLoader of tomcat 5 (I currently use tomcat 5.0,
   but I guess
   it's the same on Tomcat 5.5) keeps in cache (in a Hashtable more
   precisely) all classes it already loaded once. And this
   cache is never
   cleared, except when the WebappClassLoader is stopped.
  So, when the
   class file is modified on the disk, tapestry 5 clears its
   own cache,
   and then asks to the parent classloader (WebAppClassLoader)
   to reload
   the class, which then serves the previous version of the
  class from
   its cache. The result is that the class is never actually updated
   until the next restart of tomcat.
  
  
   So, as a temporary solution, I tried to develop a class extending
   WebappClassLoader that does not cache classes for packages
   containing
   .pages. and .components.. The source of this class is :
  
  
   public class Tapestry5DevClassLoader extends WebappClassLoader{
  
  private static String[] noCacheElements={.pages.,/
   pages/,.components.,/components/};
  
 public Tapestry5DevClassLoader() {
 super();
  
 }
  
 public Tapestry5DevClassLoader(ClassLoader arg0) {
  

Re: T5: Persisting per page AND depending on page state.

2007-10-01 Thread Jean-Philippe Bouchard
Probably because the domain component of the cookie issued by the 
servlet container is the actual hostname, not .my-host.com 
(http://wp.netscape.com/newsref/std/cookie_spec.html).


Anyhow, if you ever need to share the session, you'll know where to look :)

Ted Steen wrote:

hah, and now, after further investigation I see that all this is
unnecessary... I get a new session automatically for each new host i
try to access my page from.
I just assumed that the same session would be used.
anyway, it was interesting to see how a persistance stategy was contributed.

2007/9/24, Ted Steen [EMAIL PROTECTED]:

the contribution should be to the PersistentFieldManager of course

2007/9/24, Ted Steen [EMAIL PROTECTED]:

Ok!
After digging a little deeper I now see that extending the
AbstractSessionPersistentFieldStrategy and letting the prefix contain
the host name should be a solution!
I then contribute this to the ApplicationStatePersistenceStrategySource.
Any objections? :)

2007/9/24, Ted Steen [EMAIL PROTECTED]:

A page in our application can be in different states (depending on the
sub domain). When a field is persisted, the state of the page should
be taken in to account.

For example if the page is accessed via the host name a.my-host.com
the page should have its fields persisted for the context A and if the
page is accessed via the host name b.my-host.com the fields should be
persisted for the context B.

its important that if the user browses the page via a.my-host.com and
then changes to b.my-host.com the persistent fields should not cross
over!

I am currently looking for a contribution to some sort of persist
stategy service but I'm not really sure where to look, and also, I'm
not really sure this is the right way.

--
/ted



--
/ted



--
/ted







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



Re: [T5] Linkable rows with Grid component

2007-10-01 Thread Howard Lewis Ship
Alternately, you could subclass GridRows to provide the hooks for what you
need, then subclass Grid to make use of your custom GridRows.

The components in Tapestry are not meant to be sacrosanct, just useful.

Though that does bring up the question of component compatibility between
releases.  Hmph.

On 9/27/07, Carl Pulley [EMAIL PROTECTED] wrote:


 Having now had the chance to tidy up my example code, here's my MixIn code
 for the Grid Component:

 @MixinAfter
 public class ActionRows {

  public static final String event = rowAction;

 @Parameter(value=click, defaultPrefix=literal)
  private String action;

 @Parameter(required=true)
  private String rowid;

 @Inject
  private ComponentResources resources;

 @AfterRender
 void after(MarkupWriter writer) {
 final String tbodyPath = div/table/tbody;
 Element tbody = writer.getElement().find(tbodyPath);
 if (tbody == null) {
 throw new RuntimeException(...);
 }
 for (Node rowNode : tbody.getChildren()) {
 if (rowNode instanceof Element) {
 ((Element) rowNode).attribute(on + action, 
 window.location.assign(' +
 resources.createActionLink(event, false, new Object[] { rowid }) + '));
 }
 }
 } // end of AfterRender method

 } // end of MixIn class ActionRows

 and here's a typical page-usage scenario:

 @Component(parameters = { action=dblclick, rowid=row.id, row=row,
 ...
 })
 @MixinClasses(ActionRows.class)
 private Grid displayData;

 @OnEvent(value = ActionRows.event, component = ...)
 public Object displayRow(int id) {
   ...
 }

 Hope that helps,

   Carl.
 --
 View this message in context:
 http://www.nabble.com/-T5--Linkable-rows-with-Grid-component-tf4519155.html#a12916995
 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
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind