ASO state objects and StateObjectfactory... tap4 to tap5

2011-08-22 Thread Ken in Nashua

Hi All,

In tap-4.1.2 there was a concept of ASO whereby a singleton would be loaded on 
bootstrap and an application state object cuold be maintained throughout the 
livability of the web application... I assume it would get stuffed into servlet 
context or something like that.

In any case... can someone shed some light on how this should be performed in 
tap5 ?

Should I create some ASO/DAO service and have this guy operate my singletons at 
bootstrap ?
Which interfaces and managers are available in tap5 to implement.

Just trying to get feel for best practices using tap5.

thanks in advance
kcola...@live.com
 

  

Re: components and events

2011-08-22 Thread Jens Breitenstein

Hi Robert!

again, many thanks for you input, I really appreciate this discussion 
and time you spent



If you're using tapestry's form components inside your component, and binding 
the values, then all of the values should be updated automatically.  The main 
thing is to make sure that the property path to be updated still references a 
valid object.  For instance, if I have a form:


   


With mycomponent looking something like:




this is exactly my problem: "object.someProperty" is a "1:1" mapping of 
a data-model value to an UI element and this is not possible in my 
particular case. Assume we compact data in our database for example 
newsletter settings (daily, weekly, monthly) for several areas. Fully 
normalized our database will explode with 100 of fields (even I know 
normalisation is usually the way to go, in theory). But changes happen 
very often and altering db schema in production is not an option due 
very limited downtimes. Thus we store "newsletter" settings in a string 
field and use a compact representation like "dwmwmd" to feed 6 
checkboxes (example simplified). This means I have something like


boolean newsletterSettingArea1D = 
"1".equals(object.newsletter.substring(0,1));
boolean newsletterSettingArea1W = 
"1".equals(object.newsletter.substring(1,2));

..

to extract the values in setupRender. And I need the opposite in 
"onSuccess" (checking the state and compacting the info again). Just 
think about a bitfield which causes exactly the same problems.


After some sleep I was thinking about what you said concerning event 
bubbling from components to the form: Looking at field validation it 
seems at least the "validation event bubbles" from the form to all input 
elements as the page's onSubmit must have initiated the validation 
sequence somehow (have not debugged tapestry yet, but I assume this for 
now). This simply means Tapestry just uses a different approach for 
validating fields which is not based on events, right? But for symmetry 
reasons if events can bubble up from components to pages, shouldn't they 
not bubble down, too? At least for onSuccess/onFailure/onValidate to 
give a component a chance to participate as union not just assembly of 
single fields? If a component groups fields than only the component is 
able to detect a valid state considering all input elements, right? 
Consequently only a component can feed UI elements from the model and 
vice versa in case we need something more sophisticated than single 
attribute to attribute mappings via coersions.


I am not intending to work "against" Tapestry concepts, but currently 
this feels like something is missing in the framework. I can not believe 
we are the only developers using a persistence representation of our 
data which is quite different from the UI (anyone using SAP as backend 
immediately suffers from this)?
And worse: even we use a "Tapestry-friendly attribute only domain model" 
we need a chance to extract / compact the persistence data which again 
means code is creeping into the page which is usally not required as a 
component can fully live on it's own as soon it participates on the form 
events onSuccess/onFailure/onValidate.


Please correct me if I am wrong



Jens


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



Re: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Robert Zeigler
> 
> As a developer I'm not looking at components in isolation, but rather,
> I'm looking at T5 as a framework. So if the framework provdes defaults
> and I don't need to, fantastic! Moreover, I don't need to know that
> attribute was ever required, for that's now unimportant information.
> 

Except when the framework can't provide a default and it blows up in your face. 
:)
Especially with value encoders, the framework /tries/ to provide a default, and 
often can, but it's not guaranteed.

Robert

> Steve.
> 
> 
> On 23 August 2011 10:18, Robert Zeigler  wrote:
>> 
>> On Aug 22, 2011, at 8/229:06 PM , Bob Harner wrote:
>>> 
>>> "In many cases, a ValueEncoder can be generated automatically from the
>> 
>> And this is the crux: in /many/ cases... /can/ be generated. When it can't 
>> be, you'll still get the exception that it's not bound and must be.
>> Ergo: required. :)
>> 
>> Robert
>> -
>> 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: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Steve Eynon
My tuppence worth:

> required is from the component perspective, not from the developer perspective

Therein lies the confusion, for the documentation is read by
developers looking to see what is 'required' from them! (I've yet to
catch my T5 components reading JavaDocs or Googling for answers!)

As the documentation is meant for developers it should focus on their
needs - i.e. what they 'need' to provide to make the component work.

As a developer I'm not looking at components in isolation, but rather,
I'm looking at T5 as a framework. So if the framework provdes defaults
and I don't need to, fantastic! Moreover, I don't need to know that
attribute was ever required, for that's now unimportant information.

Steve.


On 23 August 2011 10:18, Robert Zeigler  wrote:
>
> On Aug 22, 2011, at 8/229:06 PM , Bob Harner wrote:
>>
>> "In many cases, a ValueEncoder can be generated automatically from the
>
> And this is the crux: in /many/ cases... /can/ be generated. When it can't 
> be, you'll still get the exception that it's not bound and must be.
> Ergo: required. :)
>
> Robert
> -
> 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.3 Checklist java.lang.reflect.GenericSignatureFormatError

