Re: Is wicketstuff-scriptaculous still active?
On Jan 11, 2008 9:08 AM, Edward Yakop [EMAIL PROTECTED] wrote: 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. 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. Also, I still don't see how this would work for the SortableListView? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
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. 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. 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. On Jan 10, 2008 10:21 PM, Edward Yakop [EMAIL PROTECTED] wrote: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
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?
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?
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?
On Jan 10, 2008 10:10 PM, Edward Yakop [EMAIL PROTECTED] wrote: 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. Not sure what you mean by multiple drag source type. with my latest changes, you can have one draggable target that will accept *any* draggable (or sortable) object without using the DraggableTarget.accepts() methods. 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? 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. 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? div wicket:id=draggableTarget Drop contents here! img wicket:id=myImage / /div - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
On Jan 11, 2008 9:37 AM, Edward Yakop [EMAIL PROTECTED] wrote: 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. 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. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
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. Really? I use the draggable target on a div on firefox 2.0 and 1.5 and it works fine. I'd try this same example out with a static html and scriptaculous to see if it works. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Is wicketstuff-scriptaculous still active?
Is this project no longer going to support jdk 1.4? I was using a build from Sept. '07 from http://wicketstuff.org/maven/repository/org/wicketstuff/wicketstuff-scri ptaculous/ and it worked fine, but I just tried a build from January '08 and it was compiled with java 5, so I can't use it -Clay -Original Message- From: Ryan Sonnek [mailto:[EMAIL PROTECTED] Sent: Friday, January 11, 2008 11:51 AM To: users@wicket.apache.org Subject: Re: Is wicketstuff-scriptaculous still active? On Jan 11, 2008 9:37 AM, Edward Yakop [EMAIL PROTECTED] wrote: 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. 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. - 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?
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?
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: Is wicketstuff-scriptaculous still active?
Edward, Thanks for the email. I'm currently working on revamping the drag drop API. if you have any code you'd like to contribute feel free to drop me an email. maybe we could hash out a great new api to simplify it's use. regarding the javascript issues, could you re-open this bug i filed in wicket? https://issues.apache.org/jira/browse/WICKET-987 I really think wicket should drop it's custom javascript minifier and use YUI compressor instead to avoid these bugs... On Jan 9, 2008 10:05 PM, edward.yakop [EMAIL PROTECTED] wrote: Hi, Boon Ping and I managed to modify scriptaculous to get wicket component to be passed during onDrop callback. We changed the DraggableTargetContainer? to become a wicket behavior. We concluded by doing it this way, we can practically make any wicket component (tested for label and img, so far) to be a drop target. For example, Code for DraggableTarget final ContextImage image = ... add( image ); DropHandler handler = new DropHandler() { public void onDrop( Component aDragSourceComponent, AjaxRequestTarget aTarget ) { String newImageURL = (String) aDragSourceComponent.getModelObject(); image.setModelObject( newImageURL ); aTarget.add( image ); } } image.add( new DraggableTargetBehavior( handler, Image ) ); // Image is the drag type /Code for DraggableTarget Code for Draggable source ContextImage source = ... add( source ); source.add( new DraggableBehavior( Image ) ); // Image is the drag type /Code for Draggable source On another note, we encounter weird problem when scriptaculous is used in deployment mode. We have to invoke WebApplication#getResourceSettings().setStripJavascriptCommentsAndWhitespace(false) to get javascript to work. Regards, Edward Yakop -- View this message in context: http://www.nabble.com/Is-wicketstuff-scriptaculous-still-active--tp14660810p14727336.html Sent from the Wicket - User mailing list archive at Nabble.com. - 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?
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?
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?
i've reopened the issue. It must only allow whoever filed the issue to reopen it... On Jan 10, 2008 10:00 AM, Edward Yakop [EMAIL PROTECTED] wrote: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
On Jan 10, 2008 9:22 AM, Ryan Sonnek [EMAIL PROTECTED] wrote: Edward, Thanks for the email. I'm currently working on revamping the drag drop API. if you have any code you'd like to contribute feel free to drop me an email. maybe we could hash out a great new api to simplify it's use. Hey everyone. Thanks again for all the comments and suggestions. I just finished re-writing the drag-drop support and would love to hear how it looks. http://www.jroller.com/wireframe/entry/revamped_drag_and_drop_for if there are other improvements to be made, let me know! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
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?
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]
Re: Is wicketstuff-scriptaculous still active?
Hi, Boon Ping and I managed to modify scriptaculous to get wicket component to be passed during onDrop callback. We changed the DraggableTargetContainer? to become a wicket behavior. We concluded by doing it this way, we can practically make any wicket component (tested for label and img, so far) to be a drop target. For example, Code for DraggableTarget final ContextImage image = ... add( image ); DropHandler handler = new DropHandler() { public void onDrop( Component aDragSourceComponent, AjaxRequestTarget aTarget ) { String newImageURL = (String) aDragSourceComponent.getModelObject(); image.setModelObject( newImageURL ); aTarget.add( image ); } } image.add( new DraggableTargetBehavior( handler, Image ) ); // Image is the drag type /Code for DraggableTarget Code for Draggable source ContextImage source = ... add( source ); source.add( new DraggableBehavior( Image ) ); // Image is the drag type /Code for Draggable source On another note, we encounter weird problem when scriptaculous is used in deployment mode. We have to invoke WebApplication#getResourceSettings().setStripJavascriptCommentsAndWhitespace(false) to get javascript to work. Regards, Edward Yakop -- View this message in context: http://www.nabble.com/Is-wicketstuff-scriptaculous-still-active--tp14660810p14727336.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
Hi Lan There was a discussion about it being a couple of versions behind, im not sure if Ryan's active? Whats the problem? Lan Boon Ping wrote: Hi, Is wicketstuff-scriptaculous still active? Regards Boon Ping. - 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]
Re: Is wicketstuff-scriptaculous still active?
Hi Nino and Ryan Thanks for the reply. Regard the DraggableTarget.onDrop(...) method, it has a String (markupId) and AjaxRequestTarget as parameters, I found out that in some circumstances, markupId is not desirable. For instance, I have a FruitPanel and two subsclasses-ApplePanel and OrangePanel. If I put the markupId in FruitPanel, markupId parameter in DraggableTarget.onDrop method will no longer useful. public abstract class FruitPanel extends Panel { public FruitPanel(FruitModel model) { super(fruitPanel, model);l } public class OrangePanel extends FruitPanel { public OrangePanel(OrangeModel model) { super(model); } } public class ApplePanel extends FruitPanel { public ApplePanel(AppleModel model) { super(model); } } Instead of using markupId, it is possible for the parameter to be a Component for DraggableTarget.onDrop? Thanks in advance. Regards Boon Ping. On Jan 7, 2008 11:05 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: It sure is still active. I recently upgraded to version 1.8.0 and haven't heard of any issues. http://www.jroller.com/wireframe/entry/scriptaculous_1_8_release 1.8.1 was just released, but i haven't had time to upgrade to it yet. On Jan 7, 2008 5:17 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Lan There was a discussion about it being a couple of versions behind, im not sure if Ryan's active? Whats the problem? Lan Boon Ping wrote: Hi, Is wicketstuff-scriptaculous still active? Regards Boon Ping. - 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] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is wicketstuff-scriptaculous still active?
I'm open to suggestions. The markupId is required for the scriptaculous library to do it's magic, but how about something like this? When you call the DraggableTarget.accepts(Component) method, it could store a reference to that component, and the onDrop() method could take the string markupId and lookup the correct component. The one downside to this is that you *must* call DraggableTarget.accepts(Component) for any/all Components that may be dropped on the target. Right now it's very loosely enforced and you can technically drop components that the target doesn't know about. On Jan 7, 2008 8:54 PM, Lan Boon Ping [EMAIL PROTECTED] wrote: Hi Nino and Ryan Thanks for the reply. Regard the DraggableTarget.onDrop(...) method, it has a String (markupId) and AjaxRequestTarget as parameters, I found out that in some circumstances, markupId is not desirable. For instance, I have a FruitPanel and two subsclasses-ApplePanel and OrangePanel. If I put the markupId in FruitPanel, markupId parameter in DraggableTarget.onDrop method will no longer useful. public abstract class FruitPanel extends Panel { public FruitPanel(FruitModel model) { super(fruitPanel, model);l } public class OrangePanel extends FruitPanel { public OrangePanel(OrangeModel model) { super(model); } } public class ApplePanel extends FruitPanel { public ApplePanel(AppleModel model) { super(model); } } Instead of using markupId, it is possible for the parameter to be a Component for DraggableTarget.onDrop? Thanks in advance. Regards Boon Ping. On Jan 7, 2008 11:05 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: It sure is still active. I recently upgraded to version 1.8.0 and haven't heard of any issues. http://www.jroller.com/wireframe/entry/scriptaculous_1_8_release 1.8.1 was just released, but i haven't had time to upgrade to it yet. On Jan 7, 2008 5:17 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Lan There was a discussion about it being a couple of versions behind, im not sure if Ryan's active? Whats the problem? Lan Boon Ping wrote: Hi, Is wicketstuff-scriptaculous still active? Regards Boon Ping. - 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] 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?
hmmm this change doesn't really work when dealing with a SortableListView. With the SortableListView, there's no Component for the DraggableTarget to work with. It really only has the markupId. Maybe another wicket dev has an idea for how to do this? On Jan 7, 2008 9:44 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: I'm open to suggestions. The markupId is required for the scriptaculous library to do it's magic, but how about something like this? When you call the DraggableTarget.accepts(Component) method, it could store a reference to that component, and the onDrop() method could take the string markupId and lookup the correct component. The one downside to this is that you *must* call DraggableTarget.accepts(Component) for any/all Components that may be dropped on the target. Right now it's very loosely enforced and you can technically drop components that the target doesn't know about. On Jan 7, 2008 8:54 PM, Lan Boon Ping [EMAIL PROTECTED] wrote: Hi Nino and Ryan Thanks for the reply. Regard the DraggableTarget.onDrop(...) method, it has a String (markupId) and AjaxRequestTarget as parameters, I found out that in some circumstances, markupId is not desirable. For instance, I have a FruitPanel and two subsclasses-ApplePanel and OrangePanel. If I put the markupId in FruitPanel, markupId parameter in DraggableTarget.onDrop method will no longer useful. public abstract class FruitPanel extends Panel { public FruitPanel(FruitModel model) { super(fruitPanel, model);l } public class OrangePanel extends FruitPanel { public OrangePanel(OrangeModel model) { super(model); } } public class ApplePanel extends FruitPanel { public ApplePanel(AppleModel model) { super(model); } } Instead of using markupId, it is possible for the parameter to be a Component for DraggableTarget.onDrop? Thanks in advance. Regards Boon Ping. On Jan 7, 2008 11:05 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: It sure is still active. I recently upgraded to version 1.8.0 and haven't heard of any issues. http://www.jroller.com/wireframe/entry/scriptaculous_1_8_release 1.8.1 was just released, but i haven't had time to upgrade to it yet. On Jan 7, 2008 5:17 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Lan There was a discussion about it being a couple of versions behind, im not sure if Ryan's active? Whats the problem? Lan Boon Ping wrote: Hi, Is wicketstuff-scriptaculous still active? Regards Boon Ping. - 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] 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?
Hi Ryan, I like the fact that I can drop components that the target doesn't know about them, I think it is very useful especially when you have many planes need to collaborate without knowing each other. Is it possible to use component.getPath()? and the onDrop() method could get the component via Component component = ajaxRequestTarget.getPage().get(path); In regard SortableListView, you can use ListItem instead. What do you think? Regards Boon Ping. On Jan 8, 2008 12:40 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: hmmm this change doesn't really work when dealing with a SortableListView. With the SortableListView, there's no Component for the DraggableTarget to work with. It really only has the markupId. Maybe another wicket dev has an idea for how to do this? On Jan 7, 2008 9:44 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: I'm open to suggestions. The markupId is required for the scriptaculous library to do it's magic, but how about something like this? When you call the DraggableTarget.accepts(Component) method, it could store a reference to that component, and the onDrop() method could take the string markupId and lookup the correct component. The one downside to this is that you *must* call DraggableTarget.accepts(Component) for any/all Components that may be dropped on the target. Right now it's very loosely enforced and you can technically drop components that the target doesn't know about. On Jan 7, 2008 8:54 PM, Lan Boon Ping [EMAIL PROTECTED] wrote: Hi Nino and Ryan Thanks for the reply. Regard the DraggableTarget.onDrop(...) method, it has a String (markupId) and AjaxRequestTarget as parameters, I found out that in some circumstances, markupId is not desirable. For instance, I have a FruitPanel and two subsclasses-ApplePanel and OrangePanel. If I put the markupId in FruitPanel, markupId parameter in DraggableTarget.onDrop method will no longer useful. public abstract class FruitPanel extends Panel { public FruitPanel(FruitModel model) { super(fruitPanel, model);l } public class OrangePanel extends FruitPanel { public OrangePanel(OrangeModel model) { super(model); } } public class ApplePanel extends FruitPanel { public ApplePanel(AppleModel model) { super(model); } } Instead of using markupId, it is possible for the parameter to be a Component for DraggableTarget.onDrop? Thanks in advance. Regards Boon Ping. On Jan 7, 2008 11:05 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: It sure is still active. I recently upgraded to version 1.8.0 and haven't heard of any issues. http://www.jroller.com/wireframe/entry/scriptaculous_1_8_release 1.8.1 was just released, but i haven't had time to upgrade to it yet. On Jan 7, 2008 5:17 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hi Lan There was a discussion about it being a couple of versions behind, im not sure if Ryan's active? Whats the problem? Lan Boon Ping wrote: Hi, Is wicketstuff-scriptaculous still active? Regards Boon Ping. - 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] 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]