[t4] ParameterPropertyWorker and EstablishDefaultParameterValuesVisitor

2009-04-13 Thread Carlos F

ParameterPropertyWorker 
if the component is not active a setXX call to the param property sets the 
value of "default" field that is automagically added by javassist.  the 
assocaited accessor and mutator then interact with the default field.

EstablishDefaultParameterValuesVisitor
if a binding hasn't already been created for the property the visitor adds an 
IBinding to the component.

In short why doesn't the ParameterPropertyWorker follow the same behavior of 
the EstablishDefaultParameterValuesVisitor?  The creation of the default field 
and the various checks of the default field in the added accessor/mutator add 
conceptually weight to the worker.

Carlos


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



T4.1.5 - Hidden component's getExtendedId() returns incorrect path

2008-06-11 Thread Carlos F
i have an @EventListener attached to an JS method on a Hidden component.

during the rendering of the page the ComponentEventConnectionWorker will 
contribute the results of the ComponentEvent.script for each component that has 
ajax events.  as part of that rendering the component's extendedId is utilized.

my hidden component is returning an extended Id of 
"MyPageName/theHiddenComponentsContainer.null"

the ".null" portion of the extendedId is incorrect.  The Hidden components Id 
parameter is set to "hidden".

this seems to be a bug in how the AbstractComponent's impl of getIdPath() 
conflicts with the Hidden components Id parameter.

AbstractComponent.getIdPath() access the _id instance variable directly.  
Outsiders, such as the PageLoader use the getId()/setId() getter/setter pair.  
Unfortunately, if the component has an id parameter getId()/setId() are 
overridden by the ParameterPropertyWorker.

In my case this means that the component's id$Default instance variable is set 
to "hidden" while the _id instance variable is still null.  Calls to getId() 
return "hidden", but since the AbstractComponent accesses _id directly ... the 
id$Default is never used when constructing the extendedPath.

This should effect any component with an id parameter.

Can anyone else confirm this?  This may just be a case of user error ;)

I didn't find any mention of this in Jira or the mailing list - although nabble 
has a lot to be desired and I am a Jira noob.  If so i will be happy to add it 
and submit a simple patch.

Carlos

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



Re: Form - asyn submission with file upload

2008-05-19 Thread Carlos F
Andreas,

thanks for the reply!

-->  how did you enable the IFrame transport?

i added "dojo.require("dojo.io.IframeIO");" to a script file.  However, this 
was insufficient.  IframeTransport.canHandle() fails for two reasons:

- the response type that tapestry was requesting was "text/xml" - and as the 
bug you emailed me notes, that is not a supported format for the IframeIO
- it also appears that the IframeIO also requires the call to be synchronous.  
tapestry passes the request as async.

This might be a little naive, but can I avoid the problems the IFrame has with 
"text/xml" by specify that the response should come as JSON?

Carlos 

Andreas Andreou <[EMAIL PROTECTED]> wrote: See 

Unfortunately, dojo decided to skip support for XML return types for IframeIO
(which is needed for file uploads) due to problems with making it cross-browser.

What this basically means for Tapestry is that async submit of forms
having files
cannot return the expected xml responses... however, i believe that the requests
do actually take place - how did you enable the IFrame transport?

Another idea (i think someone had mentioned doing this in this ML) is to have
a separate form just for the uploads or (even better) investigate how
to integrate
one of those flash uploaders...


On Mon, May 19, 2008 at 5:43 PM, Carlos F  wrote:
> After trying to async submit a form with a file upload field for a few hours 
> I trolled around the message board and JIRA and ran across this:
>
> http://issues.apache.org/jira/browse/TAPESTRY-1348
>
> Is trying to async submit a form with a file upload field a DEAD END?
>
> We tried to add the IFrame transport mechanism . . . however this did not 
> trigger the request.  Looking at the code it appears that the IFrame 
> transport mechanism does not support async submissions etc.  The tacos bug 
> system has a related bug that mentions other changes that may be necessary to 
> fix this:
>
> http://tacoscomponents.jot.com/BugReporter/Bug62
>
> Has anyone been able to successfully async submit a form with a file upload 
> field?
>
> Carlos
>



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

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




Form - asyn submission with file upload

2008-05-19 Thread Carlos F
After trying to async submit a form with a file upload field for a few hours I 
trolled around the message board and JIRA and ran across this:

http://issues.apache.org/jira/browse/TAPESTRY-1348

