Contribute custom Messages for localization

2010-08-11 Thread Henrik Schlanbusch
Hi all

We have a Message service that we used when our system
was implemented in T4. The messages will request localized
strings from file and override the string with values
from the database if they have been overridden there.

I cannot find anything in the T5 literature on how to 
provide custom Message implementations, so that we can 
continue to use this strategy for our app.

Henrik von Schlanbusch


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



Re: Class reloading in custom component library

2010-06-04 Thread Henrik Schlanbusch
Inge Solvoll inge.tapestry at gmail.com writes:

 
 I'm using file synch in eclipse to copy the newly compiled files to
 webapp/WEB-INF/classes. If the class is found there, it 
overrides the one in
 the jar.
 
 On Fri, Jun 4, 2010 at 7:56 AM, Nicolas Bouillon nicolas 
at bouil.org wrote:
 
  I'm very interested too if there is a solution to this problem.
 
I solved it in a way - but I am not sure if it is the best way.

What I did resembles Inge's solution. I have setup in my pom.xml
that the compilation output will go to the webapp target folder:

outputDirectory../webapp/target/classes/outputDirectory

so each time I build components, the compilation outputs goes to 
the webapp target/classes folder. The maven script updates the
intellij target directory, which means that if I either compile
via maven or compile via intellij, the classes are outputted
in the webapp, and thus reloaded in jetty.

The problem is that the compiled classes are not always picked up
by tapsetry, so I have to look a bit more into this.

-Henrik





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



Class reloading in custom component library

2010-06-03 Thread Henrik Schlanbusch
Hi

I have setup a project in maven 2 where the lowest project 
(parent) has two sub modules, one with the webapp 
(tapestry 5) and one with a separate custom made 
component library. This means  that I have three 
modules to build (parent, webapp and components). 
Webapp has a dependency to components in order to be 
able to use the components. I think this is a 
sensible division, but maybe not?

Anyway my question is whehter it is possible to 
enable class reloading in the component package so I 
do not have to restart jetty for each template change/code 
change. I can change templates and compile classes 
in the webapp project directly from intellij, but currently 
i cannot do that from the components package. It would 
be fantastic if I could.

Regards,
Henrik


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



Upgrade from T4 to T5.1

2009-05-11 Thread Henrik Schlanbusch
Hi all

We have a rather big system that has been written in tapestry 4. We started out
in tapestry 3 some years ago and during upgrade to T4 we spent quite a long
time, which was very critical for our customers. But in the end, the upgrade was
really worth it.

Now we would like to upgrade to T5.1. I know about the backwards compatibility
issues here, so what I would like to do is to upgrade lazily. What I would
like to do is to run T4 and T5 at the same time, while we develop new stuff in
T5, and slowly transform old T4 functionality to T5.

So my question is: is it possible to run T4 and T5 from the same webapp? And if
it does, what is the best practice in order to do so?

Best regards
Henrik


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



[T5] Access to page instance

2008-11-24 Thread Henrik Schlanbusch
Hi all

Is it possible to get access to an instance 
of a page without using the InjectPage 
annotation? I know the logical name of the
page - the string groupEditor, and would
like get an instance of the page, and run
some getters on it. I have the logical names
in a map, and do not have the option to 
use annotations to get access  to a page
instance.

Henrik


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



Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Hi

In tapestry 4 it was possible to get an instance of a page by using the
cycle.getPage(somePageName); Then it was possible to set properties on the
page before activating it. I would like to do something like this in T5, it
seems that the only way to get an instance of a page is by getting it from an
injected property (InjectPage). Is it possible in T5 to get hold of page
instances without using injected properties, but through string identifiers like
in T4?

Henrik


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



Re: Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Shing Hing Man matmsh at yahoo.com writes:

 
 Have you tried ComponentSource  ?
 
@Inject
   private ComponentSource compSource;
 
  MyPage comp = (MyPage) compSource.getPage(pageName); 
 
 Shing

Shing, thanks man! This worked. I can now get instances of the pages through
their id!

