Re: EventListener on components within a @For loop

2006-10-04 Thread Christian Dutaret

I found a nice solution using dojo's ability to listen to an arbitrary
javascript function as if it were a native event.
I attach an empty js function to an arbitrary DOM element like this:

document.getElementById('someDiv').clickRadio=function(radio) {};

and an onclick attribute to my radio buttons:

span jwcid=@Radio value=ognl:lv.value onclick=document.getElementById
('someDiv').clickRadio(this);/

Then I can set an EventListener on the server-side

   @EventListener(targets = someDiv, events = clickRadio, submitForm =
form)
   public void listenToOnclickOnAnyRadioButtonInTheForLoop(IRequestCycle
cycle) throws InterruptedException {
   ...
   }

Works fine.
Ch.


2006/10/3, Dennis Sinelnikov [EMAIL PROTECTED]:


I'm glad someone else has a need for this as well.  From doing a little
bit of research the other day, I found @EventListener annotation that
was introduced into tapestry 4.1+ that sort of fixes the problem. I'm
currently using stable release of tapestry 4.0.2, so I didn't bother
going that route. I believe this can be accomplished with tacos, but not
sure.  If you find something I would love to see an example, I'll do the
same as well...

Good Luck,
Dennis

Christian Dutaret wrote:
 Hi,

 Is it possible to have an EventListener for events on components within
a
 @For loop? Typically, I have a set of radio buttons, which are rendered
 from
 @Radio components within a @For loop (with a surrounding @RadioGroup
 component), and I want to invoke a listener whenever an onclick event
 occurs
 on any of those radio buttons.
 I could achieve this with @contrib:XTile components, but I'd rather use
the
 same programming model everywhere. It would be nice, for instance, to
 set an
 EvenListener on the @RadioGroup component, and have it propagate the
event
 on nested @Radio components.

 Thx
 Ch.



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




Insert Components depending on SubClass

2006-10-04 Thread Skorpien126

Hi Guys..
I?m let?s say a Newbie. I have a Project and i want to realize the
following:

I have a abstract class called Person extending from BaseComponent owning
some properties. Furthermore I have class Worker and Non-Worker extending
from Person and owning some properties each. I read an array from Database
including Worker and Non-Workers Objects.

I have made a new component for Workers and one for non-Worker.

In another Component I read the array. This one should entry a the
Non-worker component or the Worker-Component for each object depending on
which object i want to visualize. Is there a way realize that?!?!
-- 
View this message in context: 
http://www.nabble.com/Insert-Components-depending-on-SubClass-tf2382665.html#a6640638
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: Insert Components depending on SubClass

2006-10-04 Thread Christian Haselbach
Quoting Skorpien126 [EMAIL PROTECTED]:

 In another Component I read the array. This one should entry a the
 Non-worker component or the Worker-Component for each object depending on
 which object i want to visualize. Is there a way realize that?!?!

You can use the If component to choose how to display something.
Assuming your Person Class has a method isWorker() that is true
iff the person instance is a worker and your component stores a
Person instance in a component property called person, you can
write the following in the html template (untested code follows):

span jwcid=@If condition=ognl:person.worker
  span jwcid=@WorkerDisplayComponent worker=ognl:person
/span
span jwcid=@Else
  span jwcid=@NonWorkerDisplayComponent nonWorker=ognl:person
/span

WorkerDisplayComponent here is a component that has a parameter
worker and NonWorkerDisplayComponent is a component that has a
parameter nonWorker.

HTH

Ciao Christian

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



Re: Insert Components depending on SubClass

2006-10-04 Thread Norbert Sándor

Use the For and the If components. Pseudo code:

span jwcid=@For source=ognl:arrayOfPersons value=ognl:person
   span jwcid=@If condition=ognl:person instanceof Worker
  span jwcid=@Worker ... /
   /span
   span jwcid=@If condition=ognl:person instanceof NonWorker
  span jwcid=@NonWorker ... /
   /span
/span

I hope I understood your problem well...

Regards,
Norbi

Skorpien126 wrote:

Hi Guys..
I?m let?s say a Newbie. I have a Project and i want to realize the
following:

I have a abstract class called Person extending from BaseComponent owning
some properties. Furthermore I have class Worker and Non-Worker extending
from Person and owning some properties each. I read an array from Database
including Worker and Non-Workers Objects.

I have made a new component for Workers and one for non-Worker.

