Re: Open Discussion: remove Bootstrap from T5 core

2020-10-03 Thread Thiago H. de Paula Figueiredo
Hello, everyone!

I know this thread is a bit old already, but Tapestry 5.5.0 can be used
without Bootstrap at all: https://tapestry.apache.org/release-notes-550.html
, https://tapestry.apache.org/css.html, @ImportModule(NoBootstrapModule.class).
In addition, there's a number of configuration symbols controlling which
CSS classes are output by the components which use Bootstrap ones by
default but can be overriden. If there's some CSS class still hardcoded,
please let us know.

On Thu, Feb 14, 2019 at 7:14 AM Jens Breitenstein 
wrote:

> Hi Tapestry guys!
>
> I want to hear/read your opinion about getting rid of the Bootstrap
> Library from T5 core.
> I would like to move all BS related code (css/js) to a seperate module
> like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
> Furthermore I would like to see a second module "tapestry-bootstrap4"
> which uses BS4.
>
>  From the sources I see direct dependencies are less than expected. Some
> tml's use it (I just ignore the internal T5 pages for now):
>
>  AjaxFormLoop.tml
>  class="btn btn-default btn-sm"
>  
>
>  BeanEditForm.tml
>  class="btn-toolbar"
>  class="btn-group"
>  class="btn btn-primary"
>
>  DevTool.tml
>  
>  class="dropdown-menu"
>  class="dropdown-header"
>
>  ExceptionDisplay.tml
>  class="well"
>  class="pull-right"
>  class="checkbox"// ?
>
>  Palette.tml
>  class="btn-group-vertical"
>
> and some JAVA references like:
>
>  JavaScriptModule.java
>  configuration.add("bootstrap/ ...")
>
>  bundledModules=...
>
>
> Do you think it's worths looking into it, digging deeper?
> Any pitfalls I should consider?
> Anyone interested to discuss it?
>
>
> Jens
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-- 
Thiago


Re: Open Discussion: remove Bootstrap from T5 core

2019-02-21 Thread Ben Weidig
Hi David,

we've used @extend with SASS in our projects and ended up not using it a
lot due to its drawbacks, instead we use Bootstraps mixins more directly.

I haven't read the article in its entirety, but here are my thoughts:

For decoupling the components it might be possible to wrap the needed CSS
in placeholder selectors and aggregate them it in custom shared classes and
load only what needed. But if the components don't use the Bootstrap
classes directly we would need to change 2 classes if we like to change
behavior (e.g. .form-control and .t5-form-control).

And this doesn't deal with changed HTML-structure of Bootstrap components
between version. We needed to adapt our TML multiple times between
Bootstrap 4.0.0 beta and 4.1.2 and 4.2.1 (especially custom controls stuff).

Separated JARs or component swaps might be the better or at least more
maintainable option IMO.

Nevertheless the direct integration of SASS-support would be great. As
written before we added it ourselves with the help of
https://github.com/bit3/jsass so we can build Bootsrap from its SASS-source
instead of using the CSS-only version, and we can add some SASS beforehand
to set the
https://github.com/twbs/bootstrap/blob/master/scss/_variables.scss before
compiling Bootstrap to customize it (thanks to !default).

Works without any major issues in our projects.

Ben


On Thu, Feb 21, 2019 at 4:24 AM David Taylor 
wrote:

> Anyone have experience working with the @extend directive in CSS
> preprocessors?
>
> I came across a post that advocates decoupling HTML markup from
> bootstrap classes by using @extend. I don't particularly agree with many
> of the points the author makes, but the technique is intriguing and
> might be something that can applied to Tapestry since we support Less.
> Here is the link to the article.
>
>
> https://hackernoon.com/the-backendification-of-frontend-development-62f218a773d4
>
> The interesting bit is titled "Dealing with CSS Frameworks" and contains
> the following example:
>
> %our-warning-button {
> @extend .btn;
> @extend .btn-warning;
> }
> .empty-shopping-cart-button {
>@extend %our-warning-button;
> }
>
> Searching the web a bit I came across another article that gets into
> this in more detail. The article's title is a bit misleading since it
> actually advocates the @extend technique and offer somes advice on best
> practices.
>
> https://webinista.com/updates/dont-use-extend-sass/
>
> David
>
> emailsig On 2/19/2019 6:03 AM, Chris Poulsen wrote:
> > Hi
> >
> > I think working on making the framework "core" more css agnostic seems
> like
> > a good direction, allowing things to move forward without having to try
> and
> > pick (and maintain) the correct bootstrap version (or other css framework
> > version/flavor). There is a pretty good chance that whatever is selected,
> > will not fit the requirements of everybody anyway.
> >
> > It is a while back, but was the tapestry bootstrap integration not
> > initially handled "externally" by a markup renderer filter (I guess it
> > removed the tapestry default styling and added the bootstrap equivalent).
> > Maybe something similar could be used to apply styling (Tapestry-BS3,
> > Tapestry- BS4 or whatever) to the tapestry components, without having to
> > dream up new stuff. (Provided that the processing does not become a
> > significant performance bottle-neck).
> >
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: Open Discussion: remove Bootstrap from T5 core

2019-02-20 Thread David Taylor
Anyone have experience working with the @extend directive in CSS 
preprocessors?


I came across a post that advocates decoupling HTML markup from 
bootstrap classes by using @extend. I don't particularly agree with many 
of the points the author makes, but the technique is intriguing and 
might be something that can applied to Tapestry since we support Less. 
Here is the link to the article.


https://hackernoon.com/the-backendification-of-frontend-development-62f218a773d4

The interesting bit is titled "Dealing with CSS Frameworks" and contains 
the following example:


%our-warning-button {
   @extend .btn;
   @extend .btn-warning;
}
.empty-shopping-cart-button {
  @extend %our-warning-button;
}

Searching the web a bit I came across another article that gets into 
this in more detail. The article's title is a bit misleading since it 
actually advocates the @extend technique and offer somes advice on best 
practices.


https://webinista.com/updates/dont-use-extend-sass/

David

emailsig On 2/19/2019 6:03 AM, Chris Poulsen wrote:

Hi

I think working on making the framework "core" more css agnostic seems like
a good direction, allowing things to move forward without having to try and
pick (and maintain) the correct bootstrap version (or other css framework
version/flavor). There is a pretty good chance that whatever is selected,
will not fit the requirements of everybody anyway.

It is a while back, but was the tapestry bootstrap integration not
initially handled "externally" by a markup renderer filter (I guess it
removed the tapestry default styling and added the bootstrap equivalent).
Maybe something similar could be used to apply styling (Tapestry-BS3,
Tapestry- BS4 or whatever) to the tapestry components, without having to
dream up new stuff. (Provided that the processing does not become a
significant performance bottle-neck).





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



Re: Re: Open Discussion: remove Bootstrap from T5 core

2019-02-19 Thread Chris Poulsen
Hi

I think working on making the framework "core" more css agnostic seems like
a good direction, allowing things to move forward without having to try and
pick (and maintain) the correct bootstrap version (or other css framework
version/flavor). There is a pretty good chance that whatever is selected,
will not fit the requirements of everybody anyway.

It is a while back, but was the tapestry bootstrap integration not
initially handled "externally" by a markup renderer filter (I guess it
removed the tapestry default styling and added the bootstrap equivalent).
Maybe something similar could be used to apply styling (Tapestry-BS3,
Tapestry- BS4 or whatever) to the tapestry components, without having to
dream up new stuff. (Provided that the processing does not become a
significant performance bottle-neck).

-- 
Chris



On Tue, Feb 19, 2019 at 10:05 AM abangkis  wrote:

> Another 👍👍 up.
>
> Btw, could you share the link to the github repo here? Thanks.
>
> On Fri, Feb 15, 2019 at 7:03 PM Jens Breitenstein 
> wrote:
>
> > Thanks for you positive feedback. I suggest the following now:
> >
> > 1) I will use git hub to create a new T5 Fork based on Thiagos
> > 5.5.0-beta-1 and remove all bootstrap dependencies. As soon this
> > compiles we will have a T5.5 version looking like websites in the good
> > old early 80ies.
> >
> > 2) I will try to get our own (unfortunately internal) website up and
> > running again, including the latest BS3, means all BS code is located in
> > my client (it is anyway, because we use a newer BS3).
> >
> > 3) Next I extract all BS3 related code to a new module, thus we have a
> > plain T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3
> > css classes / col definitions in TML code -> everything is like before,
> > existing code should still run without modifications.
> >
> > 
> >
> > 4) I invite you to discuss the implementation details how we can best
> > make use of bootstrap related features without tight coupling so we can
> > basically change between BS3 and BS4. This means we need some way to
> > handle BS related differences like new / missing BS classes (for example
> > panel) and we have to support the different grid definitions aso. One
> > way (for example) might be T5 components to wrap most of the BS classes
> > and each extension lib will take care of the particular BS details. At
> > the very end our TML code never sees BS css classes at all, well at
> > least for the "most common" things. We can start this discussion right
> > now, because this is the tough part to my opinion. I would like to hear
> > / read all your ideas.
> >
> > 5) We / I create a mini App using the new T5-BSx extensions do
> > demonstrate the use of the new BSx handling, we need it for testing /
> > discussing anyway (see 4)
> >
> >
> > We move over our disussion to github to avoid polluting the mailing list.
> >
> > Ok?
> >
> >
> > Jens
> >
> >
> >
> >
> >
> > Am 14.02.19 um 14:07 schrieb Bob Harner:
> > > I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
> > > framework.
> > >
> > > For context and some alternative ideas, see this prior discussion of
> the
> > > same topic:
> > >
> > >
> >
> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
> > >
> > > On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  > >
> > >> Hi Jens,
> > >>
> > >> I like the idea of decoupling the core and Bootstrap to make it easier
> > to
> > >> use other versions.
> > >>
> > >> Maybe the components should be updated to BS4 for T5.5, with a legacy
> > >> fallback or a component swap (can't remember the service doing it, we
> > have
> > >> our own implementation, it's doing an advice on
> > >> ComponentClassResolver#resolveComponentTypeToClassName or
> > >> ComponentInstantiatorSource#getInstantiator).
> > >>
> > >> For 5.4 we've developed an internal solution for using different BS
> > >> versions, here are some specifics.
> > >>
> > >> We have multi-tenant-apps with different BS versions (so far up to 3),
> > so
> > >> we needed a flexible solution that supports the internal BS and other
> > >> versions dynamically.
> > >>
> > >> To make it even more flexible we've added SASS-support and compile
> > >> Bootstrap from the source files, with the

Re: Re: Open Discussion: remove Bootstrap from T5 core

2019-02-19 Thread abangkis
Another 👍👍 up.

Btw, could you share the link to the github repo here? Thanks.

On Fri, Feb 15, 2019 at 7:03 PM Jens Breitenstein 
wrote:

> Thanks for you positive feedback. I suggest the following now:
>
> 1) I will use git hub to create a new T5 Fork based on Thiagos
> 5.5.0-beta-1 and remove all bootstrap dependencies. As soon this
> compiles we will have a T5.5 version looking like websites in the good
> old early 80ies.
>
> 2) I will try to get our own (unfortunately internal) website up and
> running again, including the latest BS3, means all BS code is located in
> my client (it is anyway, because we use a newer BS3).
>
> 3) Next I extract all BS3 related code to a new module, thus we have a
> plain T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3
> css classes / col definitions in TML code -> everything is like before,
> existing code should still run without modifications.
>
> 
>
> 4) I invite you to discuss the implementation details how we can best
> make use of bootstrap related features without tight coupling so we can
> basically change between BS3 and BS4. This means we need some way to
> handle BS related differences like new / missing BS classes (for example
> panel) and we have to support the different grid definitions aso. One
> way (for example) might be T5 components to wrap most of the BS classes
> and each extension lib will take care of the particular BS details. At
> the very end our TML code never sees BS css classes at all, well at
> least for the "most common" things. We can start this discussion right
> now, because this is the tough part to my opinion. I would like to hear
> / read all your ideas.
>
> 5) We / I create a mini App using the new T5-BSx extensions do
> demonstrate the use of the new BSx handling, we need it for testing /
> discussing anyway (see 4)
>
>
> We move over our disussion to github to avoid polluting the mailing list.
>
> Ok?
>
>
> Jens
>
>
>
>
>
> Am 14.02.19 um 14:07 schrieb Bob Harner:
> > I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
> > framework.
> >
> > For context and some alternative ideas, see this prior discussion of the
> > same topic:
> >
> >
> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
> >
> > On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  >
> >> Hi Jens,
> >>
> >> I like the idea of decoupling the core and Bootstrap to make it easier
> to
> >> use other versions.
> >>
> >> Maybe the components should be updated to BS4 for T5.5, with a legacy
> >> fallback or a component swap (can't remember the service doing it, we
> have
> >> our own implementation, it's doing an advice on
> >> ComponentClassResolver#resolveComponentTypeToClassName or
> >> ComponentInstantiatorSource#getInstantiator).
> >>
> >> For 5.4 we've developed an internal solution for using different BS
> >> versions, here are some specifics.
> >>
> >> We have multi-tenant-apps with different BS versions (so far up to 3),
> so
> >> we needed a flexible solution that supports the internal BS and other
> >> versions dynamically.
> >>
> >> To make it even more flexible we've added SASS-support and compile
> >> Bootstrap from the source files, with the possibility to add files
> >> beforehand to the compilation step with custom variables etc.
> >>
> >> The layout component has an annotation that triggers
> >> a ComponentClassTransformWorker2 attaching a JavaScriptStack containing
> the
> >> BS version decided by a contributable strategy pipeline.
> >>
> >> JavaScript modules were the biggest problems, we started with replacing
> the
> >> internal modules, but ended up adding additional modules instead. This
> >> worked fine after getting all the dependencies right, but every BS
> version
> >> might break it again, so we're now using the bundled version of BS JS.
> >>
> >> We think this could all be cleaned up nicely if the internal BS
> wouldn't be
> >> as integrated as it is right now.
> >>
> >> Eventually we will release it as open-source, but having an integration
> >> into Tapestry (as a new tapestry-*) would be even nicer :-)
> >>
> >> Best regards
> >> Ben
> >>
> >>
> >> On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein <
> mailingl...@j-b-s.de>
> >> wrote:
> >>
> >>> Hi Tapestry guys!
> >>>
> &

Re: Re: Open Discussion: remove Bootstrap from T5 core

2019-02-18 Thread Bob Harner
Thiago,

Template overriding would only work for those Tapestry-supplied components
that use templates, right? But most currently don't, which could be changed
and is part of what I was suggesting here:
https://markmail.org/message/m5g3icg3jsxi7nc5

On Mon, Feb 18, 2019, 2:04 PM Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> I know it's not the most future-proven way of doing this, but couldn't a
> simple solution would be to have a separate JAR which subclasses the
> components using Bootstrap, do nothing but change the template and then
> contribute the components to ComponentOverride?
>
> On Fri, Feb 15, 2019 at 10:03 AM Jens Breitenstein 
> wrote:
>
> > Thanks for you positive feedback. I suggest the following now:
> >
> > 1) I will use git hub to create a new T5 Fork based on Thiagos
> > 5.5.0-beta-1 and remove all bootstrap dependencies. As soon this
> > compiles we will have a T5.5 version looking like websites in the good
> > old early 80ies.
> >
> > 2) I will try to get our own (unfortunately internal) website up and
> > running again, including the latest BS3, means all BS code is located in
> > my client (it is anyway, because we use a newer BS3).
> >
> > 3) Next I extract all BS3 related code to a new module, thus we have a
> > plain T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3
> > css classes / col definitions in TML code -> everything is like before,
> > existing code should still run without modifications.
> >
> > 
> >
> > 4) I invite you to discuss the implementation details how we can best
> > make use of bootstrap related features without tight coupling so we can
> > basically change between BS3 and BS4. This means we need some way to
> > handle BS related differences like new / missing BS classes (for example
> > panel) and we have to support the different grid definitions aso. One
> > way (for example) might be T5 components to wrap most of the BS classes
> > and each extension lib will take care of the particular BS details. At
> > the very end our TML code never sees BS css classes at all, well at
> > least for the "most common" things. We can start this discussion right
> > now, because this is the tough part to my opinion. I would like to hear
> > / read all your ideas.
> >
> > 5) We / I create a mini App using the new T5-BSx extensions do
> > demonstrate the use of the new BSx handling, we need it for testing /
> > discussing anyway (see 4)
> >
> >
> > We move over our disussion to github to avoid polluting the mailing list.
> >
> > Ok?
> >
> >
> > Jens
> >
> >
> >
> >
> >
> > Am 14.02.19 um 14:07 schrieb Bob Harner:
> > > I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
> > > framework.
> > >
> > > For context and some alternative ideas, see this prior discussion of
> the
> > > same topic:
> > >
> > >
> >
> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
> > >
> > > On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  > >
> > >> Hi Jens,
> > >>
> > >> I like the idea of decoupling the core and Bootstrap to make it easier
> > to
> > >> use other versions.
> > >>
> > >> Maybe the components should be updated to BS4 for T5.5, with a legacy
> > >> fallback or a component swap (can't remember the service doing it, we
> > have
> > >> our own implementation, it's doing an advice on
> > >> ComponentClassResolver#resolveComponentTypeToClassName or
> > >> ComponentInstantiatorSource#getInstantiator).
> > >>
> > >> For 5.4 we've developed an internal solution for using different BS
> > >> versions, here are some specifics.
> > >>
> > >> We have multi-tenant-apps with different BS versions (so far up to 3),
> > so
> > >> we needed a flexible solution that supports the internal BS and other
> > >> versions dynamically.
> > >>
> > >> To make it even more flexible we've added SASS-support and compile
> > >> Bootstrap from the source files, with the possibility to add files
> > >> beforehand to the compilation step with custom variables etc.
> > >>
> > >> The layout component has an annotation that triggers
> > >> a ComponentClassTransformWorker2 attaching a JavaScriptStack
> containing
> > the
> > >> BS version decided by a c

Re: Re: Open Discussion: remove Bootstrap from T5 core

2019-02-18 Thread Thiago H. de Paula Figueiredo
I know it's not the most future-proven way of doing this, but couldn't a
simple solution would be to have a separate JAR which subclasses the
components using Bootstrap, do nothing but change the template and then
contribute the components to ComponentOverride?

On Fri, Feb 15, 2019 at 10:03 AM Jens Breitenstein 
wrote:

> Thanks for you positive feedback. I suggest the following now:
>
> 1) I will use git hub to create a new T5 Fork based on Thiagos
> 5.5.0-beta-1 and remove all bootstrap dependencies. As soon this
> compiles we will have a T5.5 version looking like websites in the good
> old early 80ies.
>
> 2) I will try to get our own (unfortunately internal) website up and
> running again, including the latest BS3, means all BS code is located in
> my client (it is anyway, because we use a newer BS3).
>
> 3) Next I extract all BS3 related code to a new module, thus we have a
> plain T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3
> css classes / col definitions in TML code -> everything is like before,
> existing code should still run without modifications.
>
> 
>
> 4) I invite you to discuss the implementation details how we can best
> make use of bootstrap related features without tight coupling so we can
> basically change between BS3 and BS4. This means we need some way to
> handle BS related differences like new / missing BS classes (for example
> panel) and we have to support the different grid definitions aso. One
> way (for example) might be T5 components to wrap most of the BS classes
> and each extension lib will take care of the particular BS details. At
> the very end our TML code never sees BS css classes at all, well at
> least for the "most common" things. We can start this discussion right
> now, because this is the tough part to my opinion. I would like to hear
> / read all your ideas.
>
> 5) We / I create a mini App using the new T5-BSx extensions do
> demonstrate the use of the new BSx handling, we need it for testing /
> discussing anyway (see 4)
>
>
> We move over our disussion to github to avoid polluting the mailing list.
>
> Ok?
>
>
> Jens
>
>
>
>
>
> Am 14.02.19 um 14:07 schrieb Bob Harner:
> > I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
> > framework.
> >
> > For context and some alternative ideas, see this prior discussion of the
> > same topic:
> >
> >
> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
> >
> > On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  >
> >> Hi Jens,
> >>
> >> I like the idea of decoupling the core and Bootstrap to make it easier
> to
> >> use other versions.
> >>
> >> Maybe the components should be updated to BS4 for T5.5, with a legacy
> >> fallback or a component swap (can't remember the service doing it, we
> have
> >> our own implementation, it's doing an advice on
> >> ComponentClassResolver#resolveComponentTypeToClassName or
> >> ComponentInstantiatorSource#getInstantiator).
> >>
> >> For 5.4 we've developed an internal solution for using different BS
> >> versions, here are some specifics.
> >>
> >> We have multi-tenant-apps with different BS versions (so far up to 3),
> so
> >> we needed a flexible solution that supports the internal BS and other
> >> versions dynamically.
> >>
> >> To make it even more flexible we've added SASS-support and compile
> >> Bootstrap from the source files, with the possibility to add files
> >> beforehand to the compilation step with custom variables etc.
> >>
> >> The layout component has an annotation that triggers
> >> a ComponentClassTransformWorker2 attaching a JavaScriptStack containing
> the
> >> BS version decided by a contributable strategy pipeline.
> >>
> >> JavaScript modules were the biggest problems, we started with replacing
> the
> >> internal modules, but ended up adding additional modules instead. This
> >> worked fine after getting all the dependencies right, but every BS
> version
> >> might break it again, so we're now using the bundled version of BS JS.
> >>
> >> We think this could all be cleaned up nicely if the internal BS
> wouldn't be
> >> as integrated as it is right now.
> >>
> >> Eventually we will release it as open-source, but having an integration
> >> into Tapestry (as a new tapestry-*) would be even nicer :-)
> >>
> >> Best regards
> >> Ben
> >