Is trying to async submit a form with a file upload field a DEAD END?

We tried to add the IFrame transport mechanism . . . however this did not 
trigger the request.  Looking at the code it appears that the IFrame transport 
mechanism does not support async submissions etc.  The tacos bug system has a 
related bug that mentions other changes that may be necessary to fix this:

http://tacoscomponents.jot.com/BugReporter/Bug62

Has anyone been able to successfully async submit a form with a file upload 
field?

Carlos


dojo 0.4.3 documentation

2008-04-03 Thread Carlos F
has anyone been able to successfully build the dojo 0.4.3 docs?  I am asking 
here because:

1- tap 4.1.x uses it (so I am hoping someone else has done this),
2 - the dojo site's copy doesn't work, and
3 - folks have been asking about it for 2+ weeks on the dojo forums and it is 
still not functioning.

I downloaded the 0.4.3 release src.  The help target in buildscripts/build.xml 
denotes a "docs" target.  However, that target doesn't exist in that build 
file.  documents/web0.3/build.xml includes a "docs" target.  However, it 
references a jar/zip that seems to be missing from the build.  After getting 
past that it asked for a buildUtil that also seems to be missing from the build 
etc etc etc.

Has anyone already done this?

Carlos


@EventListener - SubmitForm element

2008-03-17 Thread Carlos F

I am displaying a tabular list of records inside of a form.  Each row in the 
tabular list includes a checkbox, an up and down arrow image and info about the 
detail record in question.  When the user clicks on the up and down arrow image 
the detailed record should be resorted in a backing list and the tabular list 
should be redisplayed.  This was easily enough using a DirectLink with the asyn 
property.  However, I need to maintain the state of the checkbox.  This has 
lead me to using the @EventListener with the "SubmitForm" element.

Because I need to pass along information about the detail record being 
reordered I am using the "Accessing intercepted functions' parameters on the 
server-side" form of the @EventListener.  The parameter I am passing is the 
index position of the detail record being moved.


I have a few questions about @EventListener.

1 - is the "submitForm" element only intended to be used when the "targets" 
parameter includes a component that implements IFormComponent?

When my @EventListener targets an Any (wraps image) and Button component the 
eventlistener method is triggered when the event occurs for either component.  
When I target just the Any component the eventlistener method is skipped (as is 
the form's listener).  This seems to be because the eventlistener method is not 
registered as a formEventListener with the IComponentEventInvoker -- even 
though the "submitForm" element is specified.

2 - is there a way to declare that the @EventListener should bypass the form's 
listener method?  E.g. I want the overall form data to be submitted to the 
server because it will effect how a component will be rendered by 
"cycle.getResponseBuilder().updateComponent(fooComponentId)".  Currently I just 
have the eventListener method set a flag that short circuits the subsequent 
call to the form's listener method.  Is the order that the are triggered in 
guranteed?  e.g. will my listenermethod always be invoked prior to the form's 
event listener?

Carlos


image doesn't render id

2008-03-17 Thread Carlos F
The value of getClientId() seems critical to the proper use of clientside 
javascript.  However, unless a component includes a call torenderIdAttribute() 
while rendering its open element tag, the componentseems unable to display its 
id property.   I ran across this when itried to use an Image as a target for an 
@EventListener.  I suspectthat it effects other components as well.

By default Image doesn't render its ID and if you tried to setid="clientId" as 
an informal parameter then you run into a stackoverflow because the 
ClientIdPropertyWorker checks the component's "id"binding.

This doesn't seem to be a huge issue because you can simplywrap the image 
component with an Any component.  However, it does seeminconsistent and results 
in superfluous wrappers.

Before I add this to the jira with a patch - i just wanted to make sure I 
didn't miss something.

Carlos


image doesn't render id

2008-03-17 Thread carlos f

The value of getClientId() seems critical to the proper use of client side
javascript.  However, unless a component includes a call to
renderIdAttribute() while rendering its open element tag, the component
seems unable to display its id property.   I ran across this when i tried to
use an Image as a target for an @EventListener.  I suspect that it effects
other components as well.

By default Image doesn't render its ID and if you tried to set id="clientId"
as an informal parameter then you run into a stack overflow because the
ClientIdPropertyWorker checks the component's "id" binding.

This doesn't seem to be a huge issue because you can simply wrap the image
component with an Any component.  However, it does seem inconsistent and
results in superfluous wrappers.

Before I add this to the jira with a patch - i just wanted to make sure I
didn't miss something.

Carlos
-- 
View this message in context: 
http://www.nabble.com/image-doesn%27t-render-id-tp16096885p16096885.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: T4: Using @EventListener to capture a javascript method call

2008-02-22 Thread carlos f

Chris,

take everything i say with a grain a salt.  I am having limited success
getting this to work with tap 4.1.3.  I can get the client side JS call to
trigger . . . however i can't see to get it to execute the right server side
listener method.


Chris Norris-2 wrote:
> 
> The first question is this: what is the  elements for?  In the other
> examples it is used to indicate which
> elements on the page will be triggering which events.  In this example
> we're listening for a javascript method call, so why the 'elements'
> parameter?
> 

http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html#EventListener

targets - is used to identify tapestry components to listen to
elements - is used to identify DOM nodes to listen to

it is my understanding that only one is required.  i am not sure if you get
a union or intersection when you use both.  i am still trying to dig through
the source to get a clearer understanding - looking at the client side JS
that is emitted would probably solve that question pretty quickly.


Chris Norris-2 wrote:
> 
> Here's what I have: a page with a script.  The script defines something
> like so:
> 
> var photoLoader = {
> loadPhotos:function(something){
> alert("loadPhotos " + something);
> }
> }; 
> 
> This function is called like this: photoLoader.loadPhotos.  My annotated
> listener looks like this:
>   @EventListener(events="loadPhotos", targets="photoLoader")
>   public void loadPhotos(BrowserEvent event)
>   {
>   System.out.println("loadPhotos listener");
>   }
> 
> When I call photoLoader.loadPhotos("testing"), the listener in my page
> class is not called.  What am I missing here?
> 

you are trying to listen to a method invocation on a JS object that is 1)
not tied to the DOM and 2) not a tapestry component.  if my understanding is
correct, you should probably add loadPhotos as an attribute of a tapestry
component or any arbitrary dom element.  you just need to make sure that you
appropriately change the targets/elements values for the @EventListener
functionality.

