You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Fernando Wermus <fe...@gmail.com> on 2008/02/13 15:15:12 UTC

working on my first wicket web 2.0 scriptaculos component

Hi all,
     I am working on rtying to reproduce this behavior
http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo.
Two sortable list which you can reorder de item in it a between them.
This is the html generated by my component, but it seems
not to work. It doesn't call the component back. I was reading on the
net about some constrains in the ids and I think I apply to it.
However, I am still in troubles. The dinamic part works, not the call back.

	<div id="holder6" wicket:id="holder">
		<div class="node" >
			<ul id="firstlist7" wicket:id="firstlist">
				<li id="firstlistFirstlist_0" wicket:id="firstlistFirstlist">
					<span wicket:id="nombreLabel">a</span>
				</li><li id="firstlistFirstlist_1" wicket:id="firstlistFirstlist">
					<span wicket:id="nombreLabel">a</span>

				</li>
			</ul>
		</div>
		<div class="node" >
			<ul id="secondlist8" wicket:id="secondlist">
  				<li id="secondlistSecondlist_0" wicket:id="secondlistSecondlist">
  					<span wicket:id="nombreLabel2">a</span>
				</li><li id="secondlistSecondlist_1" wicket:id="secondlistSecondlist">

  					<span wicket:id="nombreLabel2">a</span>
				</li>
			</ul>
		</div>
	</div>
<script type="text/javascript">
Sortable.create('firstlist7',
{dropOnEmpty:true,containment:['firstlist7','secondlist8'],constraint:false},
{
  onUpdate: function(element) {
wicketAjaxGet('?x=6*%3A1%3Atabs%3Apanel%3Amensajes%3Apanel%3Aholder%3A1%3AIActivePageBehaviorListener%3A0%3A%26amp%3Bwicket%3AignoreIfNotActive%3Dtrue&'
+ Sortable.serialize(element)); }
}
);
Sortable.create('secondlist8',
{dropOnEmpty:true,containment:['firstlist7','secondlist8'],constraint:false},
{
  onUpdate: function(element) {
wicketAjaxGet('?x=6*%3A1%3Atabs%3Apanel%3Amensajes%3Apanel%3Aholder%3A1%3AIActivePageBehaviorListener%3A0%3A%26amp%3Bwicket%3AignoreIfNotActive%3Dtrue&'
+ Sortable.serialize(element)); }
}
);
</script>



-- 
Fernando Wermus.

Re: working on my first wicket web 2.0 scriptaculos component

Posted by Igor Vaynberg <ig...@gmail.com>.
here is the list of things to try:

are there any javascript errors during callback?
try without encrypted coding strategy
set a break point in wicketfilter and see why it doesnt hit the behavior

-igor


On Feb 13, 2008 6:15 AM, Fernando Wermus <fe...@gmail.com> wrote:
> Hi all,
>      I am working on rtying to reproduce this behavior
> http://wiki.script.aculo.us/scriptaculous/show/SortableListsDemo.
> Two sortable list which you can reorder de item in it a between them.
> This is the html generated by my component, but it seems
> not to work. It doesn't call the component back. I was reading on the
> net about some constrains in the ids and I think I apply to it.
> However, I am still in troubles. The dinamic part works, not the call back.
>
>         <div id="holder6" wicket:id="holder">
>                 <div class="node" >
>                         <ul id="firstlist7" wicket:id="firstlist">
>                                 <li id="firstlistFirstlist_0" wicket:id="firstlistFirstlist">
>                                         <span wicket:id="nombreLabel">a</span>
>                                 </li><li id="firstlistFirstlist_1" wicket:id="firstlistFirstlist">
>                                         <span wicket:id="nombreLabel">a</span>
>
>                                 </li>
>                         </ul>
>                 </div>
>                 <div class="node" >
>                         <ul id="secondlist8" wicket:id="secondlist">
>                                 <li id="secondlistSecondlist_0" wicket:id="secondlistSecondlist">
>                                         <span wicket:id="nombreLabel2">a</span>
>                                 </li><li id="secondlistSecondlist_1" wicket:id="secondlistSecondlist">
>
>                                         <span wicket:id="nombreLabel2">a</span>
>                                 </li>
>                         </ul>
>                 </div>
>         </div>
> <script type="text/javascript">
> Sortable.create('firstlist7',
> {dropOnEmpty:true,containment:['firstlist7','secondlist8'],constraint:false},
> {
>   onUpdate: function(element) {
> wicketAjaxGet('?x=6*%3A1%3Atabs%3Apanel%3Amensajes%3Apanel%3Aholder%3A1%3AIActivePageBehaviorListener%3A0%3A%26amp%3Bwicket%3AignoreIfNotActive%3Dtrue&'
> + Sortable.serialize(element)); }
> }
> );
> Sortable.create('secondlist8',
> {dropOnEmpty:true,containment:['firstlist7','secondlist8'],constraint:false},
> {
>   onUpdate: function(element) {
> wicketAjaxGet('?x=6*%3A1%3Atabs%3Apanel%3Amensajes%3Apanel%3Aholder%3A1%3AIActivePageBehaviorListener%3A0%3A%26amp%3Bwicket%3AignoreIfNotActive%3Dtrue&'
> + Sortable.serialize(element)); }
> }
> );
> </script>
>
>
>
> --
> Fernando Wermus.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org