2011-08-22 Thread Josh Canfield
What tapestry build are you running. This looks like a defect I fixed while
back in plastic.
On Aug 22, 2011 7:19 PM, "TG"  wrote:
> Yup, thanks for the sample source at the given URL. I managed to remove
> Chenillekit multiselect component and integrated T 5.3 Checklist. However,
> with existing data (which were saved by Chenilekit component), it gave the
> following error. Any idea? Could it be a T 5.3 bug?
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: Exception
> assembling root component of page UserSave: Could not convert 'user' into
a
> component parameter binding: Exception generating conduit for expression
> 'user': java.lang.reflect.GenericSignatureFormatError
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: Operations
> trace:
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: [ 1]
> Constructing instance of page class tapp.pages.UserSave
>
> org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: [ 2]
Assembling
> root component for page UserSave
>
> org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler
> handleRequestException: Processing of request failed with uncaught
> exception: Exception assembling root component of page UserSave: Could not
> convert 'user' into a component parameter binding: Exception generating
> conduit for expression 'user':
java.lang.reflect.GenericSignatureFormatError
> org.apache.tapestry5.ioc.internal.OperationException: Exception assembling
> root component of page UserSave: Could not convert 'user' into a component
> parameter binding: Exception generating conduit for expression 'user':
> java.lang.reflect.GenericSignatureFormatError
> at
>
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102)
> at
>
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:69)
> at
>
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
>
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082)
> at
>
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:87)
> at
>
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:213)
> at
>
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:206)
> at
>
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
> at
>
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
> at
>
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082)
> at
>
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:205)
> at $PageLoader_3623c106ac052.loadPage(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:87)
> at $PageSource_3623c106ac051.getPage(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:83)
> at $RequestPageCache_3623c106ac050.get(Unknown Source)
> at $RequestPageCache_3623c106ac04a.get(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
> at
>
org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2376)
> at $PageRenderRequestHandler_3623c106ac04e.handle(Unknown Source)
> at $PageRenderRequestHandler_3623c106ac048.handle(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
> at
>
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
> at $ComponentRequestHandler_3623c106ac049.handlePageRender(Unknown Source)
> at $ComponentRequestHandler_3623c106ac027.handlePageRender(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
> at $Dispatcher_3623c106ac029.dispatch(Unknown Source)
> at $Dispatcher_3623c106ac023.dispatch(Unknown Source)
> at
>
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:434)
> at
>
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
> at $RequestHandler_3623c106ac024.service(Unknown Source)
> at
>
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:1055)
> at $RequestHandler_3623c106ac024.service(Unknown Source)
> at
>
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:1045)
> at $RequestHandler_3623c106ac024.service(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
> at $RequestHandler_3623c106ac024.service(Unknown Source)
> at
>
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter

Re: [ANN] JumpStart 5.4 does Tapestry 5.2.6

2011-08-22 Thread Steve Eynon
Hi,

Just to say thanks for the continued hard work - it's a really handy
resource for showing & explaining T5 principles in action. I'm forever
pointing my team at your website!

Cheers,

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


On 22 August 2011 23:44, Taha Hafeez  wrote:
> Great !!
>
> Congrats Geoff
>
> On Mon, Aug 22, 2011 at 8:12 PM, Geoff Callender
>  wrote:
>> Hi all,
>>
>> JumpStart has been upgraded to use Tapestry 5.2.6. And...
>>
>> - A lot of examples have been added recently to demonstrate 
>> ProgressiveDisplay, AJAX Periodic Updates (auto-refresh), Scriptaculous, and 
>> Delegates and Blocks.
>>
>> - Also, there are improvements to the examples of Object Select, Custom 
>> Validators, Event Bubbling, and Event Links.
>>
>> - Plus, the css has been reworked in many places to give a fresher look. IE 
>> and Firefox are handled better, too.
>>
>> - Plus, it handles the newly released JBoss 6.1.0.
>>
>> Here's the demo:
>>
>>         http://jumpstart.doublenegative.com.au/jumpstart/
>>
>> As always there's room for more improvement, so please let me know your 
>> thoughts and whether you've found any bugs or questionable techniques!
>>
>> Cheers,
>>
>> Geoff
>
>
>
> --
> Regards
>
> Taha Hafeez Siddiqi (tawus)
> http://tawus.wordpress.com
>
> -
> 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



T5.3 Checklist java.lang.reflect.GenericSignatureFormatError

2011-08-22 Thread TG
Yup, thanks for the sample source at the given URL. I managed to remove
Chenillekit multiselect component and integrated T 5.3 Checklist. However,
with existing data (which were saved by Chenilekit component), it gave the
following error. Any idea? Could it be a T 5.3 bug?

org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: Exception
assembling root component of page UserSave: Could not convert 'user' into a
component parameter binding: Exception generating conduit for expression
'user': java.lang.reflect.GenericSignatureFormatError

org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: Operations
trace:

org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: [ 1]
Constructing instance of page class tapp.pages.UserSave

org.apache.tapestry5.ioc.internal.OperationTrackerImpl log: [ 2] Assembling
root component for page UserSave

org.apache.tapestry5.internal.services.DefaultRequestExceptionHandler
handleRequestException: Processing of request failed with uncaught
exception: Exception assembling root component of page UserSave: Could not
convert 'user' into a component parameter binding: Exception generating
conduit for expression 'user': java.lang.reflect.GenericSignatureFormatError
org.apache.tapestry5.ioc.internal.OperationException: Exception assembling
root component of page UserSave: Could not convert 'user' into a component
parameter binding: Exception generating conduit for expression 'user':
java.lang.reflect.GenericSignatureFormatError
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:102)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:69)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082)
at
org.apache.tapestry5.internal.pageload.ComponentAssemblerImpl.assembleRootComponent(ComponentAssemblerImpl.java:87)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:213)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl$3.invoke(PageLoaderImpl.java:206)
at
org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:65)
at
org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:68)
at
org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1082)
at
org.apache.tapestry5.internal.pageload.PageLoaderImpl.loadPage(PageLoaderImpl.java:205)
at $PageLoader_3623c106ac052.loadPage(Unknown Source)
at
org.apache.tapestry5.internal.services.PageSourceImpl.getPage(PageSourceImpl.java:87)
at $PageSource_3623c106ac051.getPage(Unknown Source)
at
org.apache.tapestry5.internal.services.NonPoolingRequestPageCacheImpl.get(NonPoolingRequestPageCacheImpl.java:83)
at $RequestPageCache_3623c106ac050.get(Unknown Source)
at $RequestPageCache_3623c106ac04a.get(Unknown Source)
at
org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:55)
at
org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2376)
at $PageRenderRequestHandler_3623c106ac04e.handle(Unknown Source)
at $PageRenderRequestHandler_3623c106ac048.handle(Unknown Source)
at
org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at
org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at $ComponentRequestHandler_3623c106ac049.handlePageRender(Unknown 
Source)
at $ComponentRequestHandler_3623c106ac027.handlePageRender(Unknown 
Source)
at
org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
at $Dispatcher_3623c106ac029.dispatch(Unknown Source)
at $Dispatcher_3623c106ac023.dispatch(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:434)
at
org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_3623c106ac024.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:1055)
at $RequestHandler_3623c106ac024.service(Unknown Source)
at
org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:1045)
at $RequestHandler_3623c106ac024.service(Unknown Source)
at
org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_3623c106ac024.service(Unknown Source)
at
org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter

Re: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Robert Zeigler

On Aug 22, 2011, at 8/229:06 PM , Bob Harner wrote:
> 
> "In many cases, a ValueEncoder can be generated automatically from the

And this is the crux: in /many/ cases... /can/ be generated. When it can't be, 
you'll still get the exception that it's not bound and must be.
Ergo: required. :) 

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



Re: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Bob Harner
Expanding the meaning of "autoconnect" in this way seems beneficial --
better than doing nothing but (to me) not as good as just making
"parameter is required" mean "parameter is required" :-)

Continuing to bang my head against the wall (caps are mine)... see if
you can follow my reasoning via quotes from Tapestry:

"Parameters that are required must be BOUND. A runtime exception
occurs if a component has unbound required parameters."
(http://tapestry.apache.org/component-parameters.html)

"A binding is a connection between a component and its CONTAINER
(another component), that allows the embedded component to gain access
to resources defined by the container."
(http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/Binding.html)

"In many cases, a ValueEncoder can be generated automatically from the
type of the value parameter. The ValueEncoderSource service provides
an encoder in these situations; it can be overriden by binding the
encoder parameter, OR extended by contributing a ValueEncoderFactory
into the service's configuration." (Select.java)

I haven't looked everywhere, but so far I can't find any reference in
Tapestry that uses the "binding a parameter" concept to refer to an
act like providing a ValueEncoder by contributing it to the
configuration. Instead, "binding a parameter" seems to consistently
refer to the more obvious act of linking together a component's
parameter with field of the containing component. Or maybe this use of
the "bind" concept is just not documented, or maybe I missed it in my
search.

Note that "ComponentDefaultProvider" is not named
"ComponentDefaultParameterBinder" :-)

On Mon, Aug 22, 2011 at 2:07 PM, Josh Canfield  wrote:
> @Parameter already has the "autoconnect" attribute to determine
> whether the framework will attempt to find a value for the parameter.
>
> The Component Report should be updated to include that information in
> the "flags" column.
>
>
> Currently the flags for TextField's value parameter read:
>
> Required, NOT Allow Null
>
> It could be changed to read:
>
> Required, AutoConnect, Not Null
>
> It would be nice if that HTML was cleaned up a bit as well, those
> values get squished and being less readable...
>
> As a side not; I find "NOT Allow Null" to be... not optimal for easy reading.
>
> Are we going to continue using the tapestry-component-report build the
> doc going forward?
>
> Josh
>
> On Mon, Aug 22, 2011 at 10:04 AM, Robert Zeigler
>  wrote:
>> I would prefer to keep the required clause. The difference between a 
>> required parameter and one that isn't is that if no value is available for 
>> the required parameter (whether user or framework provided), the component 
>> /cannot/ function.  An /optional/ parameter is one where the component /can/ 
>> function, even if there is no value provided (by the user or framework) for 
>> the value.  AjaxFormLoop absolutely MUST have a value encoder, or it doesn't 
>> work.  Likewise, "value" is required for TextField, even though the 
>> framework will attempt to "autobind" the parameter to a property in the 
>> container matching the component id. As Thiago said, required is from the 
>> component perspective, not from the developer perspective.  I do agree that 
>> it's a bit confusing, though, and it would be nice to distinguish between 
>> "required, but framework attempts a default" from "required, and you must 
>> provide and explicit binding".  Maybe we could add a new boolean: 
>> "defaultAttempted" or "defaultProvided" to achieve this ternary state? 
>> Alternatively, perhaps "required" could be tweaked to an enum: REQUIRED, 
>> REQUIRED_WITH_DEFAULT, NOT_REQUIRED, with a boolean -> enum converter for 
>> backwards compatibility.  False would -> NOT_REQUIRED.  Not sure what true 
>> would convert to, but probably REQUIRED_WITH_DEFAULT since that is the 
>> majority of required parameters out there.
>>
>> Robert
>>
>> On Aug 22, 2011, at 8/2211:09 AM , Bob Harner wrote:
>>
>>> We all agree that it is common for one piece of software to require
>>> something that another piece of software can provide. This is the
>>> whole idea of the concept of "defaults". The user can provide
>>> something directly, or he/she can let the software figure out the best
>>> default value to apply. In those cases, we use the word "optional",
>>> not the word "required". That much is a universal convention, clear
>>> and unambiguous to all.
>>>
>>> In the case of value encoders, if the component needs one and the user
>>> doesn't supply one directly via the "value" parameter, then the
>>> component is expected to figure out the best default to apply. Whether
>>> the best default is one of Tapestry's coercions or a default value
>>> encoder the user has established in some other part of the program is
>>> immaterial to the argument. The documentation says that the parameter
>>> is required, and yet, it is really only the underlying value encoder
>>> that is required, not the parameter.
>>>
>>> I un

