This has been fixed in tapestry-cometd 0.9.19
Please give it a try
On 15 September 2014 22:14, Boris Horvat horvat.z.bo...@gmail.com wrote:
Sure I will answer them. Thanks for help in identifying this
On Mon, Sep 15, 2014 at 10:18 AM, Lance Java lance.j...@googlemail.com
wrote:
I've
I have tried it yesterday and it is working perfectly now. I have also
commentated that yesterday on the ticket.
Thanks for quick resolution
Cheers
On Wed, Sep 17, 2014 at 11:24 PM, Lance Java lance.j...@googlemail.com
wrote:
This has been fixed in tapestry-cometd 0.9.19
Please give it a
I've created an issue here:
https://github.com/uklance/tapestry-cometd/issues/62
Not sure of an eta yet. You could help by answering the questions in the
issue.
On 14 Sep 2014 23:27, Boris Horvat horvat.z.bo...@gmail.com wrote:
Brilliant at least we figured out the issue here :)
Any eta on
Sure I will answer them. Thanks for help in identifying this
On Mon, Sep 15, 2014 at 10:18 AM, Lance Java lance.j...@googlemail.com
wrote:
I've created an issue here:
https://github.com/uklance/tapestry-cometd/issues/62
Not sure of an eta yet. You could help by answering the questions in the
Ok, that's a bit of a bombshell you've just dropped there. For those
playing along at home it seems that you're using tapestry-cometd. Care to
share how you're using it?
On 13 Sep 2014 14:49, Boris Horvat horvat.z.bo...@gmail.com wrote:
Ok, so I was able to isolate the problem, but still not
Yea, I didn't expect that this would mess with the event context to be
honest (and I am not sure how it does) but as I was excluding line by line
and managed to find the issue.
Indeed you are correct this belongs to the cometd.
What details are you interested in?
The use case is that a user uses
When a PushTarget renders, it fires up a cometd connection to receive
updates. At this point it registers the page activation context.
serverside push events fire a component event. But before this, tapestry
first fires the onActivate with the push target's page activation context.
From your
True the form is not ajax, do you think it would help if it was?
But even if the PushTarget is triggered with the old data I dont get why
the exception is thrown. I would understand if it loads wrong object...but
not to get coercion exception, right?
What would be the best way to resolve this
Hmm... Perhaps this is a bug in the way tapestry-cometd fires the
onActivate.
Can you fire up a debugger and inspect the EventContext object passed to
onActivate() in
1. the normal page render
2. the tapestry-cometd component
I think there's something preventing type coercion (which passes
You are right, the implementation is different between the two cases.
- eventContext =
{org.apache.tapestry5.internal.*URLEventContext*@10311}EventContext:
null
- valueEncoder = {$ContextValueEncoder_9660c5cdf431@10618}
- values = {java.lang.String[1]@10619}
- values =
Yes, looks like a bug. I assumed the ArrayEventContext would it's
TypeCoercer reference to do the type coercion. Seems I was wrong.
The workaround for now is to convert from string yourself.
On 14 Sep 2014 22:17, Boris Horvat horvat.z.bo...@gmail.com wrote:
You are right, the implementation is
Brilliant at least we figured out the issue here :)
Any eta on the fix? I would be happy to test the fix :)
On Sun, Sep 14, 2014 at 11:49 PM, Lance Java lance.j...@googlemail.com
wrote:
Yes, looks like a bug. I assumed the ArrayEventContext would it's
TypeCoercer reference to do the type
Ok, so I was able to isolate the problem, but still not sure how to fix it
:)
The form submission creates a new object (a new Shot) and as part of that
logic I also brodcast a message. Basically a signal to notify the header to
refresh a part of itself in order to show an increases in size (think
Nope, still the same issue
public void onActivate(EventContext eventContext) {
selectedScene = eventContext.getCount() 0 ?
eventContext.get(Scene.class, 0) : null;
selectedShot = eventContext.getCount() 1 ?
eventContext.get(Shot.class, 1) : null;
selectedComponent =
On Fri, 12 Sep 2014 03:44:00 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
I suppose I could accept String in the context and then manually load the
object...but that just sounds wrong as tapestry should be able to handle
this, right?
Yes if you have a configured ValueEncoder for each
tapestry-hibernate will only create ValueEncoder's for entities that are in
the basepackage.entities package (configurable). What packages are your
entities in?
Try @Inject ValueEncoderSource and call getValueEncoder(Scene.class)
Does it find a ValueEncoder?
Perhaps you're doing too much in onActivate(), it's called more often than
you might think. Perhaps you should split the initialization logic into
onPrepare() more info here
http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3
eg:
public void
Try again:
public void onActivate(EventContext eventContext) {
selectedScene = eventContext.getCount() 0 ?
eventContext.get(Scene.class, 0) : null;
selectedShot = eventContext.getCount() 1 ?
eventContext.get(Shot.class, 1) : null;
selectedComponent = eventContext.getCount() 2 ?
Exception in method null, parameter #1: Could not find a coercion from
type java.lang.String to type Scene. context - 3
It looks like the context is -3? Is this primary key in the database?
Also annotation wont, really work for me as I have more then one field
You might be interested in this
Yea -3 is not propet db id, but what could have changed it into negative
number...strange
Is this partbof the 5.3.7 or 5.4 as I am still on the old offucial version.
I can try it out tonight and see what happen
Thanks
On 10 Sep 2014 09:16, Lance Java lance.j...@googlemail.com wrote:
No, this is a new feature.
Your onActivate methods are very complex. Have you considered a single
onActivate(EventContext)?
Perhaps the '-' in '-3' is just a presentation issue.
I think the main culprit is likely to be your onPassivate(). Does it return
all 3 objects (when populated).
I think I've seen messages on the mailing lists about problems related to
multiple onActivate's a long time ago.
https://issues.apache.org/jira/browse/TAPESTRY-1730 seems to suggest that
the method with the most parameters is called first, but whether the
execution stops here or continues to the
I have tried with EventContext
public void onActivate(EventContext eventContext) {
if (eventContext.getCount() == 3) {
activate(eventContext.get(Scene.class, 0),
eventContext.get(Shot.class, 1), eventContext.get(ShotComponent.class, 2));
} else if
On Wed, 10 Sep 2014 14:14:01 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
public List onPassivate() {
List a = new ArrayList();
a.add(selectedScene);
a.add(selectedShot);
a.add(selectedComponent);
return a;
}
onPassivate() doesn't work
On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
public String[] onPassivate() {
String[] a = new String[3];
a[0] = selectedScene != null ? selectedScene.getId().toString() :
null;
a[1] = selectedShot != null ?
I know :) as I wrote in the previous mail I have tried both ways, but still
not working
On Wed, Sep 10, 2014 at 9:09 PM, Thiago H de Paula Figueiredo
thiag...@gmail.com wrote:
On Wed, 10 Sep 2014 15:40:25 -0300, Boris Horvat horvat.z.bo...@gmail.com
wrote:
public String[] onPassivate() {
Hi my methods look like this
public boolean onActivate(Scene scene) {
selectedScene =
scene;//systemManager.getScene(Long.parseLong(scene.toString()));
return selectedScene != null;
}
public Scene onPassivate() {
return selectedScene;
}
I don't have
What are you hoping to achieve by returning boolean from onActivate()?
Have you tried a @PageActivationContext annotation instead on onActivate /
onPassivate?
I don't have ValueEncoder cause I would expect that conversion works
String - Long - hibernate gets the id of the object and returns -
On Tue, 09 Sep 2014 04:10:22 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
Hi my methods look like this
public boolean onActivate(Scene scene) {
selectedScene =
scene;//systemManager.getScene(Long.parseLong(scene.toString()));
return selectedScene != null;
}
It is a hibernate entity so yea it gets a ValueEncoder from hibernate. As
mentioned when I first navigate to the page, it works fine, but after form
submit it breaks...
I will remove return type and try annotation and see if that helps
On Tue, Sep 9, 2014 at 2:33 PM, Thiago H de Paula Figueiredo
Using the annotation triggers slightly different exception.
- org.apache.tapestry5.runtime.ComponentEventException
Exception in method null, parameter #1: Could not find a coercion from
type java.lang.String to type Scene.
context
- 3
eventTypeactivate
Also annotation wont,
Hi all,
I have an onActivate(MyObject) method, when I go to the page for the first
time and context is present everything is triggered properly. The url is
something like
localhost:8080/mypage/1
However when I submit my form, and process it, page reloads and my id is
now treated as a String
On Mon, 08 Sep 2014 18:21:42 -0300, Boris Horvat
horvat.z.bo...@gmail.com wrote:
Hi all,
Hi!
I have an onActivate(MyObject) method, when I go to the page for the
first time and context is present everything is triggered properly. The
url is
something like
localhost:8080/mypage/1
33 matches
Mail list logo