Carlos

-- 
View this message in context: 
http://www.nabble.com/T4%3A-Using-%40EventListener-to-capture-a-javascript-method-call-tp15574790p15634440.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T4: example of using @EventListener to capture a javascript method call

2008-02-21 Thread carlos f

using tap 4.1.3

I am trying to tie an arbitrary client side JS method call to a server side
listener method as per "Accessing intercepted functions' parameters on the
server-side" on the tap 4.1 event listener page
(http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.html)

i can't get the client side JS method call to invoke the server side
listener method.  Since this is the first time i am using the @EventListener
annotation I am sure that I am missing something simple.

Does anyone know of a publicly available example of this functionality? 
that would probably be the fastest way to straighten myself out.

Carlos
-- 
View this message in context: 
http://www.nabble.com/T4%3A-example-of-using-%40EventListener-to-capture-a-javascript-method-call-tp15618713p15618713.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Using Alfresco from within Tapestry

2007-11-20 Thread carlos f

BTW - I have only used spring 1.2.x.  Maybe spring 2.x has a cleaner way of
inter-servlet context bean sharing.

Carlos
-- 
View this message in context: 
http://www.nabble.com/Using-Alfresco-from-within-Tapestry-tf4831087.html#a13861374
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Using Alfresco from within Tapestry

2007-11-20 Thread carlos f



