Re: For Nabble users

2013-03-22 Thread Ulrich Stärk
First, Nabble users don't subscribe, meaning I have to moderate Nabble mails on 
a daily basis.
Nabble won't or can't force users to subscribe users prior to posting.

Second, Nabble eats code listings etc. leaving users to wonder why their emails 
aren't displayed
properly to normal users, possibly causing confusion or even frustration. I 
don't want to have
users confused over something we can't control.

Third, and most important, if I or another moderator forgets to moderate a 
Nabble email, or doesn't
moderate it in time because of travel, sickness or whatever, readers of the 
mailing list won't get
the post and can't reply, creating a friction in our community (those that use 
Nabble and those that
don't).

Our discussions take place on mailing lists. Period. Nabble violates that 
policy, creates work for
our volunteers and confusion for our users. If you can make Nabble behave 
properly I'm willing to
withdraw my objections and I'm sure other PMC members will too. But until then 
I recommend that
people like Lance use a webmail service in situations where they can't use an 
email client.

Uli

On 22.03.2013 00:45, Bob Harner wrote:
 Yeah, I 'm with you, Lance. And I didn't think the annoyances of the nabble
 posts were significant.
 On Mar 21, 2013 7:06 PM, Lance Java lance.j...@googlemail.com wrote:
 
 That's actually really annoying for me.

 Most workplaces don't allow personal email but they do allow Nabble. Sure I
 can always use my phone but writing code and copy / paste etc is really
 annoying on a phone.

 On 21 March 2013 16:31, Thiago H de Paula Figueiredo thiag...@gmail.com
 wrote:

 Hi!

 Due to many headaches we're having with posts from Nabble (including
 swallowing of code), we decided to not allow them anymore. People, please
 remember: this isn't a forum, it never was a forum, this is a mailing
 list,
 and Apache Foundation projects must use mailing lists as the official way
 of discussing stuff.

 If you want to post to the mailing lists, please subscribe to them as
 described in http://tapestry.apache.org/**community.html
 http://tapestry.apache.org/community.html.
 If you don't want to have mailing list messages mixed with other stuff in
 your inbox, you can create folders and filters for it or even create a
 separate e-mail account just for that. We will be ignoring requests for
 permission to post in the Tapestry mailing list mirrors (emphasis on
 'mirror') though Nabble. And you don't need permission from anyone to
 subscribe to the Tapestry mailing lists, so do it if you didn't yet. :)

 Cheers!

 --
 Thiago H. de Paula Figueiredo

 --**--**-
 To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
 users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



 

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Bob Harner
Uli, this is the first time I've heard that you had to moderate Nabble
posts. Sorry to hear that. I withdraw my objection.
On Mar 22, 2013 5:27 AM, Ulrich Stärk u...@spielviel.de wrote:

 First, Nabble users don't subscribe, meaning I have to moderate Nabble
 mails on a daily basis.
 Nabble won't or can't force users to subscribe users prior to posting.

 Second, Nabble eats code listings etc. leaving users to wonder why their
 emails aren't displayed
 properly to normal users, possibly causing confusion or even
 frustration. I don't want to have
 users confused over something we can't control.

 Third, and most important, if I or another moderator forgets to moderate a
 Nabble email, or doesn't
 moderate it in time because of travel, sickness or whatever, readers of
 the mailing list won't get
 the post and can't reply, creating a friction in our community (those that
 use Nabble and those that
 don't).

 Our discussions take place on mailing lists. Period. Nabble violates that
 policy, creates work for
 our volunteers and confusion for our users. If you can make Nabble behave
 properly I'm willing to
 withdraw my objections and I'm sure other PMC members will too. But until
 then I recommend that
 people like Lance use a webmail service in situations where they can't use
 an email client.

 Uli

 On 22.03.2013 00:45, Bob Harner wrote:
  Yeah, I 'm with you, Lance. And I didn't think the annoyances of the
 nabble
  posts were significant.
  On Mar 21, 2013 7:06 PM, Lance Java lance.j...@googlemail.com wrote:
 
  That's actually really annoying for me.
 
  Most workplaces don't allow personal email but they do allow Nabble.
 Sure I
  can always use my phone but writing code and copy / paste etc is really
  annoying on a phone.
 
  On 21 March 2013 16:31, Thiago H de Paula Figueiredo 
 thiag...@gmail.com
  wrote:
 
  Hi!
 
  Due to many headaches we're having with posts from Nabble (including
  swallowing of code), we decided to not allow them anymore. People,
 please
  remember: this isn't a forum, it never was a forum, this is a mailing
  list,
  and Apache Foundation projects must use mailing lists as the official
 way
  of discussing stuff.
 
  If you want to post to the mailing lists, please subscribe to them as
  described in http://tapestry.apache.org/**community.html
  http://tapestry.apache.org/community.html.
  If you don't want to have mailing list messages mixed with other stuff
 in
  your inbox, you can create folders and filters for it or even create a
  separate e-mail account just for that. We will be ignoring requests for
  permission to post in the Tapestry mailing list mirrors (emphasis on
  'mirror') though Nabble. And you don't need permission from anyone to
  subscribe to the Tapestry mailing lists, so do it if you didn't yet. :)
 
  Cheers!
 
  --
  Thiago H. de Paula Figueiredo
 
 
 --**--**-
  To unsubscribe, e-mail: users-unsubscribe@tapestry.**apache.org
  users-unsubscr...@tapestry.apache.org
  For additional commands, e-mail: users-h...@tapestry.apache.org
 
 
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: For Nabble users