Re: Open Discussion: remove Bootstrap from T5 core

2019-02-15 Thread Numa Schmeder
Sounds good! We would need to document bootstrap usage locations, and classes 
therefor we could use any library. We could also add default class names to all 
locations where there was bootstrap classes with tap- prefix. 

Sent from my iPhone!
Numa Schmeder


> Le 15 févr. 2019 à 12:38, Jens Breitenstein  a écrit :
> 
> Thanks for you positive feedback. I suggest the following now:
> 
> 1) I will use git hub to create a new T5 Fork based on Thiagos 5.5.0-beta-1 
> and remove all bootstrap dependencies. As soon this compiles we will have a 
> T5.5 version looking like websites in the good old early 80ies.
> 
> 2) I will try to get our own (unfortunately internal) website up and running 
> again, including the latest BS3, means all BS code is located in my client 
> (it is anyway, because we use a newer BS3).
> 
> 3) Next I extract all BS3 related code to a new module, thus we have a plain 
> T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3 css 
> classes / col definitions in TML code -> everything is like before, existing 
> code should still run without modifications.
> 
> 
> 
> 4) I invite you to discuss the implementation details how we can best make 
> use of bootstrap related features without tight coupling so we can basically 
> change between BS3 and BS4. This means we need some way to handle BS related 
> differences like new / missing BS classes (for example panel) and we have to 
> support the different grid definitions aso. One way (for example) might be T5 
> components to wrap most of the BS classes and each extension lib will take 
> care of the particular BS details. At the very end our TML code never sees BS 
> css classes at all, well at least for the "most common" things. We can start 
> this discussion right now, because this is the tough part to my opinion. I 
> would like to hear / read all your ideas.
> 
> 5) We / I create a mini App using the new T5-BSx extensions do demonstrate 
> the use of the new BSx handling, we need it for testing / discussing anyway 
> (see 4)
> 
> 
> We move over our disussion to github to avoid polluting the mailing list.
> 
> Ok?
> 
> 
> Jens
> 
> 
> 
> 
> 
>> Am 14.02.19 um 14:07 schrieb Bob Harner:
>> I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
>> framework.
>> 
>> For context and some alternative ideas, see this prior discussion of the
>> same topic:
>> 
>> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
>> 
>>> On Thu, Feb 14, 2019, 4:52 AM Ben Weidig >> 
>>> Hi Jens,
>>> 
>>> I like the idea of decoupling the core and Bootstrap to make it easier to
>>> use other versions.
>>> 
>>> Maybe the components should be updated to BS4 for T5.5, with a legacy
>>> fallback or a component swap (can't remember the service doing it, we have
>>> our own implementation, it's doing an advice on
>>> ComponentClassResolver#resolveComponentTypeToClassName or
>>> ComponentInstantiatorSource#getInstantiator).
>>> 
>>> For 5.4 we've developed an internal solution for using different BS
>>> versions, here are some specifics.
>>> 
>>> We have multi-tenant-apps with different BS versions (so far up to 3), so
>>> we needed a flexible solution that supports the internal BS and other
>>> versions dynamically.
>>> 
>>> To make it even more flexible we've added SASS-support and compile
>>> Bootstrap from the source files, with the possibility to add files
>>> beforehand to the compilation step with custom variables etc.
>>> 
>>> The layout component has an annotation that triggers
>>> a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
>>> BS version decided by a contributable strategy pipeline.
>>> 
>>> JavaScript modules were the biggest problems, we started with replacing the
>>> internal modules, but ended up adding additional modules instead. This
>>> worked fine after getting all the dependencies right, but every BS version
>>> might break it again, so we're now using the bundled version of BS JS.
>>> 
>>> We think this could all be cleaned up nicely if the internal BS wouldn't be
>>> as integrated as it is right now.
>>> 
>>> Eventually we will release it as open-source, but having an integration
>>> into Tapestry (as a new tapestry-*) would be even nicer :-)
>>> 
>>> Best regards
>>> Ben
>>> 
>>> 
>>> On Thu, Feb 14, 2019 at 10:14 AM

Re: Re: Open Discussion: remove Bootstrap from T5 core

2019-02-15 Thread Jens Breitenstein

Thanks for you positive feedback. I suggest the following now:

1) I will use git hub to create a new T5 Fork based on Thiagos 
5.5.0-beta-1 and remove all bootstrap dependencies. As soon this 
compiles we will have a T5.5 version looking like websites in the good 
old early 80ies.


2) I will try to get our own (unfortunately internal) website up and 
running again, including the latest BS3, means all BS code is located in 
my client (it is anyway, because we use a newer BS3).


3) Next I extract all BS3 related code to a new module, thus we have a 
plain T5.5 without BS, a T5-BS3-extension and a sample APP using the BS3 
css classes / col definitions in TML code -> everything is like before, 
existing code should still run without modifications.




4) I invite you to discuss the implementation details how we can best 
make use of bootstrap related features without tight coupling so we can 
basically change between BS3 and BS4. This means we need some way to 
handle BS related differences like new / missing BS classes (for example 
panel) and we have to support the different grid definitions aso. One 
way (for example) might be T5 components to wrap most of the BS classes 
and each extension lib will take care of the particular BS details. At 
the very end our TML code never sees BS css classes at all, well at 
least for the "most common" things. We can start this discussion right 
now, because this is the tough part to my opinion. I would like to hear 
/ read all your ideas.


5) We / I create a mini App using the new T5-BSx extensions do 
demonstrate the use of the new BSx handling, we need it for testing / 
discussing anyway (see 4)



We move over our disussion to github to avoid polluting the mailing list.

Ok?


Jens





Am 14.02.19 um 14:07 schrieb Bob Harner:

I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
framework.

For context and some alternative ideas, see this prior discussion of the
same topic:

https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F

On Thu, Feb 14, 2019, 4:52 AM Ben Weidig 
Hi Jens,

I like the idea of decoupling the core and Bootstrap to make it easier to
use other versions.

Maybe the components should be updated to BS4 for T5.5, with a legacy
fallback or a component swap (can't remember the service doing it, we have
our own implementation, it's doing an advice on
ComponentClassResolver#resolveComponentTypeToClassName or
ComponentInstantiatorSource#getInstantiator).

For 5.4 we've developed an internal solution for using different BS
versions, here are some specifics.

We have multi-tenant-apps with different BS versions (so far up to 3), so
we needed a flexible solution that supports the internal BS and other
versions dynamically.

To make it even more flexible we've added SASS-support and compile
Bootstrap from the source files, with the possibility to add files
beforehand to the compilation step with custom variables etc.

The layout component has an annotation that triggers
a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
BS version decided by a contributable strategy pipeline.

JavaScript modules were the biggest problems, we started with replacing the
internal modules, but ended up adding additional modules instead. This
worked fine after getting all the dependencies right, but every BS version
might break it again, so we're now using the bundled version of BS JS.

We think this could all be cleaned up nicely if the internal BS wouldn't be
as integrated as it is right now.

Eventually we will release it as open-source, but having an integration
into Tapestry (as a new tapestry-*) would be even nicer :-)

Best regards
Ben


On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein 
wrote:


Hi Tapestry guys!

I want to hear/read your opinion about getting rid of the Bootstrap
Library from T5 core.
I would like to move all BS related code (css/js) to a seperate module
like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
Furthermore I would like to see a second module "tapestry-bootstrap4"
which uses BS4.

  From the sources I see direct dependencies are less than expected. Some
tml's use it (I just ignore the internal T5 pages for now):

  AjaxFormLoop.tml
  class="btn btn-default btn-sm"
  

  BeanEditForm.tml
  class="btn-toolbar"
  class="btn-group"
  class="btn btn-primary"

  DevTool.tml
  
  class="dropdown-menu"
  class="dropdown-header"

  ExceptionDisplay.tml
  class="well"
  class="pull-right"
  class="checkbox"// ?

  Palette.tml
  class="btn-group-vertical"