hbf wrote:
> 
> and everything works beautifully up to the load order of the webapps:
> As my module starts before Alfresco, I cannot reference the (yet non-
> existing) bean of Alfresco that represents the Alfresco Node Service!
> 
> . . . 
>  
> Everything works fine up to the point when I change 'Foo'
> to '' in my bean (and of course change the
> type in the bean class from String to Alfresco's NodeService).
> 
> At this point I get at startup
> 
>ERROR main org.springframework.web.context.ContextLoader - Context
>initialization failed
>org.springframework.beans.factory.BeanCreationException: Error
>creating bean with name 'alfrescoContext' defined in  
> ServletContext resource
>[/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean
>'nodeService' while setting bean property 'nodeService'; nested  
> exception
>is  
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No
>bean named 'nodeService' is defined
> 
> And I sort of understand it: At this point, Alfresco is started by
> Tomcat after my Tapestry webapp and it seems that due to its multi-
> threaded nature, one cannot require a particular order in which the
> webapps are deployed.
> 
> Any suggestion as to what I could do?
> 
> I though about calling Spring's getBean() not at startup but at a later
> point but do not have any idea which application context to use, i.e.,
> how to obtain an application context at all!?
> 

If I understanding you have two spring application contexts defined in two
separate web applications:

- alfresco (3rd party CMS system that defines a bean you want to use)
- mywebapp (custom tapestry application that will consume a bean defined by
alfresco)

If that is the case, I think your core problem is that by default, web
application contexts don't span web applications.  So a particular war's
beans are referenced through the web application context stored in that
application's servlet context.  The web application context in turn, is
built exclusively using all the context files listed in that web
application's contextConfigLocation param (or the default
applicationContext.xml file).

A web application context, is pretty isolated to the particular servlet
context in which it is defined.   Although your web application context can
access external resources, such as WS, JDBC, JNDI, JMS etc, the client/proxy
beans you are using to access those external resources are always local to
your web application context.

I might be living in a cave, but I don't know of an out of the box method
for DIRECTLY accessing beans defined in one servlet context to access beans
defined in another servlet context.

If that is true . . . I am not quite sure what your best options are.

- If you have access to the application context files in the alfresco war,
you could add some sort of remote exporter (WS, RMI etc) so that the spring
application context in your tapestry web application could consume it. 
However, remote calls are far more expensive than local communication and
some of the remoting options baked into spring may not support the services
you want to export (e.g. HttpInvoker requires java.io serialization).  

- Depending on the servlet container you are using you could try to
programmatically access servlet context A from servlet context B.  If you
can get access to the servlet context then you can get access to the spring
web application context that is stored in it.  Doing that would allow you,
in some fashion, to access context A beans from context B.  Spring
application contexts support the concept of application context hierarchies. 
Perhaps you can use that to make the context in B treat the context in A as
its parent.  You will also need to time the startup of the web application
contexts so that the alfresco context is always completely initialized
before your application starts initializing its context.  I would search
around the spring forums for any suggestions or existing solutions.

Good luck.

Carlos

-- 
View this message in context: 
http://www.nabble.com/Using-Alfresco-from-within-Tapestry-tf4831087.html#a13861372
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: How to initialize a session variable in a page render request?

2007-11-20 Thread carlos f



carlos f wrote:
> 
> If you are using tap 4.x . . .
> 

Maybe if I looked at the subject of the original message I would have seen
the "T5" staring at me ;)

Carlos
-- 
View this message in context: 
http://www.nabble.com/T5%3A-How-to-initialize-a-session-variable-in-a-page-render-request--tf4839139.html#a13859449
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: OGNL Expression evaluated 4 times on tap 4.1.2 release

2007-11-19 Thread carlos f


andyhot wrote:
> 
> On the meantime, maybe the @Cached annotation can help you.
> http://tacos.sourceforge.net/tacos4.1/tacos-annotations/index.html
> It's in the 4.1.1-SNAPSHOT and it annotates a normal non-abstract method,
> caching its result and returning it on further invocations.
> 

Thanks for the suggestion.  That should work.

Carlos
-- 
View this message in context: 
http://www.nabble.com/OGNL-Expression-evaluated-4-times-on-tap-4.1.2-release-tf4824162.html#a13850119
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: How to initialize a session variable in a page render request?

2007-11-19 Thread carlos f



jeffrey ai wrote:
> 
> I am looking for the best way to initialize a session variable(@Persist)
> in a page render request once, so I could access it in the next action
> request.
> 

Jeffrey,

I am not sure about the particulars of your situation.  If you are using tap
4.x, you might want to look into the InitialValue/Bean
annotation/specification element or use an application state object to
configure and manage your session scoped object.

Carlos
-- 
View this message in context: 
http://www.nabble.com/How-to-initialize-a-session-variable-in-a-page-render-request--tf4839139.html#a13846518
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: OGNL Expression evaluated 4 times on tap 4.1.2 release

2007-11-19 Thread carlos f


carlos f wrote:
> 
> This occurs when i am executing tests as part of my selenium integration
> tests.
> 
> . . . 
> 
> Is this a configuration/user error on my side, or is the framework still
> purposefully evaluating these OGNL expressions 4 times?
> 

I am still looking into this, but it appears that is the way the framework
is intended to operate.