2013-03-22 Thread Barry Books
Not a complaint about the Tapestry list (or PMC members) but I though
I voice my opinion about the policy to see if there are others like
me. I think I understand the reasoning behind the Apache mailing list
policy but I think it's outdated. To me it has two problems.

1. I cannot participate in the list from my work email and I cannot
read my personal email (easily) while I'm at work. I suspect there are
others like me.
2. There is no real built in archive system which makes web searches a
problem. Nabble is considered a hosting site and hosting sites are
blocked by my work firewall.

These two things make it difficult for me to participate in the email
list and make the archives useless to searches because when I click on
a result 9 times out of 10 I get a firewall violation. It's things
like this that make open source adoption problematic in the corporate
world.

I realize you are bound by the Apache rules but if no one complains
about them they will never change.

Thanks for your hard work
Barry

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Barry Books
This has been a source of problems for me also. I'll mess with it
today and report back. I think it should be possible to create a new
binding then change the default from

symbol:SomeSymbol

to

default:symbol:SomeSymbol

would that work for you?

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: HashMap as a Grid source - once again

2013-03-22 Thread Barry Books
I use a collection of maps all the time for both form input and grid
output. I have a report system that stores sql in the database and
uses a beaneditform for query parameters and a grid to display the
result set. It's turned out to be extremely useful. I use a
PropertyConduit just like you suggested but with one addition. Instead
of using Object.class I created MapData.class All it does is provide
get, put and getMap methods, but this allows Tapestry to auto
construct the object. For a grid this does not matter but it's very
useful when using it with beaneditform.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



How do you create a composite form component?

2013-03-22 Thread Barry Books
Usually creating Tapestry components is easy but I've run in a
problem. I've kinda solved it but I'm wondering if I'm missing
something.

I'd like to create a component called DateRange which contains two
DateFields and takes a parameter of type Range which contains a
startDate and endDate. The solution seems easy just create a component
then put two datefields in it. The problem is you can't use label on
that because the DateRange does not implement Field. Fair enough just
implement Field.  I copied RadioGroup because it's seemed like a good
starting point. Now I wanted to use it in a BeanEditForm and ran into
another problem. If range is null I'd like to create it but there does
not seem to be an onPrepareForSubmit event. I've managed to work thru
that also but the whole result seems messy and I still have not really
figured out where to check that startDate  endDate.

