I've recently noticed that the autocompleter runs the getValues method
twice for every search string. Therefore you can improve performance by
almost 50% by adding some simple caching, especially if your search is
driven externally (ie DB).
For example:
public class MyAutocompleteModel
Hi,
I have two entity classes listed at end of this post, they have referential
integrity in the table level. in a page's onActivate a new Usr is created,
then it is passed to a service where a MsgSubject is created and its usr is
set to the instance of Usr created in the page, but this will
Hello all,
I need to send a StreamResponse (namely XML, JPEG or PDF) on a
particular request with parameters.
I currently use the following solution : making a page with the right
name, getting request parameters in the classical way, through
requet.getParameter(p),and sending the
Hi All
Just wondered if anyone knows of a nice/easy way to get the rendered output
of a component after it has completed its rendering lifecycle, ie. reached
the CleanupRender phase? I've tried two approaches so far:
The first was to use a MarkupWriterListener to capture any content added
to
Hi,
I'm wondering if I can inject assets or better yet IncludeJavaScriptLibrary
from outside the web app? For instance if I want to include the YUI libraries
direct from Yahoo! rather than download and bundle them with my web app?
@IncludeJavaScriptLibrary( {
Hi José,
Try to change your method signature to this:
public InputStream onActionFromStream(String myparam) throws IOException {
...
}
and then, on your url, you can call it like this:
http://localhost:8080/appname/getstring.stream/paramValue
I hope this helps you.
On Thu, Jul 24, 2008 at
Here:
Caused by: java.lang.NullPointerException
at cn.mcguo.banjia.components.Star.onSwitch(Star.java:61)
Thiago
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
that line is this:
int id=Integer.getInteger(param.toString());
i just convert a string to a integer ,why does it throw exception?
does the inject service request's getParameter method return a actual
String?
Thiago H. de Paula Figueiredo wrote:
Here:
Caused by:
Can someone knowledgable please comment on my query from yesterday?
I notice that t:if coerces number objects (Long, Integer, etc) and
tests for zero or
non-zero. I want to test for null or not null using a number data
type. Is there any way
to do this?
Thanks,
p.
I am following the tutorial at
http://tapestry.apache.org/tapestry5/tutorial1/forms2.html
but I find that the session (supposedly injected) is null. I'm not
sure how to proceed.
Could someone point me to documents/better tutorials on how to use
Tapestry with Hibernate?
Thanks,
p.
Perhaps hibernate.cfg.xml isn't in your runtime classpath?
Are you sure your IDE includes it to the output?
On Thu, Jul 24, 2008 at 6:09 PM, [EMAIL PROTECTED] wrote:
I am following the tutorial at
http://tapestry.apache.org/tapestry5/tutorial1/forms2.html
but I find that the session
Hi,
since I've renamed my application package I get error messages for all BeanInfo
classes, e.g.:
FAIL onLoad org.apache.tapestry5.corelib.components.FormBeanInfo
I've recompiled all sources and cannot see where there should be a problem. Its
the same with both, jetty 6.1.11 and tomcat 5.5.26.
There are many threads regarding your question around the list, like this one
http://www.nabble.com/T5-if-component-tc17667375.html
On Thu, Jul 24, 2008 at 12:11 PM, [EMAIL PROTECTED] wrote:
Can someone knowledgable please comment on my query from yesterday?
I notice that t:if coerces
When ever i use onActivate in my tapestry page i see that it is called
multiple times.
I am using onActivate(String ,String).
In first instance it will take the right value and in the second instance it
will replace the last value with my resource folder names.
eg: 1st time when
I'm guessing that you don't want Integer.toInteger(), cause if you read the
javadoc(
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#getInteger(java.lang.String)
you'll see that it's pulling a property from System.property with the
passed name. If the property doesn't exist it
Hi,
Sorry about the off topic question...
Tomcat have your own app manager, and lambda probe is another option.
Is anyone out there using such tool with Jetty?
Thanks,
Marcus
It sounds more like a data issue, check your data in database carefully.
Yunhua
On Wed, Jul 23, 2008 at 11:18 PM, Chris Lewis [EMAIL PROTECTED] wrote:
Hello,
I have a dispatcher that uses a hibernate session. The dispatcher is
auto bound and receives the session in the constructor. I'm using
General test construct:
.java
public boolean myTest() {
return (thingie != null);
}
.tml
t:if test=myTest
!-- it's not null --
/t:if
or
t:if test=myTest negate=true
!-- it's null --
/t:if
photos-4 wrote:
I notice that t:if coerces number objects (Long, Integer, etc) and
tests
t: is absolutely critical only for two things: id, and type.
t:id or t:type clearly identify a particular tag as a reference to a
component, either an explicit one (t:id) or implicit (t:type).
Without one of those two things (or both), having, eg, t:page=Index
is meaningless.
Beyond
Hi,
Seach on this list for:
t5 redirect after post
Tapestry uses redirect-after-post design.
http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost
Marcus
Post your query and load code.
-Original Message-
From: Chris Lewis [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2008 13:16
To: Tapestry users
Subject: Re: T5.0.14-SNAPSHOT: strange behavior Dispatcher when using a
Session
It can't be a data issue. The records are persisted
I have an EagerLoad service that uses a PerThread service. I expected the
EagerLoad service to hold a reference to a proxy to the PerThread service so
that the actual instance of the PerThread service that is used depends upon
the thread calling the EagerLoad service. Instead, the EagerLoad
Look at the html that your page is generating. Your image/js paths are
probably relative to the page.
You probably have:
img src=images/myimage.jpg/
you want
img src=/images/myimage.jpg/
Josh
On Thu, Jul 24, 2008 at 9:13 AM, tapestry5 [EMAIL PROTECTED] wrote:
When ever i use onActivate in my
Hi Jonathan,
Here is my dispatcher. As you can see it's in a very early stage so it's
both small and messy. The query is being done via:
session.load(Listing.class, Long.parseLong(sListingId));
It was being done via createQuery and uniqueResult, with the same results.
public class
I tried changing path but it still gives me same values
joshcanfield wrote:
Look at the html that your page is generating. Your image/js paths are
probably relative to the page.
You probably have:
images/myimage.jpg
you want
/images/myimage.jpg
Josh
On Thu, Jul 24, 2008 at 9:13
show us the urls generated for your page and the urls generated for the
images.
On Thu, Jul 24, 2008 at 11:51 AM, tapestry5 [EMAIL PROTECTED] wrote:
I tried changing path but it still gives me same values
joshcanfield wrote:
Look at the html that your page is generating. Your image/js
Is it possible to use Differ validator to validate a field shouldn't match a
known value? Match/Differ expects to match against a form component; just
any component won't do. In my case the value the value to differ against
cannot change (think use case where a password cannot match with a
I'm not sure why it WORKED.
Session.load will try to create an instance of Listing, which it can't
because it is abstract.
On the other hand, if you do a query, then even though you ask for a
Listing, Hibernate will look for any descendant of Listing.
The actual object type returned will
I switched over to using Assets and then in the page/component class using
@Inject
@Path(context:/images/Logo.gif)
@Property(read=true)
private Asset _logo;
-Original Message-
From: tapestry5 [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2008 14:51
To:
I haven't looked at the source of hibernate (or read) to see what
exactly goes on, but the erratic behavior of load() is precisely the
same as this:
Listing listing = (Listing)session.createQuery(from Listing
where id=:id)
.setLong(id,
Event bubbling? In 5.0.13 I have a page with two onActivate()'s, both of
which will get invoked.
.java
1. void onActivate(Object[] projectContext) {..} // pagelink handler with
a context of two Long ids
2. void onActivate(Long taskId) { ... } // pagelink handler
with standard
Since it's just my intuition speaking, I may be off-base, but...this sounds
like the beloved Hibernate Proxy and/or Cache issue, both of which
SnoopyDance all-over gray concurrency areas. Try substituting the query
code for a, literally, straight get(persistentClass, databaseId); call and
see if
Padawn,
Per your suggestion I tried the get method with the exact same results:
Listing listing = (Listing)session.get(Listing.class,
Long.parseLong(sListingId));
I also changed the dispatcher so that it uses the
HibernateSessionManager to get the current session explicitly on each
request, to
You are right.
I changed the url in the css links and script links but missed to change in
the links of images.
Its working now.
Thanks.
joshcanfield wrote:
show us the urls generated for your page and the urls generated for the
images.
On Thu, Jul 24, 2008 at 11:51 AM, tapestry5
Phew, that's good. I was thinking it might be something harder :)
On Thu, Jul 24, 2008 at 1:33 PM, tapestry5 [EMAIL PROTECTED] wrote:
You are right.
I changed the url in the css links and script links but missed to change in
the links of images.
Its working now.
Thanks.
joshcanfield
Be paranoid. Set hibernate.show_sql=true. Grab the SQL statement, and
execute it manually.
Also, can you change Listing to be non-abstract - even if you never use it?
-Original Message-
From: Chris Lewis [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 24, 2008 15:41
To: Tapestry
Right on. So imagine Snoopy's fist shake to the sky after being
perforated by the Red Baron (Hibernate). . . ;-)
You're dealing with alot of code layers, and potentially a data issue
here (one instance you are trying to query could be represented
in the schema just differently enough to cause
I have a secure page (https) which calls my tapestry page. when i do a
servlet call on return i get http back and not https. I read about @secure
annotation. I am using 5.0.10. I don't see @secure annotation in that pkg.
Thanks
--
View this message in context:
Chris Lewis-5 wrote:
Do I need to do any manual hibernate cleanup? I thought this was handled
by a background
event but I'm at a bit of a loss...
Actually, Uber T5 folks, this raises a good question: when using an ORM
framework, are there specific gotcha's to be sensitive to when
Brian Lough wrote:
Right on. So imagine Snoopy's fist shake to the sky after being
perforated by the Red Baron (Hibernate). . . ;-)
You're dealing with alot of code layers, and potentially a data issue
here (one instance you are trying to query could be represented
in the schema just
I'm showing the sql and in the conditions where the query is successful
it's as it should be. When it bombs it doesn't even reach the point
where the query is executed. It's almost like it forgets its mappings...
Jonathan Barker wrote:
Be paranoid. Set hibernate.show_sql=true. Grab the SQL
I don't want to change Listing to be non-abstract, but I did try
querying a concrete subclass and that doesn't suffer from the same
defect. So that raises/reiterates a few questions
1) Can't you, via HQL, query an interface or abstract class entity with
the goal of getting a collection of all
Making listing non-abstract offends my sensibilities but I occasionally
need to offend myself.
1) I've actually never tried. I did run into problems when joining two
hierarchies via a third relationship hierarchy. (Take two classes related by
an association where there are additional properties
Em Thu, 24 Jul 2008 18:14:32 -0300, Chris Lewis
[EMAIL PROTECTED] escreveu:
This is occurring in a development environment on a fresh and small app
with a schema with a total of 6 mapped entities, 7 tables, 3 records in
the abstract entity's table, one user (me), and all queries working
Thiago,
You must not have read my explanation of just how erratic this is, so
here it is again:
Quick summary of the behavior with the following urls:
1) request /LStAug/?limg=1
works
2) request /LStAug/?limg=1 (again)
works
3) request /LStAug/?limg=2
breaks
4) request /LStAug/?limg=1
This looks like an issue ... I think EagerLoad is not compatible with
non-singleton scopes.
What does it mean to eager load a service that is, in fact, used in
multiple threads?
Ah, here's the issue; when you bind a class, not an interface, as a
service, it automatically uses singleton scope.
Maybe this would work:
You can use the t5componens/OnEvent mixin on a button or, maybe, on an
action link (I only have test this component on a textfield with the blur
event). Then, this mixin has a parameter called: onCompleteCallback, which
will call a javascript function when the ajax
Ah, just answering to myself and for future reference. The form components
don't need to do anything special to support client-side validation, but in
my case the problem is that Hidden by default uses Datasqueezer to encode
the value, in practice adding an uppercase S to the beginning of the
Sounds to me something related to the PreparedStatement cache. Do you
use c3po? If so did you specify hibernate.c3p0.max_statements?
Martijn
On Thu, 2008-07-24 at 23:26 -0400, Chris Lewis wrote:
Ok, I've figured out what exactly is causing it and how to work around
it. I can't say why, but
49 matches
Mail list logo