When an OGNL expression is first compiled, the underlying method the
expression resolves to is invoked 3 times.  Subsequent calls to the ONGL
Node the compilation process generates executes the underlying method an
additional time.

When running tapestry in a standard environment, each expression should only
be compiled once and then added to the cache.  However, for non-idempotent
methods a single expression compilation (and its 3 spurious invocations)
will cause all sorts of hell.

My integration tests, which spits up a Jetty container for each test run,
never have the benefit of working with pre-compiled expressions.

I am still trying to see if there is something I can do to avoid the 3
initial calls.  Otherwise I am going to have to rethink a bit of
functionality that seemed to work just fine with tap 4.0.x.

Carlos
-- 
View this message in context: 
http://www.nabble.com/OGNL-Expression-evaluated-4-times-on-tap-4.1.2-release-tf4824162.html#a13844431
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: OGNL Expression evaluated 4 times on tap 4.1.2 release

2007-11-19 Thread carlos f

BUMP . . . just trying to make sure this didn't get lost in all the T5
messages over the weekend .

Does anyone know what I can do to eliminate the duplicate calls?

Thanks in advance.

Carlos
-- 
View this message in context: 
http://www.nabble.com/OGNL-Expression-evaluated-4-times-on-tap-4.1.2-release-tf4824162.html#a13837518
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



OGNL Expression evaluated 4 times on tap 4.1.2 release

2007-11-16 Thread carlos f

Tap 4.1.2 release
tapestry-test 5.0.5
selenium 0.8.1 (with Jetty baked into Jar)

win xp pro sp/2
java 1.5.0_05

This occurs when i am executing tests as part of my selenium integration
tests.  I have not looked into how this behaves in a more typical deployment
environment.  As far as I can tell Jetty is running without the two
"development" options that I know of enabled (disable-caching and
enable-reset-service).

This has been mentioned on the board before as an issues with the 4.1.2
SNAPSHOT back in May/07 and the 4.1.3 SNAPSHOT in Sept/07. 

--> 
http://www.nabble.com/-Tap-4.1.2--Problem-with-repeated-calls-to-an-If-component-tf3772676.html#a10676029
--> 
http://www.nabble.com/OGNL-Methode-called-several-times-tf4488389.html#a13619568

The response to the "Problem-with-repeated-calls-to-an-If-component" thread
suggests that this will be fixed before the release of 4.1.2.

At least one other person has run across this using the 4.1.3 release.

--
http://www.nabble.com/-Tap-4.1.2--Problem-with-repeated-calls-to-an-If-component-tf3772676.html#a13551793

Is this a configuration/user error on my side, or is the framework still
purposefully evaluating these OGNL expressions 4 times?

Carlos
-- 
View this message in context: 
http://www.nabble.com/OGNL-Expression-evaluated-4-times-on-tap-4.1.2-release-tf4824162.html#a13802424
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: @InjectPage in library -- Page 'XXX' not found in application namespace.

2007-09-18 Thread carlos f


Renat Zubairov wrote:
> 
> Your assumptions are completely correct, you can address anything you want
> from the library (e.g. pages) inside the library namespace via
> namespace:BlahBlah format.
> 

Renat, thanks for the reply.

Unfortunately I thought namespace handling would be a bit more seamless.  We
are repacking large portions of free standing web applications into tapestry
libraries.  As such there are a number of preexisting external/page links
and page injection.  I had been hoping that these components would recognize
their "origin namespace" and default page look ups to that namespace.  They
don't seem to do that - in fact the external link doesn't even seem to
support an INamespace property.

I don't want to hardcode an assumed library prefix in my library.  This
isn't a huge deal - e.g. creating a little PageLink component wrapper is
pretty straight forward - just a little annoying.

Carlos 




-- 
View this message in context: 
http://www.nabble.com/%40InjectPage-in-libraryPage-%27XXX%27-not-found-in-application-namespace.-tf4443595.html#a12758047
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



T4.1 - Override a configuration when no service is used

2007-09-14 Thread carlos f

I would like to override the InjectPageWorker used by the tapestry framework.

However, the contribution for this worker uses the instance object provider:


   . . .
   


When I attempt to "override" it by contributing another worker with a "page"
type I get the "Value for attribute 'type' ('page') duplicates a prior
instance" exception.

Does anyone know of another way to override this worker?

Carlos
-- 
View this message in context: 
http://www.nabble.com/T4.1---Override-a-configuration-when-no-service-is-used-tf252.html#a12680561
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: @InjectPage in library -- Page 'XXX' not found in application namespace.