Best regards
Henrik


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



Re: Get instance of page

2008-11-24 Thread Henrik Schlanbusch
Thiago H. de Paula Figueiredo thiagohp at
 gmail.com writes:

 
 Em Mon, 24 Nov 2008 18:43:37 -0300, 
Henrik Schlanbusch henrik at enovate.no  
 escreveu:
 
  Is it possible in T5 to get hold 
of page
  instances without using injected 
properties, but through string  
  identifiers like in T4?
 
 Using @InjectPage is the T5 way to 
do it, but it is possible that there is  
 some way to do what you want. I'm 
just curious about what would be the  
 advantage of doing it using identifiers 
(besides using something you're  
 already familiar with, of course. :)).
 

Hi Thiago

I am doing this because I have one controller in the 
application that holds a
mapping between object types and page ids. 
When I create an object of any type,
the system will ask the controller to get 
a page that renders this object
correctly. If I do this through annotations 
I have to have a page full of all
pages as annotated properties, and then add 
these properties to a map where I
map object type and page, which is a bit 
heavy I think. Now I have a spring
injected map that simply maps com.somepackage.
SomeObject-SomeObjectEditor. So
when an instance of SomeObject has been created, 
I ask the map for the correct
editor (which returns the logical name of the page), 
and set the object as a
model on that page before returning it from my 
action method.

Does that make sense to you? Maybe the pattern 
isn't good? I do not know, but it
works. :-)

Henrik





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



Re: [T5] Access to page instance

2008-11-24 Thread Henrik Schlanbusch
Henrik Schlanbusch henrik at enovate.no writes:

 
 Hi all
 
 Is it possible to get access to an instance 
 of a page without using the InjectPage 
 annotation? I know the logical name of the
 page - the string groupEditor, and would
 like get an instance of the page, and run
 some getters on it. I have the logical names
 in a map, and do not have the option to 
 use annotations to get access  to a page
 instance.
 
 Henrik
 

Sorry for the double posting. The soloution 
was found thanks to Shing: 

 @Inject
  private ComponentSource compSource;

MyPage comp = (Mypage) compSource.getPage(pageId);

Henrik





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



T4.1.6 problems with ajax - prototype

2008-11-13 Thread Henrik Schlanbusch
Hi and thanks for a good and extremely responsive
group!

I have a project where i use T4.1.6 in combination
with prototype. I use the Ajax.updater to perform
ajax operations. But When I use this, the rendering
of pages gets extremely slow. Is there any reason
for this?

new Ajax.Updater(
  placeholder,
  url,{
method: 'get',
evalScripts: true,
onSuccess: function() {
   var event = new NamedBaseObjectEvent
   ('applicationController', 'UPDATE', 
   className, primKey, context);
   ApplicationController.eventOccurred(event);
 }
   }
);

I get the response that I want, but the time to render 
is extremely slow (for simple pages it may be up to
3-4 seconds).

Henrik


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



Re: Tapestry together with CXF

2008-11-10 Thread Henrik Schlanbusch
Thiago, thanks

I found the solution with your help:

 public static void 
contributeIgnoredPathsFilter(ConfigurationString configuration) {
configuration.add(/services/.*);
}

Best regards,
Henrik





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



Tapestry together with CXF

2008-11-09 Thread Henrik Schlanbusch
Hi 

I have run into a problem. 
I have defined two servlets in my web.xml - one tapestry5
and one for apache CXF. I have defined them in a way that
I should hit the CXF whenever I run /services/* and
tapestry for all other urls. 

When I try to browse the wsdls on my server, I can see
that the CXF servlet logs out that it has been hit, 
but still what is returned is a tapestry page.

Can anyone shed some light on this for me?

Here is the configurations from my web.xml:

filter
filter-nameapp/filter-name
filter-classorg.apache.tapestry5.
spring.TapestrySpringFilter/filter-class
/filter

 filter
filter-namespringSecurityFilterChain/filter-name
filter-classorg.springframework.web.filter.
DelegatingFilterProxy/filter-class
/filter

filter-mapping
filter-namespringSecurityFilterChain/filter-name
url-pattern/*/url-pattern
/filter-mapping