Has anyone tried to create composite form components and if so what
are the secrets?

Thanks
Barry

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How do you create a composite form component?

2013-03-22 Thread Taha Siddiqi
Hi Barry

Have you looked at FormSupport particularly store() and storeAndExecute()

http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/services/FormSupport.html#storeAndExecute(T,
 org.apache.tapestry5.ComponentAction)

You can register ComponentActions there.

regards
Taha

On Mar 22, 2013, at 6:50 PM, Barry Books wrote:

 Usually creating Tapestry components is easy but I've run in a
 problem. I've kinda solved it but I'm wondering if I'm missing
 something.
 
 I'd like to create a component called DateRange which contains two
 DateFields and takes a parameter of type Range which contains a
 startDate and endDate. The solution seems easy just create a component
 then put two datefields in it. The problem is you can't use label on
 that because the DateRange does not implement Field. Fair enough just
 implement Field.  I copied RadioGroup because it's seemed like a good
 starting point. Now I wanted to use it in a BeanEditForm and ran into
 another problem. If range is null I'd like to create it but there does
 not seem to be an onPrepareForSubmit event. I've managed to work thru
 that also but the whole result seems messy and I still have not really
 figured out where to check that startDate  endDate.
 
 Has anyone tried to create composite form components and if so what
 are the secrets?
 
 Thanks
 Barry
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 



Re: For Nabble users

2013-03-22 Thread Ulrich Stärk
On 22.03.2013 13:43, Barry Books wrote:
 Not a complaint about the Tapestry list (or PMC members) but I though
 I voice my opinion about the policy to see if there are others like
 me. I think I understand the reasoning behind the Apache mailing list
 policy but I think it's outdated. To me it has two problems.
 
 1. I cannot participate in the list from my work email and I cannot
 read my personal email (easily) while I'm at work. I suspect there are
 others like me.

If you don't have your superiors consent to participate on our lists, you 
shouldn't do so during
your work hours. But if your work and this list are related, talk to your 
management and make it
clear that you get free training and help here. I bet they will allow you to 
use your work email.

Apart from that there are webmail alternatives you can use.

 2. There is no real built in archive system which makes web searches a
 problem. Nabble is considered a hosting site and hosting sites are
 blocked by my work firewall.

tapestry.markmail.org - excellent searching and filtering capabilities

Google: site:mail-archives.apache.org query

 
 These two things make it difficult for me to participate in the email
 list and make the archives useless to searches because when I click on
 a result 9 times out of 10 I get a firewall violation. It's things
 like this that make open source adoption problematic in the corporate
 world.

Not really. It's management and it's 19th century methods that make open source 
adoption problematic
in the corporate world. But that's beyond the topic.

 
 I realize you are bound by the Apache rules but if no one complains
 about them they will never change.

We don't have to use mailing lists for user support at Apache; only development 
discussion has to
take place on mailing lists. In fact there are projects that host their own 
web-based forums for
user support, e.g. OpenOffice. But we, the Tapestry community, lack the 
volunteer power to support
anything else.

Uli

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How do you create a composite form component?

2013-03-22 Thread Barry Books
I did and I'm using store() to make it work, it just seems messy when
all I really want is something like this