In another Component I read the array. This one should entry a the
Non-worker component or the Worker-Component for each object depending on
which object i want to visualize. Is there a way realize that?!?!
  



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



tapestry-captcha/acegi integration

2006-10-04 Thread Denis McCarthy

Hi,
I'm attempting to integrate James Carman's tapestry-captcha library into 
a proof of concept app I'm putting together. The acegi stuff is 
redirecting correctly to a very simple captcha page just containg a 
reference to the captcha component from tapestry-captcha.

Here's the .page:
page-specification class=org.apache.tapestry.html.BasePage
 component id=captcha type=captcha:CaptchaImage/component
/page-specification

However, when the app jumps to this page, I'm getting a null pointer 
exception in the getLink() method. After looking at the code in the 
CaptchaEngineService class, it seems like I need to define both a 
LinkFactory and an ImageCaptchaService for the component. I haven't 
messed with services before, so I'd like to know how to go about 
defining a linkfactory for this component?.



As I'm using Acegi, I'd like to use acegi's 
CaptchaValidationProcessingFilter to process the captcha's success or 
failure. This filter uses the presence of a validation parameter 
(defined in the spring application context) to decide whether to 
validate the request or not. Is it possible in tapestry to ensure that 
the validation parameter passed back in the http request has a specific 
name, so that the filter will pick it up and validate whether the 
captcha was correctly entered?

If anyone needs any further info just ask
TIA
Denis Mc.

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



Re: Insert Components depending on SubClass

2006-10-04 Thread Skorpien126

Juip,  thats it. This should work.. 
( i thougth of a funtion definition in the base class, which i have to
override in every subclass... giving out the correct code)
thank u very much 



Norbert S?ndor wrote:
 
 Use the For and the If components. Pseudo code:
 
 span jwcid=@For source=ognl:arrayOfPersons value=ognl:person
 span jwcid=@If condition=ognl:person instanceof Worker
span jwcid=@Worker ... /
 /span
 span jwcid=@If condition=ognl:person instanceof NonWorker
span jwcid=@NonWorker ... /
 /span
 /span
 
 I hope I understood your problem well...
 
 Regards,
 Norbi
 
 Skorpien126 wrote:
 Hi Guys..
 I?m let?s say a Newbie. I have a Project and i want to realize the
 following:

 I have a abstract class called Person extending from BaseComponent owning
 some properties. Furthermore I have class Worker and Non-Worker extending
 from Person and owning some properties each. I read an array from
 Database
 including Worker and Non-Workers Objects.

 I have made a new component for Workers and one for non-Worker.

 In another Component I read the array. This one should entry a the
 Non-worker component or the Worker-Component for each object depending on
 which object i want to visualize. Is there a way realize that?!?!
   
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Insert-Components-depending-on-SubClass-tf2382665.html#a6641608
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: tapestry-captcha/acegi integration

2006-10-04 Thread James Carman
Denis,

The hivemodule.xml file for Tapestry-Captcha will take care of wiring in the
linkFactory and imageCaptchaService.  

James 