filter-mapping
filter-nameapp/filter-name
url-pattern/*/url-pattern
/filter-mapping

 !-- SCY LOGIN SERVICE --

servlet
servlet-nameCXFServlet/servlet-name
servlet-classorg.apache.cxf.transport.
servlet.CXFServlet/servlet-class
load-on-startup1/load-on-startup

/servlet
servlet-mapping
servlet-nameCXFServlet/servlet-name
url-pattern/services/*/url-pattern
/servlet-mapping

Best wishes
Henrik



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



Re: Tapestry together with CXF

2008-11-09 Thread Henrik Schlanbusch

 Just add this method to your AppModule:
 
 public static void  
 contributeIgnoredPathsFilter(UnorderedCollectionString configuration) {
  configuration.add(/services/.*);
 }


Thanks man! This seems to be the solution to my problem, but one more thing
I cannot get the UnorderedCollection from anywhere. Which library should
I use to get this class?

Henrik




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



Re: Cannot access bean properties in tml file

2008-10-23 Thread Henrik Schlanbusch
I am even more puzzled. I tried to do this in 
the tml file:

${group.class.name}

and the result in the html was:
org.apache.maven.project.MavenProject 

I am using the jetty:run to start the project.

Henrik


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



Re: Cannot access bean properties in tml file

2008-10-23 Thread Henrik Schlanbusch
The group object is of course my own object. 
I do not understand why the maven project is
returned. 

If I try to access the group in the java code
System.out.println(getGroup().getClass().getName());
I get the correct classname.

Henrik


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



Re: Cannot access bean properties in tml file

2008-10-23 Thread Henrik Schlanbusch
Joachim, thanks man!

That solved the problem

Henrik


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



Cannot access bean properties in tml file

2008-10-22 Thread Henrik Schlanbusch
Hi I am using Tapestry 5.0.15 and have come over 
a strange problem that I cannot resolve.

In my tml file i have this code 

${currentGroup.name} - which should display Root group
instead it displays: scy-useradmin-web Tapestry 5 Application 

The same goes for all other places where I try
to print out the property of a bean. 

If I write ${currentGroup.getName()} it works fine, but
I thought that the simplified first version was correct.

If I return a string from my java class getSomeString() and 
write it in the tml ${someString} it works fine, so 
it seems that the only problem is to traverse bean properties.

Can anyone shed some light on this problem for me?

Henrik


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



Re: cache on T4 page

2008-08-28 Thread Henrik Schlanbusch


michael lim jim_theory at yahoo.com writes:

 
  in my pagevalidate method, i call db to retrieve information and print out on
 page using @insert
 
 how do i cache it so that it will not hit the db so frequent ? any example?
 
 -
 To unsubscribe, e-mail: users-unsubscribe at tapestry.apache.org
 For additional commands, e-mail: users-help at tapestry.apache.org
 
 

Hi

We have the same problem - which slows down our app to 
a level that is not acceptable. There probably is some pattern
that I have not picked up. Our hibernate beans are loaded
each time the ognl expressions read our objects. I guesss
there is some way to evict the hibernate loaded objects in the
prepare for render method, before the rendering happens in order
to avoid hitting the db for every property the ognl tries to read
from the object, or is there some better way?

Henrik





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



Re: [T4.1.5] problems with file service and IE

2008-05-08 Thread Henrik Schlanbusch
Thanks to your hints I finally found a way to identify the problem. The problem
was that on the same page that I load the images, I also have a flash object,
that loads sound files through the same service. I am not sure, but it seems
like the calls for both the images and the soundfiles conflict with eachother
making the images load, until the call for the first sound file comes. When the
first sound file has been called, the image stream is stopped (reset by peer??)

This does - though - not happen in opera or firefox, only explorer. I am not
even sure whether my interpretation is correct, but we solved the problem by
forcing the flash player to load the sound files *after* all images had been
loaded to the  page.