java.lang.ClassFormatError: Illegal field modifiers in class lxyz/web2/components/codebook/controls/Button: 0x12

2011-08-22 Thread Steve Ragle
Hi folks,

Trying out 5.3.0.  I was running into this exception:

12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - Illegal field 
modifiers in class lxyz/web2/components/codebook/controls/Button: 0x12
12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - Operations trace:
12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 1] Constructing 
instance of page class lxyz.web2.pages.errors.Error404Page
12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 2] Assembling root 
component for page errors/Error404Page
12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 3] Assembling 
component errors/Error404Page:liabase (lxyz.web2.components.desktop.LiaBase)
12:44:23.062 ERROR  org.apache.tapestry5.ioc.Registry  - [ 4] Assembling 
component errors/Error404Page:liabase.base (lxyz.web2.components.head.BaseHead)
12:44:23.063 ERROR  org.apache.tapestry5.ioc.Registry  - [ 5] Creating 
ComponentAssembler for lxyz.web2.components.forums.LiveLinks
12:44:23.063 ERROR  org.apache.tapestry5.ioc.Registry  - [ 6] Creating 
instantiator for component class lxyz.web2.components.codebook.controls.Link
12:44:23.087 ERROR  stryModule.RequestExceptionHandler - Processing of request 
failed with uncaught exception: Illegal field modifiers in class 
lxyz/web2/components/codebook/controls/Button: 0x12  [1BE517AD] 
java.lang.ClassFormatError: Illegal field modifiers in class 
lxyz/web2/components/codebook/controls/Button: 0x12
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at 
org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:53)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
at 
org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:1722)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:322)
at 
org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at 
org.apache.tapestry5.internal.plastic.PlasticClassLoader.defineClassWithBytecode(PlasticClassLoader.java:53)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.realize(PlasticClassPool.java:140)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.realizeTransformedClass(PlasticClassPool.java:122)
at 
org.apache.tapestry5.internal.plastic.PlasticClassImpl.createInstantiator(PlasticClassImpl.java:1722)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.loadAndTransformClass(PlasticClassPool.java:322)
at 
org.apache.tapestry5.internal.plastic.PlasticClassLoader.loadClass(PlasticClassLoader.java:38)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at 
org.apache.tapestry5.internal.plastic.PlasticClassPool.getClassInstantiator(PlasticClassPool.java:421)
at 
org.apache.tapestry5.plastic.PlasticManager.getClassInstantiator(PlasticManager.java:189)
at 
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$1.invoke(ComponentInstantiatorSourceImpl.java:232)
at 
org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$1.invoke(ComponentInstantiatorSourceImpl.java:226)

The Button class is:
public interface Button {
public ButtonType getButtonType();
public String getActionId();
public boolean isDisabled();
}

After a lot of fiddling around, someone pointed out that an interface like this 
should not be in the components.xyz package to begin with.  This has been like 
this for 2 years and always worked with the javassist in 2.5.2 and older 
tapestry5 code. 

Modifier.java in the jdk defines constants that seem to indicate the offending 
combination is FINAL PRIVATE (assuming the native code that is generating the 
exception is using the same constants):
public static final int PRIVATE= 0x0002;
public static final int FINAL = 0x0010;

The only google results I found that seemed like a remotely-close match were on 
this un-accepted and unanswered tapestry user list question from June:
http://tapestry.1045711.n5.nabble.com/v5-3-and-Scala-Trait-Illegal-field-modifiers-0x12-td4534667.html
  
Maybe Scala happens to be doing something similar.

component scope service with injected messages

2011-08-22 Thread Paul Stanton

Hi all,

I am aware that there is something special about tapestry 
services/resources such as Request, Messages etc which are only 
available in the context of a component render.


I need to create a service which makes heavy use of the messages store 
and is available only in the scope of a component render.


Can someone explain how I can configure this service correctly so that I 
can create it with the appropriated Messages object each time it is used?


Thanks, Paul.

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



Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Howard Lewis Ship
Actually, perhaps Tapestry's client-side support should, by default,
handle 302 correctly.

Currently, Tapestry's JSON response for partial page updates includes
a special key for performing a redirect.

On Mon, Aug 22, 2011 at 2:20 PM, Kalle Korhonen
 wrote:
> On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
>  wrote:
>> I just rewrote my very old ProtectedPageGateKeeper that implemented
>> Dispatcher with a new one
>> inspired by Howard's blog
>> http://tapestryjava.blogspot.com/search/label/security
>> The new one implements ComponentRequestFilter and is better suited for
>> protecting ajax enabled pages.
>> So I thought ...
>> Now to my problem:
>> The redirect that takes place after an ajax call seems to disappear into
>> thin air. I.e. the page displaying
>> a rollling ajax loader is not redirected to my /noacess page. I have to hit
>> a full page refresh for the redirect to work.
>> Is there some trick needed in order to get the redirect to work for an ajax
>> call.
>> Sorry for asking stupid newbie questions ... of course I have missed
>> something again!
>
> I don't think it's a stupid newbie question but obviously you cannot
> just send 302 uri as a response to an ajax request. If you want a full
> page refresh, you can handle it similarly how the tynamo-exceptionpage
> module (http://tynamo.org/tapestry-exceptionpage+guide) handles
> exceptions in ajax responses
> (http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java).
> Or, take a look at T5.3's new ajax error handler, rendering an iframe
> on the fly in response to an ajax error.
>
> Kalle
>
>
>> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG u.s.UtskicketModule.RequestLogger
>> - Request: /group/members.grid.pager/1/grid (Method=POST,
>> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
>> isXHR=true)
>> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
>> u.services.ProtectedPageGateKeeper2 - Page path:
>> /group/members.grid.pager/1/grid
>>
>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
>> - Request: /group/members.grid.pager/7/grid (Method=POST,
>> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
>> isXHR=true)
>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
>> u.services.ProtectedPageGateKeeper2 - Page path:
>> /group/members.grid.pager/7/grid
>> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
>> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
>> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
>>
>> Note: The return from the request above does not show up in the browser ...
>>
>> 2011-08-22 22:01:56.956 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
>> - Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows NT
>> 6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
>> 2011-08-22 22:01:56.960 [btpool0-10] DEBUG
>> u.services.ProtectedPageGateKeeper2 - Page path: /group/members/3
>> 2011-08-22 22:01:56.964 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
>> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
>> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
>>
>> Note: Now we get to the /noaccess page
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

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

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

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



Re: Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Kalle Korhonen
On Mon, Aug 22, 2011 at 1:27 PM, Gunnar Eketrapp
 wrote:
> I just rewrote my very old ProtectedPageGateKeeper that implemented
> Dispatcher with a new one
> inspired by Howard's blog
> http://tapestryjava.blogspot.com/search/label/security
> The new one implements ComponentRequestFilter and is better suited for
> protecting ajax enabled pages.
> So I thought ...
> Now to my problem:
> The redirect that takes place after an ajax call seems to disappear into
> thin air. I.e. the page displaying
> a rollling ajax loader is not redirected to my /noacess page. I have to hit
> a full page refresh for the redirect to work.
> Is there some trick needed in order to get the redirect to work for an ajax
> call.
> Sorry for asking stupid newbie questions ... of course I have missed
> something again!

I don't think it's a stupid newbie question but obviously you cannot
just send 302 uri as a response to an ajax request. If you want a full
page refresh, you can handle it similarly how the tynamo-exceptionpage
module (http://tynamo.org/tapestry-exceptionpage+guide) handles
exceptions in ajax responses
(http://svn.codehaus.org/tynamo/trunk/tapestry-exceptionpage/src/main/java/org/tynamo/exceptionpage/services/ConfigurableRequestExceptionHandler.java).
Or, take a look at T5.3's new ajax error handler, rendering an iframe
on the fly in response to an ajax error.

Kalle


> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: /group/members.grid.pager/1/grid (Method=POST,
> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
> isXHR=true)
> 2011-08-22 21:54:53.243 [btpool0-11] DEBUG
> u.services.ProtectedPageGateKeeper2 - Page path:
> /group/members.grid.pager/1/grid
>
> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: /group/members.grid.pager/7/grid (Method=POST,
> browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
> isXHR=true)
> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG
> u.services.ProtectedPageGateKeeper2 - Page path:
> /group/members.grid.pager/7/grid
> 2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
>
> Note: The return from the request above does not show up in the browser ...
>
> 2011-08-22 22:01:56.956 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows NT
> 6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
> 2011-08-22 22:01:56.960 [btpool0-10] DEBUG
> u.services.ProtectedPageGateKeeper2 - Page path: /group/members/3
> 2011-08-22 22:01:56.964 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
> - Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
> rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
>
> Note: Now we get to the /noaccess page
>

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



Re: components and events

2011-08-22 Thread Robert Zeigler
If you're using tapestry's form components inside your component, and binding 
the values, then all of the values should be updated automatically.  The main 
thing is to make sure that the property path to be updated still references a 
valid object.  For instance, if I have a form:


  


With mycomponent looking something like:


Then as long as "someobject" isn't null on form submission, it's "someProperty" 
property will be updated for you, after passing validation, by the textfield 
component.

Without seeing more specific details, I can't say much more.

Robert

On Aug 22, 2011, at 8/223:59 PM , Jens Breitenstein wrote:

> Am 22.08.11 22:36, schrieb Robert Zeigler:
>> I'm not quite sure what you mean by "set back" the values in the model, but 
>> it sounds like you're extracting information in setup render that the 
>> component needs to determine how to render, and that the same information is 
>> necessary for correctly processing the form submission?
> precisely
> 
> in setupRender my component reads partly values from the model and displays 
> then without any logic implemented in the form / page class.
> 
> in case the form is submitted and passes the validation, from an OO 
> perspective my component is responsible to "read the UI settings (user 
> selection / changes)" and transfer the information back to the model without 
> requirering / accessing the page .
> 
> Thus each compont is fully responsible for a particular section in the 
> overall model without creating a hugh page or any dependency between each 
> other and I can assemble them in nearly any way I want.
> 
>> In any event, the way components typically interact with a form submission 
>> is by using the "FormSupport" environmental object:
>> 
>> @Environmental
>> FormSupport formSupport;
>> 
>> It let's you store and execute "ComponentAction" objects.  For instance, 
>> this is from AbstractField:
>> 
>> formSupport.storeAndExecute(this, new Setup(controlName));
>> formSupport.store(this, PROCESS_SUBMISSION_ACTION);
>> 
>> storeAndExecute will take the provided ComponentAction and execute it 
>> immediately.  It will also be "stored" into the form and when the form is 
>> submitted, the ComponentAction will be executed again.
>> 
>> The "store" call is similar, except that it only executes on form submission.
> 
> Will try. Seems to be more complicated as expected (or it's just to late for 
> me rigth now, near midnight...  ;-)
>> 
>> So if you have some logic that needs to execute before rendering the 
>> component, and also before processing the form submission, refactor that 
>> logic into a ComponentAction and use formSupport.storeAndExecute.
>> 
>> Robert
> 
> I refactor my read / write code so that all components become part of 
> formSupport and let you know the results
> 
> 
> Many thanks Robert for the quick help
> 
> 
>> On Aug 22, 2011, at 8/223:26 PM , Jens Breitenstein wrote:
>> 
>>> Hi Robert!
>>> 
>>> I have a hugh and complex form and tried to create components and cut down 
>>> the page code. Each component gets access to the model by a parameter and 
>>> in setupRender each component extracts the relevant data and adjusts the 
>>> visual elements like text / checkbox accordingly to reflect the state which 
>>> just works perfect. Furthermore this opens the door to dynamically show 
>>> different components (other visual elements like dropdown instead of list 
>>> of radio btns) without touching the page any longer (more or less).
>>> 
>>> So I achieved the first half. I wonder how a component can participate on 
>>> form events (especially onSubmit) which would give me a chance to "set 
>>> back" the values in my model. This is more or less full OO as the component 
>>> is responsible for displaying info from a model and updating the model and 
>>> the page becomes just a container for components without "transfer" logic. 
>>> This would allow me to reuse my componts much easier.
>>> 
>>> I can use @property(write = false) and add a setter to keep track of the 
>>> input values of each component element, but to me it feels just wrong as I 
>>> depend on many single set calls instead of one submit method which clearly 
>>> indicates it's sole purpose on a page.
>>> 
>>> 
>>> Jens
>>> 
>>> 
>>> 
>>> Am 22.08.11 22:10, schrieb Robert Zeigler:
 No. Events bubble up, so if you have:
 
 
   
 
 
 The form can "see" the events from somecomponent, and the page will see 
 events from form and somecomponent, but somecomponent won't see the form's 
 event.
 
 What are you trying to accomplish?
 
 Robert
 
 On Aug 22, 2011, at 8/223:04 PM , Jens Breitenstein wrote:
 
> Hi all!
> 
> is it possible for a component to listen to the "success" event from the 
> enclosing form?
> I tried various onEvent combinations but my annotated component method is 
> never called...
> 
> 
> Jens
> 
> ---

Re: components and events

2011-08-22 Thread Jens Breitenstein

Am 22.08.11 22:36, schrieb Robert Zeigler:

I'm not quite sure what you mean by "set back" the values in the model, but it 
sounds like you're extracting information in setup render that the component needs to 
determine how to render, and that the same information is necessary for correctly 
processing the form submission?

precisely

in setupRender my component reads partly values from the model and 
displays then without any logic implemented in the form / page class.


in case the form is submitted and passes the validation, from an OO 
perspective my component is responsible to "read the UI settings (user 
selection / changes)" and transfer the information back to the model 
without requirering / accessing the page .


Thus each compont is fully responsible for a particular section in the 
overall model without creating a hugh page or any dependency between 
each other and I can assemble them in nearly any way I want.



In any event, the way components typically interact with a form submission is by using 
the "FormSupport" environmental object:

@Environmental
FormSupport formSupport;

It let's you store and execute "ComponentAction" objects.  For instance, this 
is from AbstractField:

 formSupport.storeAndExecute(this, new Setup(controlName));
 formSupport.store(this, PROCESS_SUBMISSION_ACTION);

storeAndExecute will take the provided ComponentAction and execute it immediately.  It 
will also be "stored" into the form and when the form is submitted, the 
ComponentAction will be executed again.

The "store" call is similar, except that it only executes on form submission.


Will try. Seems to be more complicated as expected (or it's just to late 
for me rigth now, near midnight...  ;-)


So if you have some logic that needs to execute before rendering the component, 
and also before processing the form submission, refactor that logic into a 
ComponentAction and use formSupport.storeAndExecute.

Robert


I refactor my read / write code so that all components become part of 
formSupport and let you know the results



Many thanks Robert for the quick help



On Aug 22, 2011, at 8/223:26 PM , Jens Breitenstein wrote:


Hi Robert!

I have a hugh and complex form and tried to create components and cut down the 
page code. Each component gets access to the model by a parameter and in 
setupRender each component extracts the relevant data and adjusts the visual 
elements like text / checkbox accordingly to reflect the state which just works 
perfect. Furthermore this opens the door to dynamically show different 
components (other visual elements like dropdown instead of list of radio btns) 
without touching the page any longer (more or less).

So I achieved the first half. I wonder how a component can participate on form events (especially 
onSubmit) which would give me a chance to "set back" the values in my model. This is more 
or less full OO as the component is responsible for displaying info from a model and updating the 
model and the page becomes just a container for components without "transfer" logic. This 
would allow me to reuse my componts much easier.

I can use @property(write = false) and add a setter to keep track of the input 
values of each component element, but to me it feels just wrong as I depend on 
many single set calls instead of one submit method which clearly indicates it's 
sole purpose on a page.


Jens



Am 22.08.11 22:10, schrieb Robert Zeigler:

No. Events bubble up, so if you have:


   


The form can "see" the events from somecomponent, and the page will see events 
from form and somecomponent, but somecomponent won't see the form's event.

What are you trying to accomplish?

Robert

On Aug 22, 2011, at 8/223:04 PM , Jens Breitenstein wrote:


Hi all!

is it possible for a component to listen to the "success" event from the 
enclosing form?
I tried various onEvent combinations but my annotated component method is never 
called...


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



-
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: components and events

2011-08-22 Thread Robert Zeigler
I'm not quite sure what you mean by "set back" the values in the model, but it 
sounds like you're extracting information in setup render that the component 
needs to determine how to render, and that the same information is necessary 
for correctly processing the form submission?

In any event, the way components typically interact with a form submission is 
by using the "FormSupport" environmental object:

@Environmental
FormSupport formSupport;

It let's you store and execute "ComponentAction" objects.  For instance, this 
is from AbstractField:

formSupport.storeAndExecute(this, new Setup(controlName));
formSupport.store(this, PROCESS_SUBMISSION_ACTION);

storeAndExecute will take the provided ComponentAction and execute it 
immediately.  It will also be "stored" into the form and when the form is 
submitted, the ComponentAction will be executed again.

The "store" call is similar, except that it only executes on form submission.

So if you have some logic that needs to execute before rendering the component, 
and also before processing the form submission, refactor that logic into a 
ComponentAction and use formSupport.storeAndExecute.

Robert

On Aug 22, 2011, at 8/223:26 PM , Jens Breitenstein wrote:

> Hi Robert!
> 
> I have a hugh and complex form and tried to create components and cut down 
> the page code. Each component gets access to the model by a parameter and in 
> setupRender each component extracts the relevant data and adjusts the visual 
> elements like text / checkbox accordingly to reflect the state which just 
> works perfect. Furthermore this opens the door to dynamically show different 
> components (other visual elements like dropdown instead of list of radio 
> btns) without touching the page any longer (more or less).
> 
> So I achieved the first half. I wonder how a component can participate on 
> form events (especially onSubmit) which would give me a chance to "set back" 
> the values in my model. This is more or less full OO as the component is 
> responsible for displaying info from a model and updating the model and the 
> page becomes just a container for components without "transfer" logic. This 
> would allow me to reuse my componts much easier.
> 
> I can use @property(write = false) and add a setter to keep track of the 
> input values of each component element, but to me it feels just wrong as I 
> depend on many single set calls instead of one submit method which clearly 
> indicates it's sole purpose on a page.
> 
> 
> Jens
> 
> 
> 
> Am 22.08.11 22:10, schrieb Robert Zeigler:
>> No. Events bubble up, so if you have:
>> 
>> 
>>   
>> 
>> 
>> The form can "see" the events from somecomponent, and the page will see 
>> events from form and somecomponent, but somecomponent won't see the form's 
>> event.
>> 
>> What are you trying to accomplish?
>> 
>> Robert
>> 
>> On Aug 22, 2011, at 8/223:04 PM , Jens Breitenstein wrote:
>> 
>>> Hi all!
>>> 
>>> is it possible for a component to listen to the "success" event from the 
>>> enclosing form?
>>> I tried various onEvent combinations but my annotated component method is 
>>> never called...
>>> 
>>> 
>>> 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
> 


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



Problem with securing ajax enabled Tapestry pages with Annotations ...

2011-08-22 Thread Gunnar Eketrapp
I just rewrote my very old ProtectedPageGateKeeper that implemented
Dispatcher with a new one
inspired by Howard's blog
http://tapestryjava.blogspot.com/search/label/security

The new one implements ComponentRequestFilter and is better suited for
protecting ajax enabled pages.
So I thought ...

Now to my problem:

The redirect that takes place after an ajax call seems to disappear into
thin air. I.e. the page displaying
a rollling ajax loader is not redirected to my /noacess page. I have to hit
a full page refresh for the redirect to work.

Is there some trick needed in order to get the redirect to work for an ajax
call.

Sorry for asking stupid newbie questions ... of course I have missed
something again!

Thanks in advance!
Gunnar Eketrapp

2011-08-22 21:54:53.243 [btpool0-11] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members.grid.pager/1/grid (Method=POST,
browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
isXHR=true)
2011-08-22 21:54:53.243 [btpool0-11] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path:
/group/members.grid.pager/1/grid

2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members.grid.pager/7/grid (Method=POST,
browser=Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0,
isXHR=true)
2011-08-22 22:01:06.500 [btpool0-10] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path:
/group/members.grid.pager/7/grid
2011-08-22 22:01:06.500 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)

