Re: [OT] Wicket Like framework for desktop applications?

2009-01-28 Thread Edward Yakop
On Wed, Jan 28, 2009 at 22:04, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Hmm another even more ot question then are, how does spring/juice/hibernate
 integrate with swing? As you mention there are no management of application
 lifecycle..?

This is currently what I do to inject spring bean to my hibernate object.
http://www.aspectprogrammer.org/blogs/adrian/2006/02/a_practical_gui_2.html

If you use maven, you can do without load time weaving.
http://mojo.codehaus.org/aspectj-maven-plugin/

The best part about this is, spring bean dependency are injected even
with new operator.

Regards,
Edward Yakop

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



Re: Simulate DropDownChoice selection

2008-10-06 Thread Edward Yakop
On Mon, Oct 6, 2008 at 3:11 PM, Aleksandr Nikiforov
[EMAIL PROTECTED] wrote:
 Hi all,

 I have a couple of DropDownChoices  and I want to test their behaviour using
 WicketTester,
 is it possible to somehow simulate that user has made selection in ddc?

WicketTester tester = ...;

// If ajax drop down choice
tester.setParameterForNextRequest(path:to:ddc, itemIndex );
tester.setupRequestAndResponse(true);
tester.executeAjaxEvent(path:to:ddc, onchange);

// Normal drop down choice
FormTester formTester = tester.newFormTester( path:to:form );
formTester.select( path:to:ddc, itemIndex );
formTester.submit();

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [announce] Wicket in Action e-book has been published!

2008-08-19 Thread Edward Yakop
On Tue, Aug 19, 2008 at 4:33 PM, Thomas Singer [EMAIL PROTECTED] wrote:
 Just curious: why don't you make the full e-book available for free and
 charge only for the paper version? This works fine with the German Java book
 Java ist auch eine Insel and many others from the same publisher:

Bad idea!
Printing an ebook in Malaysia cost 8 cents RM per page and
I know some people won't hesitate to print them.

For this case,
it would only cost less than 10.45 USD to get the book printed.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Edward Yakop
On Thu, Jul 3, 2008 at 8:24 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 But there is a one assumption, that bundle with Wicket classes (you
 probably have a Wicket bundled somehow in your app, don't you? :)),
 should have a dynamic import for all classes which can be located in
 many different bundles:
 DynamicImport-Package: *

I don't think you should use DynamicImport-Package.
In pax wicket, we creates a delegating class resolver that tracks
IClassResolver services.

 Proposal 1 (change actual method behavior):
 Modify resolveClass() method in DefaultClassResolver as I wrote above

-1. This can be easily work around by setting the class resolver.

 Proposal 2 (do not change actual method behavior):
 Make DefaultClassResolver extensible (remove final modifier in class
 declaration) and define a new method (invent a better name for it ;)):
+1

 2. LazyInitProxyFactory - Spring integration
 The first minor thing is a call Class.forName(type); in
 ProxyReplacement. Why not use IClassResolver here (and maybe in other
 places in Wicket)?
+1

 Proposal 2 (do not change actual method behavior):
 Make LazyInitProxyFactory customizable to allows using a different
 method to create proxy inside OSGi.
