On Mon, 12 Oct 2015 06:32:01 -0300, Poggenpohl, Daniel
wrote:
Hi,
Hi!
Can I register the bean model in Tapestry so I don't have to set the
model myself?
Short answer: no. Long answer: no, but Chris' suggestions of contributing
your own edition blocks will help you apply the same comp
Take a look at data type analyzers and their corresponding property
display/edit blocks to get this working.
Jumpstart has an example:
http://jumpstart.doublenegative.com.au/jumpstart/examples/lang/propertyeditors
--
Chris
On Mon, Oct 12, 2015 at 11:32 AM, Poggenpohl, Daniel <
daniel.poggenp...
Hi,
I've created some classes that are used rather prominently in my Tapestry 5.3.8
application.
The classes have some attributes that are themselves simple string wrappers.
So, for example, I have:
SomeClass.java
--
UidString someUid;
[...]
And UidString is basically a String
sformers.aliasToBean is used. The count is achieved
> >> by using the Projections.rowCount().
> >>
> >> On Fri, Jan 2, 2015 at 3:45 AM, Ilya Obshadko
> >> wrote:
> >> > I'm trying to implement a Grid data source optimized for database
> >>
ote:
>> > I'm trying to implement a Grid data source optimized for database
>> > retrievals (with paging support). Basically it's derived from
>> > HibernateGridDataSource from Tapestry distribution, and provides support
>> > for complex Criteria queries:
>
ved from
>> HibernateGridDataSource from Tapestry distribution, and provides support
>> for complex Criteria queries:
>> https://gist.github.com/xfyre/ecb36a9173aed6a37f14
>>
>> However, there is a problem with sorting.
>>
>> Provided BeanModel implementation doesn
ia queries:
https://gist.github.com/xfyre/ecb36a9173aed6a37f14
However, there is a problem with sorting.
Provided BeanModel implementation doesn't support nested properties; that
is, I cannot use properties of child Hibernate entities: include="property1, child1.property1, child2.proper
pestry distribution, and provides support
> > for complex Criteria queries:
> > https://gist.github.com/xfyre/ecb36a9173aed6a37f14
> >
> > However, there is a problem with sorting.
> >
> > Provided BeanModel implementation doesn't support nested properties
with paging support). Basically it's derived from
> HibernateGridDataSource from Tapestry distribution, and provides support
> for complex Criteria queries:
> https://gist.github.com/xfyre/ecb36a9173aed6a37f14
>
> However, there is a problem with sorting.
>
> Provided Bea
port). Basically it's derived from
> HibernateGridDataSource from Tapestry distribution, and provides support
> for complex Criteria queries:
> https://gist.github.com/xfyre/ecb36a9173aed6a37f14
>
> However, there is a problem with sorting.
>
> Provided BeanModel implementati
ver, there is a problem with sorting.
Provided BeanModel implementation doesn't support nested properties; that
is, I cannot use properties of child Hibernate entities: results in
error. Initially I had a workaround of having helper getter methods in
parent entity class, so it looked like .
On Tue, 28 May 2013 10:45:06 -0300, Ken in Nashua
wrote:
Hi Folks,
Hi!
I want to include both player info and player stats in the same bean
model.
Check the mailing list archives for that. You'll probably need to
implement a PropertyConduit and use it in beanModel.add("stats, new
Y
Sorry folks...
if I got this
@Entity
@ClassDescriptor(hasCyclicRelationships = true)
@BeanModels(
{ @BeanModel(pageType = PageType.LIST,
include = "player, gp, g, a, pts",
exclude="") })
public class PlayerStats implements Cloneable, Serializable {
priv
Maybe I should be doing the bean model on PlayerStats
public class PlayerStats implements Cloneable, Serializable {
private static final Log log = LogFactory.getLog(PlayerStats.class);
private Integer id = null;
private Player player = null;
...can I refer to the player from there ?
Players and stats are keyed by Season.class so there could be at any given time
one Player instance and one PlayerStats instance to deal with.
Its not immediately apparent to me how to combine properties from both classes
into the grid bveanmodel
Hi Folks,
I have a Player.class
public class Player extends Person implements Cloneable, Serializable {
private Set playerStats = new HashSet();
He has a collection of stats. goals, assists, points etc...
I am rendering league leaders... so I have a bean model I am working on
myMo
On Thu, 20 Dec 2012 10:26:14 -0200, mateen wrote:
the message object is just an Injected Object. But i get a render queue
exception. What am i doing wrong.
When an exception occurs and you want help, please post the exception,
otherwise we can only guess what's happening.
--
Thiago H. de
nder queue
exception. What am i doing wrong.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/BeanModel-Exception-tp5718873.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsu
On Thu, 01 Nov 2012 11:13:19 -0200, membersound wrote:
Why not? That would be perfectly good, even recommended, object-oriented
Because it was just an example here, I want to apply some calculations
for some rows, which should not clutter my entities. And of course
itself rely again on ot
the calculation is more a process for a service
than being directly placed in the entity object itself.
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/BeanModel-how-to-add-results-from-a-method-tp5717499p5717520.html
Sent from the Tapestry - User mailing list archive
On Thu, 01 Nov 2012 10:06:34 -0200, membersound wrote:
Sorry, I think I didn't get it.
Nope, you didn't. :P
setupRender() {
model.add("result", pcSource.create("Product.class", "price"));
Does this even compile? I guess it should be model.add("result",
pcSource.create(Product.clas
Sorry, I think I didn't get it.
Lets make an example here:
http://tapestry.1045711.n5.nabble.com/BeanModel-how-to-add-results-from-a-method-tp5717499p5717512.html
Sent from the Tapestry - User mailing list archive at Nabbl
On Thu, 01 Nov 2012 09:03:06 -0200, membersound wrote:
Hi,
Hi!
When I create a BeanModel, how can I add results eg from a method that is
not contained in the Entity-Object with which the BeanModel has been
created?
You can't pass the result itself, but you can implement a PropertyCo
Hi,
when I create a BeanModel, how can I add results eg from a method that is
not contained in the Entity-Object with which the BeanModel has been
created? Like:
Here I create a beanmodel for the class UserProfile. And I want to add a
field that gets its content from a method that is placed NOT
com/Retain-BeanModel-when-sorting-columns-tp5717374p5717382.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mai
list and a BeanModel? Especially regarding
to the following example case:
So the List is the GridDataSource in your case. This is a fine example
of tapestry "magic". Tapestry coerces the List to a GridDataSource. Read
about Type Coercion here http://tapestry.apache.org/type-coercion.
OK I see. I'm doing it with BeanModelSource based on this example:
http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/gridmodel1
Would you recommend me switching to a GridDataSource in my page class for
providing the data instead of a list and a BeanModel? Especially regardi
On Mon, 29 Oct 2012 08:35:51 -0200, membersound wrote:
@Property
@Persist
private BeanModel model;
void setupRender() {
this.model = beanModelSource.createDisplayModel(User.class, messages);
this.model.add("...).sortable(true);
}
Result: everytime I sort, the db-fet
Can we have the full code?
You are probably talking about a grid. The grid data is in the
GridDataSource not in the BeanModel.
Anyway. If you have a Hibernate like GridDataSource I wouldn't recommend
persisting it because the sort should be done using SQL "order by" so
persist
@Property
@Persist
private BeanModel model;
void setupRender() {
this.model = beanModelSource.createDisplayModel(User.class, messages);
this.model.add("...).sortable(true);
}
Result: everytime I sort, the db-fetch is triggered.
How can I persist the beanmodel data and
@Inject
private BeanModelSource beanModelSource;
@Inject
private ComponentResources resources;
public BeanModel getModel(){
BeanModel result =
beanModelSource.createEditModel(EntityB.class,
resources.getMessages());
result.ad
s wrote:
>> Hi, we have been trying to work out a way to set the default sort order on
>> our BeanModel to descending by default, since this is what out SQL query
>> does but it appears as though the grid does not expose this method as shown
>> below.
>>
>> Is
ot;entered"); // now sorts descending
ugly, but effective.
On Wed, Oct 20, 2010 at 5:41 AM, Darren Williams wrote:
> Hi, we have been trying to work out a way to set the default sort order on
> our BeanModel to descending by default, since this is what out SQL query does
> but it a
e have been trying to work out a way to set the default sort order on our
BeanModel to descending by default, since this is what out SQL query does but
it appears as though the grid does not expose this method as shown below.
Is there another way we can do this? All the examples I have seen befor
Hi, we have been trying to work out a way to set the default sort order on our
BeanModel to descending by default, since this is what out SQL query does but
it appears as though the grid does not expose this method as shown below.
Is there another way we can do this? All the examples I have
t the logic for detecting
this annotation and adding the corresponding property to the
BeanModel.
This would be done with something like
model.add( "display" );
in my former example. The decorator would be configured like
explained in the ioc cookbook [1].
Now my call to modelSour
implement the logic for detecting this
annotation and adding the corresponding property to the BeanModel.
This would be done with something like
model.add( "display" );
in my former example. The decorator would be configured like explained
in the ioc cookbook [1].
Now
the rest of the bean in a verbose mode
to the user. Straight forward, no problem.
Anyway, I'm just curious: Since I can imagine many occasions where a
bean not only would hold data but also some semantics on the data
that would be useful to be displayed to a person editing this bean.
Is
many occasions where a
bean not only would hold data but also some semantics on the data that
would be useful to be displayed to a person editing this bean. Is there
a standard way to get this job done by BeanEditor/ BeanModel?
To pick up your snippet: On my concrete BeanModel for bean Custom
etter that aren't otherwise marked as @NonVisual,
and using createEditModel will only add the properties will getters
and setters. But once you have the model, you can manipulate it
anyway you want. For example:
BeanModel getModel() {
BeanModel model =
beanModelSource.createDi
Two separate beans--you create one bean on your view page (to be passed into
BeanDisplay), another bean on your edit page (to be passed into
BeanEditForm). They can have completely distinct sets of properties.
On Mon, Jun 8, 2009 at 11:38 AM, Michael Gerzabek
wrote:
> Hi,
>
> BeanModelSource no
Hi,
BeanModelSource now has deprecated create(..) in favor of
createDisplayModel(..) and createEditModel(..). This is a nice feature
leaving me with one question:
I want to edit a bean that has some properties that should not be
displayed at all (@NonVisual), some properties that should be d
A question about BeanModel again
http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/PropertyConduit.html
It looks like "PropertyConduit" is the only way to modify a BeanModel - but
this relies on Annotation...so adding fields that "do no exist" as metadata
Am I correct in thinking that the default BeanModel only recognises
the standard property types (String, double, etc, etc)?
I have a bean with several properties, one of which is one of my own
types. When I attempt to use this bean in Grid I am unable to specify
the property in the
For future reference, here is the fix. I found it by looking at the
source for BeanModelSourceImpl.java:
BeanModel toReturn = _beanModelSource.create( MyClass.class, false,
_componentResources );
toReturn.exclude( (String[])toReturn.getPropertyNames()
.toArray( new
Hello,
I have a class defined (MyClass) that has a String property pstlCode,
with a getter and a setter.
If I use BeanModelSource to create a BeanModel for MyClass, the
BeanModel has a property pstlCode that can be used to access the
pstlCode.
However, if I exclude the pstlCode property, and
Hello,
It seems that if I create a BeanModel using
BeanModel toReturn = _beanModelSrc.create( MyObject.class, false,
_cmpntRsrcs );
Things work as they should - I can then use the properties in the
BeanModel, as I expect to.
But, if I first clear all properties from the BeanModel
Hi Kris,
thank you for the quick response! Thats what I was looking for.
Udo.
Original-Nachricht
> Datum: Wed, 25 Jun 2008 10:18:33 +0200
> Von: Kristian Marinkovic <[EMAIL PROTECTED]>
> An: "Tapestry users"
> Betreff: Re: BeanModel and complex typ
ESTRY-2460
it has two examples how to display a complex child property with another
block (containing another BeanEditor)
g,
kris
"Udo Abel" <[EMAIL PROTECTED]>
25.06.2008 10:05
Bitte antworten an
"Tapestry users"
An
users@tapestry.apache.org
Kopie
Thema
BeanMod
accessed by something like
employee.getSubsidiary().getName();
Is there a way to extend the BeanModel to access those properties?
Or do I have to duplicate all fields from complex types in simple fields at the
top level object, like
employee.getSubsidiaryName();
?
Thanks,
Udo.
--
Pt! Schon vom
Hello,
It seems that if I create a BeanModel using
BeanModel toReturn = _beanModelSrc.create( MyObject.class, false,
_cmpntRsrcs );
Things work as they should - I can then use the properties in the
BeanModel, as I expect to.
But, if I first clear all properties from the BeanModel, and
I am a sole developer on my project, and I am also using Fernando's
approach. The "form beans" help solve order of data entry and other
dependencies that I just wouldn't want to encode in the persistent
model. In addition, I've found these "form beans" are a great way to
insert hard coded data an
The design pattern that we are starting to play with is to create beans
specifically for the forms. Then write code that ferries the data
between the form-bean and the actual persistent objects.
This gives you more grunt work, but it adds a point of abstraction and
flexibility. For the most
Well, you're right. But to me, at least, it's not that big of a deal.
The dependency will be to tapestry5-annotations, which is a very small
dependency.
Anyhow, developing Tapestry apps is just a hobby of mine - for now,
anyhow - so I make the decisions myself.
Sadly, I don't know of any oth
Hello Filip,
From what I understand, that would involve changing the object model
(not so nice, I dont have the hand on that), and making a dependency
from this model to T5. I can already hear ppl screaming at that ;)
Am I right ?
Thank you,
José
Filip S. Adamsen a écrit :
Hi José,
You
Hi José,
You can put @Inject in the constructor you want Tapestry to use for
auto-instantiation. Should solve your problem.
-Filip
On 2008-05-28 15:59, José Paumard wrote:
Hello Marcus,
Thank you for your answer, but the customization provided by the
BeanModel are about properties, their
Hello Marcus,
Thank you for your answer, but the customization provided by the
BeanModel are about properties, their orders etc... A bean is built by a
call to newInstance, defined in the BeanModel interface. The way the
bean is built comes from InternalUtils.findAutobuildConstructor. This
Hi Guys,
just a little side note on Filip´s suggesion. Instead of initializing the
BeanModel in onActivate() you could do this:
private final BeanModel model; {
model = beanModelSource.create(User.class, false, componentResources);
model.get("username").sortable(false);
}
Mind
Hi José,
Maybe this help.
http://tapestry.apache.org/tapestry5/tapestry-core/guide/beaneditform.html
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/app3/
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integratio
d so it was changed.
Tobias
-Filip
Tobias Wehrum schrieb:
Hi there,
yes, maybe I caused confusion. To further point out what I'm trying
to do: I just want to output whatever value Status.toString() will
return to me, for example in a grid. When I add the property to the
BeanModel, tapest
want to output whatever value Status.toString() will return
to me, for example in a grid. When I add the property to the
BeanModel, tapestry has no problems calling toString() automatically;
but at the moment, like I said, I have to add it first to the
BeanModel, and I want to automatize this. (When it com
r point out what I'm trying to
do: I just want to output whatever value Status.toString() will return
to me, for example in a grid. When I add the property to the
BeanModel, tapestry has no problems calling toString() automatically;
but at the moment, like I said, I have to add it first to t
Hi there,
yes, maybe I caused confusion. To further point out what I'm trying to
do: I just want to output whatever value Status.toString() will return
to me, for example in a grid. When I add the property to the BeanModel,
tapestry has no problems calling toString() automatically; but a
atus property to the BeanModel with
model.add("myStatus").
Obviously implementing toString() isn't enough to teach my the
BeanModel a new trick. So I tried to contribute a TypeCoercer and a
TranslatorSource, but neither of them see
But still
when I have class A, which has a property of type Status, I always have
to add the Status property to the BeanModel with model.add("myStatus").
Obviously implementing toString() isn't enough to teach my the BeanModel
a new trick. So I tried to contribute a TypeCoerce
Hi there,
I have a class named "Status" which implements toString(). But still
when I have class A, which has a property of type Status, I always have
to add the Status property to the BeanModel with model.add("myStatus").
Obviously implementing toString() isn'
Hi all,
I'm working with the Grid component and customizing the BeanModel for
display. I'd like to show complex paths in the grid. So, I've added them
to the model and everything works well, except when there's a null somewhere
along the path. Then in get an NPE in the
67 matches
Mail list logo