google-code-export / wiquery

Automatically exported from code.google.com/p/wiquery
MIT License
1 stars 1 forks source link

SortableAjaxBehavior Component is NULL #216

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Basis: This example: http://code.google.com/p/wiquery/wiki/SortableWithAjax
2. This includes a List of Strings. The SortableAjaxBehavior is of Type 
<Component> - works
3. Now I want to publish my own type. 
This Type (Attributes stores different informations, nothing special). In order 
to work, I define the class like 
public class VirtualAttributes extends Component {...

Now I overwrote the function onUpdate like in the example. I get the new index, 
BUT and now the problem:

The Component is NULL when I enter the method. Tried also to play around and 
make  SortableAjaxBehavior<Attributes>... - but same result.

The example with the strings worked fine!

You have any Idea? Please feel free to tell me which files you need!

Thank you very much for your help!!

What version of the product are you using? On what operating system?
1.2.4

Original issue reported on code.google.com by odin...@googlemail.com on 24 Oct 2011 at 1:02

GoogleCodeExporter commented 9 years ago
have you tried setting setOutputMarkupId(true); or 
setOutputMarkupPlaceholderTag(true); ?

Original comment by hielke.hoeve on 24 Oct 2011 at 1:07

GoogleCodeExporter commented 9 years ago
I tried now, but didn't help.

I'll give you some code:

Expertpanel is the one where sliders and the sortableAjaxBehavior is. 
VirtualAttributes stores only informations

Original comment by odin...@googlemail.com on 24 Oct 2011 at 1:37

Attachments:

GoogleCodeExporter commented 9 years ago
I hope it helps. Thanks in advance. If anything is unclear, just ask! Thank you!

Original comment by odin...@googlemail.com on 24 Oct 2011 at 2:51

GoogleCodeExporter commented 9 years ago
Anyone who could help me? You need other Information?

It's quite important for me... thanks a lot for your help!

Original comment by odin...@googlemail.com on 26 Oct 2011 at 5:48

GoogleCodeExporter commented 9 years ago
Can you create a quickstart application we can try?

Ernesto

Original comment by reier...@gmail.com on 26 Oct 2011 at 6:42

GoogleCodeExporter commented 9 years ago
I am not familiar with the jquery events and ui. If you could provide me with a 
wicket+wiquery quickstart [1] and reproduce the problem I can give it a better 
look.

1: http://code.google.com/p/wiquery/wiki/Quickstart15

Original comment by hielke.hoeve on 26 Oct 2011 at 7:05

GoogleCodeExporter commented 9 years ago
Hi,
thanks for your reply.
I prepared a small Testproject and thinned out not needed stuff from my project.

Unfortunately I am unable to test it right now, i'm on travel. I hope it helps 
you.

The problem is: In the function onUpdate of the SortableAjaxBehavior, I don't 
get the Attribute - it is always NULL - but I need it to read out the old 
position.

Here we go. Feel free to comment!

Sorry for not being able to prepare a perfect example :-(((

Original comment by odin...@googlemail.com on 27 Oct 2011 at 3:13

Attachments:

GoogleCodeExporter commented 9 years ago
Hi!
Is there a possibility you have a look at my Code? It is a major Problem for me 
:-(
I don't take it for granted that you help me, it's hard for me to create a 
small example code reproducing exactly this. I can donate you a bear via Paypal 
if you want ;-)

Hope you can help me. It's a student project and I don't come further :-(

Thanks in advance!!

Original comment by odin...@googlemail.com on 7 Nov 2011 at 12:15

GoogleCodeExporter commented 9 years ago

Original comment by hielke.hoeve on 10 Nov 2011 at 8:16

GoogleCodeExporter commented 9 years ago
Hi, you were right, i didn't place item.setOutputMarkupId(true); in 
populateItem function of the listview.

But I get an exception:

org.apache.wicket.markup.html.list.ListItem cannot be cast to 
probe.webclient.contentstore.VirtualAttribute

Problem is the definition of
SortableAjaxBehavior<VirtualAttribute>

Changing to
SortableAjaxBehavior<Component>

helps in that case that i don't get exception, then I have the VirtualAttribute 
as Component in arguments and not null - is better now. But I have so still no 
access to my Class :-(

Can you help me?

Thanks!

Original comment by odin...@googlemail.com on 14 Nov 2011 at 3:30

GoogleCodeExporter commented 9 years ago
Sorry for the late response.

try item.getModelObject() sounds to me like you are trying to use the wicket 
component as if its an object.

Original comment by hielke.hoeve on 2 Dec 2011 at 4:15

GoogleCodeExporter commented 9 years ago
i cannot start your project as you do not have a maven project and i am missing 
libraries...

Original comment by hielke.hoeve on 2 Dec 2011 at 4:20

GoogleCodeExporter commented 9 years ago
cannot fix your problem without a proper example project, see above comments.

Original comment by hielke.hoeve on 29 Mar 2012 at 5:13