. There is a
dojoRequest parameter, which seems like I can use it for the same
purpose. Are you using a version of Tapestry greater than 4.02?
I'm going to try to adopt your method, but without moving my
authentication code into the servlet filter.
Thanks again!
Steve Shucker wrote:
I already had a servlet
I already had a servlet filter doing some custom authentication and
handling redirects to a separate login service for expired sessions, so
I added a little extra code in there. First off, you can identify ajax
requests by the presence of an HttpServletRequest header called
dojo-ajax-request
I suspect you have an accessor hardcoded to get/set a
java.util.ArrayList. java.util.Arrays$ArrayList implements List but
does not extend java.util.ArrayList. Check to see if you're explicitly
using the implementation class (ArrayList) when your method should
really only get/set something
http://tapestry.apache.org/tapestry4.1/usersguide/validation.html
http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/form/validator/Identity.html
Look at the match/differ validators. The cover the basic concept of a
validator that acts on two components. You can probably write
hack because that didn't really fix my
IE problems. I think it just didn't like being applied in a float=right
div there.
Steve Shucker wrote:
I'm a bit nutty about writing clean code, and I didn't want to clutter
things up with binding events left and right or extra script tags for
each
implementation, esp. some code :)
On Dec 3, 2007 11:30 PM, Steve Shucker [EMAIL PROTECTED] wrote:
Is it possible to globally replace the SubmitBindings.script file used
by all the AbstractSubmit subclasses to wire up ajax events with my own
version? I've got a script that imposes an overlay on top
Is it possible to globally replace the SubmitBindings.script file used
by all the AbstractSubmit subclasses to wire up ajax events with my own
version? I've got a script that imposes an overlay on top of the
components being updated and prevents double-clicks. Right now, I can
wire it up to
You should look at the @PropertySelection component to render a select
dropdown complete with options. It takes a model attribute (interface
IPropertySelectionModel) which essentially wraps a collection/array of
options. For your case, you probably want the
BeanPropertySelectionModel or
Look at the LabeledPropertySelectionModel. From the javadoc:
Decorates an underlying [EMAIL PROTECTED] IPropertySelectionModel}adding an initial
property. The label, option, and value of the initial property are
configurable.
Joshua Jackson wrote:
Dear all,
I have a combo box defined as
You can probably set the ajaxDelegate attribute of @Shell to null (or
your own renderer). The dojo initialization code looks like it comes
from there.
-Steve
michael wrote:
hi
we are evaluating tapestry for a web application for mobile phones. we
have to keep the size of the pages low (
With the newer ognl I automatically try the #this prefix to see if it
works. Try
ognl:{null, '999', #this.checkIn == null ? null : checkIn.time, #this.checkOut
== null ? null : checkOut.time, adultsPerRoom}
or
ognl:{null, '999', #this.checkIn == null ? null : #this.checkIn.time,
Use whatever prefix your library is mapped with. It's the id
attribute in your *.application file.
BTW, I've found that you NEED to include a *.page file for pages in
libraries. Maybe it was fixed in the 4.1.2 release, but specless pages
in libraries never worked for me.
-Steve
Paulo
The registry is initialized in tapestry's ApplicationServlet.init(). In
web.xml, you need to specify load-on-startup1/load-on-startup for
the servlet configuration. This will force ApplicationServlet.init() to
run when the application is deployed instead of the first time a
tapestry page is
I see two things off the top:
- DirectLink won't rewind the form. You should really be using
LinkSubmit if you want to capture the selected value.
- The updateComponents property of the DirectLink might work, but it's
not guaranteed if you have multiple instances of this component or a
name
Is there any way to configure validation so that a validator only runs
for a specific submit method?
My situation is that I have a page with a few checkboxes and some
linksubmits on it. There's also a popup dialog box with some other form
controls and a submit button. I need everything in
the other state.
-Steve
Michael Sims wrote:
Steve Shucker wrote:
I need everything in one form
because the checkbox states should be persisted even when the popup
dialog is submitted.
[...]
My options as I see them:
[...]
- use a separate form with an async submit for the popup
I just realized I had a bug relating to this yesterday and I could use a
little help solving it. I think the solution is to force the hibernate
session to flush before the response is committed, but I'm not sure
how/where to inject that call into tapestry. If I knew where to make
tapestry
commits the response. Then I could call
session.flush() there to force the exception before the response is
committed. I just don't know how I can accomplish this.
-Steve
Michael Sims wrote:
Steve Shucker wrote:
I just realized I had a bug relating to this yesterday and I could
use
. I'd consider a dedicated
session in pageBeginRender of my error page (with some extra error
handling) to set up the state for your error page.
-Steve
Michael Sims wrote:
Steve Shucker wrote:
Keep in mind the difference between a flush and a commit in hibernate.
A flush executes all
where this happens. The short version is that the WebRequest
should have a parameter set that identifies the tapestry service being
called.
Thanks for the link.
-Steve
Michael Sims wrote:
Steve Shucker wrote:
I'm really fishing for a hivemind guru to tell me how to inject some
code
=com.vms.infrastructure.websession.TapestrySessionTxFilter
set-object property=serviceEncoders
value=service-property:tapestry.url.LinkFactory:serviceEncoders/
/construct
Thanks for catching my bug!
-Steve
Michael Sims wrote:
Steve Shucker wrote:
Unless I'm
I'm not sure if this will completely solve your problem, but I wrote my
own WebRequestServicerFilter that only applies the session/transaction
wrapping on non-asset requests.
public void service(WebRequest request, WebResponse response,
WebRequestServicer servicer)
throws
and away
from a kludgy aspect.
-Steve
Michael Sims wrote:
Hi Steve,
Steve Shucker wrote:
I'm not sure if this will completely solve your problem, but I wrote
my own WebRequestServicerFilter that only applies the
session/transaction wrapping on non-asset requests.
Interesting! Thanks
You need to specify the tableSessionStoreManager property.
If the loop iterates over something that's stored in the session anyway,
you can add a Serializable field to that object (or wrap it in another
object containing this field) and implement the two methods of
ITableSessionStoreManager
the name of the
first field to your validator
and apply the validator to the second field - this is so that both
fields have rewound
Steve Shucker wrote:
I'm trying to write a variant of the match/differ validators to check
if two fields have the same null state. I pass in the name
The dojo dialog control moves the rendered dialog around in the DOM so
it's just inside the closing /body tag. They do this so it's in a
known place and they can make some assumptions about (lack of) nesting
when it renders. However, this effectively moves it outside any forms.
Use firebug
I think you're going down the wrong path with page injection. Try using
@Parameter to declare/inject a parameter to pass the page. You can
either make your parameter a String and use cycle.getPage(pageName) like
Andreas suggested or make it an IPage or ILoginPage to pass the page
directly.
I asked that same question about a month ago and found there wasn't a
good answer. Someone pointed me to Shing Hing Man's homepage
(http://uk.geocities.com/matmsh/) where he posted some good information,
but dojo's documentation wasn't nearly as helpful as it should have been.
The first huge
would be very grateful to hear it.
Thanks
Gareth
- Original Message
From: Steve Shucker [EMAIL PROTECTED]
To: Tapestry users users@tapestry.apache.org
Sent: Wednesday, 4 April, 2007 9:54:52 PM
Subject: Re: Page Cleanup Tasks
I'm not sure where you'd call it from
My recent experience (with 4.1.1) is that injecting relative resources
isn't working. I have a few components in a library with associated
*.script files. Some have templates and use the @Script tag in the
template. Others don't have templates and use the @InjectScript
annotation. I tried
I'm not sure where you'd call it from, but
IRequestCycle.forgetPage(String) will cause it to dump any state
connected to a given page.
-Steve
Gareth wrote:
hi,
I am storing a list of items in the session using @Persist(session) and that
is working well, however I would like to remove that
This may be the answer to the wrong question, but a long time ago I
discovered that when weblogic was running out of memory, it would dump
random sessions. The solution was to configure the application server
to persist sessions in the database. This also allowed sessions to fail
over to the
Yes, it'll work just fine - with one caveat.
pageBeginRender/pageEndRender are called for all (rendered?) components
on your page. If you're using Block/RenderBlock to render a component
from another page, that component won't have its
pageBeginRender/pageEndRender methods called. Unless
If you've got the components you want somewhere else on a template, you
can always use Block/RenderBlock. That involves setting up @Block areas
for each possible content and putting a @RenderBlock in the target
area. Then you just need a method to wire up the RenderBlock's block
attribute.
might create a plain vanilla html page and
include dojo manually on it (ie no tapestry ) and do whatever I had to
do to understand how it works there first before moving it to java
managed code.
On 3/15/07, Steve Shucker [EMAIL PROTECTED] wrote:
Can someone point me to a good primer for wrapping
Thanks, I found some useful examples there.
-Steve
Yiannis Mavroukakis wrote:
I think lombok.demon.co.uk has what you need :)
On Mon, 2007-03-19 at 09:01 -0700, Steve Shucker wrote:
Creating the plain-vanilla web page and slowly moving it into the
tapestry world is how I eventually
I don't know enough about tapestry internals to say if this is a good
idea, but I've played around with DynamicBlock and your solution looks a
lot simpler. At a guess, it looks like your approach is setting up your
dynamic component when tapestry is loading the page template. If it's
part of
Can someone point me to a good primer for wrapping dojo components to be
used with tapestry 4.1. Yesterday I went through a lot of grief before
I realized that tapestry was setting parseWidgets=false. Eventually I
concluded that:
1) Tapestry doesn't want dojo to automatically inspect the
You've got two separate problems here:
1) choosing which component to render at runtime without a fixed list of
possibilities
2) pulling the template from the database
The first problem is addressed by Michael Henderson's DynamicBlock:
http://www.behindthesite.com/blog/C1931765677/E1630021481/
Could one of the gurus please post some example hivemind config showing
how I can include a hivemodule.xml with my component library project so
that the library automagically registers itself with whatever
application is running? I've thought for a while that the *.application
file was
anonymous/anon
Dan Adams wrote:
Is there an anonymous login for this?
On Fri, 2007-03-02 at 09:41 -0500, James Carman wrote:
There's a HiveMind module for that, actually. Check out:
http://svn.javaforge.com/svn/hivemind/hivemind-hibernate3/trunk/src/main/resources/META-INF/hivemodule.xml
I'm not sure if it's legal to map the html extension to two different
encoders. Try using a different extension for the external pages.
-Steve
Peter Stavrinides wrote:
Does anyone have any ideas?
Peter Stavrinides wrote:
Hi everyone
I am having some trouble with friendly URL's. Getting
Are you using the tree in a form? If so, it's bugged.
http://tacoscomponents.jot.com/BugReporter/Bug32
I posted a workaround a while ago, but it assumes that you don't have
any form controls in your tree nodes.
http://mail-archives.apache.org/mod_mbox/tapestry-users/200606.mbox/[EMAIL
I'm writing specless pages/components in my current projects, but I
can't get specless pages working in libraries. My pages work fine if I
just create an empty spec and specless components work flawlessly. I've
looked at the PageSpecificationResolverImpl and
When I install tomcat, I usually remove or rename webapps/ROOT to
something else. If I want to deploy an app to the root context, I just
name the war file ROOT.war and let tomcat autodeploy it. For maven's
tomcat plugin, I provide a context.xml file that specifies the root
context. Tomcat's
, Steve Shucker [EMAIL PROTECTED]:
I've got this working for pages and components, but it's probably a
bit
different than what you want. I have a template table in my database
and I'm looking up content by a numeric PK rather than a name
because I
have a requirement to let users version some
I've got this working for pages and components, but it's probably a bit
different than what you want. I have a template table in my database
and I'm looking up content by a numeric PK rather than a name because I
have a requirement to let users version some templates. I'm also
leaving out my
I've used AspectJ to do this. It works, but it's not the most efficient
solution out there. We have all our entities implement an interface
Persistent, so the pointcut looks like:
pointcut persistentUse(Persistent persistent):
call(java.util.Set+ Persistent+.get*())
Is there a way to change the location where tapestry looks for html
templates? I've got a component library project with a standard maven2
file structure. I'm writing specless components. I've created a
/src/main/webapp directory containing a basic *.application and web.xml
file and I use
First of all, if you want a single manager object, tapestry provides
Application State Objects to do this. See
http://tapestry.apache.org/tapestry4/UsersGuide/state.html#state.aso for
more info. For a single instance of an ASO across an entire
application, you set the scope to application
I don't know if this will work, but you can try adding another
stylesheet just for printing that will override the button's style.
link href=/css/print.css media=print rel=stylesheet
type=text/css /
Then set the color or other attributes for buttonSpecial to be something
different. It
Look at tapestry's ExceptionDisplay component source. It uses something
called an ExceptionAnalyzer and also displays the contents of the
ExceptionDescription.getProperties().
I've got a custom exception page that writes to log4j. Here's what I
use to get the text:
public void
.
-Steve
[EMAIL PROTECTED] wrote:
Thanks Steve.
So in Exception.html I could just have a
span jwcid=@ExceptionDisplay exceptions=ognl:exceptionDescription /
?
Thanks,
Greg
-Original Message-
From: Steve Shucker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 27, 2006 11:04 AM
Just use an ognl expression for the columns attribute of the table.
table jwcid=@contrib:Table columns=ognl:'column1, column2, column3'
+ (isAdminUser ? ',deleteColumn', '') ...
Never underestimate the coolness of the terniary operator.
-Steve
[EMAIL PROTECTED] wrote:
Anybody know a simple
As a general rule, it's safer to put the literal first in statements
like this:
admin.equals(user.getState())
If anyone wants to say that it looks/reads a bit funny, I'll agree.
It's an odd syntax, but it protects you from NPEs.
-Steve
Martin Strand wrote:
Well, if you get a NPE on this
Try putting an @InvokeListener component in your @For loop.
-Steve
-Original Message-
From: Patrick Moore [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 17, 2006 1:13 AM
To: Tapestry users
Subject: listener desired on For component
Hi there --
I have a situation where I am
Thank you! That was a trivially simple solution that solved 90% of my
issues. I'd spent several hours digging into the table's internals before I
saw your email and fixed the paging in 10 minutes. It was no problem to
make the objects I was iterating over implement ITableSessionStoreManager.
Is
I'm having a problem with the contrib:Table component nested inside a @For
loop. Essentially I'm rendering several lists of objects. The initial
display is correct, but paging fails. What I think is happening is that a
single @contrib:Table component is being reused with each iteration of the
The cookie domain must be a domain, not a host. For a cookie at
tapestry.apache.org, the domain is apache.org and will be valid for
tomcat.apache.org as well. If you don't have at least one period in the
hostname, the cookie just isn't set. Personally, I have a small bit of
logic to detect if
:[EMAIL PROTECTED]
Sent: Friday, June 30, 2006 10:48 AM
To: Tapestry users
Subject: Re: Tree w/Checkbox on each node--Way to Fix Indent?
Is there an open issue for this in tacos? Seems like a big enough deal thing
that I should fix it. http://tacoscomponents.jot.com/BugReporter
On 6/30/06, Steve
My team did something like this recently. We put a line in our
*.application file:
page name=Exception specification-path=/ErrorPage.page /
Then we copied/modified the code from tapestry's error page so we could pipe
tapestry's stacktrace generation to log4j. The actual html/page file was
just
I've seen something like this once before involving an app designed for a
small number of large sessions. My problem was that I was persisting my
sessions in-memory. When there was no more memory available, my app server
(weblogic 8.1) conveniently started discarding sessions. Turning on JDBC
62 matches
Mail list logo