That would apply to all grids. I want a DisablePaging mixin that I can use on
a case by case basis
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-their-value-from-a-mixin-tp5720446p5720469.html
Sent from the Tapestry - User mailing list ar
Just bumping this thread again.
Has anyone given any thought to my idea that literal: and symbol: bindings
could use a ThreadLocal for their value so that a mixin could update the
value?
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-the
Yes, and if your read the javadoc for FieldValidator it says "Responsible for
validation of a single field."
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/FieldValidator.html
Since you need to validate a group of fields, you will need to use the
form's validate event. eg onValida
Here's an example
http://jumpstart.doublenegative.com.au/jumpstart/examples/input/morevalidation
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/group-of-requred-fields-tp5720512p5720518.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
No, the GridCollapse mixin expects that each table it collapses has exactly
the same headers. The first time it encounters a grid, it copies it's
headers to the parent grid. For all other grids, it moves the rows to the
parent grid. It's probably easiest if your return a "source" parameter with
1 e
This might be better (not tested):
public GridDataSource getPeople() {
Person emptyPerson = new Person(null, null, null, .);
GridDataSource delegate = new HibernateGridDataSource(hibernateSession,
Person.class);
return new NeverEmptyGridDataSource(delegate, emptyPerson);
}
publ
Since I'm ultimately trying to apply a mixin to a symbol: binding on the
grid, a new binding won't help me. I'm asking for the core code to be
changed for literal: and symbol: bindings.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Read-only-bindings-How-do-I-set-their-
Are you sure you want to generate a grid from a Map and not a
List>?
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/HashMap-as-a-Grid-source-once-again-tp5720533p5720534.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
The grid is ultimately driven by it's source (GridDataSource) and it's model
(BeanModel). If a model is not provided, the grid will auto-generate one
from GridDataSource.getRowType().
You will most likely create a custom BeanModel. Or, you could wrap your maps
in a bean with getters and setters.
No, that won't even compile ;)
If you want to avoid all the fuss of a custom BeanModel, you will need to
use a List instead of a List>.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/HashMap-as-a-Grid-source-once-again-tp5720533p5720539.html
Sent from the Tapestry - Use
If the "lean" parameter is false, tapestry will add the property name to each
td, allowing you to style columns differently with CSS.
If you want full customisation, check out my GridDecorator here:
http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo
--
View this message in context:
> So without the custom model, you can't use a HashMap with the grid
Correct!
> But then a logical question is how to set up this model without an actual
> bean?
BeanModel is an interface, so implement it ;)
> model = beanModelSource.createDisplayModel(Set.class, null);
> Would this work?
No, c
You don't need to implement a GridDataSource, tapestry will happily coerce a
collection to a GridDataSource.
I think the question you should be asking yourself is why do you have a list
of HashMaps in the first place? A list of beans is a much clearer API.
--
View this message in context:
htt
Turns out you don't need to implement a BeanModel or a GridDataSource. I've
added a demo to tapestry-stitch which does exactly what you want. The demo
can be seen here:
http://tapestry-stitch.uklance.cloudbees.net/mapgriddemo
Now, the question remains... do you really want a collection of Maps?
> Actually, it would partially work: it would returns a working BeanModel
implementation so that you can add properties (PropertyModel instances) to
it.
Yeah, I figured that out in my demo. I used
beanModelSource.createDisplayModel(Object.class, messages) and a
MapPropertyConduit
--
View this
You can bind your component parameter to an activation context on your page.
You can also use @Persist(PersistanceConstants.CLIENT) which will use a
request parameter with a component specific name.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Keep-component-s-state
You could also do this with a GridDecorator / GridRowDecorator
http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Renders-2-rows-using-the-Grid-component-tp5720560p5720566.html
Sent from the Tapestry - User mail
That's actually really annoying for me.
Most workplaces don't allow personal email but they do allow Nabble. Sure I
can always use my phone but writing code and copy / paste etc is really
annoying on a phone.
On 21 March 2013 16:31, Thiago H de Paula Figueiredo wrote:
> Hi!
>
> Due to many heada
There are a couple of things wrong with your solution
1. You've implemented a variant binding (isVariant = false) but you have a
no-op implemetation of set(Object value)
This means that the value is 10 in your mixin, but the the value in the
underlying grid component is still 25 (no change)
2. Yo
Hi Barry, I'm not sure you understand a Thread Local, it's guaranteed to be
thread safe since it's local to a thread
I would appreciate it if a tapestry committer could chime in with their
thoughts.
Thanks,
Lance
On 22 Mar 2013 20:52, "Barry Books" wrote:
> The method is isInvariant so returni
Sorry, wasn't aware of the extra work it was creating. I'm happy for a
solution that keeps you guys focused.
Thanks for your continued tapestry support.
Cheers,
Lance
Ah, sorry, I see where you are coming from. Tapestry has a special type of
thread local which is cleaned up after each request. It's called a
PerThreadValue. That's what I was ultimately referring to.
On 23 Mar 2013 01:30, "Barry Books" wrote:
> My impression was Thread Local gives you an instanc
I'm trying to build tapestry from source by
1. Cloning https://git-wip-us.apache.org/repos/asf/tapestry-5.git
2. switching to 5.3
3. running gradlew build
But I'm getting the following error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':plastic:test'.
>
ders and try again.
>
> On Mon, Mar 25, 2013 at 2:04 PM, Lance Java >wrote:
>
> > I'm trying to build tapestry from source by
> > 1. Cloning https://git-wip-us.apache.org/repos/asf/tapestry-5.git
> > 2. switching to 5.3
> > 3. running gradlew build
> >
TapestryTester has two constructors
http://tapestrytestify.sourceforge.net/apidocs/com/formos/tapestry/testify/core/TapestryTester.html
Which one are you using? Are you passing in a context path?
On 26 March 2013 09:19, Stephan Windmüller <
stephan.windmuel...@tu-dortmund.de> wrote:
> Hello!
>
FYI, I've created a Jira ticket and attached a patch based on
PerThreadValue for literal, message and symbol bindings.
The patch includes a unit test and a selenium test.
https://issues.apache.org/jira/browse/TAP5-2099
Could one of the tapestry comitters please take a look?
Thanks,
Lance.
On 2
If you want to avoid @Persist, you might want to consider using one big
form on a single page.
You can then use javascript (and maybe a bit of ajax) to show/hide small
segments of your form at a time.
On 26 March 2013 13:50, Chris Cureau wrote:
> To follow up on what Thiago has said... I've had
ipping the plastic tests the same way, in case
> that helps narrow things down.
>
> Have you scanned through
> http://tapestry.apache.org/building-tapestry-from-source.html to make
> sure you didn't miss anything?
>
>
>
> On Mon, Mar 25, 2013 at 6:56 PM, Lance Java
>
> As I've said in the dev mailing list... this should be fixed in the way
Tapestry handles parameters
Damn!! Wish I'd read this before I started
> To me it's clear how to make it do what I want. The question how should
the symbol binding work
In my opinion, if a binding is invariant, I think a Per
I think that the ParameterWorker is outside of my comfort zone. I'll leave
it the tapestry dev team's capable hands.
Feel free to use the selenium test from my patch.
On 26 March 2013 16:57, Lance Java wrote:
> > As I've said in the dev mailing list... this shoul
You can annotate your pages with @WhitelistAccessOnly so that they can only
be accessed by the whitelist (eg localhost). This is how tapestry "hides"
the PageCatalog and ServiceStatus pages.
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/annotations/WhitelistAccessOnly.html
On 2
Unfortunately, java.text.SimpleDateFormat is not thread safe so can't be
declared as static. You'll need to use a local variable each time to be
thread safe unfortunately.
On 17 Apr 2013 05:06, "Jeshurun Daniel" wrote:
> One more time with the links
>
> http://apache-tapestry-mailing-list-archive
Hi, sorry for the late response, I've been on holiday. I'm the author of
tapestry-cometd.
Tapestry-cometd has to fool tapestry into thinking there is a "real"
request /response when a push is initiated. It does this via a
FakeHttpServletRequest (and Response). Note that not all methods are
implem
e can go to the details of that user and
> don't lose the chat.
>
> The client side is just a page for the moment (so no specials there, just
> a simple chat reciever-sender like on your wiki).
>
> Greets
> Runesmacher
> -Oorspronkelijk bericht- From: Lance Java
>
Also, do you have a security framework that might be getting in the way?
Perhaps this framework is returning a login page Link because it can't find
the session on the Fake request.
On 22 Apr 2013 16:56, "Lance Java" wrote:
> I get the feeling that your push action is returning
t putting the chat
> in the sidebar is just impossible becous of this?
>
> -Oorspronkelijk bericht- From: Lance Java
> Sent: Monday, April 22, 2013 6:14 PM
> To: Tapestry users
> Subject: Re: Live support solution
>
> Also, do you have a security framework that might be get
I've created an issue here
https://github.com/uklance/tapestry-cometd/issues/55
er}
>
>
>
>
> and in java
>
> void onUser(String user){
>system.out.println(user)
> }
>
> this also gives the encodeURL error. (is this the same error as what you
> said?)
>
> any other idea on how to do this?
>
> -Oorspronkelijk b
Unfortunately, the bug in tapestry-cometd means that context.getCount()
will always be 0. I will need to fix this bug.
This is executing your redirect logic in the push event which is then
failing.
I'll try to get you a fix over the weekend. I've detailed the bug fix quite
thoroughly in the issue
The ZoneRefresh mixin fires the "refresh" event passing the (optional)
context parameter.
So, add a handler to the containing page / component.
Eg: void onRefresh(Foo context) {...}
If you return a Block, this will be rendered (zone.getBody() renders by
default).
If you are running through your IDE (eg from class folders instead
of .jar/.war) then you will not be able to get the version since maven has
not packed the artifacts.
This might help:
http://stackoverflow.com/questions/2712970/how-to-get-maven-artifact-version-at-runtime
Far from being a gory detail, it's part of the public API for the mixin,
very similar to AutoComplete's "provideCompletions" event.
The mixin should ideally declare the event using @Events("refresh") and
should have a mention in the javadoc too.
Split it into 2 phases:
Phase 1: Submit form
Do the work (webservice + version increment)
Generate a link to the generatePDF event
Return the page to be re-rendered
Phase 2: Re-render the page
Use javascript to download the PDF once the page has loaded.
m just not sure what the
> appropriate way of doing this is, or how to do it at that. I'm assuming you
> would need some sort of business logic to prevent people from just using
> that same URL over and over again. How would you tigger the script on
> return?
>
>
Take a look at Checklist and Palette
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Palette.html
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Checklist.html
Most tapestry components take the approach of using the "id" parameter (not
to be confused with t:id) if one is provided. If an "id" is not provided, a
clientId is generated which is guaranteed not to clash with other id's on
the page.
public class MyComponent implements ClientElement {
@Enviro
It's invalid html to have two elements with the same id so it will need to
be fixed.
Have you considered styling your CSS by "class" instead of by "id"?
I suggest that component authors use the code I gave you. I also suggest to
style by class instead of by id since the clientId should be a dynamic,
runtime value that is not known at build time.
If components have a static clientId, they can not (legally) be used in a
loop.
I've just committed changes to tapestry-cometd to support page activation
context in push events. I've deployed version 0.9.16 to my github maven
repository. Please increase your dependency version and give it a whirl.
Cheers,
Lance.
You might find this page useful
http://tapestry.apache.org/tapestry-for-jsf-users.html
On 28 April 2013 10:43, Chris Poulsen wrote:
> Hi,
>
> You could get/set the bean instance in a page field before rendering the
> page. Then you would only perform the expensive get once.
>
> Or you could use
You have a few options
1. Return a java.net.URL from your onSuccess() event - This will only work
if your external URL allows GET. You can use the query part of the URL to
pass request parameters
2. Use javascript to post a form to the external URL - Redirect after your
onSuccess() event to a pag
Unfortunately, CometD doesn't expose the HttpSession in a public API so I
can't pass it to tapestry in the FakeHttpServletRequest.
You can use the following code to get a session attribute:
@Inject BayeuxServer bayeuxServer;
HttpTransport transport = (HttpTransport)
bayeuxServer.getCurrent
Hmm... Your use case is really needing the entire server spec in your push
event innit? It seems as if you are generating links in your push event's
block, correct?
Unfortunately, FakeHttpServletResponse does not have an implementation for
encodeURL which is required by AbstractLink to generate li
It's fine in the sidebar, you just need to understand the limitations of
trying to hack tapestry to function outside of the normal request /
response flow.
CometD requires that the HttpSession is created before the push occurs.
Perhaps you could initialize your httpsession scoped list in the setup
The DAO reference will never be null. It might be a proxy that points to a
null implementation. The proxy will instantiate the DAO implementation the
first time a method is invoked on the proxy.
You can use @EagerLoad to load your DAO at app startup to avoid lazy
loading.
On 1 May 2013 11:07, "Joh
I think I might've answered a question you didn't ask!
If you want to do something complex in your listeners constructor with the
DAO, don't!
Instead, create a new IOC service and delegate your methods through to it
in your session listener
public class HttpServletListenerHelperImpl implements
HttpServletListenerHelper {
private SomeDao someDao;
public SessionListenerHelperImpl(SomeDao someDao) {
doSomeFunkyInitializationWithDao(someDao);
Do you realise that there is only 1 instance of the component and also 1
instance of the mixin? And that the same component/mixin is fired for all 5
iterations through the loop?
It's part of tapestry's "static structure, dynamic behaviour". I think if
you make sure to initialize all fields in setu
Disclaimer: I've never used FormInjector before
I *think* you can do this but it will require a little trick. The
FormInjector adds a trigger() function to it's DOM element. The trigger()
function fires a serverside event passing the "context" attribute. In your
use case, the context is not known
The only core tapestry component which supports paging is the grid. If
you're rendering a table, then use a grid
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Grid.html
If you'd an example of a custom paging, take a look at my gallery component
in tapestry-stit
Sorry for my previous answer… I didn't realise that this tapestry-bootstrap
mixin existed.
After looking at the source here:
https://github.com/trsvax/tapestry-bootstrap/blob/master/src/main/java/com/trsvax/bootstrap/mixins/Pager.java
It seems to me that this mixin does not do 'true' paging since
tapestry-hibernate provides a singleton hibernate session which can be
looked up from the registry.
This singleton is a proxy to a lazy-loaded, per-thread hibernate session
instance. All service methods invoked on the thread will share the same
hibernate session. You must call either Registry.clea
Perhaps, as George mentioned, this is better handled by a single form with
two submit buttons. You can use the onSelectedFromX() event to flag which
submit button was pressed.
Here's a suggestion: Never create a page with 2500 checkboxes, 180
propertySelction components and 350 text fields!!!
No human can possibly comprehend a form like that. You could add filters
(ie a search box) and / or paging to the form to make it more usable.
Surely a tabgroup or a select pull down could filter the fields based on a
category or some other grouping?
Failing that, I'd look at the javascript that is executing and the number
of clientside objects being created. Do you attach hundreds of onchange
listeners to hundreds of fields? Sometimes,
Why don't you ask your "full time operator" what he thinks of 2500
checkboxes on a single page? I bet he's got something to say about it :)
Have you configured a non-standard XMLReader?
Take a look at the docs here
http://www.saxproject.org/apidoc/org/xml/sax/helpers/XMLReaderFactory.html#createXMLReader()
Tapestry's template parsing is done by SaxTemplateParser / XMLtokenStream
which ultimately delegates to an XMLReader created via
on to check 200 checkboxes once, then uncheck
few for this column if needed. Do you think that will help if I filter the
2500 checkboxes into 50/100 pages?
>
> Anyway, thank you for all your help. From Thiago's reply, it seems there
is no code level solution for IE7 and IE8.
>
> ---
You can annotate individual service builder methods in AppModule with
@EagerLoad. There's also ServiceBindingOptions.eagerLoad() available for
bind().
Not sure if there's a global option.
Questions about the 'magic' hibernate session proxy seem to crop up a bit
so I've raised a Jira to improve the docs.
https://issues.apache.org/jira/browse/TAP5-2115
You could extend the AutoComplete mixin and override
generateResponseMarkup.
${project.version} is a reserved property in maven. I'm guessing maven is
using its own value instead of your filter. Check by inspecting
appversion.properties in your jar/war.
Tapestry provides a random hex string default value for the application
version. I'm guessing that's what you're seeing. There must be some
circumstances under which tapestry can't find the override in your property
file.
I've not used the jquery datatable but have solved this problem with the
grid here: http://tapestry-stitch.uklance.cloudbees.net/griddecoratordemo
If it's not supported out of the box with datagrid, you could do something
similar (perhaps adding a "data-" attribute to each row).
You will need to tell tapestry to ignore the "/images" path so that another
servlet (spring) can handle it.
http://tapestry.apache.org/configuration.html#Configuration-ConfiguringIgnoredPaths
Does your webapp have a context path? You may need to use
Of course you need to map spring's servlet / filter (whatever it is) to a
url pattern in web.xml. Unfortunately the current generation of servlet
containers are not mind readers :)
This question is now off topic, please continue on an appropriate spring
mailing list.
A much better option is to fix the bug with a RequestFilter. Wrap the
response in a custom implementation that sets a flag to true when
redirect() is called and returns the correct value in isComitted()
Unfortunately, hibernate's Search.getFullTextSession(...) casts the session
to a concrete type which fails if you pass the session singleton provided
by tapestry-hibernate.
Instead, you must do something like the following in your AppModule
@Scope(ScopeConstants.PERTHREAD)
public static FullTextS
decorate != advise
You'll need to read the docs here
http://tapestry.apache.org/tapestry-ioc-decorators.html
On 18 May 2013 15:02, "Boris Horvat" wrote:
> Hm...strange this method of mine is not invoked, any idea as to why?
>
>
> On Sat, May 18, 2013 at 3:57 PM, Boris Horvat >wrote:
>
> > I do
You have many @Persist annotations which I think are unnecessary. As a
rule, if it's in the database, you don't need to store it in the session.
Instead, pass an id (or ids) in the URL via the page activation context and
look up the entities each time.
There's a caveat to this rule that you often
You can extend the mixin and then create a component which includes the
extended mixin.
I think you've hit the nail on the head and that this relates to TAP5-1778.
As a work around, can you put your special chars in a language specific
properties file? By default, prop files are treated as UTF-8. You can also
override the PropertiesFileParser if you need.
Another option is to overri
Yes, patching the bug would require a copy of TemplateParserImpl (71 lines)
and SaxTemplateParser (1197 lines)
The great thing about tapestry / tapestry IOC is that you can workaround a
bug like until a fix is provided in a later release.
Much better than rebuilding a custom version of tapestry f
Hi, as a previous dwr committer myself, I was keen to provide dwr reverse
ajax / tapestry integration.
After speaking to the dwr team, I found that the push mechanism in dwr was
not considered bulletproof and was directed towards cometd
For this reason, I have created tapestry-cometd, a push libr
tapestry-cometd is built using the cometd integration in atmosphere.
Atmosphere supports a variety of push mechanisms including WebSockets,
Server Side Events (SSE), Long-Polling, HTTP Streaming (Forever frame) and
JSONP.
Out of the box, tapestry-cometd is configured to use
org.cometd.websocket.se
You underestimate tapestry :)
Tapestry's PropertiesFileParserImpl assumes UTF-8 properties files and
performs a native2ascii transformation on the fly
http://tapestry.apache.org/current/apidocs/src-html/org/apache/tapestry5/internal/services/messages/PropertiesFileParserImpl.html#line.79
I think the easiest way would be to decorate the JavaScriptStackSource
service. Wrap the default implementation with a version which decorates
getStack(String name) to return a custom JavaScriptStack implementation.
The custom JavaScriptStack will provide wrappers for:
List getJavaScriptLibraries(
The supported browsers section on the atmosphere page can be ignored as
this refers to atmosphere.js which is not used by the cometd integration.
Only the supported servers section is relevant.
Best to check the cometd docs for supported browsers at www.cometd.org
Put your header labels in a messages prop file with key propertyName-label
http://tapestry.apache.org/localization.html
Looks like the library is referencing a nonexistent version of tapestry.
I'm no Gradle guru but in maven, this can be resolved by specifying a
different version of the tapestry dependencies in your pom and the "nearest
resolution wins" strategy comes into play.
If the equivalent doesn't work in Gr
> call the other pages setupRender() methods directly.
What you are doing sounds really dodgy to me and against the tapestry
principles. Why aren't you using a component?
Your regex looks fine to me, perhaps tapestry is having troubles parsing
the string to a list of validators. I wonder if the space character is the
cause?
Tapestry allows you to specify regexes in prop files. Try this:
template:
prop file:
firstname-regexp=^[A-Za-z0-9 ']+$
On 23 May 2013 13:50,
Ah, so use ' in place of '
That's a bit more difficult. By providing a header block, you are
overriding the default header which contains the sorting logic.
I see 2 options:
1. Include the sort link / image in your custom header block (see
GridColumns component for inspiration)
2. Decorate the default header with a mixin.
> I would then get 'cdn' urls for the different scripts that make up the
stack, and not the stack url itself
Oops, I think you're right
> I did try to implement my own proposed solution with Advice
That's a lot of messy byte code manipulation for a single method interface.
I'm a bit old fashio
You would do this by the topic (eg: "/chat/user1"). You can add custom
Authorizers for topic security.
Not sure if this will help but thought it might be of interest. I've
written a ComponentEventLinkEncoder which looks for "special" URL prefixes.
If a "special" folder is found on the URL, it is removed from the URL and
passed on to the normal tapestry component rendering. The "special" folder
(whic
Tapestry uses ASM under the hood for it's runtime byte code manipulation
magic. I'm pretty sure that this would fail on dalvik.
I see that there is an ASMDEX project, this is probably the easiest option
to get plastic working on dalvik
http://asm.ow2.org/doc/tutorial-asmdex.html
You must be note that the tapestry build includes a repackaged copy of the
ASM libraries
https://github.com/apache/tapestry-5/tree/master/plasti
901 - 1000 of 1604 matches
Mail list logo