-Original Message-
From: Denis McCarthy [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 04, 2006 11:08 AM
To: Tapestry users
Subject: tapestry-captcha/acegi integration

Hi,
I'm attempting to integrate James Carman's tapestry-captcha library into 
a proof of concept app I'm putting together. The acegi stuff is 
redirecting correctly to a very simple captcha page just containg a 
reference to the captcha component from tapestry-captcha.
Here's the .page:
page-specification class=org.apache.tapestry.html.BasePage
 component id=captcha type=captcha:CaptchaImage/component
/page-specification

However, when the app jumps to this page, I'm getting a null pointer 
exception in the getLink() method. After looking at the code in the 
CaptchaEngineService class, it seems like I need to define both a 
LinkFactory and an ImageCaptchaService for the component. I haven't 
messed with services before, so I'd like to know how to go about 
defining a linkfactory for this component?.


As I'm using Acegi, I'd like to use acegi's 
CaptchaValidationProcessingFilter to process the captcha's success or 
failure. This filter uses the presence of a validation parameter 
(defined in the spring application context) to decide whether to 
validate the request or not. Is it possible in tapestry to ensure that 
the validation parameter passed back in the http request has a specific 
name, so that the filter will pick it up and validate whether the 
captcha was correctly entered?
If anyone needs any further info just ask
TIA
Denis Mc.

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



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



Re: SSL Security Information Warning Tacos

2006-10-04 Thread Chris Chiappone

Anybody have any idea about this?

On 10/3/06, Chris Chiappone [EMAIL PROTECTED] wrote:


Hi I am using tapestry 4 with tacos and notice when I include the
following in my HeadDelegate to allow for tacos I get the annoying Security
Popup about showing secure and non-secure items.
Has anyone else ran into this?

attributeList.clear();
att = new Attribute(type, text/javascript);
attributeList.add(att);
String script =  + djConfig = { isDebug: false, 
+ baseRelativePath: \js/dojo\, 
+ preventBackButtonFix: false,  + parseWidgets: false
}; 
+ ;
createScriptTag(writer, attributeList, script);

attributeList.clear();
att = new Attribute(type, text/javascript);
attributeList.add(att);
att = new Attribute(src, js/dojo/dojo.js);
attributeList.add(att);
createScriptTag(writer, attributeList, null);

--
~chris





--
~chris


Annotations and translators

2006-10-04 Thread Mael Caldas

Hi,

I wan to to declare a DatePicker component with annotations. I just passed
the component from .page, to java the corresponding java class, but I got a
parse exception, because of the translators bindings...
Here is the code on .page:

 component id=date type=DatePicker
   binding name=value value=date/
   binding name=displayName value=literal:Data/
   binding name=validators value=validators:required[É necessário uma
data!]/
   binding name=translator
value=translator:date,pattern=dd/MM/,message=Data Inválida!/
 /component

And with annotation:

   @Component(id=date, type=DatePicker, bindings= {value=date,
displayName=literal:Data, validators={validators:required[É necessário uma
data!]}, translator={translator:date,pattern=dd/MM/,message=Data
Inválida!}})
   public abstract DatePicker getDateComponent();

Does anybody know a way to declare the component with annotation, and make
some complex bindings like these, without error?

Thank you!


Re: Annotations and translators

2006-10-04 Thread Mael Caldas

SORRY
Such a dumb I'm!
The binding declaration was wrong...
;)

Mael

On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote:


Hi,

I wan to to declare a DatePicker component with annotations. I just passed
the component from .page, to java the corresponding java class, but I got a
parse exception, because of the translators bindings...
Here is the code on .page:

  component id=date type=DatePicker
binding name=value value=date/
binding name=displayName value=literal:Data/
binding name=validators value=validators:required[É necessário uma
data!]/
binding name=translator
value=translator:date,pattern=dd/MM/,message=Data Inválida!/
  /component

And with annotation:

@Component(id=date, type=DatePicker, bindings= {value=date,
displayName=literal:Data, validators={validators:required[É necessário uma
data!]}, translator={translator:date,pattern=dd/MM/,message=Data
Inválida!}})
public abstract DatePicker getDateComponent();

Does anybody know a way to declare the component with annotation, and make
some complex bindings like these, without error?

Thank you!



Re: EventListener on components within a @For loop

2006-10-04 Thread Jesse Kuhnert

Hah! That's pretty cool. I like it :)

If someone files a bug in JIRA I'll look into the radio button stuff
.(though I thought I remembered there being a ticket for this already - at
least I know we had to deal with it in tacos )

On 10/4/06, Christian Dutaret [EMAIL PROTECTED] wrote:


I found a nice solution using dojo's ability to listen to an arbitrary
javascript function as if it were a native event.
I attach an empty js function to an arbitrary DOM element like this:

document.getElementById('someDiv').clickRadio=function(radio) {};

and an onclick attribute to my radio buttons:

span jwcid=@Radio value=ognl:lv.value onclick=
document.getElementById
('someDiv').clickRadio(this);/

Then I can set an EventListener on the server-side

@EventListener(targets = someDiv, events = clickRadio, submitForm
=
form)
public void listenToOnclickOnAnyRadioButtonInTheForLoop(IRequestCycle
cycle) throws InterruptedException {
...
}

Works fine.
Ch.


2006/10/3, Dennis Sinelnikov [EMAIL PROTECTED]:

 I'm glad someone else has a need for this as well.  From doing a little
 bit of research the other day, I found @EventListener annotation that
 was introduced into tapestry 4.1+ that sort of fixes the problem. I'm
 currently using stable release of tapestry 4.0.2, so I didn't bother
 going that route. I believe this can be accomplished with tacos, but not
 sure.  If you find something I would love to see an example, I'll do the
 same as well...

 Good Luck,
 Dennis

 Christian Dutaret wrote:
  Hi,
 
  Is it possible to have an EventListener for events on components