Thanks, 
Henrik


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



[T4.1.5] problems with file service and IE

2008-05-07 Thread Henrik Schlanbusch
Hi

I have a major problem with my file service.
It is a service that should stream files
to the client. It works swell in firefox
and opera, but behaves strangely in IE.
An image may be opened ok first time (probably
due to caching), then the second time (after 
hitting ctrl + F5)
the image may be streamed 50% or so and then
maybe not at all.

My service is implemented very simple:

public void service(IRequestCycle cycle) throws IOException {
try {
Object[] params = new Object[]{cycle.getParameter(resourceId)};
String resourceId = (String) params[0];
FileRef ref = getFileBankManager().getFileRef(resourceId);
File sourceFile = ref.getData().getContent();
byte[] data = FileUtils.readFileToByteArray(sourceFile);

_response.setHeader(Cache-Control, no-cache);
_response.setHeader(Pragma, no-cache);
_response.setContentLength(data.length);

OutputStream output = _response.getOutputStream(
new ContentType(ref.getData().getContentType()));
output.write(data);
} catch (IOException e) {

} catch(Throwable t) {
_response.setStatus(HttpServletResponse.SC_NOT_FOUND);
t.printStackTrace();
}

return;

The exception that appears is 
Connection reset by peer: socket write error

I simply cannot figure out why this happens and hope that 
some of you can shed some light on this for me.

Regards, 
Henrik


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



Re: [T4.1.5] problems with file service and IE

2008-05-07 Thread Henrik Schlanbusch
Marcus Schulte etluchs at googlemail.com writes:

 
 output.close() ?
 

Marcus, thanks for the suggestion, but the same 
situation persists. Exactly the same error message
from explorer.


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



Re: [T4.1.5] - Inherited annotations fail

2008-05-05 Thread Henrik Schlanbusch
Hi again... still no luck with this one.

After an intense night debugging this, I have found
that the bug appears consequently the *second*
browser instance that hits the same page. The first
request to the page runs fine, but the second time
(with a new browser instance) will produce the exception.

I am really stuck here - is tapestry caching some
of my components here or is it something else
going on. I have logged out from ComponentSpecification
and it actually finds that my component has already
been added to the page specification.

I really hope someone can shed some light on this
because this is a serious blocker to our
project.

Best,
Henrik


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



[T4.1.5] - Inherited annotations fail

2008-05-04 Thread Henrik Schlanbusch
Hi

I see there has been a lot of activity on this before, 
and the issue seems to have been resolved, still I 
experience this problem in 4.1.3 and 4.1.5:

Exception: Error: An error occured processing annotation 
@org.apache.tapestry.annotations.InjectState(value=bite-visit) 
of public abstract no.imb.bite.framework.BiteVisit
no.imb.bite.framework.web.BiteBasePage.getVisit(): 
Property visit has already been accounted for by the 
element at Annotation @org.apache.tapestry.annotations.InjectState
(value=bite-visit) of public abstract 
no.imb.bite.framework.BiteVisit 
no.imb.bite.framework.web.BiteBasePage.getVisit().


ComponentSpecification.claimProperty
(ComponentSpecification.java:670) 
ComponentSpecification.addInjectSpecification
(ComponentSpecification.java:641) 
InjectStateAnnotationWorker.performEnhancement
(InjectStateAnnotationWorker.java:54) 
AnnotationEnhancementWorker.performMethodEnhancement
(AnnotationEnhancementWorker.java:140)

AnnotationEnhancementWorker.performMethodEnhancement
(AnnotationEnhancementWorker.java:109)

AnnotationEnhancementWorker.performEnhancement
(AnnotationEnhancementWorker.java:71) 
performEnhancement($EnhancementWorker_119b741e3f6.java) 
performEnhancement($EnhancementWorker_119b741e3fe.java) 
performEnhancement($EnhancementWorker_119b741e3d0.java) 
ComponentConstructorFactoryImpl.getComponentConstructor
(ComponentConstructorFactoryImpl.java:101)

getComponentConstructor($ComponentConstructorFactory_119b741e3b7.java) 
PageLoader.instantiatePage(PageLoader.java:603) 
PageLoader.loadPage(PageLoader.java:630) 
loadPage($IPageLoader_119b741e3aa.java) 
loadPage($IPageLoader_119b741e3ab.java) 
PageSource.makeObject(PageSource.java:152) 
GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:797) 
PageSource.getPage(PageSource.java:176) 
getPage($IPageSource_119b741e302.java) 
RequestCycle.loadPage(RequestCycle.java:241) 
RequestCycle.getPage(RequestCycle.java:228) 
PageFormatLocatorImpl.activateSectionType(PageFormatLocatorImpl.java:132)