DateRange implements Label {

@Parameter
private String label;

@Parameter
@Property
private Range range;

onPrepareFromSubmit() {
   if ( range == null ) {
   range = new Range();
   }
}

onValidate() {
  if ( startdate = enddate ) {
  validation exception;
  }

String getLabel() {
   return label;
}

}

I guess I need to create an AbstractFormComposite and hide all the
complexity there.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Thiago H de Paula Figueiredo

On Fri, 22 Mar 2013 10:47:03 -0300, Ulrich Stärk u...@spielviel.de wrote:


2. There is no real built in archive system which makes web searches a
problem. Nabble is considered a hosting site and hosting sites are
blocked by my work firewall.


tapestry.markmail.org - excellent searching and filtering capabilities

Google: site:mail-archives.apache.org query


We're not disabling the Nabble mirror (which I consider extremely useful),  
just posting from it.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How do you create a composite form component?

2013-03-22 Thread Thiago H de Paula Figueiredo

On Fri, 22 Mar 2013 10:56:25 -0300, Barry Books trs...@gmail.com wrote:


I did and I'm using store() to make it work, it just seems messy when
all I really want is something like this


Have you tried subclassing AbstractField?

--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Barry Books
On Fri, Mar 22, 2013 at 8:47 AM, Ulrich Stärk u...@spielviel.de wrote:
 On 22.03.2013 13:43, Barry Books wrote:
 Not a complaint about the Tapestry list (or PMC members) but I though
 I voice my opinion about the policy to see if there are others like
 me. I think I understand the reasoning behind the Apache mailing list
 policy but I think it's outdated. To me it has two problems.

 1. I cannot participate in the list from my work email and I cannot
 read my personal email (easily) while I'm at work. I suspect there are
 others like me.

 If you don't have your superiors consent to participate on our lists, you 
 shouldn't do so during
 your work hours. But if your work and this list are related, talk to your 
 management and make it
 clear that you get free training and help here. I bet they will allow you to 
 use your work email.

I do have management consent to participate in the list but the
firewall rules are not a perfect implementation of what I have consent
to do. Unfortunately getting exceptions is a difficult process and
cannot be done by group which means paper work for each person on the
team. I realize these are IT problems I'm just saying I suspect I'm
not the only one with this problem. To be fair to the IT side software
development is not the primary purpose of where I work and maintaining
firewall rules is a difficult. For example Amazon S3 was blocked but
that proved to be a problem.



 Apart from that there are webmail alternatives you can use.

Webmail is against the rules.


 2. There is no real built in archive system which makes web searches a
 problem. Nabble is considered a hosting site and hosting sites are
 blocked by my work firewall.

 tapestry.markmail.org - excellent searching and filtering capabilities

Another site that's blocked by the firewall


 Google: site:mail-archives.apache.org query

This solves some of the problem but limits my search to only
apache.org. Again I realize this is perhaps a problem unique to me.



 These two things make it difficult for me to participate in the email
 list and make the archives useless to searches because when I click on
 a result 9 times out of 10 I get a firewall violation. It's things
 like this that make open source adoption problematic in the corporate
 world.

 Not really. It's management and it's 19th century methods that make open 
 source adoption problematic
 in the corporate world. But that's beyond the topic.

Perhaps but if the Apache Foundation is interesting in corporate
adoption it's a problem that needs to be solved. Email (and email
lists) are 20th century solution. Perhaps a 21st century solution is
needed to overcome the 19th century methods.



 I realize you are bound by the Apache rules but if no one complains
 about them they will never change.

 We don't have to use mailing lists for user support at Apache; only 
 development discussion has to
 take place on mailing lists. In fact there are projects that host their own 
 web-based forums for
 user support, e.g. OpenOffice. But we, the Tapestry community, lack the 
 volunteer power to support
 anything else.

I understand that which is why I said the Apache policy (not the
Tapestry policy) is outdated. If the Apache Foundation had a gateway
anyone could post thru then perhaps most of the issues would be
resolved.

Again this is not a complaint but an observation and perhaps something
the Apache Foundation should consider. It may not be worth the effort
and if I'm the only one with this problem it's certainly not.

Thanks
Barry

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How do you create a composite form component?

2013-03-22 Thread Barry Books
That's what I tried first and I did not like the path I was headed
down. Perhaps I'm spoiled by how easy it is to create a component
that's not used as a form element. I was really just curious if I was
missing something obvious.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Thiago H de Paula Figueiredo