+1

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Edward Yakop
On Thu, Jul 3, 2008 at 9:27 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 2:53 PM, Edward Yakop [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 8:24 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 But there is a one assumption, that bundle with Wicket classes (you
 probably have a Wicket bundled somehow in your app, don't you? :)),
 should have a dynamic import for all classes which can be located in
 many different bundles:
 DynamicImport-Package: *

 I don't think you should use DynamicImport-Package.

 I know it is not a very good practise, but Wicket jars/bundles already
 have DynamicImport-Package: * ;). And sometimes is hard to avoid
 this.

Isn't this in general depends on the IClassResolver of wicket application?
If IClassResolver is set and the rest of wicket bundles uses
Application class resolver, it would be irrelevant whether the other
wicket jars/bundles has DynamicImport-Package declaration.

 So each bundle must export its IClassResolver service? What about
 bundles independent from Wicket?

It doesn't have to be for each bundle. As long as you have a bundle /
many bundles that have sufficient ImportPackage and there's no
private packages caught in the page serialization. We would be able to
minimize this requirement to application wicket components and
business layer bundles.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OSGi and class loading issues solution proposal

2008-07-03 Thread Edward Yakop
On Thu, Jul 3, 2008 at 9:55 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 3:35 PM, Edward Yakop [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 9:27 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 2:53 PM, Edward Yakop [EMAIL PROTECTED] wrote:
 On Thu, Jul 3, 2008 at 8:24 PM, Daniel Stoch [EMAIL PROTECTED] wrote:
 Ok, but what about other (non-wicket) mechanisms, which do not use
 IClassResolver (eg. creating proxy by Proxy.newProxyInstance(...) - it
 uses classloader directly)?

I'm not too sure about this.
But as last resort, I would probably passed my own implementation of
ClassLoader.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vote] Release 1.4 with only generics and stop support for 1.3

2008-03-17 Thread Edward Yakop
+1

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Dynamically adding component and associated markup

2008-03-03 Thread Edward Yakop
On Mon, Mar 3, 2008 at 10:01 PM, Joel Hill [EMAIL PROTECTED] wrote:
 I'm trying to implement a popup (via floating DIV) that triggers on an 
 onmouseover event.  Sort of like a tooltip, but with more content.  I wanted 
 to implement this as a behavior so the component with the mouse event (and 
 the associated markup file) didn't need to have any special knowledge of the 
 popup code.  The problem with doing it this way is I need not only to 
 dynamically add the markup to contain the popup, but also attach a component 
 to this dynamic markup.

Have u looked at this?
http://wicketstuff.org/confluence/display/STUFFWIKI/wicketstuff-minis-prototip

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: YUI integration?

2008-03-02 Thread Edward Yakop
On Mon, Mar 3, 2008 at 5:19 AM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 there are a whole bunch of js lib integrations in wicket-stuff

Is it possible to update the wicket-contrib-yui to version 2.5.0?

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does something happen other than what html is output?

2008-02-28 Thread Edward Yakop
On Thu, Feb 28, 2008 at 5:33 PM, David Leangen [EMAIL PROTECTED] wrote:
 public void renderHead( final IHeaderResponse
  response )
 {
 response.renderString( cssLink );
 }

Shouldn't this read

response.renderCssReference( cssLink ),

instead of

response.renderString( cssLink );

 If I read the javadoc properly, #renderString( cssLink ), will just
print the cssLink verbatim.

  And this for the image:

 final MarkupContainer container = new WebMarkupContainer( id );
 final Model srcAttributeModel = new Model( imageUrl );
 final AttributeModifier srcAttribute = new AttributeModifier(
 src,
 true,
 srcAttributeModel );
 container.add( srcAttribute );
 add( container );

  I think the html looks something like this:
   img wicket:id=blahIMAGE/img

I wonder why this doesn't work. To me, this should work, is it because
of the IMAGE string?

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: comunication between panels

2008-02-19 Thread Edward Yakop
On Feb 18, 2008 7:13 PM, Timo Rantalaiho [EMAIL PROTECTED] wrote:
 On Mon, 18 Feb 2008, Mazzanti Luca wrote:
  i have a question: how can i comunicate between panels in wicket?

 The normal Wicket way is to share models, pass references etc,
 but it has its limitations.

 You can find an example of a push-type mechanism here

   https://issues.apache.org/jira/browse/WICKET-1312

 though it is done with just one page in mind.

This would be very cool if can be moved to 1.3.x release  as well.
This way, it would be possible to address
AjaxRequestTarget#addComponent in a more elegant way.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-02-13 Thread Edward Yakop
The reason why this might not work is when we have the following use case:
* We have many draggable target, and when somebody drop to one of the
location, containers that contained the other draggable targets are
also added to ajax request target. Once this happened, none of the
other draggable targets will work.
* The same thing also applies to Droppables, if the container of
droppables are added to the AjaxRequestTarget. These droppables will
no longer work too.

The way that this is fixed at my project is by forcing the user to use
my ajax request target.
I have a hook to ajax request target to listen when components are
added to ajax request target, and do necessary callback to allow the
behaviors to do something. In my case, usually called
Droppables.remove( $( markupId ) ), and for Draggables, since there's
no easy way to potentially need to re-initialize some but not all, I
have to iterate the Draggables.drag array and inovoke
Draggable#destroy.

I would think there probably a better way to handle this without
subclassing AjaxRequestTarget. Will come back to this later.

Regards,
Edward Yakop


On Feb 14, 2008 12:53 AM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 Ok everyone, I think I have a fix checked in.  Before re-rendering the
 DraggableTarget on the Ajax response, I call the scriptaculous
 Droppables.remove() to cleanup the old reference.

 The wicketstuff-scriptaculous-example project should be able to test
 and verify this behavior.  If anyone has a spare browser that they can
 throw at it to see that it works, I'd appreciate it.

 Thank you *everyone* for your contributions.  I never would have
 noticed this issue without your help!

 On Feb 13, 2008 10:39 AM, Nino Saturnino Martinez Vazquez Wael
 [EMAIL PROTECTED] wrote:

  if you have an example running, i'll be happy to test on safari and
  ie6/7/ff ..
 
 
  Ryan Sonnek wrote:
   No, i haven't yet.  the problem for me is that I don't have an install
   of IE6/7 to test this out on.  I'd be happy to apply any patch that
   someone has that has been tested against IE6 and IE7 though.
  
   On Feb 13, 2008 12:54 AM, Edward Yakop [EMAIL PROTECTED] wrote:
  
   Hi,
  
   Thanx for the hints :)
   The problem is solved, but I'm not sure whether Ryan has patched the
   scriptaculous code in wicket-stuff svn.
  
   Regards,
   Edward Yakop
  
  
   On Feb 13, 2008 2:10 PM, Ernesto Reinaldo Barreiro [EMAIL PROTECTED] 
   wrote:
  
   Don't know if it is the same issue but I have found  the same problem a
   while ago (refreshing a component via Ajax) and the problem was
   scriptaculous requires to clean up the Droppables  if an element was
   removed from the DOM tree. So, all I did was add a a clearAll
   (JavaScript) method  that delete all the Droppables. something like
  
   var Droppables = {
 drops: [],
  
 removeAll: function(element) {
   this.drops = [];
 },
  
   ..
  
   and then call it before any Ajax request that recreated the DOM tree. So
   that I could safely recreated my component and make them droppables
   again. This worked fine for IE7. For Firefox I never found those
   problems... There was a note on the web page explaining Droppables that
   suggested this idea...
  
   Hope this helps...
  
   Best,
  
   Ernesto
  
  
   Lan Boon Ping wrote:
  
   Hi,
  
   I have encountered a DragNDrop problem using wicketStuff-scriptaculous
   in IE6/IE7. The DragNDrop only work for the first time, but
   subsequently, the draggable object is no longer draggable. FYI, this
   problem doesn't exist in Firefox and it can be reproduced in
   wicket-contrib-scriptaculous-examples.
  
   Any hints?
  
   Thanks in advance.
  
   Regards
   Boon Ping.
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED

Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-02-12 Thread Edward Yakop
Hi,

Thanx for the hints :)
The problem is solved, but I'm not sure whether Ryan has patched the
scriptaculous code in wicket-stuff svn.