2007-09-14 Thread carlos f


carlos f wrote:
> 
> I am working under the assumption that page/component resolution is
> "scoped" inside of a library.  So that unqualified references (e.g.
> "ComponentName" versus "myLibrary:ComponentName") are treated as local to
> the library.
> 

BTW - I am using tap 4.1.2.

It looks like my assumption is incorrect:

http://www.nabble.com/Default-namespace-in-a-library---tf3064457.html#a8522702

Is the "default library namespace" scope only valid in a few spots such as
PageLink and  entries in page/component specification?

Do I have to explicitly manage the namespace whenever:

- injecting a page,
- locating a page with the RequestCycle, or
- returning a string from a listener method?

Carlos
-- 
View this message in context: 
http://www.nabble.com/%40InjectPage-in-libraryPage-%27XXX%27-not-found-in-application-namespace.-tf4443595.html#a12679026
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



@InjectPage in library -- Page 'XXX' not found in application namespace.

2007-09-14 Thread carlos f

For a variety of reasons I am attempting to convert a large portion of a free
standing tapestry web application into a library.

A page in my library contains an @InjectPage annotation.  This annotation
use the name of a page specified in the library.  I double checked the
library specification file and the page entry exists and seems to be
correct.

I am working under the assumption that page/component resolution is "scoped"
inside of a library.  So that unqualified references (e.g. "ComponentName"
versus "myLibrary:ComponentName") are treated as local to the library.

Before I spend the better part of my afternoon tracking this down . . . is
my assumption incorrect?  Is there something about libraries that won't
allow me to do this?

Carlos
-- 
View this message in context: 
http://www.nabble.com/%40InjectPage-in-libraryPage-%27XXX%27-not-found-in-application-namespace.-tf4443595.html#a12678543
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Integration testing Tapestry 4 applications

2007-08-22 Thread carlos f

Hugo,

Have you run into any snags using this in the past month?

Carlos

-- 
View this message in context: 
http://www.nabble.com/Integration-testing-Tapestry-4-applications-tf3927683.html#a12283397
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



RE: Using Hibernate detached objects in Tapestry (thread-safety question)

2007-06-19 Thread carlos f


Michael Sims wrote:
> 
> I don't mean to speak for Norman, but the point of this thread has been
> that
> detached objects are not thread safe, so if you are going to store them in
> the
> HttpSession, you have to serialize access to it in order to avoid
> potentially trying
> to re-attach the same object to two different Sessions.  Norman's approach
> avoids
> this problem and doesn't require any mutexes or locks...
> 

Unless I am mistaken, which happens all the time, but it appears that the
crux of his "thread safety" is, 1) storing detached instances on the client
side -- I am assuming that "persists in the client page" is a reference to
the ClientPropertyPersistenceStrategy -- 2) creating new hibernate sessions
per page request and 3) closing the hibernate session as soon the the page
is done processing the request.


Norman Franke wrote:
> 
> My application only uses detached objects that it persists in the client
> page for change detection (to determine if the record they were editing
> changed while they were editing, which I flag as an  
> error.) 
> 
> . . . 
> 
> The first call to getSession()  creates a HIbernate session, which is
> closed when the page is done  
> rendering.
> 

Since the detached object appears to be persisted on the client side, the
hibernate sessions only exist for the rendering of a single page and the
session is closed when the page is done processing, it appears as if the
detached object should be isolated to a single hibernate session at a time. 
If that is true, I was interested in his method/motivation for optimistic
locking and cloning the detached object graphs for update.  If it isn't,
how?


Norman Franke wrote:
> 
> my DAO has an "assertUnchanged" method that throws an exception if the two
> objects differ, e.g. my detached object and the one read from the
> database.  In this case, I tell the user that someone else changed their
> record  and their changes have been lost. 
> 

I was interested in knowing more about the implementation of
"assertUnchanged"  - for all I know his entities could have mapped version
attributes and "assertUnchanged" could be calling
hibernateSession.lock(detachedInstance, LockMode.READ).  If it isn't, I just
want to know why.  The question about cloning is along similar lines.

Carlos
-- 
View this message in context: 
http://www.nabble.com/Using-Hibernate-detached-objects-in-Tapestry-%28thread-safety-question%29-tf3930468.html#a11202178
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Using Hibernate detached objects in Tapestry (thread-safety question)