within
 a
  @For loop? Typically, I have a set of radio buttons, which are
rendered
  from
  @Radio components within a @For loop (with a surrounding @RadioGroup
  component), and I want to invoke a listener whenever an onclick event
  occurs
  on any of those radio buttons.
  I could achieve this with @contrib:XTile components, but I'd rather
use
 the
  same programming model everywhere. It would be nice, for instance, to
  set an
  EvenListener on the @RadioGroup component, and have it propagate the
 event
  on nested @Radio components.
 
  Thx
  Ch.
 


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







--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

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


Re: SSL Security Information Warning Tacos

2006-10-04 Thread Jesse Kuhnert

IE Shows those when you try to switch between https and http in the same
document. Must be that your script include protocol (ie http vs https )
isn't the same as your apps base protocol on this page.

On 10/4/06, Chris Chiappone [EMAIL PROTECTED] wrote:


Anybody have any idea about this?

On 10/3/06, Chris Chiappone [EMAIL PROTECTED] wrote:

 Hi I am using tapestry 4 with tacos and notice when I include the
 following in my HeadDelegate to allow for tacos I get the annoying
Security
 Popup about showing secure and non-secure items.
 Has anyone else ran into this?

 attributeList.clear();
 att = new Attribute(type, text/javascript);
 attributeList.add(att);
 String script =  + djConfig = { isDebug: false, 
 + baseRelativePath: \js/dojo\, 
 + preventBackButtonFix: false,  + parseWidgets: false
 }; 
 + ;
 createScriptTag(writer, attributeList, script);

 attributeList.clear();
 att = new Attribute(type, text/javascript);
 attributeList.add(att);
 att = new Attribute(src, js/dojo/dojo.js);
 attributeList.add(att);
 createScriptTag(writer, attributeList, null);

 --
 ~chris




--
~chris





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

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


Re: Annotations and translators

2006-10-04 Thread Jesse Kuhnert

Not dumb, that's what this list is for. :)

On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote:


SORRY
Such a dumb I'm!
The binding declaration was wrong...
;)

Mael

On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote:

 Hi,

 I wan to to declare a DatePicker component with annotations. I just
passed
 the component from .page, to java the corresponding java class, but I
got a
 parse exception, because of the translators bindings...
 Here is the code on .page:

   component id=date type=DatePicker
 binding name=value value=date/
 binding name=displayName value=literal:Data/
 binding name=validators value=validators:required[É necessário
uma
 data!]/
 binding name=translator
 value=translator:date,pattern=dd/MM/,message=Data Inválida!/
   /component

 And with annotation:

 @Component(id=date, type=DatePicker, bindings= {value=date,
 displayName=literal:Data, validators={validators:required[É necessário
uma
 data!]}, translator={translator:date,pattern=dd/MM/,message=Data
 Inválida!}})
 public abstract DatePicker getDateComponent();

 Does anybody know a way to declare the component with annotation, and
make
 some complex bindings like these, without error?

 Thank you!






--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

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


Re: Annotations and translators

2006-10-04 Thread Mael Caldas

hehehehe thanks! :)

On 10/4/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:


Not dumb, that's what this list is for. :)

On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote:

 SORRY
 Such a dumb I'm!
 The binding declaration was wrong...
 ;)

 Mael

 On 10/4/06, Mael Caldas [EMAIL PROTECTED] wrote:
 
  Hi,
 
  I wan to to declare a DatePicker component with annotations. I just
 passed
  the component from .page, to java the corresponding java class, but I
 got a
  parse exception, because of the translators bindings...
  Here is the code on .page:
 
component id=date type=DatePicker
  binding name=value value=date/
  binding name=displayName value=literal:Data/
  binding name=validators value=validators:required[É necessário
 uma
  data!]/
  binding name=translator
  value=translator:date,pattern=dd/MM/,message=Data Inválida!/
/component
 
  And with annotation:
 
  @Component(id=date, type=DatePicker, bindings= {value=date,
  displayName=literal:Data, validators={validators:required[É necessário
 uma
  data!]}, translator={translator:date,pattern=dd/MM/,message=Data
  Inválida!}})
  public abstract DatePicker getDateComponent();
 
  Does anybody know a way to declare the component with annotation, and
 make
  some complex bindings like these, without error?
 
  Thank you!
 




--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

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




Re: [announce] BeanForm 0.5

