That works perfectly but how would it work to write into the variable ? So
the *binding* is complete.
Thank you.
On Mon, Nov 12, 2012 at 4:53 AM, Paul Stanton wrote:
> You can write a method in your java class instead of trying to write a
> parameter binding.
>
> eg
>
> getSomething(String key1
Hello Alex,
About the flurry of my own responses, sorry if I seemed impatient : my only
concern was to give an update of what I found as it could be useful for
future searches. And I don't give up easily ;)
However, next time, I'll try to less "spam" the mailing list.
Thomas
2012/10/24 Alex Kot
I'm disappointed that the class elements in the persistence.xml are not being
used!
I did see a post mentioning that when there are multiple persistence units the
entities package is not scanned, but clearly it is on lazy loading the first
entity manager. I also read that PersistenceUnitConfigu
Tapestry considers "prop:" bindings to a method invocation as read-only. Can
you give an example of your data? The easiest solution is to wrap your maps
in a model with getters and setters? If you can't do that, you might want to
consider a custom binding or decorating / overriding the
PropertyCond
The value I need to bind actually has a setter\getter so here it is how I
solved this:
> "commonOptions('overridePortOptions')?.value"
That saved me a lot of code, thanks !
Is there an example on how to provide a custom binding for v5.3.6 ?
On Mon, Nov 12, 2012 at 12:12 PM, Lance Java wrote:
Chenillekit provides an "ognl:" binding, I'm not sure but this might support
setters on Maps?
http://chenillekit.codehaus.org/chenillekit-tapestry/ognlbinding.html
Here are some example custom bindings prefixes:
http://wiki.apache.org/tapestry/Tapestry5HowTos#Binding_Prefixes
--
View this mes
On Mon, 12 Nov 2012 08:12:27 -0200, Lance Java
wrote:
Tapestry considers "prop:" bindings to a method invocation as read-only.
Actually, this isn't correct. prop is a read and write binding. When you
bind a property via the prop binding to a form field component, for
example, the compon
I meant a prop binding to a custom method invocation (ie not a getter)
eg:
prop:foo will have a read and write binding
prop:someMethod('foo') will have a read-only binding
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Using-maps-withing-templates-tp5717910p5717929.html
This did not work either, even though the config code is called! Has anyone got
multiple persistence units working please, if so how?
@Contribute(EntityManagerSource.class)
public static void configurePersistenceUnitInfos(
MappedConfiguration cfg,
final Logger log) {
PersistenceUnitConf
Hi,
I came across some code that consists of a Index.java page and a index.tml
page. In the index.java page we have
Object onActivate(String... vals)
{
return new HttpError(HttpServletResponse.SC_NOT_FOUND, "Page Not
Found");
}
now this is real magic. If i sat mycontext/index thats fine
@Inject
@PersistenceContext(unitName = "JabberDBUnit")
private EntityManager jabberEntityManager;
When I output the jabberEntityManager.getEntityManagerFactory().getProperties()
I find they are the configs for another PU. That is my problem!
It looks like tapestry-jpa is not processing the co
The docs are at http://chenillekit.codehaus.org/
The demo site has been down for a while but there have been a couple of
commits in the last couple of months, so I wouldn't say the project is
"gone".
On Mon, Nov 12, 2012 at 5:21 AM, Dieter Sauvillers <
dieter.sauvill...@gmail.com> wrote:
> I th
Tapestry invokes the Index page when it receives a request for a page that
doesn't exist. I couldn't quickly find where this is explained in detail,
but I did find this footnote at
http://tapestry.apache.org/error-page-recipe.html
"... any invalid path, which would normally generate a 404 error,
Tapestry only calls the onActivate method that has a number of parameters
corresponding to the URL path segments after the last segment that is
recognized as a page name. Since there is no page named "indexxaasa" then
the last URL path segment that is recognized as a page name is "/". So
Tapestry c
Hi
I have a page with an activation context:
void onActivate(int policyId) {
policy = policyRepository.get(policyId);
}
Now I have a component on this page which does AJAX requests. At this point
the policy variable set in the activation context is null.
Now I can 'solve' this by using t
Yes, I have multiple PUs working correctly, using Glassfish and the FlowLogix
library:
Here are some references:
http://code.google.com/p/flowlogix/wiki/TLPersistenceRegistry
On Nov 12, 2012, at 6:56 AM, John wrote:
> This did not work either, even though the config code is called! Has anyone
No, this works fine. Your configuration is not working for some reason.
Please see my previous e-mail.
On Nov 12, 2012, at 7:31 AM, John wrote:
> @Inject
> @PersistenceContext(unitName = "JabberDBUnit")
> private EntityManager jabberEntityManager;
>
> When I output the
> jabberEntityManager.ge
Hi,
Have you checked out: http://tapestry.apache.org/page-navigation.html
To see if "onPassivate" or providing an explicit activation context can help you
--
Chris
On Mon, Nov 12, 2012 at 4:20 PM, nquirynen wrote:
> Hi
>
> I have a page with an activation context:
>
> void onActivate(int poli
I always avoid @Persist as it makes your webapp far more scalable. In this
example, you can pass policyId as an event context to all of the ajax events
on your page.
eg:
void onMyEvent(int policyId) {
policy = policyRepository.get(policyId);
}
A better idea is to configure a ValueEncoder [1]
Chris is right, if you include an onPassivate() with your policy/policyId
there is no need to pass it in the ajax event as it tapestry will implicitly
populate the value for you.
You might also want to consider the @PageActivationContext annotation which
takes care of onActivate() and onPassivate(
I would like to add Joda Time for the Type Coerection but I am not sure how.
I have the following eventlink that I would like to implement
Click For Week View
And the method that handles this would be
@OnEvent("showWeekHour")
public void selectWeek(LocalDa
Does this help?
http://jumpstart.doublenegative.com.au/jumpstart/examples/lang/typecoercers
Geoff
On 13/11/2012, at 6:11 AM, bhorvat wrote:
> I would like to add Joda Time for the Type Coerection but I am not sure how.
>
> I have the following eventlink that I would like to implement
Sadly no, I did use that as the template of my code. I think that what is
different is that they use the date component while I use the event. But I
am not sure.
But still my code above doesnt work, and according to the jumbstart code it
should
--
View this message in context:
http://tapestry.
If the documentation [1] is complete then tapestry does not include coercers
for java.uttil.Date by default. You might need to coerce to long instead.
[1] http://tapestry.apache.org/typecoercer-service.html
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Type-Coercer-for
I put some system out in JpaInternalUtils and it associates the wrong PU with
the annotation I have in the service class when it instantiates.
John
- Original Message -
From: Lenny Primak
To: Tapestry users
Sent: Monday, November 12, 2012 3:40 PM
Subject: Re: tapestry-jpa @P
Thanks for this library.
I tried the FlowLogix 1.1.7 library with my Tapestry 5.3.6 project and get this
on jetty startup:
java.lang.UnsupportedClassVersionError: com/flowlogix/web/services/ServicesModul
e : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Nativ
It requires java 7 to work.
On Nov 12, 2012, at 4:18 PM, "John" wrote:
> Thanks for this library.
>
> I tried the FlowLogix 1.1.7 library with my Tapestry 5.3.6 project and get
> this on jetty startup:
>
> java.lang.UnsupportedClassVersionError:
> com/flowlogix/web/services/ServicesModul
On Mon, 12 Nov 2012 18:28:29 -0200, bhorvat
wrote:
But still my code above doesnt work, and according to the jumbstart code
it should
Please define 'doesn't work'. In addition, I think you also should (maybe
need) to create and contribute a ValueEncoder for the JodaTime classes you
wan
It doesnt work as I get the exception
Could not find a coercion from type java.lang.String to type
org.joda.time.LocalDate.
The problem is that what is passed into the context is the date in the
format 2012-10-10 and then when that tries to convert back to the Joda Time
it will break.
Tapestry
If I add
configuration.add(new CoercionTuple(Long.class,
LocalDate.class,
new Coercion() {
@Override
public LocalDate coerce(Long input) {
return new LocalDate(input);
}
})
Sorry, I didn't dig into what's causing the issue, I was only able to
return it to a working state.
Have you tested if this is a problem only in the dev server or does it
occur if you deploy to production as well ?
I'd love to know if you find anything out - certainly would be useful to
post the
I suggest you upgrade to Java 7, it works perfectly with no compatibility
issues, and is a lot faster.But, if you insist on not doing it, you can look at
the source code and figure out how it works.It's not that much code.John
wrote:> Thanks for this library.> > I tried the FlowLogix 1.1.7
lib
Hello,
I use IntelliJ with a recent Tapestry and Jetty 7 with a Maven project. The
classes and tml files are packaged in the target directory but Jetty7 and 8 as
well do not pick up the classes.
Running Jetty 6 with mvn jetty:run works fine.
Any ideas?
--
Best Regards / Viele Grüße
Sebastian
On Mon, 12 Nov 2012 19:47:35 -0200, bhorvat
wrote:
It doesnt work as I get the exception
Could not find a coercion from type java.lang.String to type
org.joda.time.LocalDate.
So this coercion is missing. Add it and you should be fine. Or create a
ValueEncoder for LocalDate.
--
Thiago
So I need to set the coercer for String as well.
btw does tapestry (I think this is where my confusion is coming from) can do
multiple coercer's at once. For example String -> Long -> Date -> JodaDate
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Type-Coercer-for-Joda
With a bit of testing I figured most of it out
I use the coerction below to convert from Long to Local when the event is
fire
configuration.add(new CoercionTuple(Long.class,
LocalDate.class,
new Coercion() {
@Override
public LocalD
On Mon, 12 Nov 2012 21:11:38 -0200, bhorvat
wrote:
So my last question is if I dont proviede Coerection from LocalDate ->
String then the toString method is called on the localDate, right?
Yeah. I guess this is the Object -> String coercion, which is probably
added as a fallback when no s
Cool. I learned a bit today I guess
tnx for help
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Type-Coercer-for-Joda-Time-tp5717942p5717960.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
I continue isolating the problem. Tomcat 7 does not work as well.
If I create a plain Java project (not Maven) it works fine as well.
--
Best Regards / Viele Grüße
Sebastian Hennebrueder
-
http://www.laliluna.de
Java software developer and trainer for Hibernate and Java Persistence
Am 12.
This looks like a bug where a class member variable is used to cache the
EntityManager that is subsequently handed to all the PersistenceContext
annotations regardless of the unitName, like I said.
The following replacement class is tested working and handles multiple
persistence units correctl
40 matches
Mail list logo