and some JAVA references like:

  JavaScriptModule.java
  configuration.add("

Re: Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread David Taylor
I completely agree. We would like to move to bootstrap 4 and improve our 
integration with Kendo UI in the process.


We also need to upgrade bootstrap 3 to the latest version since there 
have been issues that cause it to show up as a XSS risk on application 
vulnerability scans. Just yesterday bootstrap 3.4.1 was released to 
address CVE-2019-8331.


We would be happy to participate in the development and testing of this 
feature. We are actively developing hybrid applications on Tapestry and 
would be able to test and provide feedback.


On 2/14/2019 6:20 PM, JumpStart wrote:

I think it’s a fabulous idea. Two thumbs up.


On 14 Feb 2019, at 9:07 pm, Bob Harner  wrote:

I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
framework.

For context and some alternative ideas, see this prior discussion of the
same topic:

https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F

On Thu, Feb 14, 2019, 4:52 AM Ben Weidig 
Hi Jens,

I like the idea of decoupling the core and Bootstrap to make it easier to
use other versions.

Maybe the components should be updated to BS4 for T5.5, with a legacy
fallback or a component swap (can't remember the service doing it, we have
our own implementation, it's doing an advice on
ComponentClassResolver#resolveComponentTypeToClassName or
ComponentInstantiatorSource#getInstantiator).

For 5.4 we've developed an internal solution for using different BS
versions, here are some specifics.

We have multi-tenant-apps with different BS versions (so far up to 3), so
we needed a flexible solution that supports the internal BS and other
versions dynamically.

To make it even more flexible we've added SASS-support and compile
Bootstrap from the source files, with the possibility to add files
beforehand to the compilation step with custom variables etc.

The layout component has an annotation that triggers
a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
BS version decided by a contributable strategy pipeline.

JavaScript modules were the biggest problems, we started with replacing the
internal modules, but ended up adding additional modules instead. This
worked fine after getting all the dependencies right, but every BS version
might break it again, so we're now using the bundled version of BS JS.

We think this could all be cleaned up nicely if the internal BS wouldn't be
as integrated as it is right now.

Eventually we will release it as open-source, but having an integration
into Tapestry (as a new tapestry-*) would be even nicer :-)

Best regards
Ben


On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein 
wrote:


Hi Tapestry guys!

I want to hear/read your opinion about getting rid of the Bootstrap
Library from T5 core.
I would like to move all BS related code (css/js) to a seperate module
like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
Furthermore I would like to see a second module "tapestry-bootstrap4"
which uses BS4.

 From the sources I see direct dependencies are less than expected. Some
tml's use it (I just ignore the internal T5 pages for now):

 AjaxFormLoop.tml
 class="btn btn-default btn-sm"
 

 BeanEditForm.tml
 class="btn-toolbar"
 class="btn-group"
 class="btn btn-primary"

 DevTool.tml
 
 class="dropdown-menu"
 class="dropdown-header"

 ExceptionDisplay.tml
 class="well"
 class="pull-right"
 class="checkbox"// ?

 Palette.tml
 class="btn-group-vertical"

and some JAVA references like:

 JavaScriptModule.java
 configuration.add("bootstrap/ ...")

 bundledModules=...


Do you think it's worths looking into it, digging deeper?
Any pitfalls I should consider?
Anyone interested to discuss it?


Jens





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




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





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



Re: Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread JumpStart
I think it’s a fabulous idea. Two thumbs up.

> On 14 Feb 2019, at 9:07 pm, Bob Harner  wrote:
> 
> I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
> framework.
> 
> For context and some alternative ideas, see this prior discussion of the
> same topic:
> 
> https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F
> 
> On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  
>> Hi Jens,
>> 
>> I like the idea of decoupling the core and Bootstrap to make it easier to
>> use other versions.
>> 
>> Maybe the components should be updated to BS4 for T5.5, with a legacy
>> fallback or a component swap (can't remember the service doing it, we have
>> our own implementation, it's doing an advice on
>> ComponentClassResolver#resolveComponentTypeToClassName or
>> ComponentInstantiatorSource#getInstantiator).
>> 
>> For 5.4 we've developed an internal solution for using different BS
>> versions, here are some specifics.
>> 
>> We have multi-tenant-apps with different BS versions (so far up to 3), so
>> we needed a flexible solution that supports the internal BS and other
>> versions dynamically.
>> 
>> To make it even more flexible we've added SASS-support and compile
>> Bootstrap from the source files, with the possibility to add files
>> beforehand to the compilation step with custom variables etc.
>> 
>> The layout component has an annotation that triggers
>> a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
>> BS version decided by a contributable strategy pipeline.
>> 
>> JavaScript modules were the biggest problems, we started with replacing the
>> internal modules, but ended up adding additional modules instead. This
>> worked fine after getting all the dependencies right, but every BS version
>> might break it again, so we're now using the bundled version of BS JS.
>> 
>> We think this could all be cleaned up nicely if the internal BS wouldn't be
>> as integrated as it is right now.
>> 
>> Eventually we will release it as open-source, but having an integration
>> into Tapestry (as a new tapestry-*) would be even nicer :-)
>> 
>> Best regards
>> Ben
>> 
>> 
>> On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein 
>> wrote:
>> 
>>> Hi Tapestry guys!
>>> 
>>> I want to hear/read your opinion about getting rid of the Bootstrap
>>> Library from T5 core.
>>> I would like to move all BS related code (css/js) to a seperate module
>>> like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
>>> Furthermore I would like to see a second module "tapestry-bootstrap4"
>>> which uses BS4.
>>> 
>>> From the sources I see direct dependencies are less than expected. Some
>>> tml's use it (I just ignore the internal T5 pages for now):
>>> 
>>> AjaxFormLoop.tml
>>> class="btn btn-default btn-sm"
>>> 
>>> 
>>> BeanEditForm.tml
>>> class="btn-toolbar"
>>> class="btn-group"
>>> class="btn btn-primary"
>>> 
>>> DevTool.tml
>>> 
>>> class="dropdown-menu"
>>> class="dropdown-header"
>>> 
>>> ExceptionDisplay.tml
>>> class="well"
>>> class="pull-right"
>>> class="checkbox"// ?
>>> 
>>> Palette.tml
>>> class="btn-group-vertical"
>>> 
>>> and some JAVA references like:
>>> 
>>> JavaScriptModule.java
>>> configuration.add("bootstrap/ ...")
>>> 
>>> bundledModules=...
>>> 
>>> 
>>> Do you think it's worths looking into it, digging deeper?
>>> Any pitfalls I should consider?
>>> Anyone interested to discuss it?
>>> 
>>> 
>>> Jens
>>> 
>>> 
>>> 
>>> 
>>> 
>>> -
>>> 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: Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread Numa Schmeder
Hi Jens,

I am interested by your project. 
Maybe we can discuss further but right now I am super busy. What’s your 
strategy to injection css classes inside components ? 

Best

Sent from my iPhone!
Numa Schmeder


> Le 14 févr. 2019 à 10:04, Jens Breitenstein  a écrit :
> 
> Hi Tapestry guys!
> 
> I want to hear/read your opinion about getting rid of the Bootstrap Library 
> from T5 core.
> I would like to move all BS related code (css/js) to a seperate module like 
> "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
> Furthermore I would like to see a second module "tapestry-bootstrap4" which 
> uses BS4.
> 
> From the sources I see direct dependencies are less than expected. Some tml's 
> use it (I just ignore the internal T5 pages for now):
> 
> AjaxFormLoop.tml
> class="btn btn-default btn-sm"
> 
> 
> BeanEditForm.tml
> class="btn-toolbar"
> class="btn-group"
> class="btn btn-primary"
> 
> DevTool.tml
> 
> class="dropdown-menu"
> class="dropdown-header"
> 
> ExceptionDisplay.tml
> class="well"
> class="pull-right"
> class="checkbox"// ?
> 
> Palette.tml
> class="btn-group-vertical"
> 
> and some JAVA references like:
> 
> JavaScriptModule.java
> configuration.add("bootstrap/ ...")
> 
> bundledModules=...
> 
> 
> Do you think it's worths looking into it, digging deeper?
> Any pitfalls I should consider?
> Anyone interested to discuss it?
> 
> 
> Jens
> 
> 
> 
> 
> 
> -
> 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: Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread Bob Harner
I agree that Tapestry shouldn't be so tightly coupled to a specific CSS
framework.

For context and some alternative ideas, see this prior discussion of the
same topic:

https://tapestry.markmail.org/search/?q=What+happens+when+Boootstrap+4+is+released%3F

On Thu, Feb 14, 2019, 4:52 AM Ben Weidig  Hi Jens,
>
> I like the idea of decoupling the core and Bootstrap to make it easier to
> use other versions.
>
> Maybe the components should be updated to BS4 for T5.5, with a legacy
> fallback or a component swap (can't remember the service doing it, we have
> our own implementation, it's doing an advice on
> ComponentClassResolver#resolveComponentTypeToClassName or
> ComponentInstantiatorSource#getInstantiator).
>
> For 5.4 we've developed an internal solution for using different BS
> versions, here are some specifics.
>
> We have multi-tenant-apps with different BS versions (so far up to 3), so
> we needed a flexible solution that supports the internal BS and other
> versions dynamically.
>
> To make it even more flexible we've added SASS-support and compile
> Bootstrap from the source files, with the possibility to add files
> beforehand to the compilation step with custom variables etc.
>
> The layout component has an annotation that triggers
> a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
> BS version decided by a contributable strategy pipeline.
>
> JavaScript modules were the biggest problems, we started with replacing the
> internal modules, but ended up adding additional modules instead. This
> worked fine after getting all the dependencies right, but every BS version
> might break it again, so we're now using the bundled version of BS JS.
>
> We think this could all be cleaned up nicely if the internal BS wouldn't be
> as integrated as it is right now.
>
> Eventually we will release it as open-source, but having an integration
> into Tapestry (as a new tapestry-*) would be even nicer :-)
>
> Best regards
> Ben
>
>
> On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein 
> wrote:
>
> > Hi Tapestry guys!
> >
> > I want to hear/read your opinion about getting rid of the Bootstrap
> > Library from T5 core.
> > I would like to move all BS related code (css/js) to a seperate module
> > like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
> > Furthermore I would like to see a second module "tapestry-bootstrap4"
> > which uses BS4.
> >
> >  From the sources I see direct dependencies are less than expected. Some
> > tml's use it (I just ignore the internal T5 pages for now):
> >
> >  AjaxFormLoop.tml
> >  class="btn btn-default btn-sm"
> >  
> >
> >  BeanEditForm.tml
> >  class="btn-toolbar"
> >  class="btn-group"
> >  class="btn btn-primary"
> >
> >  DevTool.tml
> >  
> >  class="dropdown-menu"
> >  class="dropdown-header"
> >
> >  ExceptionDisplay.tml
> >  class="well"
> >  class="pull-right"
> >  class="checkbox"// ?
> >
> >  Palette.tml
> >  class="btn-group-vertical"
> >
> > and some JAVA references like:
> >
> >  JavaScriptModule.java
> >  configuration.add("bootstrap/ ...")
> >
> >  bundledModules=...
> >
> >
> > Do you think it's worths looking into it, digging deeper?
> > Any pitfalls I should consider?
> > Anyone interested to discuss it?
> >
> >
> > Jens
> >
> >
> >
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread Ben Weidig
Hi Jens,

I like the idea of decoupling the core and Bootstrap to make it easier to
use other versions.

Maybe the components should be updated to BS4 for T5.5, with a legacy
fallback or a component swap (can't remember the service doing it, we have
our own implementation, it's doing an advice on
ComponentClassResolver#resolveComponentTypeToClassName or
ComponentInstantiatorSource#getInstantiator).

For 5.4 we've developed an internal solution for using different BS
versions, here are some specifics.

We have multi-tenant-apps with different BS versions (so far up to 3), so
we needed a flexible solution that supports the internal BS and other
versions dynamically.

To make it even more flexible we've added SASS-support and compile
Bootstrap from the source files, with the possibility to add files
beforehand to the compilation step with custom variables etc.

The layout component has an annotation that triggers
a ComponentClassTransformWorker2 attaching a JavaScriptStack containing the
BS version decided by a contributable strategy pipeline.

JavaScript modules were the biggest problems, we started with replacing the
internal modules, but ended up adding additional modules instead. This
worked fine after getting all the dependencies right, but every BS version
might break it again, so we're now using the bundled version of BS JS.

We think this could all be cleaned up nicely if the internal BS wouldn't be
as integrated as it is right now.

Eventually we will release it as open-source, but having an integration
into Tapestry (as a new tapestry-*) would be even nicer :-)

Best regards
Ben


On Thu, Feb 14, 2019 at 10:14 AM Jens Breitenstein 
wrote:

> Hi Tapestry guys!
>
> I want to hear/read your opinion about getting rid of the Bootstrap
> Library from T5 core.
> I would like to move all BS related code (css/js) to a seperate module
> like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
> Furthermore I would like to see a second module "tapestry-bootstrap4"
> which uses BS4.
>
>  From the sources I see direct dependencies are less than expected. Some
> tml's use it (I just ignore the internal T5 pages for now):
>
>  AjaxFormLoop.tml
>  class="btn btn-default btn-sm"
>  
>
>  BeanEditForm.tml
>  class="btn-toolbar"
>  class="btn-group"
>  class="btn btn-primary"
>
>  DevTool.tml
>  
>  class="dropdown-menu"
>  class="dropdown-header"
>
>  ExceptionDisplay.tml
>  class="well"
>  class="pull-right"
>  class="checkbox"// ?
>
>  Palette.tml
>  class="btn-group-vertical"
>
> and some JAVA references like:
>
>  JavaScriptModule.java
>  configuration.add("bootstrap/ ...")
>
>  bundledModules=...
>
>
> Do you think it's worths looking into it, digging deeper?
> Any pitfalls I should consider?
> Anyone interested to discuss it?
>
>
> Jens
>
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Open Discussion: remove Bootstrap from T5 core

2019-02-14 Thread Jens Breitenstein

Hi Tapestry guys!

I want to hear/read your opinion about getting rid of the Bootstrap 
Library from T5 core.
I would like to move all BS related code (css/js) to a seperate module 
like "tapestry-bootstrap3" and decouple the hardcoded BS from T5.
Furthermore I would like to see a second module "tapestry-bootstrap4" 
which uses BS4.


From the sources I see direct dependencies are less than expected. Some 
tml's use it (I just ignore the internal T5 pages for now):


    AjaxFormLoop.tml
        class="btn btn-default btn-sm"
        

    BeanEditForm.tml
        class="btn-toolbar"
        class="btn-group"
        class="btn btn-primary"

    DevTool.tml
        
        class="dropdown-menu"
        class="dropdown-header"

    ExceptionDisplay.tml
        class="well"
        class="pull-right"
        class="checkbox"    // ?

    Palette.tml
        class="btn-group-vertical"

and some JAVA references like:

    JavaScriptModule.java
        configuration.add("bootstrap/ ...")

        bundledModules=...


Do you think it's worths looking into it, digging deeper?
Any pitfalls I should consider?
Anyone interested to discuss it?


Jens





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



T5 + Tynamo RESTEasy + UriInfo

2017-02-08 Thread Michael Gentry
This is an FYI in case it helps others.

Converting a non-T5 REST-based application into a T5 + Tynamo RESTEasy
version.  The original application used:

  @Context
  private UriInfo uriinfo;

to inject UriInfo to construct URLs to other REST services. but this
didin't work with Tynamo's RESTEasy.  You *can* add "@Context UriInfo
uriInfo" to your method's parameters, but that ended up kind of ugly
passing it around all over the place.  Since you couldn't @Inject the
UriInfo without some work, I came up with this to make it possible (add to
AppModule):

@Scope(ScopeConstants.PERTHREAD)
public static UriInfo build(HttpServletRequest request,
@Symbol(ResteasySymbols.MAPPING_PREFIX)
String restEasyPackage)
throws URISyntaxException
{
// Glue the container's context path to the T5 RESTEasy path so the
// URLs are constructed correctly.
String webServicePath = request.getContextPath() + restEasyPackage;

// Create the injectable and session-scoped UriInfo for this
request.
return new ResteasyUriInfo(request.getRequestURL().toString(),
request.getQueryString(), webServicePath);
}

With that added, you can put this in your web services implementation:

@Inject
private UriInfo uriInfo;

It works just like the @Context version, but is injected by T5.  Hopefully
that will save someone some effort in the future if they need this feature.

mrg


Re: some old criticisms of T5

2016-09-22 Thread Cezary Biernacki
In my experience Tapestry generates better HTML than many (most?) of other
frameworks. Lets take for example the whitespace issue. In most cases
whitespace in templates are artefacts of indentation used to improve
readability of templates during development. As the result when blindly
preserved, whitespace in generated HTML is just ton of unnecessary garbage.
E.g. it is not uncommon to see several empty lines at the start of
generated HTML from JSP-powered frameworks. Tapestry approach is much more
efficient.

Regarding, using a complain about problems with using Tapestry-generated
page as responses to AJAX calls, I believe that Tapestry offers better
solution with custom document builder dedicated for AJAX and returning a
custom structure. While just returning HTML snippets  for AJAX can work for
simple applications, it becomes maintainability nightmare for more complex
once: how to ensure that necessary CSS-es, JavaScripts are included but not
duplicated (and when pages are generated from multiple reusable components
that do not know about each other), how to insert the response into
multiple parts of the page, how to avoid DOM id conflicts, how to handle
errors in a friendly way. All of this is provided by Tapestry from the
start.

Another complain was problems with XHTML, thankfully it almost died.

Best regards,
Cezary


On Mon, Sep 19, 2016 at 6:36 PM, Qbyte Consulting  wrote:

> No, HLS replies were spot on. The only irritation I have found with T5 is
> some of the default styling that gets added to handle form errors and these
> can be overriden with your own css - can be mucky, but works.
>
> On Mon, Sep 19, 2016 at 5:23 PM, Bob Harner  wrote:
>
> > That's a very old article (2009 -- I don't think many users care about
> > IE6 redering quirks anymore), but Howard's comments there seem to do a
> > pretty good job of explaining where the author is either mistaken or
> > misunderstands the constraints and trade-offs involved. A lot of the
> > other commenters do likewise. I don't know if there is much more to
> > add, is there?
> >
> > On Mon, Sep 19, 2016 at 11:13 AM, Qbyte Consulting
> >  wrote:
> > > https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/
> > >
> > > I'm wondering how users would respond to the above. I haven't found
> these
> > > issues a big problem myself, but some of these behaviours are
> > problematic,
> > > for example someone mentioned the white-space issue recently.
> > >
> > > John
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>


Re: some old criticisms of T5

2016-09-19 Thread Qbyte Consulting
No, HLS replies were spot on. The only irritation I have found with T5 is
some of the default styling that gets added to handle form errors and these
can be overriden with your own css - can be mucky, but works.

On Mon, Sep 19, 2016 at 5:23 PM, Bob Harner  wrote:

> That's a very old article (2009 -- I don't think many users care about
> IE6 redering quirks anymore), but Howard's comments there seem to do a
> pretty good job of explaining where the author is either mistaken or
> misunderstands the constraints and trade-offs involved. A lot of the
> other commenters do likewise. I don't know if there is much more to
> add, is there?
>
> On Mon, Sep 19, 2016 at 11:13 AM, Qbyte Consulting
>  wrote:
> > https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/
> >
> > I'm wondering how users would respond to the above. I haven't found these
> > issues a big problem myself, but some of these behaviours are
> problematic,
> > for example someone mentioned the white-space issue recently.
> >
> > John
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: some old criticisms of T5

2016-09-19 Thread Bob Harner
That's a very old article (2009 -- I don't think many users care about
IE6 redering quirks anymore), but Howard's comments there seem to do a
pretty good job of explaining where the author is either mistaken or
misunderstands the constraints and trade-offs involved. A lot of the
other commenters do likewise. I don't know if there is much more to
add, is there?

On Mon, Sep 19, 2016 at 11:13 AM, Qbyte Consulting
 wrote:
> https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/
>
> I'm wondering how users would respond to the above. I haven't found these
> issues a big problem myself, but some of these behaviours are problematic,
> for example someone mentioned the white-space issue recently.
>
> John

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



some old criticisms of T5

2016-09-19 Thread Qbyte Consulting
https://friendlybit.com/html/tapestry-5-and-how-not-to-treat-html/

I'm wondering how users would respond to the above. I haven't found these
issues a big problem myself, but some of these behaviours are problematic,
for example someone mentioned the white-space issue recently.

John


Re: Tapestry 5 jobs, the value of learning to use T5 and transferable skills.

2015-10-01 Thread Thiago H de Paula Figueiredo
On Thu, 01 Oct 2015 14:40:44 -0300, Thiago H de Paula Figueiredo  
 wrote:


Hmm, from reading http://wildfly.org/about/, it seems to me that WildFly  
isn't a stack at all, but a servlet container just like Jetty and Tomcat.


Oops, it's not just a servlet container. It's a full Java EE server. But  
you can still use Tapestry for the web part in Java EE.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Re: Tapestry 5 jobs, the value of learning to use T5 and transferable skills.

2015-10-01 Thread Thiago H de Paula Figueiredo
On Thu, 01 Oct 2015 05:46:27 -0300, Stephen Nutbrown   
wrote:



Hi,


Hi!


I feel this discussion belongs in the users group, although it is not all
directly related to Tapestry - it's related in some way or another and I
felt this community would be best positioned to talk about it. I have no
specific questions, this is intended more as a discussion/experience  
thread (if that's allowed).


I don't think it's off-topic at all. :) It's still mostly about Tapestry,  
even if not technically.



(monster.com)
and search the word "Tapestry5".
*"Sorry, no "tapestry5" jobs were found that match your criteria"*


Well, I could find two searching for just "tapestry":
http://jobview.monster.com/Senior-Java-Engineer-Core-Java-Multithreading-Job-Southfield-MI-US-157181282.aspx?mescoid=1500127001001
http://jobview.monster.com/Senior-Java-Software-Engineer-Core-Java-Multithreading-Job-Seattle-WA-US-157629655.aspx?mescoid=1500127001001

I suppose my overall comment and question is.. how many of you work in  
jobs> where you use Tapestry5,


Me! :) I got my current job, which I love, because of my involvement with  
Tapestry.


and how many of you have tried to transition to T5 from a stack like  
wildfly,


Hmm, from reading http://wildfly.org/about/, it seems to me that WildFly  
isn't a stack at all, but a servlet container just like Jetty and Tomcat.



Why are there so  very
few T5 jobs out there (In my limited opinion, hence the golden hammer, T5
is the best thing since sliced bread).


Why sometimes the best option is not the most popular one, specially in a  
crowded space like Java web frameworks? :)


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



Tapestry 5 jobs, the value of learning to use T5 and transferable skills.

2015-10-01 Thread Stephen Nutbrown
Hi,