Note: The return from the request above does not show up in the browser ...

2011-08-22 22:01:56.956 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /group/members/3 (Method=GET, browser=Mozilla/5.0 (Windows NT
6.1; rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)
2011-08-22 22:01:56.960 [btpool0-10] DEBUG
u.services.ProtectedPageGateKeeper2 - Page path: /group/members/3
2011-08-22 22:01:56.964 [btpool0-10] DEBUG u.s.UtskicketModule.RequestLogger
- Request: /noaccess (Method=GET, browser=Mozilla/5.0 (Windows NT 6.1;
rv:5.0) Gecko/20100101 Firefox/5.0, isXHR=false)

Note: Now we get to the /noaccess page


Re: components and events

2011-08-22 Thread Jens Breitenstein

Hi Robert!

I have a hugh and complex form and tried to create components and cut 
down the page code. Each component gets access to the model by a 
parameter and in setupRender each component extracts the relevant data 
and adjusts the visual elements like text / checkbox accordingly to 
reflect the state which just works perfect. Furthermore this opens the 
door to dynamically show different components (other visual elements 
like dropdown instead of list of radio btns) without touching the page 
any longer (more or less).


So I achieved the first half. I wonder how a component can participate 
on form events (especially onSubmit) which would give me a chance to 
"set back" the values in my model. This is more or less full OO as the 
component is responsible for displaying info from a model and updating 
the model and the page becomes just a container for components without 
"transfer" logic. This would allow me to reuse my componts much easier.


I can use @property(write = false) and add a setter to keep track of the 
input values of each component element, but to me it feels just wrong as 
I depend on many single set calls instead of one submit method which 
clearly indicates it's sole purpose on a page.



Jens



Am 22.08.11 22:10, schrieb Robert Zeigler:

No. Events bubble up, so if you have:


   


The form can "see" the events from somecomponent, and the page will see events 
from form and somecomponent, but somecomponent won't see the form's event.

What are you trying to accomplish?

Robert

On Aug 22, 2011, at 8/223:04 PM , Jens Breitenstein wrote:


Hi all!

is it possible for a component to listen to the "success" event from the 
enclosing form?
I tried various onEvent combinations but my annotated component method is never 
called...


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



[ANN] Version 1.3 of tapestry-tagselect released

2011-08-22 Thread Joakim Olsson
Hi,

I just released version 1.3 of tapestry-tagselect
(https://github.com/argoyle/tapestry-tagselect).

New in this release is the possibility to use it either as a
multi-select by providing a Collection or a single-select by providing
a single value.

Regards,
Joakim

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



Re: components and events

2011-08-22 Thread Robert Zeigler
No. Events bubble up, so if you have:


  


The form can "see" the events from somecomponent, and the page will see events 
from form and somecomponent, but somecomponent won't see the form's event.

What are you trying to accomplish?

Robert

On Aug 22, 2011, at 8/223:04 PM , Jens Breitenstein wrote:

> Hi all!
> 
> is it possible for a component to listen to the "success" event from the 
> enclosing form?
> I tried various onEvent combinations but my annotated component method is 
> never called...
> 
> 
> 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



components and events

2011-08-22 Thread Jens Breitenstein

Hi all!

is it possible for a component to listen to the "success" event from the 
enclosing form?
I tried various onEvent combinations but my annotated component method 
is never called...



Jens

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



Re: has Tapestry integrated the comet?

2011-08-22 Thread Josh Canfield
There is no comet integration in the framework, but it shouldn't be
too difficult to integrate something that works with servlets. I'm not
familiar with pushlet though.

On Sun, Aug 21, 2011 at 11:53 PM, dick_hu  wrote:
> I want to use the comet in my app.
> Has Tapestry integrated any comet frame. such as pushlet
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/has-Tapestry-integrated-the-comet-tp4722353p4722353.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> 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: Tapestry apache2 and tomcat

2011-08-22 Thread Kalle Korhonen
It's not a workaround, but one way to set things up. There many, many
other possible configurations. You'll quickly learn that running a
website is quite a bit more than just building a web application. If
you are not using Apache httpd for anything, ask yourself if you
really need it at all - you'll lose a bit of performance with every
layer of abstraction. One of the easiest options is to simply forward
the traffic from 80 to 8080, in which case you need to modify your
iptable configuration. If you want httpd in front, you can configure
proxypass with the following:

ProxyPass / ajp://localhost:8009/PizzAroundMe/ (see
http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html)

You also need to tell tomcat to use your host name (see
http://tomcat.apache.org/tomcat-7.0-doc/config/host.html) and override
Tapestry's BaseUrlSource in case you use other than root context.

If you are starting from scratch, these days I'd look into deploying
on Google App Engine, CloudFoundry, CloudBees or perhaps Amazon
Beanstalk instead of running your own (virtual) servers. It'll make
certain deployment related things easier - albeit other things more
difficult.

Kalle


On Mon, Aug 22, 2011 at 10:29 AM, Dimitri  wrote:
> Yeah but it's more a workaround than a solution, since i m quite new to
> tomcat/apache/t5 (yes, i just pointed everything) i ll try to do with the
> PizzAroundMe name and try to understand why does the links contain it.
>
> Thank you anyway!
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4724076.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> 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: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Josh Canfield
@Parameter already has the "autoconnect" attribute to determine
whether the framework will attempt to find a value for the parameter.

The Component Report should be updated to include that information in
the "flags" column.


Currently the flags for TextField's value parameter read:

Required, NOT Allow Null

It could be changed to read:

Required, AutoConnect, Not Null

It would be nice if that HTML was cleaned up a bit as well, those
values get squished and being less readable...

As a side not; I find "NOT Allow Null" to be... not optimal for easy reading.

Are we going to continue using the tapestry-component-report build the
doc going forward?

Josh

On Mon, Aug 22, 2011 at 10:04 AM, Robert Zeigler
 wrote:
> I would prefer to keep the required clause. The difference between a required 
> parameter and one that isn't is that if no value is available for the 
> required parameter (whether user or framework provided), the component 
> /cannot/ function.  An /optional/ parameter is one where the component /can/ 
> function, even if there is no value provided (by the user or framework) for 
> the value.  AjaxFormLoop absolutely MUST have a value encoder, or it doesn't 
> work.  Likewise, "value" is required for TextField, even though the framework 
> will attempt to "autobind" the parameter to a property in the container 
> matching the component id. As Thiago said, required is from the component 
> perspective, not from the developer perspective.  I do agree that it's a bit 
> confusing, though, and it would be nice to distinguish between "required, but 
> framework attempts a default" from "required, and you must provide and 
> explicit binding".  Maybe we could add a new boolean: "defaultAttempted" or 
> "defaultProvided" to achieve this ternary state? Alternatively, perhaps 
> "required" could be tweaked to an enum: REQUIRED, REQUIRED_WITH_DEFAULT, 
> NOT_REQUIRED, with a boolean -> enum converter for backwards compatibility.  
> False would -> NOT_REQUIRED.  Not sure what true would convert to, but 
> probably REQUIRED_WITH_DEFAULT since that is the majority of required 
> parameters out there.
>
> Robert
>
> On Aug 22, 2011, at 8/2211:09 AM , Bob Harner wrote:
>
>> We all agree that it is common for one piece of software to require
>> something that another piece of software can provide. This is the
>> whole idea of the concept of "defaults". The user can provide
>> something directly, or he/she can let the software figure out the best
>> default value to apply. In those cases, we use the word "optional",
>> not the word "required". That much is a universal convention, clear
>> and unambiguous to all.
>>
>> In the case of value encoders, if the component needs one and the user
>> doesn't supply one directly via the "value" parameter, then the
>> component is expected to figure out the best default to apply. Whether
>> the best default is one of Tapestry's coercions or a default value
>> encoder the user has established in some other part of the program is
>> immaterial to the argument. The documentation says that the parameter
>> is required, and yet, it is really only the underlying value encoder
>> that is required, not the parameter.
>>
>> I understand the thinking behind the current usage of the word
>> "required" in this case. I really do. It was a carefully-made
>> compromise to make a binary value fit what is really a ternary choice.
>> But the usage just doesn't fit with well-established conventions, and
>> it's an obstacle to users in trying to understand how to use the
>> framework.
>>
>> Theoretically, to fix this, I guess we would just need to remove the
>> "required" clause from those several components that use value
>> encoders, and then improve the exception message that displays when
>> Tapestry can't find a value encoder to use. Anything else?
>>
>> On Mon, Aug 22, 2011 at 8:47 AM, Thiago H. de Paula Figueiredo
>>  wrote:
>>> On Mon, 22 Aug 2011 07:36:08 -0300, Massimo Lusetti 
>>> wrote:
>>>
 BTW I find completely usual having a piece of software requiring
 something and having another piece of software providing it.
 It seems obvious that the latter could be user's code or another
 module of the same software or a third party module too.
>>>
>>> I don't think this is unusual. It means the component parameter requires a
>>> value, regardless where it comes from. This is not the same as saying the
>>> user is required to provide a value. The requirement here is from the
>>> component parameter view, not the user (developer) one.
>>>
>>> (Breaking the threading because I mistakenly sent the message just to
>>> Massimo instead of to the list and I already deleted the message, so I
>>> cannot reply to it directly).
>>>
>>> --
>>> Thiago H. de Paula Figueiredo
>>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>>> and instructor
>>> Owner, Ars Machina Tecnologia da Informação Ltda.
>>> http://www.arsmachina.com.br
>>>
>>> --

Re: Tapestry apache2 and tomcat

2011-08-22 Thread Lenny Primak
It's not a workaround. This is just how it works. You can always have an HTML 
or ajp proxy on apache to rewrite the paths but ROOT.war is easier. 



On Aug 22, 2011, at 12:29 PM, Dimitri  wrote:

> Yeah but it's more a workaround than a solution, since i m quite new to
> tomcat/apache/t5 (yes, i just pointed everything) i ll try to do with the
> PizzAroundMe name and try to understand why does the links contain it. 
> 
> Thank you anyway!
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4724076.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> 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: Tapestry apache2 and tomcat

2011-08-22 Thread Dimitri
Yeah but it's more a workaround than a solution, since i m quite new to
tomcat/apache/t5 (yes, i just pointed everything) i ll try to do with the
PizzAroundMe name and try to understand why does the links contain it. 

Thank you anyway!

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4724076.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: remove red cross from the field vlidator

2011-08-22 Thread leothelion
Thank you so much! Also, thank you Thiago and Dusko. 
This is a great place for Tapestry lovers.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/remove-red-cross-from-the-field-vlidator-tp4717200p4724060.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Palette and Checklist don't use contributed value encoder?

2011-08-22 Thread Robert Zeigler
I would prefer to keep the required clause. The difference between a required 
parameter and one that isn't is that if no value is available for the required 
parameter (whether user or framework provided), the component /cannot/ 
function.  An /optional/ parameter is one where the component /can/ function, 
even if there is no value provided (by the user or framework) for the value.  
AjaxFormLoop absolutely MUST have a value encoder, or it doesn't work.  
Likewise, "value" is required for TextField, even though the framework will 
attempt to "autobind" the parameter to a property in the container matching the 
component id. As Thiago said, required is from the component perspective, not 
from the developer perspective.  I do agree that it's a bit confusing, though, 
and it would be nice to distinguish between "required, but framework attempts a 
default" from "required, and you must provide and explicit binding".  Maybe we 
could add a new boolean: "defaultAttempted" or "defaultProvided" to achieve 
this ternary state? Alternatively, perhaps "required" could be tweaked to an 
enum: REQUIRED, REQUIRED_WITH_DEFAULT, NOT_REQUIRED, with a boolean -> enum 
converter for backwards compatibility.  False would -> NOT_REQUIRED.  Not sure 
what true would convert to, but probably REQUIRED_WITH_DEFAULT since that is 
the majority of required parameters out there.

Robert

On Aug 22, 2011, at 8/2211:09 AM , Bob Harner wrote:

> We all agree that it is common for one piece of software to require
> something that another piece of software can provide. This is the
> whole idea of the concept of "defaults". The user can provide
> something directly, or he/she can let the software figure out the best
> default value to apply. In those cases, we use the word "optional",
> not the word "required". That much is a universal convention, clear
> and unambiguous to all.
> 
> In the case of value encoders, if the component needs one and the user
> doesn't supply one directly via the "value" parameter, then the
> component is expected to figure out the best default to apply. Whether
> the best default is one of Tapestry's coercions or a default value
> encoder the user has established in some other part of the program is
> immaterial to the argument. The documentation says that the parameter
> is required, and yet, it is really only the underlying value encoder
> that is required, not the parameter.
> 
> I understand the thinking behind the current usage of the word
> "required" in this case. I really do. It was a carefully-made
> compromise to make a binary value fit what is really a ternary choice.
> But the usage just doesn't fit with well-established conventions, and
> it's an obstacle to users in trying to understand how to use the
> framework.
> 
> Theoretically, to fix this, I guess we would just need to remove the
> "required" clause from those several components that use value
> encoders, and then improve the exception message that displays when
> Tapestry can't find a value encoder to use. Anything else?
> 
> On Mon, Aug 22, 2011 at 8:47 AM, Thiago H. de Paula Figueiredo
>  wrote:
>> On Mon, 22 Aug 2011 07:36:08 -0300, Massimo Lusetti 
>> wrote:
>> 
>>> BTW I find completely usual having a piece of software requiring
>>> something and having another piece of software providing it.
>>> It seems obvious that the latter could be user's code or another
>>> module of the same software or a third party module too.
>> 
>> I don't think this is unusual. It means the component parameter requires a
>> value, regardless where it comes from. This is not the same as saying the
>> user is required to provide a value. The requirement here is from the
>> component parameter view, not the user (developer) one.
>> 
>> (Breaking the threading because I mistakenly sent the message just to
>> Massimo instead of to the list and I already deleted the message, so I
>> cannot reply to it directly).
>> 
>> --
>> Thiago H. de Paula Figueiredo
>> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
>> and instructor
>> Owner, Ars Machina Tecnologia da Informação Ltda.
>> http://www.arsmachina.com.br
>> 
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: dev-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: dev-h...@tapestry.apache.org
> 


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



Re: Tapestry apache2 and tomcat

2011-08-22 Thread Lenny Primak
To verify that its not a T5 issue (I don't believe that it is)
just rename your app and watch all of your context links change.
The ROOT.war approach should work.


On Aug 22, 2011, at 11:24 AM, Dimitri wrote:

> Thank you for your replies. 
> 
> I still can't get it working, i set PizzAroundMe as root app in tomcat, but
> it does not help. 
> 
> I though it was more a t5 issue, since it will append /PizzAroundMe/ at the
> end of every link or submit button, i am wrong ?
> 
> Thank you. 
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4723926.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> 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: Tapestry apache2 and tomcat

2011-08-22 Thread Dimitri
Thank you for your replies. 

I still can't get it working, i set PizzAroundMe as root app in tomcat, but
it does not help. 

I though it was more a t5 issue, since it will append /PizzAroundMe/ at the
end of every link or submit button, i am wrong ?

Thank you. 

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4723926.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Add extra buttons in beaneditform

2011-08-22 Thread Taha Hafeez
BeanEditForm is just a wrapper around BeanEditor. You can always use the latter.

On Mon, Aug 22, 2011 at 9:24 PM, TG  wrote:
> It seems like with  label using t:submitLabel="Submit" but I can not have extra button. My use
> case is, when a user click on the default button, it will go back to the
> Start and if the user click on Save (the extra button that I will be
> adding), it will remain in the save beaneditform page.
>
> How do I do that with beaneditform?
>
> Thanks.
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Add-extra-buttons-in-beaneditform-tp4723870p4723870.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: Add extra buttons in beaneditform

2011-08-22 Thread Kalle Korhonen
On Mon, Aug 22, 2011 at 8:54 AM, TG  wrote:
> It seems like with  label using t:submitLabel="Submit" but I can not have extra button. My use
> case is, when a user click on the default button, it will go back to the
> Start and if the user click on Save (the extra button that I will be
> adding), it will remain in the save beaneditform page.
> How do I do that with beaneditform?

Use the components that make up the beaneditform separately, see links
to its components from:
http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/BeanEditForm.html

Kalle

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



Add extra buttons in beaneditform

2011-08-22 Thread TG
It seems like with http://tapestry.1045711.n5.nabble.com/Add-extra-buttons-in-beaneditform-tp4723870p4723870.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: [ANN] JumpStart 5.4 does Tapestry 5.2.6

2011-08-22 Thread Taha Hafeez
Great !!

Congrats Geoff

On Mon, Aug 22, 2011 at 8:12 PM, Geoff Callender
 wrote:
> Hi all,
>
> JumpStart has been upgraded to use Tapestry 5.2.6. And...
>
> - A lot of examples have been added recently to demonstrate 
> ProgressiveDisplay, AJAX Periodic Updates (auto-refresh), Scriptaculous, and 
> Delegates and Blocks.
>
> - Also, there are improvements to the examples of Object Select, Custom 
> Validators, Event Bubbling, and Event Links.
>
> - Plus, the css has been reworked in many places to give a fresher look. IE 
> and Firefox are handled better, too.
>
> - Plus, it handles the newly released JBoss 6.1.0.
>
> Here's the demo:
>
>         http://jumpstart.doublenegative.com.au/jumpstart/
>
> As always there's room for more improvement, so please let me know your 
> thoughts and whether you've found any bugs or questionable techniques!
>
> Cheers,
>
> Geoff



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: Tapestry apache2 and tomcat

2011-08-22 Thread Lenny Primak
I believe that if you put your app as ROOT.war in tomcat, it will be the root 
context, thus fixing your issue.

On Aug 22, 2011, at 5:09 AM, Dimitri wrote:

> Hi all, 
> I would like to put my website online, using apache2 and tomcat. 
> 
> Deploying the war with tomcat worked fine and using the tomcat url is good,
> but it requires the :8080 and the app context name in the url. Also i would
> like to disable tomcat http listener on 8080 for security reason, and only
> reply to ajp, wich is listening on 8009.
> 
> Apache2 is then configured to forward request from port 80 to port 8009
> using ajp protocol. 
> 
> Here is the result: http://pizzaroundme.com
> 
> As you can see the the html source, css file (and others) are containing the
> context name in the url, for instance:
> Image source //PizzAroundMe/assets/tapestry/5.1.0.5/spacer.gif/ is not
> working
> Image source /assets/tapestry/5.1.0.5/spacer.gif/ is working
> 
> Also the PizzAroundMe actionlink on the top targets
> http://pizzaroundme.com/PizzAroundMe
> the "recherche" button on the bottom also targets the url with context
> appended, all this doesn't work because of the context name present here
> 
> I m a bit confused here, should i fix it with tomcat config ? tapestry
> config :s ?
> I think it's a tapestry config issue, any clue ?
> 
> Thank you !
> 
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4722849.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> -
> 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: Tapestry 4 @TextField Problem

2011-08-22 Thread legacydeveloper

Jonathan Barker wrote:
> 
> My T4 is a little rusty, but if you post your code, I'll give it a shot.
> -- 
> Jonathan Barker
> ITStrategic
> 

I found what my problem was shortly after I posted this, I had my @TextField
placed lower on the page than the submit button that was reading the value. 
Despite being in the same form, the page would complete the submit task
before reading in the value, so it was being read correctly just not in the
proper order.

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-4-TextField-Problem-tp4715972p4723751.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



[ANN] JumpStart 5.4 does Tapestry 5.2.6

2011-08-22 Thread Geoff Callender
Hi all,

JumpStart has been upgraded to use Tapestry 5.2.6. And...

- A lot of examples have been added recently to demonstrate ProgressiveDisplay, 
AJAX Periodic Updates (auto-refresh), Scriptaculous, and Delegates and Blocks.

- Also, there are improvements to the examples of Object Select, Custom 
Validators, Event Bubbling, and Event Links.

- Plus, the css has been reworked in many places to give a fresher look. IE and 
Firefox are handled better, too.

- Plus, it handles the newly released JBoss 6.1.0.

Here's the demo:

 http://jumpstart.doublenegative.com.au/jumpstart/ 

As always there's room for more improvement, so please let me know your 
thoughts and whether you've found any bugs or questionable techniques!

Cheers,

Geoff

Re: Tapestry integration with Maven and subversion

2011-08-22 Thread Taha Hafeez
To add to what Nicolas has already said, typically we don't include
the target folder or ide related settings (e.g. in case of eclipse
.classpath, .settings/ etc). This mostly leaves the src folder in case
of maven.

Also I prefer git over svn but that is one's personal preference !!

On Mon, Aug 22, 2011 at 7:32 PM, Nicolas Barrera  wrote:
> Hi,
>
> I don't know if this is a topic to be treated on this list but here come my
> thoughts...
>
> a) maven:
>
> if you used the tapestry maven archetype to create the project that you 're
> currently working at... you 're almost done.., in fact... if you 're running
> your t5 applicaction using the maven jetty plugin... well you 're done.
>
> b) subversion:
>
> you could just upload (import) your project into a svn structure (it's good
> to know and apply the trunk/tags/branches directory structure) using any svn
> client (e.g.: tortoise svn on windows or just svn on command line at linux).
>
> AFAIK Maven and SVN integration is not needed to share a maven project...
> it's needed only if you want to deal with automatic releases, in which case
> you would need to search through the "maven release" and "maven scm"
> plugin's site/mailing list.
>
> hope that helps...
>
> cheers.
>
> Nicolás.-
>
>
> On Mon, Aug 22, 2011 at 6:28 AM, captain_rhino <
> graeme.kitc...@axa-travel-insurance.com> wrote:
>
>> I've been building a tapestry prototype over the last few weeks for a new
>> project.
>>
>> I've been happily building away and running through jetty.
>>
>> Now has come the time that other developer(s) are going top have to work on
>> the project.
>>
>> I am no expert in Maven but on a high level how would I integrate my
>> tapestry project with subserversion and maven.  Should I just be checking
>> into subversion certain directories that my fellow developers can then
>> check
>> out?  Or is there something in Maven that enables me to do this easily?
>>
>> If someone could point me in the right direction it would be much
>> appreciated.
>>
>> regards&thanks
>>
>>
>>
>> --
>> View this message in context:
>> http://tapestry.1045711.n5.nabble.com/Tapestry-integration-with-Maven-and-subversion-tp4722727p4722727.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

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



Re: Tapestry apache2 and tomcat

2011-08-22 Thread Massimo Lusetti
On Mon, Aug 22, 2011 at 12:09 PM, Dimitri  wrote:

> Hi all,
> I would like to put my website online, using apache2 and tomcat.
>
> Deploying the war with tomcat worked fine and using the tomcat url is good,
> but it requires the :8080 and the app context name in the url. Also i would
> like to disable tomcat http listener on 8080 for security reason, and only
> reply to ajp, wich is listening on 8009.
>
> Apache2 is then configured to forward request from port 80 to port 8009
> using ajp protocol.
>
> Here is the result: http://pizzaroundme.com
>
> As you can see the the html source, css file (and others) are containing the
> context name in the url, for instance:
> Image source //PizzAroundMe/assets/tapestry/5.1.0.5/spacer.gif/ is not
> working
> Image source /assets/tapestry/5.1.0.5/spacer.gif/ is working
>
> Also the PizzAroundMe actionlink on the top targets
> http://pizzaroundme.com/PizzAroundMe
> the "recherche" button on the bottom also targets the url with context
> appended, all this doesn't work because of the context name present here
>
> I m a bit confused here, should i fix it with tomcat config ? tapestry
> config :s ?
> I think it's a tapestry config issue, any clue ?
>
> Thank you !

This indeed would need some more docs cause is actually not so simple
as it should be but since the are so many way to daploy a web app it
is difficult to generalize more then the current solution.

BTW do you need to play with the BaseSource service and with the
rewrite and proxy options of apache(httpd)
-- 
Massimo
http://meridio.blogspot.com

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



Re: Tapestry integration with Maven and subversion

2011-08-22 Thread Nicolas Barrera
Hi,

I don't know if this is a topic to be treated on this list but here come my
thoughts...

a) maven:

if you used the tapestry maven archetype to create the project that you 're
currently working at... you 're almost done.., in fact... if you 're running
your t5 applicaction using the maven jetty plugin... well you 're done.

b) subversion:

you could just upload (import) your project into a svn structure (it's good
to know and apply the trunk/tags/branches directory structure) using any svn
client (e.g.: tortoise svn on windows or just svn on command line at linux).

AFAIK Maven and SVN integration is not needed to share a maven project...
it's needed only if you want to deal with automatic releases, in which case
you would need to search through the "maven release" and "maven scm"
plugin's site/mailing list.

hope that helps...

cheers.

Nicolás.-


On Mon, Aug 22, 2011 at 6:28 AM, captain_rhino <
graeme.kitc...@axa-travel-insurance.com> wrote:

> I've been building a tapestry prototype over the last few weeks for a new
> project.
>
> I've been happily building away and running through jetty.
>
> Now has come the time that other developer(s) are going top have to work on
> the project.
>
> I am no expert in Maven but on a high level how would I integrate my
> tapestry project with subserversion and maven.  Should I just be checking
> into subversion certain directories that my fellow developers can then
> check
> out?  Or is there something in Maven that enables me to do this easily?
>
> If someone could point me in the right direction it would be much
> appreciated.
>
> regards&thanks
>
>
>
> --
> View this message in context:
> http://tapestry.1045711.n5.nabble.com/Tapestry-integration-with-Maven-and-subversion-tp4722727p4722727.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