2006-10-04 Thread Patrick Moore

Thanks ... I am going to try this.. btw .. your on-line doc still uses the
old notation

On 10/2/06, DJ Gredler [EMAIL PROTECTED] wrote:


Hi all,

The latest release of BeanForm, the single-line POJO editor component, is
now available for download. Below is a list of changes since the last
version. There are two incompatible changes that all current users should
be
aware of -- they're at the very end.

Happy hacking,

Daniel Gredler



Changes:

- Add exclude parameter to the BeanForm component.
- Dynamic binding overrides for input fields via informal parameters on
the
BeanForm (very cool).
- Add Italian translation. Thanks to Edoardo Campagnano.
- More efficient dynamic validator list building process (~70% form rewind
time savings).
- Don't use deprecated translator binding.
- Fix bug 1554067: input override via use of carefully-named components
breaks when using BeanForm inside a custom component. Thanks to Edoardo
Campagnano.
- Fix bug 1560627: input override can't be used when you have 2+
BeanForms.
Thanks to Edoardo Campagnano.
- Fix bug 1565487: indexed JavaBean properties cause NPEs in
BeanProperty#getTypeName(). Thanks to Jon McCarty.
- Fix bug 1565478: write-only JavaBean properties cause NPEs in
BeanProperty#getValue(). Thanks to Jon McCarty.

Incompatible Changes:

- If you are overriding inputs via the use of carefully-named components,
the new naming formula is
[beanform-component-id]_[property-name]_BeanFieldBlock and
[beanform-component-id]_[property-name]_BeanField. Adding the BeanForm's
id to the naming convention allows users with more than one BeanForm on
their page to use this override method.
- If you are using [property-name]PSM informal parameters to get
dropdown
boxes for your properties, the new naming convention is
[property-name]_model. This change was made to make the convention
consistent with the new dynamic binding override functionality
([property-name]_[binding-name]).


Homepage: http://beanform.sourceforge.net/
Component Reference:
http://beanform.sourceforge.net/component-reference.html

Change History: http://beanform.sourceforge.net/changes-report.html





Re: [announce] BeanForm 0.5

2006-10-04 Thread DJ Gredler

I'm afraid I don't see the old notation anywhere... what example are you
looking at?

On 10/4/06, Patrick Moore [EMAIL PROTECTED] wrote:


Thanks ... I am going to try this.. btw .. your on-line doc still uses the
old notation

On 10/2/06, DJ Gredler [EMAIL PROTECTED] wrote:

 Hi all,

 The latest release of BeanForm, the single-line POJO editor component,
is
 now available for download. Below is a list of changes since the last
 version. There are two incompatible changes that all current users
should
 be
 aware of -- they're at the very end.

 Happy hacking,

 Daniel Gredler



 Changes:

 - Add exclude parameter to the BeanForm component.
 - Dynamic binding overrides for input fields via informal parameters on
 the
 BeanForm (very cool).
 - Add Italian translation. Thanks to Edoardo Campagnano.
 - More efficient dynamic validator list building process (~70% form
rewind
 time savings).
 - Don't use deprecated translator binding.
 - Fix bug 1554067: input override via use of carefully-named components
 breaks when using BeanForm inside a custom component. Thanks to Edoardo
 Campagnano.
 - Fix bug 1560627: input override can't be used when you have 2+
 BeanForms.
 Thanks to Edoardo Campagnano.
 - Fix bug 1565487: indexed JavaBean properties cause NPEs in
 BeanProperty#getTypeName(). Thanks to Jon McCarty.
 - Fix bug 1565478: write-only JavaBean properties cause NPEs in
 BeanProperty#getValue(). Thanks to Jon McCarty.

 Incompatible Changes:

 - If you are overriding inputs via the use of carefully-named
components,
 the new naming formula is
 [beanform-component-id]_[property-name]_BeanFieldBlock and
 [beanform-component-id]_[property-name]_BeanField. Adding the
BeanForm's
 id to the naming convention allows users with more than one BeanForm on
 their page to use this override method.
 - If you are using [property-name]PSM informal parameters to get
 dropdown
 boxes for your properties, the new naming convention is
 [property-name]_model. This change was made to make the convention
 consistent with the new dynamic binding override functionality
 ([property-name]_[binding-name]).

 
 Homepage: http://beanform.sourceforge.net/
 Component Reference:
 http://beanform.sourceforge.net/component-reference.html

 Change History: http://beanform.sourceforge.net/changes-report.html
 