I have a superclass where my annotation is declared:

@InjectState(bite-visit)
public abstract BiteVisit getVisit();

The problem seems to be random. I never experience it in 
firefox, but when
switching between Explorer 7.0 and Opera 9.27 the 
exception randomly occurs.

This is a blocker for me. I hope that somebody can help me.

Henrik


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



Re: [T4.1.3] problems with localisation and possibly Prototype

2008-01-16 Thread Henrik Schlanbusch
The problem was that we had the two 
following files:

trans.properties (default locale)
and trans_no.properties

This always ended up with values from
the first file.

Then we renamed the files:

trans_en.properties
trans_no.properties

and it worked, why - I do not know...


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



[T4.1.3] Javascript is shown after login

2008-01-16 Thread Henrik Schlanbusch
Hi again, I have a strange problem with my app.
When I have logged in the first time, my Home
page is not rendered, but instead I can see a 
javascript file core.js (loaded by the asset service).
If I then press back (to the login form) and login
again, I will get the Home page as expected, and I can
use the app as normal.

I simply cannot understand why the javascript
file is returned the first time. 

Anyone has any clues?

Best regards
Henrik


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



Re: [T4.1.3] Javascript is shown after login

2008-01-16 Thread Henrik Schlanbusch
Thanks Alejandro, this was indeed the problem.

Best, 
Henrik


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



[T4.1.3] problems with localisation and possibly Prototype

2008-01-15 Thread Henrik Schlanbusch
Hi

I have to do some of the localisation
work in the java code, and run this
simple method:

public String getLocalisedMessage
  (String key) {
  return getMessages().getMessage(key);
}

The method does only return strings in 
english locale. 

The only special thing with my pages is that
they are loaded via the Ajax.Updater (Prototype).


So my question is, when loading pages through
Prototype, will the application servlet in some
way lose control over the users locale and reset
it to the default one?

The localisation works fine in the container page
that is not loaded through the Ajax.Updater.

Henrik



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



[T4.1.3] Problems using ajax with Tapestry

2007-11-24 Thread Henrik Schlanbusch
Hi I have problem with my ajax code. I try
to run the code in my tapestry app, but 
when I read the results in firebug from my calls, I get an
empty string  from the tapestry servlet, 
when I indeed expect to see a well formed html
page. I have tried to run the url that I call
directly through the browser, which turns out to 
run just fine, but it seems that when i use the
prototype Ajax.Updater it will not load the html content??

My script looks like this:

function getHTML() {
dojo.log.info(Running getHTML);
var url = 'span jwcid=@Insert value=ognl:url raw=ognl:true/';

var myAjax = new Ajax.Updater(
'span jwcid=@Insert value=ognl:returnid/',
url,
{
method: 'get',
onFailure: reportError,
asynchronous: false, 
evalScripts: true,
onComplete: showResponse

});
 }

I have verified that the url that is inserted into the url variable
is valid, and the script also replaces the placeholder that is 
correctly inserted. But as told above, it seems that the
tapestry servlet returns an empty string  from the call. 

Is there a filter or something that prevents tapestry from
responding properly to the Ajax.Updater calls? Is this a
configuration issue for me? I am pretty sure people
have been using this technique before :-)