custom head component

2011-08-22 Thread Ken in Nashua

Hi All,

Been getting into tap5 fairly heavily... and must say... I am impressed this 
time. Much so over previous versions. finally... pheew

Best feature I believe is the unbeatable extensibility...by design... since day 
one... and I believe this one is here to stay for quite some time.

So I am excited and encouraged. It's nice to spot something from the beginning, 
hang in there... and see it hold thru.

I feel this framework has yet to see it's real commercial day. But I am going 
to try to race the engines.

In any event... I want to instrument the  tag space of my page. 
Originally I had a custom head component from tapestry-4.1.2.

But I am a bit shaken up now. With the new changes to tap5.

Can anyone point me to some semantics where by and how I could instrument this 
area with the new portfolio of tap5 components?

Does a custom head component exist anywhere ? 

What I am after is souping up some runtime instrumentation that I can store off 
into database... and later my  area wuold reflect those on subsequent 
load.

I guess I could either write a new component 
or figure out how to render within that space

Any help in both these solutions would be appreciated.

Us JAVA guys need to stick together. We are few for this taste of JAVA.

thanks

KEN
  

Re: Setting a JavaScript variable before including a JS library?

2011-08-22 Thread Barry Books
Glad you got it working and using action is fine. You should also be
able to return the TextStreamResponse from onActivate and remove the
:action from the url if you like.

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