Re: [announce] BeanForm 0.5

2006-10-04 Thread Patrick Moore

In section 5. (http://beanform.sourceforge.net/component-reference.html) I
see references to 'PSM' for the property selection model.. but I think I may
have just misread your release note.

On 10/4/06, DJ Gredler [EMAIL PROTECTED] wrote:


I'm afraid I don't see the old notation anywhere... what example are you
looking at?





Re: [announce] BeanForm 0.5

2006-10-04 Thread DJ Gredler

Ah, I think you're confusing the page property names with the parameter
names. The convention is in the naming of the informal parameters (like
owner_model and manufacturer_model). You can name your page properties
however you like (in this case ownerPSM and manufacturerPSM). I'll try
to make the wording clearer.

On 10/5/06, Patrick Moore [EMAIL PROTECTED] wrote:


In section 5. (http://beanform.sourceforge.net/component-reference.html) I
see references to 'PSM' for the property selection model.. but I think I
may
have just misread your release note.

On 10/4/06, DJ Gredler [EMAIL PROTECTED] wrote:

 I'm afraid I don't see the old notation anywhere... what example are you
 looking at?







RE: Equivalent of JSP Includes?

2006-10-04 Thread Mark Stang
Did you ever get a satisfactory solution?  I was on vacation...

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Mike Grundvig [mailto:[EMAIL PROTECTED]
Sent: Sun 9/24/2006 9:11 AM
To: Tapestry users
Subject: Re: Equivalent of JSP Includes?
 
Yes Robert; that is EXACTLY what I'm looking for. I'm willing to write the 
meta component myself but I don't know how to ensure Tapestry loads the 
component dynamically. I'm sure there is a service somewhere and I simply 
use the path to the component or some such. Sadly; this is something I 
assumed would be a trivial thing to implement but now it's proving to be a 
nightmare.

Peter: I've poured over those examples closely now and I still don't see how 
this does what I need. I'm not trying to be argumentative or dense, but I'm 
not seeing how it provides what I'm looking for. The best I can come up with 
using RenderBlock is something like this:

TEMPLATE
-=-=-
html
...
span jwcid=@RenderBlock block=ad1Ad1/span
span jwcid=@RenderBlock block=ad2Ad1/span
span jwcid=@RenderBlock block=ad2Ad1/span
...
/html

PAGE USING TEMPLATE (one of almost 2000)
-=-=-
html

span jwcid=[EMAIL PROTECTED]
span jwcid=@otherProductsListThisAd
/span
span jwcid=[EMAIL PROTECTED]
span jwcid=@otherPurchasedProductsAd
/span
span jwcid=[EMAIL PROTECTED]
span jwcid=@popularProductsAd
/span

/html

Thanks for any suggestions or advice!

Michael

- Original Message - 
From: Robert Binna [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Sunday, September 24, 2006 9:51 AM
Subject: Re: Equivalent of JSP Includes?


 But if RenderBlock is used the Block that should be rendered must be 
 somewhere defined, or do I get it totaly wrong?
 Is something like this possible (I think that's what Mike wants to do):

 span jwcid=@MetaComponent componentName=ognl:nameOfComponent 
 [informal parameters.] /

 Robert

 Jesse Kuhnert schrieb:
 The page I referenced gives you an example of what you asked for.

 http://tapestry.apache.org/tapestry4.1/components/RenderBlock.html

 On 9/24/06, Mike Grundvig [EMAIL PROTECTED] wrote:

 Doh! That's the second time someone has suggested RenderBlock to me, but
 apparently I'm dense because I really can't see how that does what I 
 need.
 If I make my original example JSP more sophisticated, how could render
 block
 do this?

 %
  String pageToInclude = blah_ + request.getParameter(id) +
 .html;
 %

 jsp:include page=%=pageToInclude%

 My understanding is that render block lets me put Blocks in the page 
 that
 is
 using the template and the template itself will render that out inline. 
 I
 don't see how I can pass another tapestry component name and the render
 block will render it. Please correct me if I'm mistaken. Thanks!

 Michael

 - Original Message -
 From: Jesse Kuhnert [EMAIL PROTECTED]
 To: Tapestry users users@tapestry.apache.org
 Sent: Sunday, September 24, 2006 9:32 AM
 Subject: Re: Equivalent of JSP Includes?


  Ah, then you definitely want to use RenderBlock.
 
  http://tapestry.apache.org/tapestry4.1/components/RenderBlock.html
 
  On 9/24/06, Mike Grundvig [EMAIL PROTECTED] wrote:
 
  But how can you dynamically define the component name? I have 20-30
  custom
  components (each one is an ad) and one template for the whole site
 with
  spots for 6 components. The site has an external tool to manage which
  page
  has which of the 20-30 components in what location. I want to know
 how
 to
  do
  that dynamically in Tapestry. Basically, I really want to maintain
 only
 a
  single template for the site but still show different components in
  places.
  Thanks!
 
  Michael
 
  - Original Message -
  From: Jesse Kuhnert [EMAIL PROTECTED]
  To: Tapestry users users@tapestry.apache.org
  Sent: Sunday, September 24, 2006 9:21 AM
  Subject: Re: Equivalent of JSP Includes?
 
 
  I usually do something like:
  
   span jwcid=@MyCustomComponentName /
  
   On 9/24/06, Mike Grundvig [EMAIL PROTECTED] wrote:
  
   How do you do the little snippet below in Tapestry?
  
   %
   // This could be any code needed, but it results in a specific
   page
   String pageToInclude = blah.html;
   %
  
   jsp:include page=%=pageToInclude%
  
   Thanks!
  
   Michael Grundvig
   Electrotank, Inc
   http://www.electrotank.com
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   --
   Jesse Kuhnert
   Tapestry/Dojo/(and a dash of TestNG), team member/developer
  
   Open source based consulting work centered around
   dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
  
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL 

RE: BeanForm for TP3?

2006-10-04 Thread Mark Stang
Did you ever make any progress on this?

thanks,

Mark

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Darío Vasconcelos [mailto:[EMAIL PROTECTED]
Sent: Mon 9/25/2006 9:34 AM
To: Tapestry users
Subject: Re: BeanForm for TP3?
 
Thanks Daniel,

I didn't recognize the title of my own post (duh!) and didn't notice
you had replied to it. I will search the list and try to do the
backport. Losing automatic validations and other stuff doesn't worry
me that much; I'm assembling a team of Tapestry newbies for a project
I'm starting and they're having a hard time climbing the learning
curve... so I thought maybe BeanForm would speed development, if not
helped them to understand TP a little more

Regards,

Dario


On 9/20/06, DJ Gredler [EMAIL PROTECTED] wrote:
 I don't have plans to backport it to Tap3, mainly because I don't use Tap3
 and because I don't have any experience using Tap3.

 There has been some interest from others on this list in doing a backport
 (search the list), so you might want to get together to tackle it. It's
 Apache2-licensed, so nothing stops you. The only thing is that the next
 version or two will still be pretty large improvements over previous
 iterations, so keeping in sync with the original codebase might be an issue.

 I assume you realize that you'd have to eliminate some of the nicer features
 (like automatic validation generation based on annotations) in order to
 target older JDKs.

 Take care,

 Daniel


 On 9/20/06, Darío Vasconcelos [EMAIL PROTECTED] wrote:
 
  Hi,
 
  since recently someone mentioned the BeanForm component, I've been
  reading about it and wondering if there's a version for Tapestry 3,
  because I'm still stuck with old JDKs and app servers...
 
  In case there isn't such thing, would a backport be possible? Too much
  hard work? I haven't really gotten into all the annotation and
  HiveMind stuff and it looks kinda complicated from here...
 
  Regards,
 
  Dario
 
 
  --
  Some weasel took the cork out of my lunch.
-- W.C. Fields
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Some weasel took the cork out of my lunch.
  -- W.C. Fields

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




Newbie question about ApplicationServlet

2006-10-04 Thread Dave Rathnow

I'm new to Tapestry and have just started working with it.  My background is 
WebObjects so
most of my question will come from that perspective.

The application I'm developing will be doing some background processing with 
the UI providing
monitoring and control functions.  In WebObjects, we would use an single 
Application instance 
that is created when the web application is first started. We would store the 
objects required to 
access and control the back ground processing.  This Application instance is 
then available in
in each request-response loop through a Session object, or through a global 
static method.

Is this same model provided by the ApplicationServlet class in Tapestry?  Is 
there a single instance
of this object and if so, how can I get it?  Is it common practice to subclass 
this class and
then do all your own application specific logic in the derived class?

Thanks,
Dave.

Re: Newbie question about ApplicationServlet

2006-10-04 Thread Dennis Sinelnikov

Hello Dave,

There is 1 instance of ApplicationServlet, with newer releases of 
tapestry there is less and less things I can think of doing in the 
ApplicationServlet.  You can extend from 
org.apache.tapestry.ApplicationServlet and create your own (perfectly ok 
to do).  In ApplicationServlet, usually you would do some global 
configuration settings, resource allocation, fork threads, etc..


Without knowing too much about the application you're trying to develop, 
you could fork threads in your ApplicationServlet that would do your 
background processing and just clean them up in destroy().  I would not 
recommend getting your ApplicationServlet instance, but perhaps develop 
separate logic that would get triggered via a UI.  This logic would do 
monitoring/control and return response to the user via a UI.  If you 
need some global object or perhaps one of the threads that got forked 
upon ApplicationServlet startup, consider having a pool of threads that 
have the same purpose that you can just grab at any point...


Hope this helps,
Dennis

Dave Rathnow wrote:

I'm new to Tapestry and have just started working with it.  My background is 
WebObjects so
most of my question will come from that perspective.

The application I'm developing will be doing some background processing with 
the UI providing
monitoring and control functions.  In WebObjects, we would use an single Application instance 
that is created when the web application is first started. We would store the objects required to 
access and control the back ground processing.  This Application instance is then available in

in each request-response loop through a Session object, or through a global 
static method.

Is this same model provided by the ApplicationServlet class in Tapestry?  Is 
there a single instance
of this object and if so, how can I get it?  Is it common practice to subclass 
this class and
then do all your own application specific logic in the derived class?

Thanks,
Dave.



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



NotSerializableException - MIME, Persist = client

2006-10-04 Thread Joel
I have a datasqueezer works fine when persisting as a link or value of a 
radio button, however, if I try to persist=cllient  or client:page I 
get an exception, NotSerializableException and its complaining about 
MIME in some regard. The datasqueezer happens to return an ID that is in 
the format of an URL.


Any ideas?

Joel



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



Re: Newbie question about ApplicationServlet

2006-10-04 Thread Jesse Kuhnert

Oh no... Don't do anything remotely like that.

You want to go look at jakarta.apache.org/hivemind. It's a very powerful IoC
container - and it's also what t4 is built on.

You'll find almost any pattern (including thread per session ) available to
you once you peek inside. Almost all of the core of Tapestry is broken up
into easy to manage / inject services.

On 10/4/06, Dennis Sinelnikov [EMAIL PROTECTED] wrote:


Hello Dave,

There is 1 instance of ApplicationServlet, with newer releases of
tapestry there is less and less things I can think of doing in the
ApplicationServlet.  You can extend from
org.apache.tapestry.ApplicationServlet and create your own (perfectly ok
to do).  In ApplicationServlet, usually you would do some global
configuration settings, resource allocation, fork threads, etc..

Without knowing too much about the application you're trying to develop,
you could fork threads in your ApplicationServlet that would do your
background processing and just clean them up in destroy().  I would not
recommend getting your ApplicationServlet instance, but perhaps develop
separate logic that would get triggered via a UI.  This logic would do
monitoring/control and return response to the user via a UI.  If you
need some global object or perhaps one of the threads that got forked
upon ApplicationServlet startup, consider having a pool of threads that
have the same purpose that you can just grab at any point...

Hope this helps,
Dennis

Dave Rathnow wrote:
 I'm new to Tapestry and have just started working with it.  My
background is WebObjects so
 most of my question will come from that perspective.

 The application I'm developing will be doing some background processing
with the UI providing
 monitoring and control functions.  In WebObjects, we would use an single
Application instance
 that is created when the web application is first started. We would
store the objects required to
 access and control the back ground processing.  This Application
instance is then available in
 in each request-response loop through a Session object, or through a
global static method.

 Is this same model provided by the ApplicationServlet class in
Tapestry?  Is there a single instance
 of this object and if so, how can I get it?  Is it common practice to
subclass this class and
 then do all your own application specific logic in the derived class?

 Thanks,
 Dave.


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





--
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

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


Add-on extensions

2006-10-04 Thread Bill Holloway

We're looking to integrate a bulletin board and blog system into our
Tapestry app.  Are there any such high-level components/extensions
around for Tapestry?

Bill

--
The real threat from global warming is not the number of people who
fail to see the danger.  The real threat is number who do see the
danger and refuse to change their lifestyles.

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