I feel this discussion belongs in the users group, although it is not all
directly related to Tapestry - it's related in some way or another and I
felt this community would be best positioned to talk about it. I have no
specific questions, this is intended more as a discussion/experience thread
(if that's allowed).

About 3 years ago, I began my first web project as part of my own work -
not for any company, just for some sites I needed to set up to support some
of my research. Perhaps naively, as a new user of Java EE (but experienced
with Java SE), I googled the net for "Simple to use java web frameworks"
and similar searches until I came across Tapestry. Some good reviews around
the internet and some good posts from Howard on SO lead me to running the
getting started tutorial and was amazed how easy it was - I was able to put
my Java SE knowledge straight into practise without knowing anything about
various xml files, or even the difference between a servlet, container and
application server, what CDI is or any of that. Everything was (and is)
running nicely on a jetty server. Whenever I became stuck, i'd go to the T5
documentation and read about how to use @Persist or @Sessionstate, or
perhaps how to work with services and injecting them or how to set up
Tapestry-hibernate - these kind of things (Or i'd ask here, and.. many
thank you's to the people of this mailing list for so much help).

Move on 3 years and I am fairly comfortable with Tapestry and have several
small projects (again, just for me, not a company or work). I then begin to
wonder if I've perhaps fallen into a trap of Tapestry5 being my golden
hammer - I see a web project, I think oh that would be easy using T5, my
favourite, and get started right away (Unless it requires CMS systems etc
in which case.. Joomla/Wordpress/Drupal). This is perhaps not efficient,
but fine until you begin a job search and use a big job site (monster.com)
and search the word "Tapestry5".

*"Sorry, no "tapestry5" jobs were found that match your criteria"*

Oh, I see. Well, that's not too bad - I see there are lots of companies
looking for java EE developers and in particular, (oddly to me), running
Wildfly stacks (formerly JBoss) and using RESTEasy etc.

These look entirely new to me, but then when you look a bit further you see
actually that @Inject is common (part of CDI and specified in JSR), session
beans (which I consider like session state) is a fairly normal concept, the
annotations for hibernate are of course all the same and actually..
Tapestry users are using a huge amount of the same set of tools, interfaces
and annotations as users of other stacks or frameworks. I see
@ApplicationScope and realise that it's a singleton, similar to if I added
it from a module and that I can then inject into pages. All very nice. At
this point I learn that actually whilst learning to use Tapestry5, mainly
through T5s documentation I have learnt an awful lot more - how to use
hibernate (and I learnt some elsewhere too), how to use maven, how to set
up jetty... how to inject things, what session state is and how things are
persisted.

I suppose my overall comment and question is.. how many of you work in jobs
where you use Tapestry5, and how many of you have tried to transition to T5
from a stack like wildfly, or from T5 to something like wildfly, and how
did you find it. How did you work on that transition? Why are there so very
few T5 jobs out there (In my limited opinion, hence the golden hammer, T5
is the best thing since sliced bread). I think perhaps one of my
missunderstandings is that I attribute many things which are actually part
of Java EE or other libraries/frameworks that T5 uses to T5 itself, without
realising that what I am actually working with is very common.

I wonder if anyone else has had similar experiences, or if anyone has any
advice for a Tapestry5 person who learnt effectively everything from the
documentation and mailing list to moving to other technologies.


Thanks, almost any discussion is welcome :).


Re: T5 and Ember

2015-03-24 Thread Kalle Korhonen
On Tue, Mar 24, 2015 at 7:24 AM, Andreas Andreou  wrote:

> After having worked for more almost 2 years on (mostly) ember,
> my advice would be to completely decouple (if possible) the projects.
>
> Move ember on its own, make use of the improving cli plugins for
> developing,
> building and deploying. I'm still on a yeoman created grunt setup, so that
> could
> also work for you.
>

Yes, that's certainly an option and that's how I've approached the
prototype, but this strategy doesn't work quite as well if you are
releasing to a customer as opposed to developing company's own site where
you typically already have an http server to deploy the Ember bits to. And
if you have to figure out packaging into a .war anyway, then might make
sense to use a similar setup for development as well. In any case, thanks
for the advice. I bet the framework has changed quite a bit in your two
years. I wonder if your experience has been a positive one and if there are
any "I wish I had known this before we started" tidbits you could share.

@Ivano - if popularity was a measure, we'd all be still using Struts
instead of Tapestry, wouldn't we? Convention over configuration is one
thing, but the article you linked to is a fairly well balanced in my
opinion. For me, the biggest things to like in Ember is it's router, clean
urls, cleaner/simpler concepts and performance.

Kalle


>
>
> On Tue, Mar 24, 2015 at 5:50 AM, Kalle Korhonen <
> kalle.o.korho...@gmail.com>
> wrote:
>
> > As an experiment, I'm trying to migrate an existing Angular app to Ember
> > (with T5 back-end and serving multiple other "thin" pages). There's a lot
> > to like in Ember vs Angular but I'm wondering if there are anybody else
> > using Ember with T5 and if so, what's your setup? I'm mainly interested
> in
> > knowing if you've managed to integrate wro4j's EmberJsProcessor or
> perhaps
> > you have just overlaid an ember-cli setup over T5 folder structure? Also,
> > I'd especially like to know how you handle third-party components if you
> > are using any. Installing snippets using npm and ember-cli seems like a
> > great idea but I find a lot of outdated and broken stuff. I'm using the
> > very latest, the ember-cli 0.2.1 released today (I was battling issues
> with
> > the previous 0.2.0 release over the weekend) and ember 1.10.0. Perhaps
> I'm
> > pushing too far on the bleeding edge... if you've gone done this path,
> I'd
> > appreciate some war stories for things to watch out for.
> >
> > Kalle
> >
>
>
>
> --
> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
> Apache Tapestry PMC / http://chesstu.be owner
> Open Source / JS Consulting
>


Re: T5 and Ember

2015-03-24 Thread Andreas Andreou
Kalle,
After having worked for more almost 2 years on (mostly) ember,
my advice would be to completely decouple (if possible) the projects.

Move ember on its own, make use of the improving cli plugins for developing,
building and deploying. I'm still on a yeoman created grunt setup, so that
could
also work for you.

Just throw in some cors headers on the tapestry side and you'll be able to
live
code against production data



On Tue, Mar 24, 2015 at 5:50 AM, Kalle Korhonen 
wrote:

> As an experiment, I'm trying to migrate an existing Angular app to Ember
> (with T5 back-end and serving multiple other "thin" pages). There's a lot
> to like in Ember vs Angular but I'm wondering if there are anybody else
> using Ember with T5 and if so, what's your setup? I'm mainly interested in
> knowing if you've managed to integrate wro4j's EmberJsProcessor or perhaps
> you have just overlaid an ember-cli setup over T5 folder structure? Also,
> I'd especially like to know how you handle third-party components if you
> are using any. Installing snippets using npm and ember-cli seems like a
> great idea but I find a lot of outdated and broken stuff. I'm using the
> very latest, the ember-cli 0.2.1 released today (I was battling issues with
> the previous 0.2.0 release over the weekend) and ember 1.10.0. Perhaps I'm
> pushing too far on the bleeding edge... if you've gone done this path, I'd
> appreciate some war stories for things to watch out for.
>
> Kalle
>



-- 
Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr
Apache Tapestry PMC / http://chesstu.be owner
Open Source / JS Consulting


Re: T5 and Ember

2015-03-24 Thread Ivano Luberti
Oh well, reading further I have found the answer by myself:

> Ember.js favors Convention over Configuration. 

sorry Kalle


Il 24/03/2015 12:00, Ivano Luberti ha scritto:
> Hi Kalle, I don't know a thing about Ember and Angular but I plan to
> learn about javascript frameworks. Hence I don't have an answer for you
> but a question instead (of course totally OT on this list).
>
> First link I get from google searching for "ember angular" is
>
> https://www.airpair.com/js/javascript-framework-comparison
>
> that is a very angular partizan article in reality.
> Maybe explanation on why is the first result is this contained phrase:
>
>> Not only does Angular have the largest community and much more online
>> content than the two others, it is also backed and promoted by Google. 
> Nonetheless motivation for the article to sponsor Angular seem reasonable.
> So question is: what is to like in ember more than in angular?
>
> Il 24/03/2015 04:50, Kalle Korhonen ha scritto:
>> As an experiment, I'm trying to migrate an existing Angular app to Ember
>> (with T5 back-end and serving multiple other "thin" pages). There's a lot
>> to like in Ember vs Angular but I'm wondering if there are anybody else
>> using Ember with T5 and if so, what's your setup? I'm mainly interested in
>> knowing if you've managed to integrate wro4j's EmberJsProcessor or perhaps
>> you have just overlaid an ember-cli setup over T5 folder structure? Also,
>> I'd especially like to know how you handle third-party components if you
>> are using any. Installing snippets using npm and ember-cli seems like a
>> great idea but I find a lot of outdated and broken stuff. I'm using the
>> very latest, the ember-cli 0.2.1 released today (I was battling issues with
>> the previous 0.2.0 release over the weekend) and ember 1.10.0. Perhaps I'm
>> pushing too far on the bleeding edge... if you've gone done this path, I'd
>> appreciate some war stories for things to watch out for.
>>
>> Kalle
>>

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==


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



Re: T5 and Ember

2015-03-24 Thread Ivano Luberti
Hi Kalle, I don't know a thing about Ember and Angular but I plan to
learn about javascript frameworks. Hence I don't have an answer for you
but a question instead (of course totally OT on this list).

First link I get from google searching for "ember angular" is

https://www.airpair.com/js/javascript-framework-comparison

that is a very angular partizan article in reality.
Maybe explanation on why is the first result is this contained phrase:

>
> Not only does Angular have the largest community and much more online
> content than the two others, it is also backed and promoted by Google. 

Nonetheless motivation for the article to sponsor Angular seem reasonable.
So question is: what is to like in ember more than in angular?

Il 24/03/2015 04:50, Kalle Korhonen ha scritto:
> As an experiment, I'm trying to migrate an existing Angular app to Ember
> (with T5 back-end and serving multiple other "thin" pages). There's a lot
> to like in Ember vs Angular but I'm wondering if there are anybody else
> using Ember with T5 and if so, what's your setup? I'm mainly interested in
> knowing if you've managed to integrate wro4j's EmberJsProcessor or perhaps
> you have just overlaid an ember-cli setup over T5 folder structure? Also,
> I'd especially like to know how you handle third-party components if you
> are using any. Installing snippets using npm and ember-cli seems like a
> great idea but I find a lot of outdated and broken stuff. I'm using the
> very latest, the ember-cli 0.2.1 released today (I was battling issues with
> the previous 0.2.0 release over the weekend) and ember 1.10.0. Perhaps I'm
> pushing too far on the bleeding edge... if you've gone done this path, I'd
> appreciate some war stories for things to watch out for.
>
> Kalle
>

-- 
==
dott. Ivano Mario Luberti
Archimede Informatica societa' cooperativa a r. l.
Sede Operativa
Via Gereschi 36 - 56126- Pisa
tel.: +39-050- 580959
tel/fax: +39-050-9711344
web: www.archicoop.it
==



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



T5 and Ember

2015-03-23 Thread Kalle Korhonen
As an experiment, I'm trying to migrate an existing Angular app to Ember
(with T5 back-end and serving multiple other "thin" pages). There's a lot
to like in Ember vs Angular but I'm wondering if there are anybody else
using Ember with T5 and if so, what's your setup? I'm mainly interested in
knowing if you've managed to integrate wro4j's EmberJsProcessor or perhaps
you have just overlaid an ember-cli setup over T5 folder structure? Also,
I'd especially like to know how you handle third-party components if you
are using any. Installing snippets using npm and ember-cli seems like a
great idea but I find a lot of outdated and broken stuff. I'm using the
very latest, the ember-cli 0.2.1 released today (I was battling issues with
the previous 0.2.0 release over the weekend) and ember 1.10.0. Perhaps I'm
pushing too far on the bleeding edge... if you've gone done this path, I'd
appreciate some war stories for things to watch out for.

Kalle


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-11 Thread Martin Nagl
Setting tapestry.secure-enabled to "false" and removing @Secure annotations
solved my problem.
Internal users can acces Tomcat directly via HTTP.
External users can access Apache httpd via HTTPS, which handles SSL and
forwards the request to Tomcat (via AJP).

Works nicely now when Tapestry does not redirect between http and https .

Thans for your advice.
Regards
Martin


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-11 Thread Martin Nagl
On Thu, Feb 5, 2015 at 5:01 PM, Martin Nagl  wrote:

> Aha, sorry for the "hardcoded" part, I can see that the number 80 is only
> used to determine whether to include port in URL or not :) Will try to
> provide HOSTPORT instead.
>
> M.
>
> On Thu, Feb 5, 2015 at 4:53 PM, Martin Nagl  wrote:
>
>> I am using Tapestry 5.3.6.
>>
>> I have not overridden BaseURLSource or anything simmilar.
>> I have not provided HOSTPORT or HOSTPORT_SECURE.
>>
>> Looking at the code in BaseURLSourceImpl, maybe my problem is that http
>> communication goes on port 8080, not 80 as expected (hardcoded in
>> BaseURLSourceImpl). I will try to experiment more with the settings above
>> and figure out how to test it on my local machine.
>>
>> Regards
>> Martin
>>
>
>


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-06 Thread Bob Harner
Martin,

Have you tried setting the tapestry.secure-enabled symbol to "false" in
your AppModule.java? That prevents Tapestry from redirecting to https (and
you won't have to have @Secure annotations on your pages).
On Feb 5, 2015 11:30 AM, "Norman Franke"  wrote:

> While not addressing your problem exactly, I have found issues with
> cookies doing things like this. You try to login via HTTPS. Your session is
> created as a secure cookie, and when you go back to regular HTTP after
> login, you have no session cookie. I created a new, non-secure cookie, but
> that’s definitely a hack and has some issues. I don’t use @Secure since I
> could never get anything working correctly, and so redirect myself.
>
> You could try using something like nginx to do SSL to plan old tomcat
> running in HTTP mode. Using the @Secure annotation will still cause
> problems, since it will want to use HTTPS to / from tomcat. This would
> likely work, but local users won’t benefit from HTTPS for login. However,
> you could potentially us nginx to handle that as well, forcing HTTPS for a
> specific URL.
>
> You may be able to use your own MetaDataLocator service to determine that
> client IP address and decide there. Obviously if you are doing a reverse
> proxy, the Http Request IP address won’t necessarily be the client’s IP
> address, but most proxies add a header you could use.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
> On Feb 5, 2015, at 4:16 AM, Martin Nagl  wrote:
>
> > Hi all,
> >
> > we have a Tapesty5 application deployed on Tomcat + Apache httpd. In
> > production environment at our customer, the application should be
> deployed
> > / accessed like this:
> >  - Tomcat is running on a server in internal network on port 8080.
> >  - There is an Apache HTTP server with reverse proxy to Tomcat (AJP)
> > accessible from the internet on port 80.
> >  - Internal users should access the application on Tomcat directly
> without
> > https on http://servername.intranet.customer.sk:8080/appname/login
> >  - External users should access the application through Apache httpd,
> with
> > https, on https://apps.customer.sk/appname/login
> >
> > 1. Initiallly, I had no @Secure annotations on my pages. The application
> > worked correctly from internal network, but not from internet. From
> > internet, I could access the login page through https, but after submit,
> I
> > get somehow redirected to http which ends with server error: Your browser
> > sent a request that this server could not understand.
> > Reason: You're speaking plain HTTP to an SSL-enabled server port.
> > Instead use the HTTPS scheme to access this URL, please.
> >
> > 2. I have annotated all my pages with @Secure. The aplication now works
> > correctly from internet, but not from internal network. From internal
> > network, I can access
> > http://servername.intranet.customer.sk:8080/appname/login but I get
> > redirected to https at
> > https://servername.intranet.customer.sk:8080/appname/login. - This is
> not
> > desired, I would like the application to continue in http mode.
> >
> > Is this setup possible with a Tapestry5 application (a single deployed
> > instance)?
> > Is there some way to tell Tapestry "If you're accessed through https,
> then
> > serve all pages through https, else if you're accessed through http, then
> > serve all pages through http"?
> >
> > Thanks
> > Regards
> > Martin
>
>


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-05 Thread Norman Franke
While not addressing your problem exactly, I have found issues with cookies 
doing things like this. You try to login via HTTPS. Your session is created as 
a secure cookie, and when you go back to regular HTTP after login, you have no 
session cookie. I created a new, non-secure cookie, but that’s definitely a 
hack and has some issues. I don’t use @Secure since I could never get anything 
working correctly, and so redirect myself.

You could try using something like nginx to do SSL to plan old tomcat running 
in HTTP mode. Using the @Secure annotation will still cause problems, since it 
will want to use HTTPS to / from tomcat. This would likely work, but local 
users won’t benefit from HTTPS for login. However, you could potentially us 
nginx to handle that as well, forcing HTTPS for a specific URL. 

You may be able to use your own MetaDataLocator service to determine that 
client IP address and decide there. Obviously if you are doing a reverse proxy, 
the Http Request IP address won’t necessarily be the client’s IP address, but 
most proxies add a header you could use.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com



On Feb 5, 2015, at 4:16 AM, Martin Nagl  wrote:

> Hi all,
> 
> we have a Tapesty5 application deployed on Tomcat + Apache httpd. In
> production environment at our customer, the application should be deployed
> / accessed like this:
>  - Tomcat is running on a server in internal network on port 8080.
>  - There is an Apache HTTP server with reverse proxy to Tomcat (AJP)
> accessible from the internet on port 80.
>  - Internal users should access the application on Tomcat directly without
> https on http://servername.intranet.customer.sk:8080/appname/login
>  - External users should access the application through Apache httpd, with
> https, on https://apps.customer.sk/appname/login
> 
> 1. Initiallly, I had no @Secure annotations on my pages. The application
> worked correctly from internal network, but not from internet. From
> internet, I could access the login page through https, but after submit, I
> get somehow redirected to http which ends with server error: Your browser
> sent a request that this server could not understand.
> Reason: You're speaking plain HTTP to an SSL-enabled server port.
> Instead use the HTTPS scheme to access this URL, please.
> 
> 2. I have annotated all my pages with @Secure. The aplication now works
> correctly from internet, but not from internal network. From internal
> network, I can access
> http://servername.intranet.customer.sk:8080/appname/login but I get
> redirected to https at
> https://servername.intranet.customer.sk:8080/appname/login. - This is not
> desired, I would like the application to continue in http mode.
> 
> Is this setup possible with a Tapestry5 application (a single deployed
> instance)?
> Is there some way to tell Tapestry "If you're accessed through https, then
> serve all pages through https, else if you're accessed through http, then
> serve all pages through http"?
> 
> Thanks
> Regards
> Martin



Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-05 Thread Martin Nagl
Aha, sorry for the "hardcoded" part, I can see that the number 80 is only
used to determine whether to include port in URL or not :) Will try to
provide HOSTPORT instead.

M.

On Thu, Feb 5, 2015 at 4:53 PM, Martin Nagl  wrote:

> I am using Tapestry 5.3.6.
>
> I have not overridden BaseURLSource or anything simmilar.
> I have not provided HOSTPORT or HOSTPORT_SECURE.
>
> Looking at the code in BaseURLSourceImpl, maybe my problem is that http
> communication goes on port 8080, not 80 as expected (hardcoded in
> BaseURLSourceImpl). I will try to experiment more with the settings above
> and figure out how to test it on my local machine.
>
> Regards
> Martin
>


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-05 Thread Martin Nagl
I am using Tapestry 5.3.6.

I have not overridden BaseURLSource or anything simmilar.
I have not provided HOSTPORT or HOSTPORT_SECURE.

Looking at the code in BaseURLSourceImpl, maybe my problem is that http
communication goes on port 8080, not 80 as expected (hardcoded in
BaseURLSourceImpl). I will try to experiment more with the settings above
and figure out how to test it on my local machine.

Regards
Martin


Re: Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-05 Thread Jonathan Barker
I've faced similar issues in the past (see TAP5-167), but these days I
just access everything through https.

It does sound like you were using @Secure on your login page, but
nowhere else.  I seem to recall that if you use @Secure on one page,
then it will try to use http on pages NOT marked with @Secure.  To get
around that, you end up skipping the @Secure and sending passwords
plaintext over your internal network - not a great practice.

I am curious if anyone ever came up with a good way of doing what you
are trying to do.

A few questions that come to mind are:
Which version of T5?
Have you overridden anything like BaseURLSource?
Have you provided any parameters like HOSTPORT or HOSTPORT_SECURE?


On Thu, Feb 5, 2015 at 4:16 AM, Martin Nagl  wrote:
> Hi all,
>
> we have a Tapesty5 application deployed on Tomcat + Apache httpd. In
> production environment at our customer, the application should be deployed
> / accessed like this:
>   - Tomcat is running on a server in internal network on port 8080.
>   - There is an Apache HTTP server with reverse proxy to Tomcat (AJP)
> accessible from the internet on port 80.
>   - Internal users should access the application on Tomcat directly without
> https on http://servername.intranet.customer.sk:8080/appname/login
>   - External users should access the application through Apache httpd, with
> https, on https://apps.customer.sk/appname/login
>
> 1. Initiallly, I had no @Secure annotations on my pages. The application
> worked correctly from internal network, but not from internet. From
> internet, I could access the login page through https, but after submit, I
> get somehow redirected to http which ends with server error: Your browser
> sent a request that this server could not understand.
> Reason: You're speaking plain HTTP to an SSL-enabled server port.
> Instead use the HTTPS scheme to access this URL, please.
>
> 2. I have annotated all my pages with @Secure. The aplication now works
> correctly from internet, but not from internal network. From internal
> network, I can access
> http://servername.intranet.customer.sk:8080/appname/login but I get
> redirected to https at
> https://servername.intranet.customer.sk:8080/appname/login. - This is not
> desired, I would like the application to continue in http mode.
>
> Is this setup possible with a Tapestry5 application (a single deployed
> instance)?
> Is there some way to tell Tapestry "If you're accessed through https, then
> serve all pages through https, else if you're accessed through http, then
> serve all pages through http"?
>
> Thanks
> Regards
> Martin



-- 
Jonathan Barker
ITStrategic

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



Access a T5 app through both http (Tomcat) and https (Apache httpd + AJP + Tomcat)

2015-02-05 Thread Martin Nagl
Hi all,

we have a Tapesty5 application deployed on Tomcat + Apache httpd. In
production environment at our customer, the application should be deployed
/ accessed like this:
  - Tomcat is running on a server in internal network on port 8080.
  - There is an Apache HTTP server with reverse proxy to Tomcat (AJP)
accessible from the internet on port 80.
  - Internal users should access the application on Tomcat directly without
https on http://servername.intranet.customer.sk:8080/appname/login
  - External users should access the application through Apache httpd, with
https, on https://apps.customer.sk/appname/login