Re: Confused by mixins render order. Bug?

2011-08-22 Thread Barry Books
Thanks for the fix.

Barry

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



Tapestry apache2 and tomcat

2011-08-22 Thread Dimitri
Hi all, 
I would like to put my website online, using apache2 and tomcat. 

Deploying the war with tomcat worked fine and using the tomcat url is good,
but it requires the :8080 and the app context name in the url. Also i would
like to disable tomcat http listener on 8080 for security reason, and only
reply to ajp, wich is listening on 8009.

Apache2 is then configured to forward request from port 80 to port 8009
using ajp protocol. 

Here is the result: http://pizzaroundme.com

As you can see the the html source, css file (and others) are containing the
context name in the url, for instance:
Image source //PizzAroundMe/assets/tapestry/5.1.0.5/spacer.gif/ is not
working
Image source /assets/tapestry/5.1.0.5/spacer.gif/ is working

Also the PizzAroundMe actionlink on the top targets
http://pizzaroundme.com/PizzAroundMe
the "recherche" button on the bottom also targets the url with context
appended, all this doesn't work because of the context name present here

I m a bit confused here, should i fix it with tomcat config ? tapestry
config :s ?
I think it's a tapestry config issue, any clue ?

Thank you !

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-apache2-and-tomcat-tp4722849p4722849.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Tapestry integration with Maven and subversion

2011-08-22 Thread captain_rhino
I've been building a tapestry prototype over the last few weeks for a new
project.

I've been happily building away and running through jetty.

Now has come the time that other developer(s) are going top have to work on
the project.

I am no expert in Maven but on a high level how would I integrate my
tapestry project with subserversion and maven.  Should I just be checking
into subversion certain directories that my fellow developers can then check
out?  Or is there something in Maven that enables me to do this easily?  

If someone could point me in the right direction it would be much
appreciated.

regards&thanks



--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Tapestry-integration-with-Maven-and-subversion-tp4722727p4722727.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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



Re: Grid display after a new row insertion

2011-08-22 Thread antalk
Maybe that's because tapestry keeps track of the sorting in the session and
doing an updateSort reverses the sorting with each page call.

I have this solved as such:

 if (grid.getSortModel().getSortConstraints().isEmpty()) {
 while
(!grid.getSortModel().getColumnSort("creation_date").equals(ColumnSort.DESCENDING))
   
{
 grid.getSortModel().updateSort("creation_date");
  }
}


This will sort enough times to make sure it is descending on each page.





--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/Grid-display-after-a-new-row-insertion-tp4715298p4722399.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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