2007-06-19 Thread carlos f

Sorry, my questions have nothing to do with Tapestry - put a few things you
mentioned piqued my interest.


Norman Franke wrote:
> In my case, my DAO has an  
> "assertUnchanged" method that throws an exception if the two objects  
> differ, e.g. my detached object and the one read from the database.  
> In this case, I tell the user that someone else changed their record  
> and their changes have been lost.

Why not rely on Hibernate's version support for detached objects and
versioning?


Norman Franke wrote:
> 
> To persist a detached object, I call a clone() function on all of my  
> DB objects that converts it back to a normal POJO (from whatever  
> Hibernate does to it.)
> 

Why clone the detached object graph?  Why not have the DAO reattach it to
the session and save it -- assuming it passes your version check?

Carlos
-- 
View this message in context: 
http://www.nabble.com/Using-Hibernate-detached-objects-in-Tapestry-%28thread-safety-question%29-tf3930468.html#a11197907
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Tapestry-Acegi - carmanconsulting.com not responding

2007-06-06 Thread carlos f


carlos f wrote:
> 
> Also I can't seem to get anonymous access working to the svn repo -
> http://svn.javaforge.com/svn/tapestry/tapestry-acegi/trunk
> 

anonymous/anon works - chalk that up to user error

Carlos

-- 
View this message in context: 
http://www.nabble.com/Tapestry-Acegi---carmanconsulting.com-not-responding-tf3878665.html#a10992390
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Tapestry-Acegi - carmanconsulting.com not responding

2007-06-06 Thread carlos f

Not sure if there is an issue on my end, but the the tapestry-acegi URL is
not responding --
http://www.carmanconsulting.com/tapestry-acegi/

Also I can't seem to get anonymous access working to the svn repo -
http://svn.javaforge.com/svn/tapestry/tapestry-acegi/trunk

I am also having general issues with JavaForge . . . pages time out, I get
404 and 500 errors when i click on links etc.

Does anyone know if the carmanconsulting site is up or if SVN anonymous
access is working.

Carlos
-- 
View this message in context: 
http://www.nabble.com/Tapestry-Acegi---carmanconsulting.com-not-responding-tf3878665.html#a10991197
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Re: Unit Testing EnhancementWorkers

2007-06-04 Thread carlos f


Howard Lewis Ship wrote:
> 
> But an integration test (either relatively contained, such as creating the
> EnhancementOperationImpl, or wider, such as firing up the app and testing
> with selenimum) is the only worthwhile way to
> ensure that generated code is correct.
> 

I would like to as tightly constrain this as possible, newing up an
EnhancementOperationImpl and other associated classes to test my
enhancement.  The generatation of a IComponentSpecifiction instance seems to
touch a number of classes.  Do you have any advice on how best to do this? 
Should I try to spin up hivemind for the test or just new up the object
graph that is required in this interaction?  Is there any testing utility
that I may be missing?

Carlos
-- 
View this message in context: 
http://www.nabble.com/Unit-Testing-EnhancementWorkers-tf3867100.html#a10956427
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



Unit Testing EnhancementWorkers

2007-06-04 Thread carlos f

I have written an enhancement worker that adds some conditional logic to a
component.

The unit tests I have written rely on mock objects to verify the behavior
under test is appropriate.  This is similar to the design of the unit tests
in the tapestry-framework project.

look at testStandard() as a reference -- 
http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/test/org/apache/tapestry/enhance/TestParameterPropertyWorker.java?revision=419064&view=markup

The most critical method mocked is the EnchancementOperation.addMethod()
method - among the various arguments addMethod() expects, is a string that
represents the body of the method added.  My mock, basically tests that the
string argument used in the implementation is a character for character
match of the "expected" method body.  My unit tests do not guarantee that
the actual method body will behave as expected . . . it may even throw a
litany of exceptions at runtime.

In order to test a component that has been enhanced by my class under test,
requires newing up an EnhancementOperationImpl and generating the
ComponentSpecification.  Doing this seems to involve a number of framework
classes - it may be significantly more work than it is worth at this point. 
Has anyone done this before for testing enhancement workers?

Carlos

-- 
View this message in context: 
http://www.nabble.com/Unit-Testing-EnhancementWorkers-tf3867100.html#a10955775
Sent from the Tapestry - User mailing list archive at Nabble.com.


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