hi peter,
ASOs that have a (non-empty) constructor can be instantiated by
contributing to the ApplicationStateManager service. Please see
the thread for the source. if you contribute to this service you can
still use the @ApplicationState annotation.
http://www.nabble.com/-T5-Question-on-ASO-co
maybe you missed the point here,
never mind the reason I use the _ prefix ..
the problem was with hibernate, not with tapestry
Davor Hrg
On 10/15/07, Christian Gruber <[EMAIL PROTECTED]> wrote:
>
> Tapestry doesn't require _ prefixes, mind you. That's a Howard M.
> Lewis Ship-ism. (act
Hi Peter
1) I think the general opinion on this is that a service and an aso are
completely different animals. I can't think of a situation where I'd
ever want an aso to be a service (or vice versa), but that's just me. If
there is a way to do this, someone else will need to chime in.
2) @In
Hi all,
Following on from a previous post on this subject I have some questions
on Tapestry 5 IoC:
1. How do you register an ASO as a service if you have to provide
arguments to the constructor (i.e. you cannot use @ApplicationState in
this case).
2. How do you retrieve a service object th
Thanks Nick - you're right, i should have looked over list and jira first:
http://thread.gmane.org/gmane.comp.java.tapestry.user/51015
https://issues.apache.org/jira/browse/TAPESTRY-1679
I agree that 'configure' is a step forward -
configureRequestHandler() is better than contributeRequestHandler(
Doesn't an ordered configuration help you there?
http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html#Ordered%20List
The order of module processing shouldn't be important since the final
ordering is imposed by resolving all such configurations after loading.
(Sorry, I haven't exp
Hey Guys,
I've quite happily been working on creating my own module to enhance
Tapestry5. This module is a generic patch so that I can more rapidly
create new WebApps based on T5. I've added some components and a service
and all seemed to be working quite well. Now I've run into a problem thou
they should both work,
what's the error you're getting?
Jesse Merriman wrote:
(Tapestry newb, using 4.1.3, maybe answered before but I couldn't find it.)
Is it possible to bind to a sub-property? Eg, this works:
Home.html:
Home.java:
public abstract class Home extends BasePage impl
(Tapestry newb, using 4.1.3, maybe answered before but I couldn't find it.)
Is it possible to bind to a sub-property? Eg, this works:
Home.html:
Home.java:
public abstract class Home extends BasePage implements PageBeginRender {
public abstract int getNum();
public abstract void
Tapestry doesn't require _ prefixes, mind you. That's a Howard M.
Lewis Ship-ism. (actually, I have it too from my NeXTSTEP days.)
It's not mandatory, however, so on your persistent objects, you could
use the typical pattern and annotate your properties, if that's how
you want to do it.
Tapestry-ioc already calls the "something" a configuration:
http://tapestry.apache.org/tapestry5/tapestry-ioc/configuration.html
so Howard's "configure" naming suggestion looks even better.
(This has been discussed previously in this list.)
Cheers,
Nick.
lasitha wrote:
Howard,
Just in case t
There are at least 2 ways to do this.
If you follow Serge's suggestion of a context, you need to use
the context to set "name" in page B using the onActivate event:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html
The alternative is to use an ActionLink instead of PageLink i
I can't check the code right now, but pageAttached may be too early.
Try either onActivate or setupRender.
Cheers,
Nick.
Mohammad Shamsi wrote:
i wrote this code to change locale, but i got NullPointerException, any idea
please?
public class Start {
@Inject
PersistentLocale locale;
i wrote this code to change locale, but i got NullPointerException, any idea
please?
public class Start {
@Inject
PersistentLocale locale;
@PageAttached
public void attached() {
locale.set(Locale.GERMAN);
}
}
--
sincerely yours
M. H. Shamsi
IOC helps your code being more modular and less dependable,
you make your DAO class so it receives Session via constructor,
you can use your DAO class in any project easily.
in a tapestry app you add your DAO as service,
an later on inject it where needed. IOC gives
your DAO class the Session and
hi,
I've tried to adopt underscores for private fields,
so the the tutorial got mixed when I've created that page with AngeloChen.
I'll check tomorow if this is true, but I belive you
can avoid this problem by not putting annotations
on the fields and putting them on the getters or setters instea
Not having to create getters & setters (or abstract getters in T4) just so
that @Loop (and @For) values and indexes can
become accessible is a fairly often request/question...
Creating a custom binding prefix (perhaps named temp) that attaches objects
to the currect requestcycle
and reads from the
Sorry for my dumb questions. I've been away from java since 1.4 and so I'm
not used to play with such magic tricks.
Anyway, can I see those values when I do a System.out.println()? I use
Eclipse for debugging. Does it make a difference if I set a method
breakpoint or a line breakpoint? I'm not o
You can define a variable as a field of your component class.
However, it won't be visible without your providing a getter and setter.
Example:
${user.name}
Java code:
public class MyPage {
@Inject
private UserDatabase _database;
private User _user;
public UserDatabase getDataba
There's a bit of magic going on. Most of your parameters will be null
except when you have a break point inside code during the rendering of the
component. Further, some of your code will have to read a value from a
parameter field for the field to get filled in.
Basically, the first time you ha
Thanks for the advice. I also planned to follow the first path you outlined.
It just cost me some time to get familiar with the concept of the inner live
of forms in T5 and I wanted to make a rapid prototype before I would step
into the definition of a service which is another new area of T5 to
dear friends,
is it posible to define multiple value for tapestry.app-package context
parameter ?
--
sincerely yours
M. H. Shamsi
please look this code :
// first page.
class A {
}
// second page
class B {
private String name;
}
in A page template i have this linke :
B
i want to set name parameters of page B in this link. is it possible ?
On 10/14/07, SergeEby <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> You can use
hi Howard,
i have no experience in Tapestry, i just test it for replacing my company
framework.
i use for 6 years struts, webworks and my own framework that based on both
struts and webworks.
in pages that made from JSP and JSTL , we can simply define a variable in
page, this variable bind on
Howard,
Just in case that was an invitation for proposals :), how about:
contributeSomethingToSomeService(), where 'Something' is optional?
Allows for a little more specificity while still being an easily
parsed convention. And for those that don't care - its only two more
characters :)
In any
I would avoid the use of static maps for tracking the radio groups. In
addition, static will be shared between threads, so you have code that will
likely break in production.
In my book, static should always be stateless.
You have two approaches that work better (and are more testable):
- Define
I just saw that www.sourcekibitzer.org
is using Tapestry4 and Tacos - I didnt know!
Perhaps we can get them to write a success story,
or talk about their future plans
--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
Sorry, you're right: The component is basically a compilation of Radio
and RadioGroup. I use a static Map to secure the unique names of
[EMAIL PROTECTED]'s. In setupRender() I prepare the environment in
cleanupRender() I wrap it up.
Here's the code ...
package com.michaelgerzabek.services.we
Because it is perfectly shared and uniform, reasonable to cache (portions in
memory), uniformly accessible from multiple machines, etc.
However, such systems rarely get other aspects right, like coordinating code
changes with content changes, or providing adequate history (equivalent to
Subversion
Where I dropped the ball here, in a minor way, is that it should be
"contributeTo" as a prefix, or perhaps "configure". It's a prefix on the
*service* being configured or contributed to. So I would choose option #2
or #3.
I wonder if there's some value in something like:
@Contribute(FooBar.clas
If we made the getIndex() and getValue() methods of Loop public, then you
could:
${loop.currValue}
But then you must define your loop in your Java class and expose it as a
property:
@Component
private Loop _loop;
public Loop getLoop() { return _loop; }
how
I always wonder why some ppl want to use a db like a file system.
On 10/13/07, Renat Zubairov <[EMAIL PROTECTED]> wrote:
>
> I've worked once with the application where all content, e.g. HTML,
> Javascript, CSS was put in the DB. Not very good idea .
>
> Renat
>
> On 12/10/2007, Daniel Jue <[EMAIL
I can see what you mean, though it is quite common to use the index inside
the page class too. T5 keeps things simple to cover the most common cases.
You can create your own components if you don't like the default ones.
It would be interesting to see an alternative if you write one.
Cheers,
Nic
Hi,
Did you try the "literal:" binding prefix?
---
/Serge
Hans Jörg Hessmann wrote:
>
> Hi,
>
> I'd like to show a static text containing ${something} on a page. Is
> there a way to escape the "${"?
>
> Thanks,
> Hans Joerg Hessmann
>
> -
Hi,
This issue has been discussed in the past. Please search the list.
--
/Serge
Foror wrote:
>
> Some package "pages.articles" and page "Articles.java" in this package.
> URL
> "http://localhost/articles/";. When need context page="articles/" context="literal:param1">test then URL
> "http:/
Hi Foror,
how about page="articles"?
Foror wrote:
>
> Some package "pages.articles" and page "Articles.java" in this package.
> URL
> "http://localhost/articles/";. When need context page="articles/" context="literal:param1">test then URL
> "http://localhost/articles//param1"; two slashes bef
Some package "pages.articles" and page "Articles.java" in this package. URL
"http://localhost/articles/";. When need context test then URL
"http://localhost/articles//param1"; two slashes before "param1".
^
---
Hi,
You can use the context parameter:
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentspagelink
--
/Serge
dalahoo wrote:
>
> dear friends,
>
> i want to set some value for may page properties, with pagelink compoent,
> is
> it p
java:
private int currValue;
public int getCurrValue()
{
return currValue;
}
public void setCurrValue(int currValue)
{
this.currValue = currValue;
}
template:
${currValue}
dear friends,
i want to set some value for may page properties, with pagelink compoent, is
it posible ?
--
sincerely yours
M. H. Shamsi
dear Nick,
i want index just for iteration, i don't need it in may page class, i think
that its better to define in Loop component class,
suppose that i want to use Loop, 5 times in a singe page, then i most define
5 index value, and five item object ???
On 10/14/07, Nick Westgate <[EMAIL PROT
The value and index have to go somewhere. Why not in your page class?
Cheers,
Nick.
Mohammad Shamsi wrote:
hi all,
please take a look at my page bellow,
???
${item.firstName}
${item.lastName}
${item.ph
Hard to say without seeing the source and how you are using the component.
Cheers,
Nick.
Michael Gerzabek wrote:
I implemented an alternative radio component. When I debug my
setupRender() the parameters from the template are all null. When I look
into the ComponentResources in _bindings ther
I implemented an alternative radio component. When I debug my
setupRender() the parameters from the template are all null. When I look
into the ComponentResources in _bindings there are all my Parameters but
the annotated values in my own component seem never be initialized.
What am am I missi
hi all,
please take a look at my page bellow,
???
${item.firstName}
${item.lastName}
${item.phone}
1 - i just want to use item object here, for iteration, i don't want to
define it at my
45 matches
Mail list logo