On Fri, 22 Mar 2013 11:46:42 -0300, Barry Books trs...@gmail.com wrote:


I understand that which is why I said the Apache policy (not the
Tapestry policy) is outdated. If the Apache Foundation had a gateway
anyone could post thru then perhaps most of the issues would be
resolved.

Again this is not a complaint but an observation and perhaps something
the Apache Foundation should consider. It may not be worth the effort
and if I'm the only one with this problem it's certainly not.


So our problem here seems to be Nabble itself. As Ulrich said, it has some  
problems that end up causing some serious trouble for everyone involved.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Barry Books
I had not looked at that way but I think you are correct. You tried to
solve an Apache Foundation mailing list deficiency with Nabble but
Nabble has it's own set of problems.

On Fri, Mar 22, 2013 at 10:17 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
 On Fri, 22 Mar 2013 11:46:42 -0300, Barry Books trs...@gmail.com wrote:

 I understand that which is why I said the Apache policy (not the
 Tapestry policy) is outdated. If the Apache Foundation had a gateway
 anyone could post thru then perhaps most of the issues would be
 resolved.

 Again this is not a complaint but an observation and perhaps something
 the Apache Foundation should consider. It may not be worth the effort
 and if I'm the only one with this problem it's certainly not.


 So our problem here seems to be Nabble itself. As Ulrich said, it has some
 problems that end up causing some serious trouble for everyone involved.


 --
 Thiago H. de Paula Figueiredo

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: notify embedded components

2013-03-22 Thread Howard Lewis Ship
ive tought this woud be a cool feature, but it does not exist yet.

On Thursday, March 21, 2013, Paul Stanton wrote:

 Hi all,

 Is there a way to trigger an event in a container (Page) which notifies
 embedded components?

 I'm hoping to do something like this (pseudo code) :

 Page
 {
 void onSomeEvent()
 {
 notifyListeners(**SomethingHappened);
 }
 }

 EmbeddedComponent
 {
 void setupRender()
 {
 page.listenTo(**SomethingHappened);
 }

 void onSomethingHappened()
 {
 // called when triggered by page
 }
 }

 Help appreciated, thanks, paul.

 --**--**-
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com


Re: For Nabble users

2013-03-22 Thread Thiago H de Paula Figueiredo

On Fri, 22 Mar 2013 12:42:14 -0300, Barry Books trs...@gmail.com wrote:


I had not looked at that way but I think you are correct. You tried to
solve an Apache Foundation mailing list deficiency with Nabble but
Nabble has it's own set of problems.


Actually, we never tried anything with Nabble: it just started mirroring  
Tapestry's mailing lists and posting to them without any action from the  
Tapestry committers (as far as I know). Just a couple months ago we got  
the permission to change Tapestry's mailing lists' configurations at  
Nabble.




On Fri, Mar 22, 2013 at 10:17 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
On Fri, 22 Mar 2013 11:46:42 -0300, Barry Books trs...@gmail.com  
wrote:



I understand that which is why I said the Apache policy (not the
Tapestry policy) is outdated. If the Apache Foundation had a gateway
anyone could post thru then perhaps most of the issues would be
resolved.

Again this is not a complaint but an observation and perhaps something
the Apache Foundation should consider. It may not be worth the effort
and if I'm the only one with this problem it's certainly not.



So our problem here seems to be Nabble itself. As Ulrich said, it has  
some

problems that end up causing some serious trouble for everyone involved.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: notify embedded components

2013-03-22 Thread Lenny Primak
The CDI has support for events in an elegant way:

http://docs.oracle.com/javaee/6/tutorial/doc/gkhic.html

FlowLogix library supports CDI as well