Regards,
Edward Yakop

On Feb 13, 2008 2:10 PM, Ernesto Reinaldo Barreiro [EMAIL PROTECTED] wrote:
 Don't know if it is the same issue but I have found  the same problem a
 while ago (refreshing a component via Ajax) and the problem was
 scriptaculous requires to clean up the Droppables  if an element was
 removed from the DOM tree. So, all I did was add a a clearAll
 (JavaScript) method  that delete all the Droppables. something like

 var Droppables = {
   drops: [],

   removeAll: function(element) {
 this.drops = [];
   },

 ..

 and then call it before any Ajax request that recreated the DOM tree. So
 that I could safely recreated my component and make them droppables
 again. This worked fine for IE7. For Firefox I never found those
 problems... There was a note on the web page explaining Droppables that
 suggested this idea...

 Hope this helps...

 Best,

 Ernesto


 Lan Boon Ping wrote:
  Hi,
 
  I have encountered a DragNDrop problem using wicketStuff-scriptaculous
  in IE6/IE7. The DragNDrop only work for the first time, but
  subsequently, the draggable object is no longer draggable. FYI, this
  problem doesn't exist in Firefox and it can be reproduced in
  wicket-contrib-scriptaculous-examples.
 
  Any hints?
 
  Thanks in advance.
 
  Regards
  Boon Ping.
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-02-08 Thread Edward Yakop
Committed at
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous

The examples can be found at
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous-examples.

Regards,
Edward Yakop

Note: The wicket dependency version is now set to 1.3.1

On Feb 1, 2008 11:59 PM, Edward Yakop [EMAIL PROTECTED] wrote:
 On Feb 1, 2008 11:47 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:
  On Feb 1, 2008 3:26 AM, Lan Boon Ping [EMAIL PROTECTED] wrote:
   My colleague (Edward Yakop) found out the cause root and have a
   solution for it. The reason why this is only occured in IE is because
   wicket-ajax.js uses Element.removeChild and Element.addChild to
   replace component during ajax callback.
 
  Is this an issue with all wicket ajax requests on IE, or just with
  scriptaculous projects?
 I believe this is a combination.
 Scriptaculous cached the element when Droppables.add and new
 Draggable  is invoked and
 Wicket ajax behavior handling AjaxRequestTarget#addComponent( ), where
 it remove the old element and add
 the new element during ajax response.

 Regards,
 Edward Yakop
 Note: OPS4j server is just backed up, so I haven't have time to update
 the code yet.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: localization

2008-02-06 Thread Edward Yakop
 Translator translator = new Translator( Locale.GERMAN );
 Hotel translatedHotel = translator.translate( hotel );
 translatedHotel.getDescription(); // return description in german
 translatedHotel.setDescription( die Beschreibung ); // persist german 
 description

I think it would be very cool to extend that API to have a better
wicket integration.
It would be very cool if we can do the following:

code
BoundCompoundPropertyModel model = new
TranslatableBoundCompoundPropertyModel( hotel );
TextField descriptionField = ...;
model.bind( descriptionField, description );
/code

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [WicketStuff-Scriptaculous] DragNDrop problem in IE6/IE7.

2008-02-01 Thread Edward Yakop
On Feb 1, 2008 11:47 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 On Feb 1, 2008 3:26 AM, Lan Boon Ping [EMAIL PROTECTED] wrote:
  My colleague (Edward Yakop) found out the cause root and have a
  solution for it. The reason why this is only occured in IE is because
  wicket-ajax.js uses Element.removeChild and Element.addChild to
  replace component during ajax callback.

 Is this an issue with all wicket ajax requests on IE, or just with
 scriptaculous projects?
I believe this is a combination.
Scriptaculous cached the element when Droppables.add and new
Draggable  is invoked and
Wicket ajax behavior handling AjaxRequestTarget#addComponent( ), where
it remove the old element and add
the new element during ajax response.

Regards,
Edward Yakop
Note: OPS4j server is just backed up, so I haven't have time to update
the code yet.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: setting session locale to browser locale on onSubmit()

2008-02-01 Thread Edward Yakop
On Feb 2, 2008 12:19 AM, iwanj [EMAIL PROTECTED] wrote:
 and this works fine.  however, for button's onSubmit() wicket uses the
 existing page instead of creating a new one and so my code in the base page
 constructor's is not run.  copying my code into every handler is one option.
 subclassing all such components is another.  neither seems particularly
 appealing for me.
What exactly do you want to do with the locale information?

If u want internationalize the page,
You could either always do.
PageClassName_locale.html
or
PanelClassName_locale.html
or
If they're in resource bundle.properties, you could always do
new Label( wicketId, new ResourceModel( resourceBundleKey ) );

Or otherwise
If this is mass changes of components etcs
setResponsePage( new PageClassToInstantiate() );

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: openlayers

2008-01-25 Thread Edward Yakop
I'm interested :)

Regards,
Edward Yakop

On 1/25/08, Peter Neubauer [EMAIL PROTECTED] wrote:
 Cool,
 I hope we can get this to a more stable state in the next couple of
 days so others can jump in and help out. Is anyone interested? The OL
 and GeoServer combo seems to be a very appealing combination for
 rolling your own mapping  apps.

 /peter

 On Jan 24, 2008 5:42 PM, Nino Saturnino Martinez Vazquez Wael
 [EMAIL PROTECTED] wrote:
  i've begun work on this.. currently its VERY unstable and unrecommended
  to use..
 
 
  Nino Saturnino Martinez Vazquez Wael wrote:
   Hi
  
   At some point someone talked about creating something around open
   layers. However nothing but the project structure are checked in, so I
   guess i'll continue on that, if its okay?
  
  
   regards
  
 
  --
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 GTalk:neubauer.peter
 Skypepeter.neubauer
 ICQ18762544
 GTalkneubauer.peter
 Phone   +46704 106975
 Mail   [EMAIL PROTECTED]
 LinkedIn   http://www.linkedin.com/in/neubauer

 http://www.neo4j.org - New Energy for Data - the Netbase.
 http://www.ops4j.org - New Energy for OSS Communities - Open
 Participation Software.
 http://www.qi4j.org- New Energy for Java - Domain Driven
 Development.

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-11 Thread Edward Yakop
On Jan 11, 2008 10:59 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:
  The committed code has improved
  JavascriptBuilder#formatJavascriptValue to support array, set and list
  value.

 I didn't know about these changes.  I'll try and take a look and see
 if I can reuse the code.  Do you have unit tests?

No unit test yet, but I tested the output for my project and it works.
I could write test cases for this, but will have to do this during weekend.
Sorry.

 Can't you wrap your image in a div/span for the draggable target?  I
 don't see this as a very strong usecase.  Most usecases will have some
 kind of placeholder text instructing the user to drop objects on it.
 Does this work for you?
I tried div, span and your example.
Neither work for firefox 2.0 and 1.5 (I haven't test it on another browser).
The only way to get it to work is by wrapping it between td, and I
think this is too much.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-11 Thread Edward Yakop
On Jan 11, 2008 11:04 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 I don't care if it can be optomized if it introduces more complexity.
 How often are people drag/dropping objects on webpages anyways?  There
 isn't a need to support 100,000 operations per second for this kind of
 operation.  Looping over components in a page is blazing fast unless
 you have *thousands* of components on your page.

Using page.getPath is much easier than creating your own visitor class.
Look at DraggableTargetBehavior, and please tell me that it's actually
harder to do.

 If there's an easy way to grab the component path for both Draggable
 objects *AND* the SortableListView, I'd be interested to see it *and*
 see benchmarks for it.
I'm not sure why hostility is ensued here. The fact that the getPath
is simpler to do and more optimized, I wonder why don't look at the
code in there instead.

 So far, I have only been able to get both the SortableListView and the
 DraggableBehavior to use markup id's, and i'm very pleased with how
 easy *and clean* it is to do this.  any other solution will have a
 tough time swaying my opinion unless it's very simple to do.

If u can get the markup id, u can get the path. And the code is
simpler to retrieve the component.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-11 Thread Edward Yakop
 It's not the code for finding the component that bothers me.  as you
 said, it's very easy.  My problem is that now you have to muck with
 the scriptaculous javascript callback to extract the component path
 instead of just using the default behavior which is to transfer the
 markup id.  This makes the code more brittle in my opinion since the
 scriptaculous behavior may change in the future.
I didn't change a single line of scriptaculous code.
You could verify by md5sum on each of the js files and compare to the
latest scriptaculous 1.8.1.

The changes that I did was on the generated javascript for both
[DraggableTargetBehavior] and [DraggableBehavior].
For draggable behavior, the generated html looks like:

[Snippets]
img style=position: relative; class=Picture
wicketcomponentpath=0:dynamicContainer:replaceablePanel:favorite:dynamicContainer:content:pictureDataView:1:picture
src=http://localhost:8080/war/pictures/100.jpg; id=picture144
height=50 width=50
script type=text/javascript
new Draggable('picture144',
{
  revert: true
}
);
/script
[/Snippets]

and the generated html for component with [DraggableTargetBehavior]:
[Snippets]
img style=position: relative;
src=http://localhost:8080/war/pictures/100.jpg;
id=playlistPictureField121 height=50 width=50
script type=text/javascript
Droppables.add('playlistPictureField121',
{
  onDrop: function(draggable, droppable, event) {
var wicketComponentPath = draggable.getAttribute( 'wicketComponentPath' );
wicketAjaxGet('?wicket:interface=:0:dynamicContainer:replaceablePanel:playlistDetailPanel:playlistPictureField::IActivePageBehaviorListener:0:-1amp;wicket:ignoreIfNotActive=truewicketComponentPath='
+ wicketComponentPath); },
  accept: new Array('Picture')
}
);
/script
[/Snippets]

As u can see, that wicketComponentPath is an attribute of the drag
source html node, and I use
[draggable.getAttribute( 'wicketComponentPath' )] to retrieve the
wicket component path of the drag source html node.

 Also, I still don't see how this would work for the SortableListView?
I need to see what u did here. Will get back to u in 1 hour or so.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-11 Thread Edward Yakop
On Jan 12, 2008 12:50 AM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 I didn't mean you changed scriptaculoius.  i meant that you really
 customized the rendered *scriptaculous javascript*.  I've seen the
 sourcecode and remain unconvinced that this is simpler than using the
 markup ID.
I'll leave this for u to decide. As far as user of
wicket-scriptaculous concern. This is transparent to them.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-11 Thread Edward Yakop
On Jan 11, 2008 11:12 PM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 Also, I still don't see how this would work for the SortableListView?
Ok, hours as passed (I was thinking to only spent 1 hour, ended up
spending 4 instead).

Status:
After spending much time about SortableListView.

I couldn't make the API any simpler for dragging within list view case.
However, I refactored [SortableListView] code:
* To make it cleaner; and
* Add a callback method to indicate model is sorted event.
  The callback is useful to update status label, for example.

I also added [SortableListView] examples.

The updated code can be updated from:
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous-examples
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TreeGrid and DataGrid open source

2008-01-11 Thread Edward Yakop
On Jan 12, 2008 9:08 AM, Matej Knopp [EMAIL PROTECTED] wrote:
 The beta downloads and live demo are available at http://www.inmethod.com .

It's very nice :)

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-10 Thread Edward Yakop
The code is commited at
https://scm.ops4j.org/repos/ops4j/laboratory/users/efy/wicket-contrib-scriptaculous

I'm sorry that I couldn't sent a patch, when the modification was
done, it was committed to our project svn server.
Hence a diff couldn't be made.

 regarding the javascript issues, could you re-open this bug i filed in wicket?
 https://issues.apache.org/jira/browse/WICKET-987
Ok, will do that.

Note: I haven't modify the scriptcaulous example, if u need me to
update this, let me know.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-10 Thread Edward Yakop
  regarding the javascript issues, could you re-open this bug i filed in 
  wicket?
  https://issues.apache.org/jira/browse/WICKET-987
I can't re-open this bug, but I left a comment in the jira issue.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-10 Thread Edward Yakop
On Jan 11, 2008 11:51 AM, Ryan Sonnek [EMAIL PROTECTED] wrote:
 if there are other improvements to be made, let me know!

How about committing the [DraggableTargetBehavior] and its support for
multiple drag source type.
The committed code has improved
JavascriptBuilder#formatJavascriptValue to support array, set and list
value.

Another reason why we prefer [DraggableTargetBehavior] instead of
[DraggableTarget],
when the drag target is an image (instead of the current test label),
I would not be able to drop to it.
This is because the div/span representing the [DraggableTarget] is
not being rendered by firefox browser.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is wicketstuff-scriptaculous still active?

2008-01-10 Thread Edward Yakop
I forgot to mention about the usage of markup id.

I think this is a less optimize way to find the drag source component,
especially if the page object graph is large.

For example,
If we have the following Page component structure.

Page
 - Container1
   - Table with a lot of rows
   - other component
 - Container2
   - Table
 - rows
 - dragSource

If we search based on output markup id for drag source, it will have
to visit Container 1 and all its children, before visiting container
2.

By using path (sample path 0:container2::dragSource ), instead
of visitor,
the search will be a matter on how many hop to get to the drag source.

Regards,
Edward Yakop

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]