1. Initiallly, I had no @Secure annotations on my pages. The application
worked correctly from internal network, but not from internet. From
internet, I could access the login page through https, but after submit, I
get somehow redirected to http which ends with server error: Your browser
sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.

2. I have annotated all my pages with @Secure. The aplication now works
correctly from internet, but not from internal network. From internal
network, I can access
http://servername.intranet.customer.sk:8080/appname/login but I get
redirected to https at
https://servername.intranet.customer.sk:8080/appname/login. - This is not
desired, I would like the application to continue in http mode.

Is this setup possible with a Tapestry5 application (a single deployed
instance)?
Is there some way to tell Tapestry "If you're accessed through https, then
serve all pages through https, else if you're accessed through http, then
serve all pages through http"?

Thanks
Regards
Martin


Re: requireJS modules in T5 library

2014-11-27 Thread Jan Fryblik


Thank you both for answers, I've made adjustments and now it works and  
looks fine. Great!




On Thu, 27 Nov 2014 18:06:20 +0100, Thiago H de Paula Figueiredo  
 wrote:


On Thu, 27 Nov 2014 09:35:36 -0200, Jan Fryblik  
 wrote:



Hello guys,


Hi!


scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount);


I'm not sure why people want to use .invoke() for simple initializations  
like this.


I'd do just:  
scriptSupport.require("LastArticle").with(previewLinesCount);


and
define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"],  
function ($, dom) {

   return function (rowsCount) {
   $('.preview').ThreeDots({ max_rows: rowsCount });
   }
});

As Chris said, Tapestry 5.4 uses RequireJS, so you should write your JS  
modules as valid RequireJS (AMD) >modules, and your code doesn't look  
valid.


--Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br




--
S pozdravem



Mgr. Jan Fryblík
jednatel
+420 739 094 784
jan.fryb...@ebrothers.cz

eBrothers Software s.r.o. | www.ebrothers.cz

Re: requireJS modules in T5 library

2014-11-27 Thread Thiago H de Paula Figueiredo
On Thu, 27 Nov 2014 09:35:36 -0200, Jan Fryblik   
wrote:



Hello guys,


Hi!


scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount);


I'm not sure why people want to use .invoke() for simple initializations  
like this.


I'd do just: scriptSupport.require("LastArticle").with(previewLinesCount);

and

define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function  
($, dom) {

return function (rowsCount) {
$('.preview').ThreeDots({ max_rows: rowsCount });
}
});

As Chris said, Tapestry 5.4 uses RequireJS, so you should write your JS  
modules as valid RequireJS (AMD) modules, and your code doesn't look valid.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

Re: requireJS modules in T5 library

2014-11-27 Thread Geoff Callender
Your module is not returning anything and init is invisible outside the 
module's function. After the init function add this...

return {
init : init
};

The rest looks fine, assuming that you've checked that threedots is AMD 
compliant. if it isn't then you'll have to shim it (search the mailing list for 
contributeModuleManager).

Cheers,
Geoff


On 27 Nov 2014, at 10:35 pm, Jan Fryblik  wrote:

> 
> 
> Hello guys,
> 
> I'm fighting a bit with RequireJS modules. So...
> 
> I have Tapestry library 'cms' with 'LastArticle' component. So I have simple 
> RequireJS module in 
> resources/META-INF/modules/cms folder with following code
> 
> define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function ($, 
> dom)
> {
> init = function (rowsCount)
> {
> $('.preview').ThreeDots({ max_rows: rowsCount });
> }
> });
> 
> and in LastArticle.java I call:
> 
> scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount);
> 
> in SetupRender method.
> 
> In javascript console then I can see error "TypeError: moduleLib is 
> undefined". So either I still don't fully understand this concept or I've 
> missed something. Could you please help me? Thanks a lot in advance!
> 
> Best,
> Jan



requireJS modules in T5 library

2014-11-27 Thread Jan Fryblik



Hello guys,

I'm fighting a bit with RequireJS modules. So...

I have Tapestry library 'cms' with 'LastArticle' component. So I have  
simple RequireJS module in

resources/META-INF/modules/cms folder with following code

define(["jquery", "t5/core/dom", "jquery/jquery.threedots.min"], function  
($, dom)

{
init = function (rowsCount)
{
$('.preview').ThreeDots({ max_rows: rowsCount });
}
});

and in LastArticle.java I call:

scriptSupport.require("LastArticle").invoke("init").with(previewLinesCount);

in SetupRender method.

In javascript console then I can see error "TypeError: moduleLib is  
undefined". So either I still don't fully understand this concept or I've  
missed something. Could you please help me? Thanks a lot in advance!


Best,
Jan

Re: [T5] How can I validate if a script is present ?

2014-09-26 Thread Thiago H de Paula Figueiredo
On Fri, 26 Sep 2014 16:12:18 -0300, Carlos Gómez Montiel  
 wrote:


Thank you for your help and support Thiago, I prefer wait to T5.4  
release ;)


You can already try the 5.4-beta-24, which is very close to final.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



RE: [T5] How can I validate if a script is present ?

2014-09-26 Thread Carlos Gómez Montiel
Thank you for your help and support Thiago, I prefer wait to T5.4 release ;)
Regards

-Mensaje original-
De: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] 
Enviado el: viernes, 26 de septiembre de 2014 01:23 p.m.
Para: Tapestry users
Asunto: Re: [T5] How can I validate if a script is present ?

On Fri, 26 Sep 2014 14:04:01 -0300, Carlos Gómez Montiel  
wrote:

> Hi Thiago

Hi!

> refresh
> 
> 
>  t:parameters="options">
> 

If you had mentioned before you were trying to show it in a Zone update, we 
would have understood the problem earlier. You can use blocks in non-AJAX 
scenarios too.

In your case, using your own code, not the one from tapestry5-jquery, the check 
for whether the Google Maps is already loaded should be part of your own code. 
Not a good solution.

Ultimately the solution is to use Require.js or a similar solution and let it 
handle the client-side dependencies and ensure the loading order of JavaScript 
files. Tapestry 5.4 supports it out-of-the-box.

-- 
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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


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



Re: [T5] How can I validate if a script is present ?

2014-09-26 Thread Thiago H de Paula Figueiredo
On Fri, 26 Sep 2014 14:04:01 -0300, Carlos Gómez Montiel  
 wrote:



Hi Thiago


Hi!


refresh


t:parameters="options">




If you had mentioned before you were trying to show it in a Zone update,  
we would have understood the problem earlier. You can use blocks in  
non-AJAX scenarios too.


In your case, using your own code, not the one from tapestry5-jquery, the  
check for whether the Google Maps is already loaded should be part of your  
own code. Not a good solution.


Ultimately the solution is to use Require.js or a similar solution and let  
it handle the client-side dependencies and ensure the loading order of  
JavaScript files. Tapestry 5.4 supports it out-of-the-box.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



RE: [T5] How can I validate if a script is present ?

2014-09-26 Thread Carlos Gómez Montiel
Hi Thiago

> The component being inside a block (you mean ?) shouldn't make a 
> difference. How are you rendering this block?

Yeap, to simplify the problem, the tapestry5-jquery's GMap component has the 
same problem, with the next code the component renders correctly the google map.

Test.tml

Test.java
public class Test  {
public JSONObject getOptions(){
JSONObject json = new JSONObject();
return json;
}
}

With the next code the GMap component does not render correctly the map after 
you click the refresh link (to show the block).

Test2.tml:
refresh





Test2.java:
public class Test2 {

@Inject
private Block blockResults;

Object onActionFromRefresh() {
return blockResults;
}

public JSONObject getOptions(){
JSONObject json = new JSONObject();
return json;
}
}

When you press refresh link the browser (Chrome) javascript console error is: 
"Failed to execute 'write' on 'Document': It isn't possible to write into a 
document from an asynchronously-loaded external script unless it is explicitly 
opened."


Reference: 
tapestry5-jquery's GMap component source code: 
https://github.com/got5/tapestry5-jquery/blob/master/src/main/java/org/got5/tapestry5/jquery/components/GMap.java

tapestry5-jquery's GMap component example:  http://tapestry5 
jquery.com/components/docsgmap;jsessionid=A5260C324E4C8E97299C0E556621697D.FA4B475DA717#

Thanks in advance

-Mensaje original-
De: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] 
Enviado el: viernes, 26 de septiembre de 2014 08:20 a.m.
Para: Tapestry users
Asunto: Re: [T5] How can I validate if a script is present ?

On Fri, 26 Sep 2014 01:09:14 -0300, Carlos Gómez Montiel  
wrote:

> Hi Thiago, thank you for your answer :) I'm using Tapestry 5.3.7

Hi!

> Testing it, I have created a file (googlemaps.js) with the content of 
> the url: "https://maps.googleapis.com/maps/api/js?v=3.exp"; and 
> included it inside component:
> @Import(library =
> "classpath:mx/kka/msurvey/web/view/components/maps/googlemaps.js")
> public class GMapShow {
> }

This way (which I suggested, I'm sorry), with the external library included in 
setupRender() and your code that uses it included via @Import, the two JS files 
are included in the wrong order, because @Import is processed before 
setupRender(). Please try this:

@Inject
@Path("classpath:mx/kka/msurvey/web/view/components/maps/googlemaps.js")
private Asset myCode;

public void setupRender() {

javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp";);
javaScriptSupport.importJavaScriptLibrary(myCode);
)

This will guarantee your code will be included after the Google Maps API.

> But the result is the same, the map is rendered correctly if the 
> component is outside a block but if the component is inside a block, 
> the map is not renderer.

The component being inside a block (you mean ?) shouldn't make a 
difference. How are you rendering this block?

>> That's why we ask people more information and snippets of code when 
>> asking help: the original question in the subject of the message (how 
>> can I validate if a script is present), which, by the way, is 
>> JavaScript-specific, not Tapestry-specific, wouldn't need to be asked.
>
> Ok Thiago, thank you for your feedback.
> I think the question is about tapestry because I need to validate 
> inside a tapestry's component if its parent page contains the string 
> 

Re: [T5] How can I validate if a script is present ?

2014-09-26 Thread Thiago H de Paula Figueiredo
On Fri, 26 Sep 2014 01:09:14 -0300, Carlos Gómez Montiel  
 wrote:



Hi Thiago, thank you for your answer :)
I'm using Tapestry 5.3.7


Hi!

Testing it, I have created a file (googlemaps.js) with the content of  
the url: "https://maps.googleapis.com/maps/api/js?v=3.exp"; and included  
it inside component:
@Import(library =  
"classpath:mx/kka/msurvey/web/view/components/maps/googlemaps.js")

public class GMapShow {
}


This way (which I suggested, I'm sorry), with the external library  
included in setupRender() and your code that uses it included via @Import,  
the two JS files are included in the wrong order, because @Import is  
processed before setupRender(). Please try this:


@Inject
@Path("classpath:mx/kka/msurvey/web/view/components/maps/googlemaps.js")
private Asset myCode;

public void setupRender() {

javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp";);
javaScriptSupport.importJavaScriptLibrary(myCode);
)

This will guarantee your code will be included after the Google Maps API.

But the result is the same, the map is rendered correctly if the  
component is outside a block but if the component is inside a block, the  
map is not renderer.


The component being inside a block (you mean ?) shouldn't make a  
difference. How are you rendering this block?


That's why we ask people more information and snippets of code when  
asking help: the original question in the subject of the message (how  
can I validate if a script is present), which, by the way, is  
JavaScript-specific, not Tapestry-specific, wouldn't need to be asked.


Ok Thiago, thank you for your feedback.
I think the question is about tapestry because I need to validate inside  
a tapestry's component if its parent page contains the string 

RE: [T5] How can I validate if a script is present ?

2014-09-25 Thread Carlos Gómez Montiel
Hi Lance, thank you for your answer.

Yes, I have tried with exanpe library (versión 1.2.1) but it throws the 
javascript console error:
Uncaught TypeError: Cannot set property 'ajaxValidator' of undefined 
exanpe-t5-lib.js:737
No Tapestry.Initializer function for : gMapBuilder: jQuery.fn.jQuery.init[0]

Additionally I have tried with tapestry5-jquery's map component but the result 
is the same, the map is renderer ok if it is outside a block, if the component 
is inside a block the map is never renderer.

Test2.tml:

refrescar





Test2.java:
public class Test2 {

public JSONObject getOptions() {
JSONObject json = new JSONObject();
return json;
}
@Inject
private Block blockResults;

Object onActionFromRefrescar() {
return blockResults;
}
}



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



RE: [T5] How can I validate if a script is present ?

2014-09-25 Thread Carlos Gómez Montiel
Hi Thiago, thank you for your answer :)
I'm using Tapestry 5.3.7

> Where's your JavaScript?
For google maps, you have to access the javascript library from a URL, so my 
javascript is inside the url: "https://maps.googleapis.com/maps/api/js?v=3.exp";

> How are you including it?

public class GMapShow {
@Inject
private JavaScriptSupport javaScriptSupport;

public void setupRender() {

javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp";);
}
}

> If you put your JavaScript code inside a .js file and included using @Import 
> or JavaScriptSupport.importJavaScriptLibrary(), your code would be 
> automatically included after the library you're using.

Testing it, I have created a file (googlemaps.js) with the content of the url: 
"https://maps.googleapis.com/maps/api/js?v=3.exp"; and included it inside 
component:
@Import(library = 
"classpath:mx/kka/msurvey/web/view/components/maps/googlemaps.js")
public class GMapShow {
}

But the result is the same, the map is rendered correctly if the component is 
outside a block but if the component is inside a block, the map is not renderer.

I suppose the javascript inside 
"https://maps.googleapis.com/maps/api/js?v=3.exp"; is loading another javascript 
files and maybe the component is rendered before all all javascript libraries 
are loaded. 
The javascript has snipets that looks like:

getScript("https://maps.gstatic.com/maps-api-v3/api/js/18/5/intl/es_ALL/main.js";);
apiLoad([0.00999776482582,[[["https://mts0.googleapis.com/vt?lyrs=m@27500\u0026src=api\u0026hl=es-ES\u0026","https://mts1.googleapis.com
 .

> That's why we ask people more information and snippets of code when asking 
> help: the original question in the subject of the message (how can I validate 
> if a script is present), which, by the way, is JavaScript-specific, not 
> Tapestry-specific, wouldn't need to be asked.

Ok Thiago, thank you for your feedback. 
I think the question is about tapestry because I need to validate inside a 
tapestry's component if its parent page contains the string 

RE: [T5] How can I validate if a script is present ?

2014-09-25 Thread Lance Java
Have you seen the exanpe gmap component?

http://exanpe-t5-lib.appspot.com/components/googlemap/example2
 On 25 Sep 2014 14:45, "Carlos Gómez Montiel"  wrote:

> Hi Thiago
> Ok, I will more specific:
>
>  I'm developing a Tapestry component (GMapShow) that renders a google map.
> If I include the google maps javascript library directly in this component,
> the map is not render if the component is inside a block, so I need to
> include the library BEFORE the block (with the GMapShow component) is
> rendered.
>
> So, I have created a component to only include the Google Maps library:
> public class ImportGMapLib {
>
> @Inject
> private JavaScriptSupport javaScriptSupport;
>
> public void beginRender() {
> javaScriptSupport.importJavaScriptLibrary("
> https://maps.googleapis.com/maps/api/js?v=3.exp";);
> }
> }
>
> My "Test.tml" looks like this:
>
> 
>
> refresh
> 
> 
> 
> 
>
> I need to validate from GMapEdit component if the javascript library "
> https://maps.googleapis.com/maps/api/js?v=3.exp"; was imported, or
> validate inside GMapEdit if the ImportGMapLib component was invoked inside
> Test.tml.
>
> Thanks in advance.
>
>
> -Mensaje original-----
> De: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com]
> Enviado el: jueves, 25 de septiembre de 2014 07:29 a.m.
> Para: Tapestry users
> Asunto: Re: [T5] How can I validate if a script is present ?
>
> On Wed, 24 Sep 2014 21:59:44 -0300, Carlos Gómez Montiel 
> wrote:
>
> > Hi ¡
>
> Hi!
>
> > How can I validate from a component if a script is inside  tag
> > of a container page?
>
> I'm sorry, but I have no idea which scenario are you trying to describe
> here. Which validation is this?
>
> --
> Thiago H. de Paula Figueiredo
> Tapestry, Java and Hibernate consultant and developer
> http://machina.com.br
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [T5] How can I validate if a script is present ?

2014-09-25 Thread Thiago H de Paula Figueiredo
On Thu, 25 Sep 2014 10:45:44 -0300, Carlos Gómez Montiel  
 wrote:



Hi Thiago
Ok, I will more specific:


Hi!

Thanks for being more specific. :) We want to help, but it's quite hard

 I'm developing a Tapestry component (GMapShow) that renders a google  
map. If I include the google maps javascript library directly in this  
component, the map is not render if the component is inside a block, so  
I need to include the library BEFORE the block (with the GMapShow  
component) is rendered.


So, I have created a component to only include the Google Maps library:
public class ImportGMapLib {

@Inject
private JavaScriptSupport javaScriptSupport;

public void beginRender() {

javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp";);
}
}


By the way, from T5.4 on, you can use https://, http:// and //: in @Import.

Where's your JavaScript? How are you including it? That's probably the  
source of your problem.
If you put your JavaScript code inside a .js file and included using  
@Import or JavaScriptSupport.importJavaScriptLibrary(), your code would be  
automatically included after the library you're using.


That's why we ask people more information and snippets of code when asking  
help: the original question in the subject of the message (how can I  
validate if a script is present), which, by the way, is  
JavaScript-specific, not Tapestry-specific, wouldn't need to be asked.


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



RE: [T5] How can I validate if a script is present ?

2014-09-25 Thread Carlos Gómez Montiel
Hi Thiago
Ok, I will more specific:

 I'm developing a Tapestry component (GMapShow) that renders a google map. If I 
include the google maps javascript library directly in this component, the map 
is not render if the component is inside a block, so I need to include the 
library BEFORE the block (with the GMapShow component) is rendered.

So, I have created a component to only include the Google Maps library:
public class ImportGMapLib {

@Inject
private JavaScriptSupport javaScriptSupport;

public void beginRender() {

javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp";);
}
}

My "Test.tml" looks like this:



refresh





I need to validate from GMapEdit component if the javascript library 
"https://maps.googleapis.com/maps/api/js?v=3.exp"; was imported, or validate 
inside GMapEdit if the ImportGMapLib component was invoked inside Test.tml.

Thanks in advance.


-Mensaje original-
De: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] 
Enviado el: jueves, 25 de septiembre de 2014 07:29 a.m.
Para: Tapestry users
Asunto: Re: [T5] How can I validate if a script is present ?

On Wed, 24 Sep 2014 21:59:44 -0300, Carlos Gómez Montiel  
wrote:

> Hi ¡

Hi!

> How can I validate from a component if a script is inside  tag 
> of a container page?

I'm sorry, but I have no idea which scenario are you trying to describe here. 
Which validation is this?

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer http://machina.com.br

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


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



Re: [T5] How can I validate if a script is present ?

2014-09-25 Thread Thiago H de Paula Figueiredo
On Wed, 24 Sep 2014 21:59:44 -0300, Carlos Gómez Montiel  
 wrote:



Hi ¡


Hi!


How can I validate from a component if a script is inside  tag of a
container page?


I'm sorry, but I have no idea which scenario are you trying to describe  
here. Which validation is this?


--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



[T5] How can I validate if a script is present ?

2014-09-24 Thread Carlos Gómez Montiel
Hi ¡

How can I validate from a component if a script is inside  tag of a
container page?

 

Thanks in advance.

 



RE: How can I add a component inside another component without template in T5?

2014-09-24 Thread Carlos Gómez Montiel
it only was a existencial question ;)
Thank you for your answer Thiago

-Mensaje original-
De: Thiago H de Paula Figueiredo [mailto:thiag...@gmail.com] 
Enviado el: miércoles, 24 de septiembre de 2014 06:07 p.m.
Para: Tapestry users
Asunto: Re: How can I add a component inside another component without template 
in T5?

On Wed, 24 Sep 2014 19:35:44 -0300, Carlos Gómez Montiel  
wrote:

> I have a component without template, how can I add another component
> (render) inside it?

You cannot. Component instances need to be declared inside a template.  
Tapestry templates are strictly static in structure, even having completely 
dynamic behavior, and what you're asking needs dynamic structure. Static 
structure allows Tapestry to be very fast and use less memory at the same time.

In a higher level, what you're trying to do? Without the answer, I can suggest 
you creating the template and using the If component:

http://tapestry.apache.org/schema/tapestry_5_3.xsd";>





In your Java class:

public boolean ifShowTextField() {
return ...
}

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer http://machina.com.br

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


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



Re: How can I add a component inside another component without template in T5?

2014-09-24 Thread Thiago H de Paula Figueiredo
On Wed, 24 Sep 2014 19:35:44 -0300, Carlos Gómez Montiel  
 wrote:



I have a component without template, how can I add another component
(render) inside it?


You cannot. Component instances need to be declared inside a template.  
Tapestry templates are strictly static in structure, even having  
completely dynamic behavior, and what you're asking needs dynamic  
structure. Static structure allows Tapestry to be very fast and use less  
memory at the same time.


In a higher level, what you're trying to do? Without the answer, I can  
suggest you creating the template and using the If component:


http://tapestry.apache.org/schema/tapestry_5_3.xsd";>





In your Java class:

public boolean ifShowTextField() {
return ...
}

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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



How can I add a component inside another component without template in T5?

2014-09-24 Thread Carlos Gómez Montiel
I have a component without template, how can I add another component
(render) inside it?

 

public class Component1 {

 

void beginRender(MarkupWriter writer) {

// How can I render for example a tapestry's textfield component
inside this component without have a template?

}

 

}

 

Note: Component1 has no template (tml file)

 



[T5.4] Does exanpe-t5-lib work with Tapestry 5.4 ?

2014-06-10 Thread D Tim Cummings
I am using exanpe-t5-lib to include some google maps on a page in Tapestry 5.3 
and want to upgrade my app to 5.4.  

exanpe-t5-lib version 1.3.0-SNAPSHOT from the master branch caused problems 
starting my app so I have checked out branch br_5.4 from github 
exanpe/exanpe-t5-lib (version 2.0.0-SNAPSHOT). Now when my app renders the page 
containing the google map it doesn't include all the javascript files. I have 
added yahoo-dom-event.js because it was missing some YAHOO features. Now I get 
a javascript error


RequireJS error: require: google.maps.InfoWindow is not a constructor

at console.js (line 104)


Regards

Tim


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Peformance loading huge data with T5 grid.

2013-12-23 Thread Howard Lewis Ship
The key to performance with Grid is to look to the GridDataModel and
provide a smarter caching version that limits the amount of data taken from
the database.

That being said, Grid is an scaffolding component ... much like
BeanEditForm. It is meant to be useful but if a grid view of some form is
essential in your application, you will benefit by building something
simpler and custom to your application.


On Sun, Dec 22, 2013 at 5:54 AM, Chung Khanh Duy <
chungkhanhduy1...@gmail.com> wrote:

> Hi Antal,
>
> Thanks for your suggestion, I am afraid that i can not use this component
> because actually we had existing grid component extends tapestry grid, but
> it's helpful because i can take a look to know how to customize grid to
> adapt with huge records for increasing peformance.
>
> Thanks again,
> Duy
>
> Vào Chủ nhật, ngày 22 tháng mười hai năm 2013, A.T. van Kalleveen đã viết:
>
> > Hello Duy,
> >
> > Have a look at the weaves Tapestry 5.x library, it contains a Pagedgrid
> > component with a custom gridsource which will never query the total
> number
> > of rows in a dataset and uses paging to increase performance, especially
> > for large datasets. We use it to scroll through recordssets of over 1
> > million records.
> >
> > The code is here: https://github.com/intercommit/Weaves
> >
> > A demo is here: http://intercommitweavesdemo.intercommit.cloudbees.net/
> >
> > Regards,
> > Antal
> >
> > -Oorspronkelijk bericht- From: Chung Khanh Duy
> > Sent: Sunday, December 22, 2013 10:07 AM
> > To: Tapestry users
> > Subject: Peformance loading huge data with T5 grid.
> >
> > Hi experts,
> >
> > I am facing performance problem when loading over 25,000 records although
> > have set paging = true, the time to complete loading is over 30s. So do
> > someone have any suggestion or idea to improve that ?
> >
> > Any suggestion or idea will be appreciated .
> >
> > Thanks,
> > Duy
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> > For additional commands, e-mail: users-h...@tapestry.apache.org
> >
> >
>
> --
> Chung Khánh Duy
> Project Support Manager
> Formos
>



-- 
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: Peformance loading huge data with T5 grid.

2013-12-22 Thread Chung Khanh Duy
Hi Antal,

Thanks for your suggestion, I am afraid that i can not use this component
because actually we had existing grid component extends tapestry grid, but
it's helpful because i can take a look to know how to customize grid to
adapt with huge records for increasing peformance.

Thanks again,
Duy

Vào Chủ nhật, ngày 22 tháng mười hai năm 2013, A.T. van Kalleveen đã viết:

> Hello Duy,
>
> Have a look at the weaves Tapestry 5.x library, it contains a Pagedgrid
> component with a custom gridsource which will never query the total number
> of rows in a dataset and uses paging to increase performance, especially
> for large datasets. We use it to scroll through recordssets of over 1
> million records.
>
> The code is here: https://github.com/intercommit/Weaves
>
> A demo is here: http://intercommitweavesdemo.intercommit.cloudbees.net/
>
> Regards,
> Antal
>
> -Oorspronkelijk bericht- From: Chung Khanh Duy
> Sent: Sunday, December 22, 2013 10:07 AM
> To: Tapestry users
> Subject: Peformance loading huge data with T5 grid.
>
> Hi experts,
>
> I am facing performance problem when loading over 25,000 records although
> have set paging = true, the time to complete loading is over 30s. So do
> someone have any suggestion or idea to improve that ?
>
> Any suggestion or idea will be appreciated .
>
> Thanks,
> Duy
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-- 
Chung Khánh Duy
Project Support Manager
Formos


Re: Peformance loading huge data with T5 grid.

2013-12-22 Thread A.T. van Kalleveen

Hello Duy,

Have a look at the weaves Tapestry 5.x library, it contains a Pagedgrid 
component with a custom gridsource which will never query the total number 
of rows in a dataset and uses paging to increase performance, especially for 
large datasets. We use it to scroll through recordssets of over 1 million 
records.


The code is here: https://github.com/intercommit/Weaves

A demo is here: http://intercommitweavesdemo.intercommit.cloudbees.net/

Regards,
Antal

-Oorspronkelijk bericht- 
From: Chung Khanh Duy

Sent: Sunday, December 22, 2013 10:07 AM
To: Tapestry users
Subject: Peformance loading huge data with T5 grid.

Hi experts,

I am facing performance problem when loading over 25,000 records although
have set paging = true, the time to complete loading is over 30s. So do
someone have any suggestion or idea to improve that ?

Any suggestion or idea will be appreciated .

Thanks,
Duy 




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



Re: Peformance loading huge data with T5 grid.

2013-12-22 Thread Chung Khanh Duy
Thanks for your suggestion. I will take a look on it.

Duy.


On Sun, Dec 22, 2013 at 5:39 PM, François Facon wrote:

> Hi Duy,
>
> Did you have a look at
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources
> ?
> To support access to large data, you will have to provide a class that
> implement  GridDataSource
> (
>
> http://tapestry.apache.org/5.3.7/apidocs/org/apache/tapestry5/grid/GridDataSource.html
> ).
> See the class PersonPagedDataSource.java for more details.
>
> Kudos to Geoff
> François
>
>
> 2013/12/22 Chung Khanh Duy 
>
> > Hi experts,
> >
> > I am facing performance problem when loading over 25,000 records although
> > have set paging = true, the time to complete loading is over 30s. So do
> > someone have any suggestion or idea to improve that ?
> >
> > Any suggestion or idea will be appreciated .
> >
> > Thanks,
> > Duy
> >
>



-- 
Chung Khánh Duy
Project Support Manager
Formos


Re: Peformance loading huge data with T5 grid.

2013-12-22 Thread François Facon
Hi Duy,

Did you have a look at
http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/griddatasources
?
To support access to large data, you will have to provide a class that
implement  GridDataSource
(
http://tapestry.apache.org/5.3.7/apidocs/org/apache/tapestry5/grid/GridDataSource.html
).
See the class PersonPagedDataSource.java for more details.

Kudos to Geoff
François


2013/12/22 Chung Khanh Duy 

> Hi experts,
>
> I am facing performance problem when loading over 25,000 records although
> have set paging = true, the time to complete loading is over 30s. So do
> someone have any suggestion or idea to improve that ?
>
> Any suggestion or idea will be appreciated .
>
> Thanks,
> Duy
>


Peformance loading huge data with T5 grid.

2013-12-22 Thread Chung Khanh Duy
Hi experts,

I am facing performance problem when loading over 25,000 records although
have set paging = true, the time to complete loading is over 30s. So do
someone have any suggestion or idea to improve that ?

Any suggestion or idea will be appreciated .

Thanks,
Duy


Re: T5 Tynamo RestEasy, discovering all rest resources and paths

2013-10-31 Thread Alejandro Scandroli
Hi Daniel

Take a look at RESTEasy's JSAPIWriter [1] and how it was integrated
with tapestry-resteasy [2]
I think you will find everything you need in there.

If you need even more discoverability than that I'd recommend to use
something like Swagger [3]

1: 
https://svn.code.sf.net/p/resteasy/svn/trunk/jaxrs/resteasy-jsapi/src/main/java/org/jboss/resteasy/jsapi/JSAPIWriter.java
2: 
http://svn.codehaus.org/tynamo/trunk/tapestry-resteasy/src/main/java/org/tynamo/resteasy/JSAPIRequestFilter.java
3: http://jira.codehaus.org/browse/TYNAMO-231 ;-)

Cheers.
Alejandro.


On Thu, Oct 31, 2013 at 8:16 AM, Daniel Jue  wrote:
> Hi,  I have a bunch of rest services, across a couple modules.  One of the
> rest services is a meta type of service, where the methods (via
> parameter-less @Get requests) return things like canonical values/enums
> used as query values elsewhere in the system.
>
>
> Anyway, some member(s) of our team like to change the rest paths around and
> this breaks the JS front end of course.
>
> Is there a way to collect:
>
> 1) The rest services paths for each service (i.e. the @Path value on the
> class)
> 2) The individual resources' paths (i.e. the @Path on the methods)
>
> Oh and I guess knowing the root rest path as defined in your module would
> be nice too.
>
>
> If I had the complete or relative paths to the individual methods, that
> would solve my problem 100%.
>
> The plan is to then expose the available paths through a method under the
> meta rest service.
>
> It's not really HATEOAS, I just want to keep the JS guys and back end guys
> from stabbing each other (myself included)

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



T5 Tynamo RestEasy, discovering all rest resources and paths

2013-10-31 Thread Daniel Jue
Hi,  I have a bunch of rest services, across a couple modules.  One of the
rest services is a meta type of service, where the methods (via
parameter-less @Get requests) return things like canonical values/enums
used as query values elsewhere in the system.


Anyway, some member(s) of our team like to change the rest paths around and
this breaks the JS front end of course.

Is there a way to collect:

1) The rest services paths for each service (i.e. the @Path value on the
class)
2) The individual resources' paths (i.e. the @Path on the methods)

Oh and I guess knowing the root rest path as defined in your module would
be nice too.


If I had the complete or relative paths to the individual methods, that
would solve my problem 100%.

The plan is to then expose the available paths through a method under the
meta rest service.

It's not really HATEOAS, I just want to keep the JS guys and back end guys
from stabbing each other (myself included)


Re: T5 IOC Integration Questions

2013-09-27 Thread Martin Kersten
Norman, I implemented something I called Invoker lately. It was quite easy
to do field injection and calling methods where you inject all parameters.
The mixed part was quite difficult though (provide some parameters and
inject the others). Also be aware of that the ordering of methods is not
guaranteed in any way using JDK 7 192 and above (getDeclaredMethods and
getMethods along with getConstructors now return methods in random order).
I fixed the issue by using ASM and visit each method in the order they are
stored within the class file (which is the exact order you define it in the
java file).

So beside this if you are doing invocation and injection on fields and
methods go ahead. This wont take more then an hour at most. If you need
additional help, just ask. You can even invoke and create private classes /
constructors and methods which comes quite handy in case of writing test
cases.


Cheers,

Martin (Kersten)


2013/9/27 Norman Franke 

> On Sep 27, 2013, at 1:31 PM, Thiago H de Paula Figueiredo <
> thiag...@gmail.com> wrote:
>
> > On Fri, 27 Sep 2013 13:11:33 -0300, Norman Franke 
> wrote:
> >
> >> I'm trying to better integrate Atmosphere and Tapestry 5. It would make
> life easier if there was a way for T5's IOC layer to inject into an
> existing object, instead of having it need to create objects itself. I
> can't find one, if it exists.
> >
> > Unless there's some setter we could call through injection, I don't
> think any other IoC does that (injecting stuff into already existing
> objects). Most IoC features can only be implemented because the IoC
> container is instantiating the object.
> >
> > --
> > Thiago H. de Paula Figueiredo
>
>
> Spring does, as does Guice. You lose some things, but it's better than
> nothing.
>
> Norman Franke
> Answering Service for Directors, Inc.
> www.myasd.com
>
>
>
>


Re: T5 IOC Integration Questions

2013-09-27 Thread Norman Franke
On Sep 27, 2013, at 1:31 PM, Thiago H de Paula Figueiredo  
wrote:

> On Fri, 27 Sep 2013 13:11:33 -0300, Norman Franke  wrote:
> 
>> I'm trying to better integrate Atmosphere and Tapestry 5. It would make life 
>> easier if there was a way for T5's IOC layer to inject into an existing 
>> object, instead of having it need to create objects itself. I can't find 
>> one, if it exists.
> 
> Unless there's some setter we could call through injection, I don't think any 
> other IoC does that (injecting stuff into already existing objects). Most IoC 
> features can only be implemented because the IoC container is instantiating 
> the object.
> 
> -- 
> Thiago H. de Paula Figueiredo


Spring does, as does Guice. You lose some things, but it's better than nothing.

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com





Re: T5 IOC Integration Questions

2013-09-27 Thread Thiago H de Paula Figueiredo

On Fri, 27 Sep 2013 13:11:33 -0300, Norman Franke  wrote:

I'm trying to better integrate Atmosphere and Tapestry 5. It would make  
life easier if there was a way for T5's IOC layer to inject into an  
existing object, instead of having it need to create objects itself. I  
can't find one, if it exists.


Unless there's some setter we could call through injection, I don't think  
any other IoC does that (injecting stuff into already existing objects).  
Most IoC features can only be implemented because the IoC container is  
instantiating the object.


--
Thiago H. de Paula Figueiredo

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



T5 IOC Integration Questions

2013-09-27 Thread Norman Franke
I'm trying to better integrate Atmosphere and Tapestry 5. It would make life 
easier if there was a way for T5's IOC layer to inject into an existing object, 
instead of having it need to create objects itself. I can't find one, if it 
exists.

I have made a few modifications to Atmosphere that let me use the Tapestry IOC 
layer to create most objects, which allows me to use @Inject to gain access to 
my services from classes Atmosphere instantiates to process requests. I'd like 
to have a more complete solution where the Tapestry IOC layer can know about 
the AtmosphereFrameowrk and AtmosphereConfig and inject them as well.

Any thoughts?

Norman Franke
Answering Service for Directors, Inc.
www.myasd.com





Re: [5.4.22] Application 'randomly' starts choking out 404s for t5/core/dom and underscore

2013-09-27 Thread Peter Hvass
Yes have managed to get 404s by interrupting a page load.. guess it makes 
sense. But it doesn't reoccur 
for subsequent attempts whereas in the issue we're experiencing it does. Plus 
the 404s generated by interrupting 
page load are occurring regardless of GZIP being on or off (which again stands 
to reason I guess - just for verbosity). 


Will try running with GZIP off in any case and see if our issue reoccurs. 
Thanks! 

- Original Message -

From: "Peter Hvass"  
To: "Tapestry users"  
Sent: Friday, September 27, 2013 10:43:33 AM 
Subject: Re: [5.4.22] Application 'randomly' starts choking out 404s for 
t5/core/dom and underscore 

Thanks for the reply Howard; we'll run with GZIP disabled for a while and see 
if it reoccurs. 


So reloading page while modules are still loading up might reproduce perhaps? 
Will give it a go! 


We're noticing that when this starts happening it starts happening for every 
single session. :P 


Will try to find out more! 
Peter 

- Original Message - 

From: "Howard Lewis Ship"  
To: "Tapestry users"  
Sent: Thursday, September 26, 2013 7:59:27 PM 
Subject: Re: [5.4.22] Application 'randomly' starts choking out 404s for 
t5/core/dom and underscore 

You can also test your theory by disabling GZIP compression. 


On Thu, Sep 26, 2013 at 9:59 AM, Howard Lewis Ship  wrote: 