On Mar 22, 2013, at 11:36 AM, Howard Lewis Ship hls...@gmail.com wrote:

 ive tought this woud be a cool feature, but it does not exist yet.
 
 On Thursday, March 21, 2013, Paul Stanton wrote:
 
 Hi all,
 
 Is there a way to trigger an event in a container (Page) which notifies
 embedded components?
 
 I'm hoping to do something like this (pseudo code) :
 
 Page
 {
void onSomeEvent()
{
notifyListeners(**SomethingHappened);
}
 }
 
 EmbeddedComponent
 {
void setupRender()
{
page.listenTo(**SomethingHappened);
}
 
void onSomethingHappened()
{
// called when triggered by page
}
 }
 
 Help appreciated, thanks, paul.
 
 --**--**-
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 -- 
 Howard M. Lewis Ship
 
 Creator of Apache Tapestry
 
 The source for Tapestry training, mentoring and support. Contact me to
 learn how I can get you up and productive in Tapestry fast!
 
 (971) 678-5210
 http://howardlewisship.com


Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Barry Books
I overrode the SymbolBindingFactory with the attached
MySymbolBindingFactory and it appears to work, but I'd like a second
opinion. As I understand it Bindings are cached so my question is will
making the set method a no op instead of an error cause any problems?
I created this mixin to test it.

public class GridEnviromentMixin {
@BindParameter
private Boolean lean;

@BindParameter
private int rowsPerPage;

@Inject
private Environment environment;

@Inject
private Logger logger;

@Inject
private ComponentResources resources;

@SetupRender
void setupRender() {
environment.push(GridEnvironment.class, new
GridEnvironmentImpl().withLean(lean));
logger.info(rows {},rowsPerPage);
rowsPerPage= 10;
logger.info(rows {},rowsPerPage);

}

@CleanupRender
void cleanupRender() {
environment.pop(GridEnvironment.class);
}

}

and the output is this

[INFO] mixins.GridEnviromentMixin rows 25
[INFO] mixins.GridEnviromentMixin rows 10


public class MySymbolBindingFactory implements BindingFactory {

private final SymbolSource symbolSource;
private final Logger logger;

   public MySymbolBindingFactory(SymbolSource symbolSource, Logger 
logger)
   {
   this.symbolSource = symbolSource;
   this.logger = logger;
   }

   public Binding newBinding(String description,
ComponentResources container,
   ComponentResources component, String expression,
Location location)
   {

   String value = symbolSource.valueForSymbol(expression);
   logger.info(value {} {},expression ,value);
   return new SymbolBinding(location, description, value);
   }

   public class SymbolBinding implements Binding {
   private Object value;


   public SymbolBinding(Location location, String description,
String value) {
   this.value = value;
   }

@Override
public T extends Annotation T getAnnotation(ClassT 
arg0) {
return null;
}

@Override
public Object get() {
return value;
}

@Override
public Class getBindingType() {
return value.getClass();
}

@Override
public boolean isInvariant() {
return false;
}

@Override
public void set(Object value) {
//this.value = value;
}

   }

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: intermittent stack trace

2013-03-22 Thread Thiago H de Paula Figueiredo
On Fri, 22 Mar 2013 14:59:15 -0300, Ken in Nashua kcola...@live.com  
wrote:


Forms require that the request method be POST and that the t:formdata  
query parameter have values.


Here is, from the error message, the description of what is happening. If  
this is a public-facing site, your probably have someone crawling it.


--
Thiago H. de Paula Figueiredo

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Lance Java
There are a couple of things wrong with your solution

1. You've implemented a variant binding (isVariant = false) but you have a
no-op implemetation of set(Object value)
This means that the value is 10 in your mixin, but the the value in the
underlying grid component is still 25 (no change)

2. Your binding has a per binding value
I notice you commented out this.value = value in your set(Object value)
method. If you were to uncomment this block of code, you would have major
problems. Bindings are singletons (like pages and components) so they are
shared by all threads in your application.

As I said initially, I think that the value should be backed by a mutable
ThreadLocal.


On 22 March 2013 18:10, Barry Books trs...@gmail.com wrote:

