I'd just create a wrapper object that can point to either a db entity, or
an enum instance.
eg:
public class Wrapper {
private MyEnum myEnum;
private DbEntity dbEntity;
public String getKey() {
return myEnum != null ? myEnum.name() :
String.valueOf(dbEntity.getId());
}
Hi all,
I really like the concept to store values in the url instead of
storing in the session. But in most cases these are IDs of the
entities that can be manipulated by users in the url.
Is it a good idea to try to encode parameters before storing in the
url and to decode before onActivate and
On Fri, 24 Oct 2014 08:13:14 -0200, Semen Vishniakov
vishnyako...@gmail.com wrote:
Hi all,
Hi!
I really like the concept to store values in the url instead of
storing in the session. But in most cases these are IDs of the
entities that can be manipulated by users in the url.
Is it a good
On Thu, 23 Oct 2014 22:48:50 -0200, Name Surname
wintertime0...@outlook.com wrote:
Lets say I have an input field with validation parameter something like
input validate=max=${number}
and in my Java code I have a public function
getNumber(){
}
Now is it possible to manipulate with
Hi Tapestry-users,
Tapestry's AbstractReloadableObjectCreator, LoggingInvokableWrapper,
ModuleImpl, RegistryImpl and others log a lot of really boring stuff. For some
of our tests it's actually the majority of the log output making it difficult
to visually parse what's going on in the
Hello, I have searched for Tap documentation and found out FieldValidator would
serve my cause.
I have done following:
@InjectComponent
private TextField brojPolja;
@Inject
private FieldValidatorSource fieldValidatorSource;
public FieldValidator? getBrojValidator()
{
I have made a Q in Tap so if anyone is willing to help thank you!
http://stackoverflow.com/questions/26547184/assigning-passing-value-from-java-function-to-js-jquery-function
From: wintertime0...@outlook.com
To: users@tapestry.apache.org
Subject: RE: Putting property values in Validate
As Thiago has already pointed out, non sensitive database ID's passed
through the URL should not be an issue providing you check permissions. I
do this kind of thing all the time where I have a method that handles
permission checking. If your doing the check in onActivate you have the
option to
On Fri, 24 Oct 2014 10:10:26 -0200, Name Surname
wintertime0...@outlook.com wrote:
I have made a Q in Tap so if anyone is willing to help thank you!
http://stackoverflow.com/questions/26547184/assigning-passing-value-from-java-function-to-js-jquery-function
You question in StackOverflow is
By the way, why do you need a value from server-side while validating in
JavaScript? In most scenarios, this doesn't make sense. What exactly is
the logic you want to implement?
By the way, recommended reading for you: How to Ask Questions the Smart
Way:
I think he's having a very difficult time distinguishing the difference
between serverside and clientside and how they interact with each other.
On Fri, Oct 24, 2014 at 9:44 AM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
By the way, why do you need a value from server-side while
Hey everyone,
I'm facing an issue with @CommitAfter annotation being placed on
implementation.
I have 2 interfaces A and B :
public interface AT {
void methodA(T t);
}
public interface B extends AC {
void methodB();
}
and one implementation BImpl :
public class Bimpl implements B {
I just tried to remove the generic parameter from interface A and it works
so it actually a generic parameter problem.
It's a shame as my code seems less clean without it.
Cheers,
Charles.
2014-10-24 16:10 GMT+02:00 Charlouze m...@charlouze.com:
Hey everyone,
I'm facing an issue with
If I'm not mistaking you need to advice tapestry of it and the annotation
will need to reside in your interface. I'm not sure if that changed in 5.4.
I added the following code to my app module to get it to work with my
DAO's.
@Match(*DAO)
public static void
That part is OK... @CommitAfter works for other methods.
2014-10-24 16:16 GMT+02:00 George Christman gchrist...@cardaddy.com:
If I'm not mistaking you need to advice tapestry of it and the annotation
will need to reside in your interface. I'm not sure if that changed in 5.4.
I added the
nvm, I think I misunderstood your question.
On Fri, Oct 24, 2014 at 10:12 AM, Charlouze m...@charlouze.com wrote:
I just tried to remove the generic parameter from interface A and it works
so it actually a generic parameter problem.
It's a shame as my code seems less clean without it.
My question is related to TAP-2029
https://issues.apache.org/jira/browse/TAP5-2029 I think.
2014-10-24 16:17 GMT+02:00 George Christman gchrist...@cardaddy.com:
nvm, I think I misunderstood your question.
On Fri, Oct 24, 2014 at 10:12 AM, Charlouze m...@charlouze.com wrote:
I just tried to
On Fri, 24 Oct 2014 12:30:32 -0200, Charlouze m...@charlouze.com wrote:
My question is related to TAP-2029
https://issues.apache.org/jira/browse/TAP5-2029 I think.
Hello, Charlouze!
Yep, that's directly related to TAP5-2029. I suppose you're already using
one of the latest T5.4 betas,
Hello, yes it's true I may not be very good with proper words to explain my
situation but let me try it once again.
What I need is following: I have a method that returns some value, now I want
that value to be put into validate, something like: validate=max=${broj}
which returns value max
Hey Thiago,
I'm using tapestry 5.4-beta-22.
I followed your conversation about copying annotation. I think that's great
but it seems there are still some issues. I looked at your commits on that
subject and it seems really tricky :D
I will try to write a test for you.
2014-10-24 16:48
Hi Guys, I have a form contained within a zone where I'm passing an object
into the context value. When I submit the form I get the following
exception.
*parameter #1: org.apache.tapestry5.ioc.util.UnknownValueException: Could
not find a coercion from type java.lang.String to type
Hello,
Just wonder if anybody have any ideas how we can deprecate usage os input
name=t:formdata / element?
Tapestry5.x form submission logic heavily relies on the value of t:formdata
at the moment.
This approach just doesn't play well with REST. Which means in practice
that we can't integrate
Hey George. I had a very similar situation. What you can do here is to make a
new Encoder and put it into appropriate field. Take a look at my example.
private class DateEncoder implements ValueEncoderDate {
@Override
public String toClient(Date date) {
long
Like Thiago said, you need to do the following from serverside
@Inject
private FieldValidatorSource source;
@InjectComponent
private Field yourField;
public FieldValidator getDynamicConstraints() {
return source.createValidators(yourField, required, null);
}
yourField will be the id of
Unfortunately the valueencoder is not an option for the form component.
On Fri, Oct 24, 2014 at 11:09 AM, Name Surname wintertime0...@outlook.com
wrote:
Hey George. I had a very similar situation. What you can do here is to
make a new Encoder and put it into appropriate field. Take a look at
On Fri, 24 Oct 2014 12:54:32 -0200, Name Surname
wintertime0...@outlook.com wrote:
Hello, yes it's true I may not be very good with proper words to explain
my situation but let me try it once again.
What I need is following: I have a method that returns some value, now I
want that value
On Fri, 24 Oct 2014 12:58:54 -0200, Charlouze m...@charlouze.com wrote:
Hey Thiago,
Hi!
I followed your conversation about copying annotation. I think that's
great but it seems there are still some issues. I looked at your commits
on that subject and it seems really tricky :D
It surely
Pass the object key as a simple type (string/long) and setup the object in
the PREPARE_FOR_SUBMIT handler.
On Fri, Oct 24, 2014 at 5:22 PM, George Christman gchrist...@cardaddy.com
wrote:
Unfortunately the valueencoder is not an option for the form component.
On Fri, Oct 24, 2014 at 11:09
If I was to take an educated guess, I'd guess that the solution will
involve checking java.lang.reflect.Method.isBridge() similar to TAP5-1493.
Instead of null ids, you could give your unsaved entities unique ids that
are negative. This would require a smart enough ValueEncoder that would NOT
attempt to lookup negative ids from the database.
It's all sounding a bit hack so you might prefer to pass around a wrapper
object which knows if
Hello Thiago. This is solution to my problem:
@InjectComponent
private TextField prodajaKolicinaPolje;
@Inject
private FieldValidatorSource fieldValidatorSource;
public FieldValidator? getAmountValidator()
{
return
Attached is a patch that add my issue to the test case commited in january
for TAP5-2029 by Thiago. It fails as expected :D
2014-10-24 17:39 GMT+02:00 Lance Java lance.j...@googlemail.com:
If I was to take an educated guess, I'd guess that the solution will
involve checking
What you can do is to make @Persist(PersistanceConstants.CLIENT) and retrieve
only id of the object ( not object, because it may go to broken reference ) of
the object between AJAX calls. With that id pass values of that object between
calls. It's much safer and consumes less server resources
Lance, even if I were to give the object a temp id or put it in a wrapper
object, wouldn't that value be lost as soon as the zone finishes rendering?
It seems to me as if I have three choices, session, commit, or copy form
data from form a to b. Your thoughts?
On Fri, Oct 24, 2014 at 12:02 PM,
I agree with Lance, but I just want to comment on the overall problem.
Unless the per-step lifetime in your wizard is in the order of a few
seconds, you are, in my opinion, unnecessarily optimizing to reduce
database operations (and if it was in the order a few seconds, a wizard
might not be the
On Fri, 24 Oct 2014 14:16:01 -0200, Charlouze m...@charlouze.com wrote:
Attached is a patch that add my issue to the test case commited in
january for TAP5-2029 by Thiago. It fails as expected :D
Could you please post it in JIRA, in TAP5-2029 if possible or a new ticket
otherwise?
--
If I exclude JQuery from my tml page, it fires just fine, however if I include
JQuery, I get issues of not showing error message and strange JQuery dialog box.
From: wintertime0...@outlook.com
To: users@tapestry.apache.org
Subject: RE: Putting property values in Validate
Date: Fri, 24 Oct
On Fri, 24 Oct 2014 14:41:38 -0200, Name Surname
wintertime0...@outlook.com wrote:
If I exclude JQuery from my tml page, it fires just fine, however if I
include JQuery, I get issues of not showing error message and strange
JQuery dialog box.
Tapestry 5.3 uses Prototype by default and
I attached it but the issue is still closed... maybe you can reopen it.
2014-10-24 18:39 GMT+02:00 Thiago H de Paula Figueiredo thiag...@gmail.com
:
On Fri, 24 Oct 2014 14:16:01 -0200, Charlouze m...@charlouze.com wrote:
Attached is a patch that add my issue to the test case commited in
Now's the time to go to 5.4 ;) Validation has changed a lot between
versions not to mention prototype has finally gone away.
On Fri, Oct 24, 2014 at 1:02 PM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
On Fri, 24 Oct 2014 14:41:38 -0200, Name Surname
wintertime0...@outlook.com
On Fri, 24 Oct 2014 13:07:52 -0200, Dmitry Gusev dmitry.gu...@gmail.com
wrote:
Hello,
Hi!
Just wonder if anybody have any ideas how we can deprecate usage os
input name=t:formdata / element?
I'd too love to get rid of that . . .
Tapestry5.x form submission logic heavily relies on
On Fri, 24 Oct 2014 15:02:11 -0200, Charlouze m...@charlouze.com wrote:
I attached it but the issue is still closed... maybe you can reopen it.
Thank you very much! I'll reopen it.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
I'm not sure I fully understand the problem. I thought the form contained
all the data so all you needed was a new object to populate.
If not, Kalle's suggestion of saving temp state to the db sounds OK to me.
Perhaps with a scheduled task to clear out incomplete wizards after some
period of
Hey George. Thank you on your answer. I am using Tomcat and I can't get Tap5.4
from Apache site, 'cause I don't get any dependency from it? Is there a POM
file with all jars included to build it from Tomcat already or do I have to go
a long walk with that?
Date: Fri, 24 Oct 2014 13:08:54
On Fri, 24 Oct 2014 16:42:14 -0200, Name Surname
wintertime0...@outlook.com wrote:
Hey George. Thank you on your answer. I am using Tomcat and I can't get
Tap5.4 from Apache site, 'cause I don't get any dependency from it? Is
there a POM file with all jars included to build it from Tomcat
Implementing your own ValueEncoder and contribute it to ValueEncoderSource
should be enough to get this working.
On Fri, 24 Oct 2014 16:33:52 -0200, Lance Java lance.j...@googlemail.com
wrote:
I'm not sure I fully understand the problem. I thought the form contained
all the data so all
Sorry, what I wanted to say is that I am using NetBeans IDE. Tomcat loads app
just fine( after removing some of the jars from Tap5.4. jar package ), however
when I go to address in a browser, it says it The requested resource is not
available. I have removed some of the jars from my project
On Fri, 24 Oct 2014 18:07:09 -0200, Name Surname
wintertime0...@outlook.com wrote:
Sorry, what I wanted to say is that I am using NetBeans IDE. Tomcat
loads app just fine( after removing some of the jars from Tap5.4. jar
package ), however when I go to address in a browser, it says it The
I think I'm just going to save the values to the db, however for future
knowledge how do i use a value encoder with a form?
On Oct 24, 2014 3:15 PM, Thiago H de Paula Figueiredo thiag...@gmail.com
wrote:
Implementing your own ValueEncoder and contribute it to ValueEncoderSource
should be enough
Lol Thiago, I still use netbeans but only because work required us too.
In netbeans you can add new project from maven arch and look for jumpstart,
it will just about everything to get you started. Before downloaded, be
sure to use 5.4-beta-22 and the correct repo url. If u want to use jetty
The little engineer was very proud of his little engine. But one day, a
fellow train enthusiast noticed the engine was a leaking. They drove the
train to the engine yard and... oh well, perhaps I took the metaphor too
far. Suffice to say, thanks to Jochen Berger for spotting and reporting an
issue
Hi Thiago!
I got used to NB, that's why I am using it. OK, here is full stack trace,
http://pastebin.com/6ZwsdMhR
http://pastebin.com/xJKAiybu
I have no idea why is it coming up now so I am yelling Please help me. :D
To: users@tapestry.apache.org
Subject: Re: Putting property values in
Hi George!
I have never used before this maven archtype? What should I search for in seach
field in order to get jumpstart with tomcat running?
Date: Fri, 24 Oct 2014 17:11:35 -0400
Subject: Re: Putting property values in Validate
From: gchrist...@cardaddy.com
To: users@tapestry.apache.org
I have made my first app in this way!!! :))) OK, now how can I declare
hibernate connection to this project now? Where do I need to declare it?
From: wintertime0...@outlook.com
To: users@tapestry.apache.org
Subject: RE: Putting property values in Validate
Date: Fri, 24 Oct 2014 23:51:48
Toot toot!
55 matches
Mail list logo