> Does this only occur during testing? I've found that we sometimes see 
> this during testing when Selenium starts loading a new page while there are 
> outstanding AMD module requests; the requests fail as if 404 just before 
> the new page content loads. 
> 
> 
> On Thu, Sep 26, 2013 at 5:51 AM, Peter Hvass  wrote: 
> 
>> Hello, 
>> 
>> 
>> Having a hard time reliably reproducing this one, wondering if anyone 
>> else has run into similar; 
>> 
>> 
>> We start getting the following in our browser consoles; 
>> 
>> GET http://sadaharu:8087/village/asset.gz/module/t5/core/dom.js 404 
>> (/asset.gz/module/t5/core/dom.js) require-2.1.8.js:1880 
>> GET http://sadaharu:8087/village/asset.gz/module/underscore.js 404 
>> (/asset.gz/module/underscore.js) require-2.1.8.js:1880 
>> Uncaught Error: Script error for: t5/core/dom 
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 
>> Uncaught Error: Script error for: underscore 
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 
>> 
>> 
>> A restart or reload (via new exception pages) fixes it. Have compared 
>> network info, mark-up and such locally between a working run and a broken 
>> run and all is identical. 
>> 
>> 
>> Am wondering if Tapestry is choking on what it provides in assets.gz from 
>> time to time. 
>> 
>> 
>> Will reply if I learn anything that will allow me to be more specific but 
>> in the meantime would be good to hear if anyone 
>> else has run into this issue. 
>> 
>> 
>> Thanks, 
>> Peter 
>> 
>> 
>> 
>> 
> 
> 
> -- 
> 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 
> 



-- 
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: [5.4.22] Application 'randomly' starts choking out 404s for t5/core/dom and underscore

2013-09-27 Thread Peter Hvass
Thanks for the reply Howard; we'll run with GZIP disabled for a while and see 
if it reoccurs. 


So reloading page while modules are still loading up might reproduce perhaps? 
Will give it a go! 


We're noticing that when this starts happening it starts happening for every 
single session. :P 


Will try to find out more! 
Peter 

- Original Message -

From: "Howard Lewis Ship"  
To: "Tapestry users"  
Sent: Thursday, September 26, 2013 7:59:27 PM 
Subject: Re: [5.4.22] Application 'randomly' starts choking out 404s for 
t5/core/dom and underscore 

You can also test your theory by disabling GZIP compression. 


On Thu, Sep 26, 2013 at 9:59 AM, Howard Lewis Ship  wrote: 

> Does this only occur during testing? I've found that we sometimes see 
> this during testing when Selenium starts loading a new page while there are 
> outstanding AMD module requests; the requests fail as if 404 just before 
> the new page content loads. 
> 
> 
> On Thu, Sep 26, 2013 at 5:51 AM, Peter Hvass  wrote: 
> 
>> Hello, 
>> 
>> 
>> Having a hard time reliably reproducing this one, wondering if anyone 
>> else has run into similar; 
>> 
>> 
>> We start getting the following in our browser consoles; 
>> 
>> GET http://sadaharu:8087/village/asset.gz/module/t5/core/dom.js 404 
>> (/asset.gz/module/t5/core/dom.js) require-2.1.8.js:1880 
>> GET http://sadaharu:8087/village/asset.gz/module/underscore.js 404 
>> (/asset.gz/module/underscore.js) require-2.1.8.js:1880 
>> Uncaught Error: Script error for: t5/core/dom 
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 
>> Uncaught Error: Script error for: underscore 
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 
>> 
>> 
>> A restart or reload (via new exception pages) fixes it. Have compared 
>> network info, mark-up and such locally between a working run and a broken 
>> run and all is identical. 
>> 
>> 
>> Am wondering if Tapestry is choking on what it provides in assets.gz from 
>> time to time. 
>> 
>> 
>> Will reply if I learn anything that will allow me to be more specific but 
>> in the meantime would be good to hear if anyone 
>> else has run into this issue. 
>> 
>> 
>> Thanks, 
>> Peter 
>> 
>> 
>> 
>> 
> 
> 
> -- 
> 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 
> 



-- 
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: [5.4.22] Application 'randomly' starts choking out 404s for t5/core/dom and underscore

2013-09-26 Thread Howard Lewis Ship
Does this only occur during testing?  I've found that we sometimes see this
during testing when Selenium starts loading a new page while there are
outstanding AMD module requests; the requests fail as if 404 just before
the new page content loads.


On Thu, Sep 26, 2013 at 5:51 AM, Peter Hvass  wrote:

> Hello,
>
>
> Having a hard time reliably reproducing this one, wondering if anyone else
> has run into similar;
>
>
> We start getting the following in our browser consoles;
>
> GET http://sadaharu:8087/village/asset.gz/module/t5/core/dom.js 404
> (/asset.gz/module/t5/core/dom.js) require-2.1.8.js:1880
> GET http://sadaharu:8087/village/asset.gz/module/underscore.js 404
> (/asset.gz/module/underscore.js) require-2.1.8.js:1880
> Uncaught Error: Script error for: t5/core/dom
> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163
> Uncaught Error: Script error for: underscore
> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163
>
>
> A restart or reload (via new exception pages) fixes it. Have compared
> network info, mark-up and such locally between a working run and a broken
> run and all is identical.
>
>
> Am wondering if Tapestry is choking on what it provides in assets.gz from
> time to time.
>
>
> Will reply if I learn anything that will allow me to be more specific but
> in the meantime would be good to hear if anyone
> else has run into this issue.
>
>
> Thanks,
> Peter
>
>
>
>


-- 
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: [5.4.22] Application 'randomly' starts choking out 404s for t5/core/dom and underscore

2013-09-26 Thread Howard Lewis Ship
You can also test your theory by disabling GZIP compression.


On Thu, Sep 26, 2013 at 9:59 AM, Howard Lewis Ship  wrote:

> Does this only occur during testing?  I've found that we sometimes see
> this during testing when Selenium starts loading a new page while there are
> outstanding AMD module requests; the requests fail as if 404 just before
> the new page content loads.
>
>
> On Thu, Sep 26, 2013 at 5:51 AM, Peter Hvass  wrote:
>
>> Hello,
>>
>>
>> Having a hard time reliably reproducing this one, wondering if anyone
>> else has run into similar;
>>
>>
>> We start getting the following in our browser consoles;
>>
>> GET http://sadaharu:8087/village/asset.gz/module/t5/core/dom.js 404
>> (/asset.gz/module/t5/core/dom.js) require-2.1.8.js:1880
>> GET http://sadaharu:8087/village/asset.gz/module/underscore.js 404
>> (/asset.gz/module/underscore.js) require-2.1.8.js:1880
>> Uncaught Error: Script error for: t5/core/dom
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163
>> Uncaught Error: Script error for: underscore
>> http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163
>>
>>
>> A restart or reload (via new exception pages) fixes it. Have compared
>> network info, mark-up and such locally between a working run and a broken
>> run and all is identical.
>>
>>
>> Am wondering if Tapestry is choking on what it provides in assets.gz from
>> time to time.
>>
>>
>> Will reply if I learn anything that will allow me to be more specific but
>> in the meantime would be good to hear if anyone
>> else has run into this issue.
>>
>>
>> Thanks,
>> Peter
>>
>>
>>
>>
>
>
> --
> 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
>



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


[5.4.22] Application 'randomly' starts choking out 404s for t5/core/dom and underscore

2013-09-26 Thread Peter Hvass
Hello, 


Having a hard time reliably reproducing this one, wondering if anyone else has 
run into similar; 


We start getting the following in our browser consoles; 

GET http://sadaharu:8087/village/asset.gz/module/t5/core/dom.js 404 
(/asset.gz/module/t5/core/dom.js) require-2.1.8.js:1880 
GET http://sadaharu:8087/village/asset.gz/module/underscore.js 404 
(/asset.gz/module/underscore.js) require-2.1.8.js:1880 
Uncaught Error: Script error for: t5/core/dom 
http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 
Uncaught Error: Script error for: underscore 
http://requirejs.org/docs/errors.html#scripterror require-2.1.8.js:163 


A restart or reload (via new exception pages) fixes it. Have compared network 
info, mark-up and such locally between a working run and a broken run and all 
is identical. 


Am wondering if Tapestry is choking on what it provides in assets.gz from time 
to time. 


Will reply if I learn anything that will allow me to be more specific but in 
the meantime would be good to hear if anyone 
else has run into this issue. 


Thanks, 
Peter 





Re: T5: bind onlick handler after LinkSubmit

2013-08-21 Thread Dmitriy Vsekhvalnov
Hey thanks for ideas, i ended with for  mixin to do:

$(formId).observe(Tapestry.FORM_PROCESS_SUBMIT_EVENT, function(event)
{
//hide modal
});

by some reason  is never called.


On Wed, Aug 21, 2013 at 6:46 PM, Lenny Primak wrote:

> FlowLogix library has a mixin for this:
> http://code.google.com/p/flowlogix/wiki/TLUpdateEvent
>
> On Aug 21, 2013, at 9:15 AM, Thiago H de Paula Figueiredo wrote:
>
> > On Wed, 21 Aug 2013 09:45:33 -0300, Dmitriy Vsekhvalnov <
> dvsekhval...@gmail.com> wrote:
> >
> >> Hi all,
> >
> > Hi!
> >
> >> i'm looking for a way to bind event handler (js) to  element which
> also is LinkSubmit, but i'd like my event handler to be executed after
> >> LinkSubmit handler.
> >
> > What you actually want is to execute JavaScript when an AJAX call is
> finished. If it's a zone update, here's the solution:
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Trigger-a-client-side-event-AFTER-Zone-update-td3229142.html
> .
> >
> > --
> > 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: T5: bind onlick handler after LinkSubmit

2013-08-21 Thread Lenny Primak
FlowLogix library has a mixin for this:
http://code.google.com/p/flowlogix/wiki/TLUpdateEvent

On Aug 21, 2013, at 9:15 AM, Thiago H de Paula Figueiredo wrote:

> On Wed, 21 Aug 2013 09:45:33 -0300, Dmitriy Vsekhvalnov 
>  wrote:
> 
>> Hi all,
> 
> Hi!
> 
>> i'm looking for a way to bind event handler (js) to  element which also 
>> is LinkSubmit, but i'd like my event handler to be executed after
>> LinkSubmit handler.
> 
> What you actually want is to execute JavaScript when an AJAX call is 
> finished. If it's a zone update, here's the solution: 
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Trigger-a-client-side-event-AFTER-Zone-update-td3229142.html.
> 
> -- 
> 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: T5: bind onlick handler after LinkSubmit

2013-08-21 Thread Thiago H de Paula Figueiredo
On Wed, 21 Aug 2013 09:45:33 -0300, Dmitriy Vsekhvalnov  
 wrote:



Hi all,


Hi!

i'm looking for a way to bind event handler (js) to  element which  
also is LinkSubmit, but i'd like my event handler to be executed after

LinkSubmit handler.


What you actually want is to execute JavaScript when an AJAX call is  
finished. If it's a zone update, here's the solution:  
http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Trigger-a-client-side-event-AFTER-Zone-update-td3229142.html.


--
Thiago H. de Paula Figueiredo

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



T5: bind onlick handler after LinkSubmit

2013-08-21 Thread Dmitriy Vsekhvalnov
Hi all,

i'm looking for a way to bind event handler (js) to  element which also
is LinkSubmit, but i'd like my event handler to be executed after
LinkSubmit handler.

E.g. consider example, form inside modal dialog - make ajax call to server
first, then close modal.

Ideas?


Re: [OT] T5-IoC in Fantom

2013-08-07 Thread Thiago H de Paula Figueiredo
On Wed, 07 Aug 2013 14:24:25 -0300, Howard Lewis Ship   
wrote:



I have some ideas for a next-generation IoC that I hope to put together
someday (outside of Tapestry).  I want to create something with a  
different level of granularity, were you are injecting functions, not  
services.


You probably want to wait for Java 8 and its first class functions aka  
functional interfaces and lambdas. :) A nice description of that and other  
Java 8 improvements are here:  
http://www.techempower.com/blog/2013/03/26/everything-about-java-8/. I  
can't wait for them.


By the way, even if your future project is independent from T-IoC, T-IoC  
could integrate it, just like it does with Plastic. :)


--
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: [OT] T5-IoC in Fantom

2013-08-07 Thread Howard Lewis Ship
I have some ideas for a next-generation IoC that I hope to put together
someday (outside of Tapestry).  I want to create something with a different
level of granularity, were you are injecting functions, not services. There
would be a whole lot of generics gymnastics to figure out how to map from a
generic function interface to a static or instance method of a class that
is exposed for injection, with lots of annotations to be used to
disambiguate. Unfortunately, this is pretty far down my list of things to
work on!


On Wed, Aug 7, 2013 at 3:01 AM, Steve Eynon
wrote:

> > No distributed configuration?
>
> Of course there is! Any module from any pod (jar) can contribute to
> services defined in any other module from any other pod. That is
> distributed configuration, right? That was built in from the get go!
>
> > Well, I hope you had a chance to address some of the things that are not
> perfect in T5 IoC!
>
> I addressed a few (of what I felt were) shortcomings, tidied up the API a
> little, and tried to keep the API to 'core' functionality. A couple of
> subtle differences include:
>
>  - configuration overrides may themselves be overridden
>  - ctor params may be passed into Registry.autobuild()
>  - emphasis on annotations (facets) and not naming conventions
>
> I learnt a lot from the project and now certainly appreciate the recursive
> complexity involved in maintaining an IoC registry!
>
> Cheers,
>
> Steve.
>  --
> Steve Eynon
> ---
> "If at first you don't succeed,
>so much for skydiving!"
>
>
>
> On 7 August 2013 01:05, Howard Lewis Ship  wrote:
>
> > No distributed configuration?
> >
> >
> > On Tue, Aug 6, 2013 at 5:04 PM, Howard Lewis Ship 
> > wrote:
> >
> > > Well, I hope you had a chance to address some of the things that are
> not
> > > perfect in T5 IoC!
> > >
> > >
> > > On Tue, Aug 6, 2013 at 4:23 PM, Steve Eynon <
> > > steve.ey...@alienfactory.co.uk> wrote:
> > >
> > >> Hello,
> > >>
> > >> If imitation is the sincerest form of flattery then T5-IoC has been
> > paid a
> > >> huge compliment...
> > >>
> > >> ...there's an IoC in the language Fantom that bears a striking
> > resemblance
> > >> to T5-IoC!
> > >>
> > >> afIoc - http://repo.status302.com/doc/afIoc/#overview
> > >>
> > >> I've been an avid fan of Tapestry since v3, and with the advent of T5
> > I've
> > >> learnt to adore T5-IoC - the foundation of all my apps (both desktop
> and
> > >> web). So much so, as I'm now (slowly) moving away from Java, I
> couldn't
> > >> bear to leave it behind.
> > >>
> > >> As my new language of choice, Fantom http://fantom.org/ , didn't have
> > an
> > >> IoC, I took it upon myself to implement one in the image of T5-IoC,
> > >> bringing with it all the goodness T5-IoC provides!
> > >>
> > >> I realise this post is slightly off topic, but I wanted to give
> > >> acknowledgement and thanks to all those inspiring T5-IoC developers,
> > your
> > >> ideas are awesome! So, err, thanks!
> > >>
> > >> Um, I'll get my coat...
> > >>
> > >> Steve.
> > >>
> > >> Oh, for those who don't know Fantom, a reasonable quick overview is
> > given
> > >> here:
> > >>
> > >>
> >
> http://zeroturnaround.com/rebellabs/the-adventurous-developers-guide-to-jvm-languages-fantom/
> > >>
> > >
> > >
> > >
> > > --
> > > 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
> > >
> >
> >
> >
> > --
> > 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
> >
>



-- 
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: [OT] T5-IoC in Fantom

2013-08-07 Thread Steve Eynon
> No distributed configuration?

Of course there is! Any module from any pod (jar) can contribute to
services defined in any other module from any other pod. That is
distributed configuration, right? That was built in from the get go!

> Well, I hope you had a chance to address some of the things that are not
perfect in T5 IoC!

I addressed a few (of what I felt were) shortcomings, tidied up the API a
little, and tried to keep the API to 'core' functionality. A couple of
subtle differences include:

 - configuration overrides may themselves be overridden
 - ctor params may be passed into Registry.autobuild()
 - emphasis on annotations (facets) and not naming conventions

I learnt a lot from the project and now certainly appreciate the recursive
complexity involved in maintaining an IoC registry!

Cheers,

Steve.
 --
Steve Eynon
---
"If at first you don't succeed,
   so much for skydiving!"



On 7 August 2013 01:05, Howard Lewis Ship  wrote:

> No distributed configuration?
>
>
> On Tue, Aug 6, 2013 at 5:04 PM, Howard Lewis Ship 
> wrote:
>
> > Well, I hope you had a chance to address some of the things that are not
> > perfect in T5 IoC!
> >
> >
> > On Tue, Aug 6, 2013 at 4:23 PM, Steve Eynon <
> > steve.ey...@alienfactory.co.uk> wrote:
> >
> >> Hello,
> >>
> >> If imitation is the sincerest form of flattery then T5-IoC has been
> paid a
> >> huge compliment...
> >>
> >> ...there's an IoC in the language Fantom that bears a striking
> resemblance
> >> to T5-IoC!
> >>
> >> afIoc - http://repo.status302.com/doc/afIoc/#overview
> >>
> >> I've been an avid fan of Tapestry since v3, and with the advent of T5
> I've
> >> learnt to adore T5-IoC - the foundation of all my apps (both desktop and
> >> web). So much so, as I'm now (slowly) moving away from Java, I couldn't
> >> bear to leave it behind.
> >>
> >> As my new language of choice, Fantom http://fantom.org/ , didn't have
> an
> >> IoC, I took it upon myself to implement one in the image of T5-IoC,
> >> bringing with it all the goodness T5-IoC provides!
> >>
> >> I realise this post is slightly off topic, but I wanted to give
> >> acknowledgement and thanks to all those inspiring T5-IoC developers,
> your
> >> ideas are awesome! So, err, thanks!
> >>
> >> Um, I'll get my coat...
> >>
> >> Steve.
> >>
> >> Oh, for those who don't know Fantom, a reasonable quick overview is
> given
> >> here:
> >>
> >>
> http://zeroturnaround.com/rebellabs/the-adventurous-developers-guide-to-jvm-languages-fantom/
> >>
> >
> >
> >
> > --
> > 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
> >
>
>
>
> --
> 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: [OT] T5-IoC in Fantom

2013-08-06 Thread Howard Lewis Ship
No distributed configuration?


On Tue, Aug 6, 2013 at 5:04 PM, Howard Lewis Ship  wrote:

> Well, I hope you had a chance to address some of the things that are not
> perfect in T5 IoC!
>
>
> On Tue, Aug 6, 2013 at 4:23 PM, Steve Eynon <
> steve.ey...@alienfactory.co.uk> wrote:
>
>> Hello,
>>
>> If imitation is the sincerest form of flattery then T5-IoC has been paid a
>> huge compliment...
>>
>> ...there's an IoC in the language Fantom that bears a striking resemblance
>> to T5-IoC!
>>
>> afIoc - http://repo.status302.com/doc/afIoc/#overview
>>
>> I've been an avid fan of Tapestry since v3, and with the advent of T5 I've
>> learnt to adore T5-IoC - the foundation of all my apps (both desktop and
>> web). So much so, as I'm now (slowly) moving away from Java, I couldn't
>> bear to leave it behind.
>>
>> As my new language of choice, Fantom http://fantom.org/ , didn't have an
>> IoC, I took it upon myself to implement one in the image of T5-IoC,
>> bringing with it all the goodness T5-IoC provides!
>>
>> I realise this post is slightly off topic, but I wanted to give
>> acknowledgement and thanks to all those inspiring T5-IoC developers, your
>> ideas are awesome! So, err, thanks!
>>
>> Um, I'll get my coat...
>>
>> Steve.
>>
>> Oh, for those who don't know Fantom, a reasonable quick overview is given
>> here:
>>
>> http://zeroturnaround.com/rebellabs/the-adventurous-developers-guide-to-jvm-languages-fantom/
>>
>
>
>
> --
> 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
>



-- 
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: [OT] T5-IoC in Fantom

2013-08-06 Thread Howard Lewis Ship
Well, I hope you had a chance to address some of the things that are not
perfect in T5 IoC!


On Tue, Aug 6, 2013 at 4:23 PM, Steve Eynon
wrote:

> Hello,
>
> If imitation is the sincerest form of flattery then T5-IoC has been paid a
> huge compliment...
>
> ...there's an IoC in the language Fantom that bears a striking resemblance
> to T5-IoC!
>
> afIoc - http://repo.status302.com/doc/afIoc/#overview
>
> I've been an avid fan of Tapestry since v3, and with the advent of T5 I've
> learnt to adore T5-IoC - the foundation of all my apps (both desktop and
> web). So much so, as I'm now (slowly) moving away from Java, I couldn't
> bear to leave it behind.
>
> As my new language of choice, Fantom http://fantom.org/ , didn't have an
> IoC, I took it upon myself to implement one in the image of T5-IoC,
> bringing with it all the goodness T5-IoC provides!
>
> I realise this post is slightly off topic, but I wanted to give
> acknowledgement and thanks to all those inspiring T5-IoC developers, your
> ideas are awesome! So, err, thanks!
>
> Um, I'll get my coat...
>
> Steve.
>
> Oh, for those who don't know Fantom, a reasonable quick overview is given
> here:
>
> http://zeroturnaround.com/rebellabs/the-adventurous-developers-guide-to-jvm-languages-fantom/
>



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


[OT] T5-IoC in Fantom

2013-08-06 Thread Steve Eynon
Hello,

If imitation is the sincerest form of flattery then T5-IoC has been paid a
huge compliment...

...there's an IoC in the language Fantom that bears a striking resemblance
to T5-IoC!

afIoc - http://repo.status302.com/doc/afIoc/#overview

I've been an avid fan of Tapestry since v3, and with the advent of T5 I've
learnt to adore T5-IoC - the foundation of all my apps (both desktop and
web). So much so, as I'm now (slowly) moving away from Java, I couldn't
bear to leave it behind.

As my new language of choice, Fantom http://fantom.org/ , didn't have an
IoC, I took it upon myself to implement one in the image of T5-IoC,
bringing with it all the goodness T5-IoC provides!

I realise this post is slightly off topic, but I wanted to give
acknowledgement and thanks to all those inspiring T5-IoC developers, your
ideas are awesome! So, err, thanks!

Um, I'll get my coat...

Steve.

Oh, for those who don't know Fantom, a reasonable quick overview is given
here:
http://zeroturnaround.com/rebellabs/the-adventurous-developers-guide-to-jvm-languages-fantom/


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Rural Hunter
Yes. I'm already using freemarker. Just want to use less dependencies 
and get all things unified since we already have one(Tapestry) right?


于 2013/6/7 21:04, Thiago H de Paula Figueiredo 写道:
On Fri, 07 Jun 2013 06:45:32 -0300, Rural Hunter 
 wrote:


cool, thanks! I am trying to implement a similar requirement as the 
OP which is to send html formatted mails in a background service of 
my webapp while there is no actual request/response involved. I'm 
trying to figure out how to use Tapestry template as the mail 
template in some way.


Wouldn't a general-purpose templating entigne like FreeMarker be a 
better choice for this scenario (e-mails)? Is there anything from the 
webapp that you could reuse here?





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



Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Thiago H de Paula Figueiredo
On Fri, 07 Jun 2013 06:45:32 -0300, Rural Hunter   
wrote:


cool, thanks! I am trying to implement a similar requirement as the OP  
which is to send html formatted mails in a background service of my  
webapp while there is no actual request/response involved. I'm trying to  
figure out how to use Tapestry template as the mail template in some way.


Wouldn't a general-purpose templating entigne like FreeMarker be a better  
choice for this scenario (e-mails)? Is there anything from the webapp that  
you could reuse here?


--
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: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Lance Java
I started to extract the logic to a separate project here
https://github.com/uklance/tapestry-offline but never got around to testing
it.

The main functionality is in this class
https://github.com/uklance/tapestry-offline/blob/master/src/main/java/org/lazan/t5/offline/services/internal/OfflineComponentRendererImpl.java

Let me know if it's useful, pull requests welcome :)


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Rural Hunter
cool, thanks! I am trying to implement a similar requirement as the OP 
which is to send html formatted mails in a background service of my 
webapp while there is no actual request/response involved. I'm trying to 
figure out how to use Tapestry template as the mail template in some way.


于 2013/6/7 17:27, Lance Java 写道:

AFAIK tapx-templating will not work with the normal tapestry web jars on
the classpath and must be a separate app.

I have written a class which can render components offline within a
tapestry webapp for tapestry-cometd. The code can be found here

https://github.com/uklance/tapestry-cometd/blob/master/src/main/java/org/lazan/t5/cometd/services/internal/ComponentJSONRendererImpl.java


Note: It's a bit of a hack!




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



Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Lance Java
AFAIK tapx-templating will not work with the normal tapestry web jars on
the classpath and must be a separate app.

I have written a class which can render components offline within a
tapestry webapp for tapestry-cometd. The code can be found here

https://github.com/uklance/tapestry-cometd/blob/master/src/main/java/org/lazan/t5/cometd/services/internal/ComponentJSONRendererImpl.java


Note: It's a bit of a hack!


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-07 Thread Rural Hunter

dose tapx-templating work in a tapestry webapp now?

于 2013/6/6 15:31, Lance Java 写道:

Have you considered tapx-templating and a single webapp?

https://github.com/hlship/tapx




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



Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-06 Thread Muhammad Gelbana
I strongly believe that Dmitry's suggestion is the simplest and most
efficient so far, thanks a lot for that :)

This would send an ajax request acceptable by tapestry:
ajax = new XMLHttpRequest();
ajax.open("POST", "http://localhost:8080/index:myevent/0/0/0";, true);
ajax.setRequestHeader("X-Requested-With", "XMLHttpRequest"); //This is
necessary
ajax.send(null);

Thank you all :)


On Thu, Jun 6, 2013 at 9:31 AM, Lance Java wrote:

> Have you considered tapx-templating and a single webapp?
>
> https://github.com/hlship/tapx
>


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-06 Thread Lance Java
Have you considered tapx-templating and a single webapp?

https://github.com/hlship/tapx


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-05 Thread Dmitry Gusev
If you only need to get HTML on the client and not on the server-side,
then you may just use Tapestry's built-in logic for handling AJAX requests.

On the server side create eventLink:

Link link = resources.createEventLink(eventType, contextValues);
return link.toAbsoluteURI();

Pass this link to client side during rendering and when needed do the AJAX
calls using, say, jQuery.ajax.

You may handle ajax request on the server side the same way I wrote in my
example above --
return block from event handler or use ajaxResponseRenderer.addRender().
On the client-side response will be the same JSON and you may extract
content from it.

Note that in both cases it is possible to render multiple blocks by one
request -- this is if you call
ajaxResponseRenderer.addRender() multiple times.


On Thu, Jun 6, 2013 at 1:12 AM, Muhammad Gelbana wrote:

> Actually Lance's second approach is what I need to do. And yes it should be
> very simple, I will only have to display regular html without controls at
> all (Hopefully it will stay this way and I actually think it will)
>
> Regards
>
>
> On Wed, Jun 5, 2013 at 8:00 PM, Dmitry Gusev 
> wrote:
>
> > The entry point is:
> >
> > String rawAddress = renderer.render(new RenderEvent(
> > "internal/companyblocks", "companyAddress", company));
> >
> >
> > You tell here that onCompanyAddress method (or method with
> > @Event("companyAddress")) should be invoked on the internal/companyblocks
> > page
> > class and if that method returns a Block - it will be rendered to a
> string.
> > company - is a parameter to that method that you may use to initialize
> > rendering context for the block.
> > You can also not return Block from the method by just addRenderer:
> >
> > ajaxResponseRenderer.addRender(addressBlockZone);
> >
> > And the addressBlockZone will be rendered to as string in this case.
> >
> > Resulting string will be serialized json object, so you can inspect its
> > structure and take the content you want like:
> >
> > String htmlAddress = new
> > JSONObject(rawAddress).getString("content");
> >
> >
> > On Wed, Jun 5, 2013 at 8:14 PM, Muhammad Gelbana  > >wrote:
> >
> > > Honestly, I can't figure out anything from these 2 resources ! It all
> > looks
> > > so complicated to me.
> > >
> > > @Dmitry
> > > What is the entry point of your code ? When an ajaxrequest is sent to
> my
> > > application, doesn't it reach your "CompanyBlocks" page ? Then when
> does
> > > all the other services begin working ?!
> > >
> > > @Lanve
> > > And I thought Dimitry's code was complicated :D
> > > Your code was even harder to look at, I also can't understand the entry
> > > point and the flow of data starting when I receive an ajax request
> till I
> > > respond with a string representation of a component's template file.
> > >
> > > Thank you all for your help :)
> > >
> > >
> > > On Thu, May 30, 2013 at 6:41 PM, Lance Java  > > >wrote:
> > >
> > > > I'm not 100% sure what your implementation will be but I've done some
> > > work
> > > > in this area.
> > > >
> > > > Take a look at PDFLink.getFoAsString() where I convert a
> RenderCommand
> > > to a
> > > > String of markup (XML in the example)
> > > >
> > > > http://tapestry-stitch.uklance.cloudbees.net/pdflinkdemo
> > > >
> > > > Also, take a look at this wiki entry
> > > >
> > > >
> > > >
> > >
> >
> http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter
> > > >
> > > > Note that a Block can be type coerced to a RenderCommand
> > > >
> > >
> >
> >
> >
> > --
> > Dmitry Gusev
> >
> > AnjLab Team
> > http://anjlab.com
> >
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-05 Thread Muhammad Gelbana
Actually Lance's second approach is what I need to do. And yes it should be
very simple, I will only have to display regular html without controls at
all (Hopefully it will stay this way and I actually think it will)

Regards


On Wed, Jun 5, 2013 at 8:00 PM, Dmitry Gusev  wrote:

> The entry point is:
>
> String rawAddress = renderer.render(new RenderEvent(
> "internal/companyblocks", "companyAddress", company));
>
>
> You tell here that onCompanyAddress method (or method with
> @Event("companyAddress")) should be invoked on the internal/companyblocks
> page
> class and if that method returns a Block - it will be rendered to a string.
> company - is a parameter to that method that you may use to initialize
> rendering context for the block.
> You can also not return Block from the method by just addRenderer:
>
> ajaxResponseRenderer.addRender(addressBlockZone);
>
> And the addressBlockZone will be rendered to as string in this case.
>
> Resulting string will be serialized json object, so you can inspect its
> structure and take the content you want like:
>
> String htmlAddress = new
> JSONObject(rawAddress).getString("content");
>
>
> On Wed, Jun 5, 2013 at 8:14 PM, Muhammad Gelbana  >wrote:
>
> > Honestly, I can't figure out anything from these 2 resources ! It all
> looks
> > so complicated to me.
> >
> > @Dmitry
> > What is the entry point of your code ? When an ajaxrequest is sent to my
> > application, doesn't it reach your "CompanyBlocks" page ? Then when does
> > all the other services begin working ?!
> >
> > @Lanve
> > And I thought Dimitry's code was complicated :D
> > Your code was even harder to look at, I also can't understand the entry
> > point and the flow of data starting when I receive an ajax request till I
> > respond with a string representation of a component's template file.
> >
> > Thank you all for your help :)
> >
> >
> > On Thu, May 30, 2013 at 6:41 PM, Lance Java  > >wrote:
> >
> > > I'm not 100% sure what your implementation will be but I've done some
> > work
> > > in this area.
> > >
> > > Take a look at PDFLink.getFoAsString() where I convert a RenderCommand
> > to a
> > > String of markup (XML in the example)
> > >
> > > http://tapestry-stitch.uklance.cloudbees.net/pdflinkdemo
> > >
> > > Also, take a look at this wiki entry
> > >
> > >
> > >
> >
> http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter
> > >
> > > Note that a Block can be type coerced to a RenderCommand
> > >
> >
>
>
>
> --
> Dmitry Gusev
>
> AnjLab Team
> http://anjlab.com
>


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-05 Thread Dmitry Gusev
The entry point is:

String rawAddress = renderer.render(new RenderEvent(
"internal/companyblocks", "companyAddress", company));


You tell here that onCompanyAddress method (or method with
@Event("companyAddress")) should be invoked on the internal/companyblocks page
class and if that method returns a Block - it will be rendered to a string.
company - is a parameter to that method that you may use to initialize
rendering context for the block.
You can also not return Block from the method by just addRenderer:

ajaxResponseRenderer.addRender(addressBlockZone);

And the addressBlockZone will be rendered to as string in this case.

Resulting string will be serialized json object, so you can inspect its
structure and take the content you want like:

String htmlAddress = new JSONObject(rawAddress).getString("content");


On Wed, Jun 5, 2013 at 8:14 PM, Muhammad Gelbana wrote:

> Honestly, I can't figure out anything from these 2 resources ! It all looks
> so complicated to me.
>
> @Dmitry
> What is the entry point of your code ? When an ajaxrequest is sent to my
> application, doesn't it reach your "CompanyBlocks" page ? Then when does
> all the other services begin working ?!
>
> @Lanve
> And I thought Dimitry's code was complicated :D
> Your code was even harder to look at, I also can't understand the entry
> point and the flow of data starting when I receive an ajax request till I
> respond with a string representation of a component's template file.
>
> Thank you all for your help :)
>
>
> On Thu, May 30, 2013 at 6:41 PM, Lance Java  >wrote:
>
> > I'm not 100% sure what your implementation will be but I've done some
> work
> > in this area.
> >
> > Take a look at PDFLink.getFoAsString() where I convert a RenderCommand
> to a
> > String of markup (XML in the example)
> >
> > http://tapestry-stitch.uklance.cloudbees.net/pdflinkdemo
> >
> > Also, take a look at this wiki entry
> >
> >
> >
> http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter
> >
> > Note that a Block can be type coerced to a RenderCommand
> >
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-05 Thread Lance Java
I think I need to understand how it's going to work before I go any further.



Here's one approach

1. The browser makes a request to the "other" webapp

2. The other webapp makes request(s) to the tapestry app

3. The other webapp merges it's own html with the tapestry html to create a
page

4. The page is returned to the user



Here's another approach

1. The browser makes a request to the "other" webapp

2. The other webapp returns a page with some empty divs

3. Some javascript runs on page load

4. The browser makes requests to the tapestry app

5. The tapestry app returns responses to the browser

6. Some javascript in the browser updates the innerHTML of some div's



In both approaches, you are going to be fighting an uphill battle if you
want to handle javascript and eventlink / actionlinks in your tapestry
components. If you simply want to render html fragments, without links or
javascript we might be able to help.


Re: [t5] Is it possible to return a component's generated HTML ?

2013-06-05 Thread Muhammad Gelbana
Honestly, I can't figure out anything from these 2 resources ! It all looks
so complicated to me.

@Dmitry
What is the entry point of your code ? When an ajaxrequest is sent to my
application, doesn't it reach your "CompanyBlocks" page ? Then when does
all the other services begin working ?!

@Lanve
And I thought Dimitry's code was complicated :D
Your code was even harder to look at, I also can't understand the entry
point and the flow of data starting when I receive an ajax request till I
respond with a string representation of a component's template file.

Thank you all for your help :)


On Thu, May 30, 2013 at 6:41 PM, Lance Java wrote:

> I'm not 100% sure what your implementation will be but I've done some work
> in this area.
>
> Take a look at PDFLink.getFoAsString() where I convert a RenderCommand to a
> String of markup (XML in the example)
>
> http://tapestry-stitch.uklance.cloudbees.net/pdflinkdemo
>
> Also, take a look at this wiki entry
>
>
> http://wiki.apache.org/tapestry/Tapestry5HowToGetAnHTMLStringFromARenderCommandParameter
>
> Note that a Block can be type coerced to a RenderCommand
>


Re: [t5] Is it possible to return a component's generated HTML ?

2013-05-30 Thread Lance Java
I'm not 100% sure what your implementation will be but I've done some work
in this area.

Take a look at PDFLink.getFoAsString() where I convert a RenderCommand to a
String of markup (XML in the example)

http://tapestry-stitch.uklance.cloudbees.net/pdflinkdemo

Also, take a look at this wiki entry

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

Note that a Block can be type coerced to a RenderCommand


Re: [t5] Is it possible to return a component's generated HTML ?

2013-05-30 Thread Dmitry Gusev
You can put your component to a block and render this block.

Have a look at this thread:
http://mail-archives.apache.org/mod_mbox/tapestry-users/201304.mbox/%3cca+v6ct9um-li7vxvafem+abwrxf-b9ar3t+x40eer971zbl...@mail.gmail.com%3e

On Thu, May 30, 2013 at 8:26 PM, Muhammad Gelbana wrote:

> Hopefully I'll explain this clearly.
>
> I'm willing to integrate my tapestry web application with another web
> application. That other web application will request ajax urls from my
> application.
>
> In my application should reply in HTML. So it would be much easier to be
> able to use the regular tapestry component\page tml to construct the HTML
> response. So that I can easily bind the tml to my component\page and let
> tapestry do it's magic on generating the HTML.
>
> Is this possible in tapestry ?
>



-- 
Dmitry Gusev

AnjLab Team
http://anjlab.com


[t5] Is it possible to return a component's generated HTML ?

2013-05-30 Thread Muhammad Gelbana
Hopefully I'll explain this clearly.

I'm willing to integrate my tapestry web application with another web
application. That other web application will request ajax urls from my
application.

In my application should reply in HTML. So it would be much easier to be
able to use the regular tapestry component\page tml to construct the HTML
response. So that I can easily bind the tml to my component\page and let
tapestry do it's magic on generating the HTML.

Is this possible in tapestry ?


Re: dwr java chat demo in t5

2013-05-24 Thread Lance Java
You would do this by the topic (eg: "/chat/user1"). You can add custom
Authorizers for topic security.


  1   2   3   4   5   6   7   8   9   10   >