 I overrode the SymbolBindingFactory with the attached
 MySymbolBindingFactory and it appears to work, but I'd like a second
 opinion. As I understand it Bindings are cached so my question is will
 making the set method a no op instead of an error cause any problems?
 I created this mixin to test it.

 public class GridEnviromentMixin {
 @BindParameter
 private Boolean lean;

 @BindParameter
 private int rowsPerPage;

 @Inject
 private Environment environment;

 @Inject
 private Logger logger;

 @Inject
 private ComponentResources resources;

 @SetupRender
 void setupRender() {
 environment.push(GridEnvironment.class, new
 GridEnvironmentImpl().withLean(lean));
 logger.info(rows {},rowsPerPage);
 rowsPerPage= 10;
 logger.info(rows {},rowsPerPage);

 }

 @CleanupRender
 void cleanupRender() {
 environment.pop(GridEnvironment.class);
 }

 }

 and the output is this

 [INFO] mixins.GridEnviromentMixin rows 25
 [INFO] mixins.GridEnviromentMixin rows 10


 public class MySymbolBindingFactory implements BindingFactory {

 private final SymbolSource symbolSource;
 private final Logger logger;

public MySymbolBindingFactory(SymbolSource symbolSource,
 Logger logger)
{
this.symbolSource = symbolSource;
this.logger = logger;
}

public Binding newBinding(String description,
 ComponentResources container,
ComponentResources component, String expression,
 Location location)
{

String value = symbolSource.valueForSymbol(expression);
logger.info(value {} {},expression ,value);
return new SymbolBinding(location, description, value);
}

public class SymbolBinding implements Binding {
private Object value;


public SymbolBinding(Location location, String
 description,
 String value) {
this.value = value;
}

 @Override
 public T extends Annotation T
 getAnnotation(ClassT arg0) {
 return null;
 }

 @Override
 public Object get() {
 return value;
 }

 @Override
 public Class getBindingType() {
 return value.getClass();
 }

 @Override
 public boolean isInvariant() {
 return false;
 }

 @Override
 public void set(Object value) {
 //this.value = value;
 }

}

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Barry Books
The method is isInvariant so returning false means the value can
change. This is confusing and it seems like a double negative to me.

public boolean isInvariant() {
   return false;
}

The set method is commented out because setting the value would affect
other instances of the component. After thinking about it I'm not sure
this is as complicated as it seems but I'm a bit fuzzy on the details
of Parameters. I believe they are really conduits so calling the set
method in the component calls the set method on all variables bound to
the parameter. In the case of the default value I don't care if the
set method is called so I just ignore it. The set method is still
called on all the other values bound to the parameter.

I don't think ThreadLocal would work if there is a thread pool. In
that case setting the value would affect all subsequent request using
that thread.

At any rate it does seem to work with the simple test case I wrote. I
just wonder if it really is this easy or am I breaking something.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Lance Java
Hi Barry, I'm not sure you understand a Thread Local, it's guaranteed to be
thread safe since it's local to a thread

I would appreciate it if a tapestry committer could chime in with their
thoughts.

Thanks,
Lance
 On 22 Mar 2013 20:52, Barry Books trs...@gmail.com wrote:

 The method is isInvariant so returning false means the value can
 change. This is confusing and it seems like a double negative to me.

 public boolean isInvariant() {
return false;
 }

 The set method is commented out because setting the value would affect
 other instances of the component. After thinking about it I'm not sure
 this is as complicated as it seems but I'm a bit fuzzy on the details
 of Parameters. I believe they are really conduits so calling the set
 method in the component calls the set method on all variables bound to
 the parameter. In the case of the default value I don't care if the
 set method is called so I just ignore it. The set method is still
 called on all the other values bound to the parameter.

 I don't think ThreadLocal would work if there is a thread pool. In
 that case setting the value would affect all subsequent request using
 that thread.