I know I could do something similar with the built in 
tapestry components, but I have to build some specially 
tailored ajaxstuff here to make my customers happy :-)

Henrik


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



Re: [T4.1.3] Problems using ajax with Tapestry

2007-11-24 Thread Henrik Schlanbusch
Andreas Andreou andreoua at gmail.com writes:

 
 But, what happens when you GET that url directly? Do you see anything 
 returned?

Yes, I get the full page as I expect it to be loadede through the ajax call. 

I can even see - when I try to load through the AjaxUploader - that the page I
want to load is rendered. I log out a message in the target page
prepareForRender method, that assures me that in fact tapestry creates the page
on the server side. I just do not get the page returned to the client. 



Henrik


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



T4.1.3 - Upgrade Dojo

2007-11-06 Thread Henrik Schlanbusch
Hi

Is it possible to upgrade to Dojo 0.9 when using T4.1.3? 
And if it is possible, how do I do it?

Regards,
Henrik


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



T4: Unable to update static binding

2007-11-05 Thread Henrik Schlanbusch
Hi

I am still in the process of upgrading from T3 to T4.1 
which have taken quite a bite of time now. I encounter the following
problem that I never had in 3.1:

 span jwcid=@fw:AjaxPlaceHolder model=ognl:userPerformance
property=satisfactoryPerformance inputType=Checkbox/

 Unable to update OGNL expression 'parsed OGNL expression' 
of [EMAIL PROTECTED]/
$AjaxPlaceHolder] to satisfactoryPerformance: Binding with 
value satisfactoryPerformance (StaticBinding
[satisfactoryPerformance]) may not be updated.

I do not understand this, all I want to do is to send  a string through
the parameter, but it does not seem to work at all. I tried the literal: 
as well, with the same result.

Can anybody tell me what I am doing wrong?

Henrik




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



Re: T4: Unable to update static binding

2007-11-05 Thread Henrik Schlanbusch
Jesse Kuhnert jkuhnert at gmail.com writes:

 
 We'd probably have to see more of your stack trace,  but it looks like
 someone is trying to update that parameter at some point.
 
 On Nov 5, 2007 6:17 AM, Henrik Schlanbusch henrik at enovate.no wrote:
  Hi
 
  I am still in the process of upgrading from T3 to T4.1
  which have taken quite a bite of time now. I encounter the following
  problem that I never had in 3.1:
 
   span jwcid=@fw:AjaxPlaceHolder model=ognl:userPerformance
  property=satisfactoryPerformance inputType=Checkbox/
 
   Unable to update OGNL expression 'parsed OGNL expression'
  of $AjaxPlaceHolder_15 at f6349d7d[useradmin_performanceOverviewPage/
  $AjaxPlaceHolder] to satisfactoryPerformance: Binding with
  value satisfactoryPerformance (StaticBinding
  [satisfactoryPerformance]) may not be updated.
 

Yes, I am trying to update the parameter from my AjaxPlaceHolder component.

Previously in T3 I could specify that a parameter name 
should be the same as a property name - and thus 
be able to update it. This seems not possible now??

For clarification, it is the String satisfactoryPerformance 
I want to send to the server. This used to work in T3.1 
but gives me major problems when upgrading.


This is the code in AjaxPlaceHolder:

@Parameter(required=false)
public abstract String getProperty();
public abstract void setProperty(String string);



Seems to be as it should?

OK - here we go:-)



Stack Trace:

*
org.apache.tapestry.binding.AbstractBinding.createReadOnlyBindingException
(AbstractBinding.java:115)
* org.apache.tapestry.binding.AbstractBinding.setObject
(AbstractBinding.java:66)
* $AjaxPlaceHolder_15.setProperty($AjaxPlaceHolder_15.java)
* $ASTProperty_1160f830dca.set($ASTProperty_1160f830dca.java)
*
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.
write(ExpressionEvaluatorImpl.java:175)
* $ExpressionEvaluator_1160f830cfc.write($ExpressionEvaluator_
1160f830cfc.java)
*
org.apache.tapestry.binding.ExpressionBinding.setObject(
ExpressionBinding.java:223)
* $Hidden_19.setValue($Hidden_19.java)
* org.apache.tapestry.form.Hidden.rewindFormComponent(
Hidden.java:95)
*
org.apache.tapestry.form.AbstractFormComponent.
renderComponent(AbstractFormComponent.java:90)
* org.apache.tapestry.AbstractComponent.render(
AbstractComponent.java:725)
*
org.apache.tapestry.services.impl.DefaultResponseBuilder.
render(DefaultResponseBuilder.java:179)
* org.apache.tapestry.AbstractComponent.renderBody(
AbstractComponent.java:539)
* org.apache.tapestry.form.FormSupportImpl.rewind(
FormSupportImpl.java:625)
* org.apache.tapestry.form.Form.renderComponent(Form.java:196)
* org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:725)
*



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



Re: another tapestry 4.1.3 archetype

2007-11-05 Thread Henrik Schlanbusch
Ulrich Stärk uli at spielviel.de writes:

 
 Hi all,
 
 for the workshop I held with some students a month ago I created a maven
archetype that uses 
 Tapestry, Hibernate and Spring. This one is very similar to the current
tapestry-archetype but is 
 based on more recent Tapestry (4.1.3), Hibernate (3.2.5.ga) and Spring (2.0.7)
versions and also 
 includes JPA integration using Hibernate wired up by Spring.
 ATM a zip file containing the maven project is located at 
 http://uli.spielviel.de/~uli/tapestry-spring-hibernate-archetype.zip.
 

Uli - I would love to try this one out, but it seems that the link is dead.
Could you provide another one?

Cheers

Henrik


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



Re: another tapestry 4.1.3 archetype

2007-11-05 Thread Henrik Schlanbusch
 
 Uli - I would love to try this one out, but it seems that the link is dead.
 Could you provide another one?


Sorry, my fault. The dot in the end of the sentence containing the link was
included in my link. The link is correct, but at least in thunderbird it is
interpreted together with the dot in the end. Correct link that works is: 

http://uli.spielviel.de/~uli/tapestry-spring-hibernate-archetype.zip

Best wishes
Henrik


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



Cannot inject visit object

2007-10-17 Thread Henrik Schlanbusch
Hi

I have a problem with injecting a good old visit object.

I do the following:

contribution configuration-id=tapestry.state.ApplicationObjects
state-object name=visit scope=session
create-instance class=no.imb.bite.framework.BiteVisit/
/state-object
/contribution

and in my BasePage i do the following:

@InjectState(visit)
public abstract BiteVisit getVisit();

As far as I can see, that should be all that 
is to it, but when I try to 
access the get visit method, the following exception occurs:

 Error at
jar:file:.../WEB-INF/lib/tapestry-framework-4.1.3.jar!/META-INF/
tapestry.state.xml,
line 186, column 42: Unable to initialize service
tapestry.state.StateObjectManagerRegistry (by invoking method 
initializeService
on org.apache.tapestry.engine.state.SOMRegistryImpl): Parameter
 factory must not
be null.

 Parameter factory must not be null.
java.lang.NullPointerException
Parameter factory must not be null.
Stack Trace:

* org.apache.hivemind.util.Defense.notNull(Defense.java:41)
*
org.apache.tapestry.engine.state.StateObjectManagerImpl.init(
StateObjectManagerImpl.java:36)
*
org.apache.tapestry.engine.state.SOMRegistryImpl.initializeServ
ice(SOMRegistryImpl.java:66)
* sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
* sun.reflect.NativeMethodAccessorImpl.invoke(N
ativeMethodAccesso
rImpl.java:39)
*
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMetho
dAccessorImpl.java:25)
* java.lang.reflect.Method.invoke(Method.java:585)
*
org.apache.hivemind.service.impl.BuilderFactoryLogic.findAndInv
okeInitializerMethod(BuilderFactoryLogic.java:275)
*
org.apache.hivemind.service.impl.BuilderFactoryLogic.invokeInit
ializer(BuilderFactoryLogic.java:249)
*
org.apache.hivemind.service.impl.BuilderFactoryLogic.createServ
ice(BuilderFactoryLogic.java:81)
*
org.apache.hivemind.service.impl.BuilderFactory.createCoreServi
ceImplementation(BuilderFactory.java:42)
*
org.apache.hivemind.impl.InvokeFactoryServiceConstructor.const
ructCoreServiceImplementation(InvokeFactoryServ
iceConstructor.java:62)
*
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImp
l.constructCoreServiceImplementation(AbstractS
erviceModelImpl.java:108)
*
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl
.constructNewServiceImplementation(AbstractSer
viceModelImpl.java:158)
*
org.apache.hivemind.impl.servicemodel.AbstractServiceModelImp
l.constructServiceImplementation(AbstractSer
viceModelImpl.java:140)
*
org.apache.hivemind.impl.servicemodel.SingletonServiceModel.
getActualServiceImplementation(SingletonServiceModel.java:69)
*
$StateObjectManagerRegistry_115afae841a._service($StateObjectMan
agerRegistry_115afae841a.java)
*
$StateObjectManagerRegistry_115afae841a.get($StateObjectManagerReg
istry_115afae841a.java)
sun.reflect.DelegatingMethodAccessorImpl.invo

ke(DelegatingMethodAccessorImpl.java:25)
* java.lang.reflect.Method.invoke(Method.java:585)
* ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:768)
* ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:1213)
*
ognl.ObjectPropertyAccessor.getPossibleProper
ty(ObjectPropertyAccessor.java:60)
* ognl.ObjectPropertyAccessor.getPropert
y(ObjectPropertyAccessor.java:144)
* ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1934)
* ognl.ASTProperty.getValueBody(ASTProperty.java:109)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:202)
* ognl.SimpleNode.getValue(SimpleNode.java:246)
* ognl.ASTNotEq.getValueBody(ASTNotEq.java:50)
* ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:202)
* ognl.SimpleNode.getValue(SimpleNode.java:246)
* ognl.Ognl.getValue(Ognl.java:494)
* ognl.Ognl.getValue(Ognl.java:458)
*

I really hope somebody can help me with this issue.

Henrik


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



Build up applicationSpecification dynamically

2007-10-16 Thread Henrik Schlanbusch
Hi

I have a problem. In my application that I am upgrading
from T3 to T4.1.3
I need to build up the list of pages dynamically
on startup time. This we managed without problems
in T3 by subclassing the engine and accessing the 
IApplicationSpecification there and add pages like this:

applicationSpecification.setPageSpecificationPath(pageName, pagePath);

Now I want to do this in T4.1 but cannot figure out how. 
I have tried to wire objects like this through Hivemind:

service-point id=basePageManager interface=java.lang.Runnable
invoke-factory
construct class=no.imb.bite.service.BasePageManager
set-service property=globals
service-id=tapestry.globals.ApplicationGlobals/
/construct
/invoke-factory
/service-point

and to start it in startup time: 

contribution configuration-id=hivemind.Startup
startup object=service:basePageManager/
/contribution

but when I try to access the global.getSpecification() in the run() method
I get null. My guess is that the applicationSpecification is not
yet set. 

Can anybody help me in how I can get a handle to the 
application specification so I can register my pages through
my java classes instead of adding them by hand in my
app.application file?

Thanks, 
Henrik


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



Re: Build up applicationSpecification dynamically

2007-10-16 Thread Henrik Schlanbusch
 I have a problem. In my application that I am upgrading
 from T3 to T4.1.3
 I need to build up the list of pages dynamically
 on startup time. 


To clearify:

I have specified all the pages file names and specification 
paths in different
xml files (spring)- that reside in several 
modules. The pages should be added to the
applicationSpecification on startup - and ONLY on startup. 

Henrik



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