 At any rate it does seem to work with the simple test case I wrote. I
 just wonder if it really is this easy or am I breaking something.

 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org




Re: Read only bindings - How do I set their value from a mixin?

2013-03-22 Thread Barry Books
My impression was Thread Local gives you an instance of an Object for
each thread. If you run Tomcat with 100 thread pool you will have at
most 100 different objects no matter how many connections you have and
since a new connection is handled by an existing thread it will pick
up the values from the previous request that used that thread. I think
you could use the request to store the value in but as I said I don't
think it's necessary. I'll post a request on the Dev list. It would be
nice to solve this problem because it seems all the parameters I'd
like to have control over are the ones with default values.

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: For Nabble users

2013-03-22 Thread Lance Java
Sorry, wasn't aware of the extra work it was creating. I'm happy for a
solution that keeps you guys focused.
Thanks for your continued tapestry support.

Cheers,
Lance


graceful exception handling - user interface

2013-03-22 Thread Ken in Nashua
Hi Folks,

Well I am about to embark on going public with a hockey league web site and I 
wanted to reformat these intimidating (well not for developers) for 
end-users... stack traces when an exception occurs. And its nice to be able to 
use tapestry in such a fashionable way now and the supported frameworks. Nice 
Job... well done. Its come a  long way since the version 3. I hope it will fair 
another decade or two (could sure use some feedback on that topic of 
longevity... will tapestry be around 20 years from now ? ) Java guys need to 
stick together.

I had a couple questions
Do any of these exceptions require the web server to be rebooted? I guess I am 
wondering if there are certain crashes in tapestry that would warrant a reboot 
of the webserver, restart of the webapp... or even a reboot of the operating 
system. None I hope but I had to ask.Is there a user interface available that 
will present these exceptions in a nice friendly format for the end-user? Maybe 
an optional dialogue instead of the whole page being taken out. 
 

Re: How do you create a composite form component?

2013-03-22 Thread Geoff Callender
This may help:


http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformasafield1

On 23/03/2013, at 1:53 AM, Barry Books wrote:

 That's what I tried first and I did not like the path I was headed
 down. Perhaps I'm spoiled by how easy it is to create a component
 that's not used as a form element. I was really just curious if I was
 missing something obvious.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: How do you create a composite form component?

2013-03-22 Thread Geoff Callender
If you'd like to see component writing made simpler, then please vote here:

https://issues.apache.org/jira/browse/TAP5-1618

It proposes replacing all that plumbing (store ComponentAction, storeAndExecute 
ComponentAction) with event handlers (eg. onPrepare, onValidate, onSuccess, 
etc).

Cheers,

Geoff

On 23/03/2013, at 3:28 PM, Geoff Callender wrote:

 This may help:
 
   
 http://jumpstart.doublenegative.com.au/jumpstart/examples/component/subformasafield1
 
 On 23/03/2013, at 1:53 AM, Barry Books wrote:
 
 That's what I tried first and I did not like the path I was headed
 down. Perhaps I'm spoiled by how easy it is to create a component
 that's not used as a form element. I was really just curious if I was
 missing something obvious.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 
 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: intermittent stack trace

2013-03-22 Thread Geoff Callender
See 
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Safari-for-example-browser-history-and-form-exception-td4942074.html
 .

Geoff

On 23/03/2013, at 5:15 AM, Thiago H de Paula Figueiredo wrote:

 On Fri, 22 Mar 2013 14:59:15 -0300, Ken in Nashua kcola...@live.com wrote:
 
 Forms require that the request method be POST and that the t:formdata query 
 parameter have values.
 
 Here is, from the error message, the description of what is happening. If 
 this is a public-facing site, your probably have someone crawling it.
 
 -- 
 Thiago H. de Paula Figueiredo
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 For additional commands, e-mail: users-h...@tapestry.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org