Re: Wicket 6.0.0-beta1: RangeValidator Issue (NPE)
I can confirm this, see this quickstart: http://decoded.de/wicket-quickstart.zip The NPE only occurs if there is a FeedbackPanel on the page. If you take it out -> no exception. Besides, there is no WARN log if you are missing a FeedbackPanel and there are messages to be rendered, bug or feature?! Cheers, -Tom On 09.05.2012 at 22:49 Sebastien wrote: > Hi wicket's team, > > While using the following code: > >final TextField input = new TextField("input", > new Model(15), Integer.class); >input.add(new RangeValidator(0, 200)); >form.add(input); > > I've got a NPE with wicket6.0.0-beta1, when I submit the form with a value > not inside the validator's bounds. (ie, 500). > I tested in a simple quickstart to be sure... It is ok with 1.5.6 and crash > with 6.0.0-beta1 > > java.lang.NullPointerException > at > org.apache.wicket.markup.html.form.ValidationErrorFeedback.toString(ValidationErrorFeedback.java:83) > at > org.apache.wicket.markup.html.panel.FeedbackPanel.newMessageDisplayComponent(FeedbackPanel.java:338) > at > org.apache.wicket.markup.html.panel.FeedbackPanel$MessageListView.populateItem(FeedbackPanel.java:117) > at > org.apache.wicket.markup.html.list.ListView.onPopulate(ListView.java:524) > at > org.apache.wicket.markup.repeater.AbstractRepeater.onBeforeRender(AbstractRepeater.java:116) > > Thus, just fyi, it is not documented in the migration guide what's happened > to the NumberValidator... I did not find it, so I did not test another > validator such as MaximumValidator... > > Best regards, > Sebastien - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loadable-detachable model for ListView
thanks for the info Dan. I haven't worked with Jquery before. I will explore more on that. But I am curious to know why DataView stores information in the session. Because I use LoadableDetachableModel in my above example. The main objective for me is minimize the information stored in session. Our backend service is very quick in sending all the entries we need for the list. -Suresh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622292.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loadable-detachable model for ListView
Suresh, I haven't seen a packaged solution for inifinte scroll in Wicket. But the way I'd implement it is to detect that more content is needed with JavaScript (some kind of jQuery event listeners), then make a request to a Wicket AJAX behavior. I'd have the behavior render content into a hidden list view, then use jQuery to move those list view items to the bottom of the visible list. This way each response only sends new content. I think ListView is better than DataView because it naturally discards its contents after the request where data view saves models, keeping your session size the same. You should probably pass the current "page" of results as a query parameter in your AJAX behavior request (instead of keeping that state server-side). That way if the user reloads the page, they simply go back to the first page of results. Hope that helps. Dan On Wed, May 9, 2012 at 4:11 PM, sudeivas wrote: > Thanks Igor for the response. > > If I use dataview.setItemsPerPage(50), then my Data View loads only the > first 50 entries. But how can I trigger or ask the data view to load the > next 50 entries when we scroll down the list or when we reach the end of > the > list? > > -Suresh > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Loadable-detachable model for ListView
use PagingNavigator. there are examples here: http://www.wicket-library.com/wicket-examples/repeater/ -igor On Wed, May 9, 2012 at 4:11 PM, sudeivas wrote: > Thanks Igor for the response. > > If I use dataview.setItemsPerPage(50), then my Data View loads only the > first 50 entries. But how can I trigger or ask the data view to load the > next 50 entries when we scroll down the list or when we reach the end of the > list? > > -Suresh > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loadable-detachable model for ListView
Thanks Igor for the response. If I use dataview.setItemsPerPage(50), then my Data View loads only the first 50 entries. But how can I trigger or ask the data view to load the next 50 entries when we scroll down the list or when we reach the end of the list? -Suresh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622091.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loadable-detachable model for ListView
call dataview.setitemsperpage(x) -igor On Wed, May 9, 2012 at 3:32 PM, sudeivas wrote: > I am using the below code in my application. But the data provider makes a > call to my service wrapper asking for all the entries. For example: if total > size of the list of 750, the first - 0 and count - 750. This is not > different from using list view. How can I make sure that this data view > loads (for example 100 entries) at a time. And when user scroll down the > list, we load more entries. Is it possible? > > class UsersProvider implements IDataProvider > { > private static final long serialVersionUID = 1L; > public Iterator iterator(int first, int count) > { > Iterator iterator = > null; > try { > iterator = > WorkflowServiceWrapper.listOpenActiveWorkflowInstances( > category, first, count); > } catch (DependencyFailureException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > return iterator; > } > > public int size() > { > return getProblemsCount(); > } > > public IModel model(final Object object) > { > return new LoadableDetachableModel() { > private static final long serialVersionUID = 1L; > protected Object load() { > return object; > } > }; > } > > @Override > public void detach() { > LOGGER.info("coming to detach"); > // TODO Auto-generated method stub > } > } > > DataView dataview = > new DataView("problems", > new UsersProvider()) { > private static final long serialVersionUID = 1L; > > @Override > protected void populateItem(final Item item) { > Label blockedImage = new Label("blockedImage",""); > if(((SerializableWorkflowInstancePartial) > item.getModelObject()).isBlocking()) { > > //do something and add all ui compoenents > } > }; > add(container); > container.add(dataview); > > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622002.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Loadable-detachable model for ListView
I am using the below code in my application. But the data provider makes a call to my service wrapper asking for all the entries. For example: if total size of the list of 750, the first - 0 and count - 750. This is not different from using list view. How can I make sure that this data view loads (for example 100 entries) at a time. And when user scroll down the list, we load more entries. Is it possible? class UsersProvider implements IDataProvider { private static final long serialVersionUID = 1L; public Iterator iterator(int first, int count) { Iterator iterator = null; try { iterator = WorkflowServiceWrapper.listOpenActiveWorkflowInstances( category, first, count); } catch (DependencyFailureException e) { // TODO Auto-generated catch block e.printStackTrace(); } return iterator; } public int size() { return getProblemsCount(); } public IModel model(final Object object) { return new LoadableDetachableModel() { private static final long serialVersionUID = 1L; protected Object load() { return object; } }; } @Override public void detach() { LOGGER.info("coming to detach"); // TODO Auto-generated method stub } } DataView dataview = new DataView("problems", new UsersProvider()) { private static final long serialVersionUID = 1L; @Override protected void populateItem(final Item item) { Label blockedImage = new Label("blockedImage",""); if(((SerializableWorkflowInstancePartial) item.getModelObject()).isBlocking()) { //do something and add all ui compoenents } }; add(container); container.add(dataview); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232p4622002.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: igor's select2 script
Use in 1.4 requires some relatively simple code changes. For example the resource syntax (for serving Select2 AJAX requests) is different. But after little changes like that, it should work fine. On Wed, May 9, 2012 at 1:04 PM, Emmanouil Batsis (Manos) wrote: > > > this is cool! Any chance it works with wicket 1.4.x? > > Manos > > > --**--**- > To unsubscribe, e-mail: > users-unsubscribe@wicket.**apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: igor's select2 script
this is cool! Any chance it works with wicket 1.4.x? Manos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: igor's select2 script
Here you go, Uwe (and all): https://github.com/dretzlaff/wicket-select2 If you provide feedback in the next couple of days I'm happy to address it. Props to Igor for sharing Select2 itself. On Wed, May 9, 2012 at 10:01 AM, Dan Retzlaff wrote: > I'll post to github shortly. I was thinking it'd be more accessible if > rolled into one of these existing Wicket component libraries, but since I > haven't had time to coordinate that, I'll just license it ASL and somebody > else can do it if desired. > > Good timing on the reminder... I leave on Friday for a 4-5 month hike! > > > On Wed, May 9, 2012 at 8:12 AM, Igor Vaynberg wrote: > >> hi Uwe, >> >> Dan Retzlaff has created a wrapper, but as far as i know he hasnt >> publicly shared it yet. i havent really had much time to work on my >> own wrapper or to look at his yet. >> >> my recommendation, barring Dan doesnt share his code, is to create a >> very thin integration that you can later replace with either mine or >> Dan's or someone else's who takes the time to write a proper >> integration. or maybe share your own if you write something that is >> worth sharing. >> >> -igor >> >> >> On Wed, May 9, 2012 at 5:10 AM, Uwe Schäfer wrote: >> > hi >> > >> > in order not to duplicate work: is there a wicket wrapper component out >> > there using igor's select2 script, already? >> > >> > cu uwe >> > >> > - >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> > For additional commands, e-mail: users-h...@wicket.apache.org >> > >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> >
Re: Loadable-detachable model for ListView
use DataView/IDataProvider -igor On Wed, May 9, 2012 at 10:54 AM, sudeivas wrote: > Hello, > Can any one please provide an example for implementing a list view with > loadable-detachable model? I am trying to minimize the size of the session. > Because sometimes, the size of the list view can be more than 2000, and this > occupies lot of space in session. > > Also is there a better way to handle this list view to populate only 100 at > a time and when the user scrolls down the list, we will populate more > entries. We have a backend service which support pagination. > > Thanks, > Suresh > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: SwingTree to WicketTree + Drag Drop + Different Objects
Hi Erik, since you're using wicket-dnd already, I'd strongly recommend to use wicket-tree (http://code.google.com/p/wicket-tree/) instead of LinkTree. Updating nodes works hassle-free with this new implementation. See wicket-tree's examples. Or do absolutely have to use a swing tree model? Sven On 05/09/2012 05:59 PM, ttboy_01 wrote: Hi Community, I've got a problem here with a (javax.swing.) tree in Wicket 1.5.4. Everything is working fine, besides the update after drag&drop. Everything according to the database is handled fine and if I recall the page the tree (and its model) is fine. Some theoretical: I'd like to display the following tree Object - AnotherObject - AnotherObject Object - AnotherObject So I've got different classes within the tree based on the deep. My first question is how to handle this with wicket-tree? Is this possible? The other question is about the update of the tree. Here's some code: public MyPage() { releaseTree = new LinkTree("releaseTree", getReleaseTreeModel()) { @Override protected Component newNodeComponent(String id, IModel model) { WebMarkupContainer component = (WebMarkupContainer) super.newNodeComponent(id, model); component.setOutputMarkupId(true); return component; } ... } releaseTree.setOutputMarkupId(true); releaseTree.add(getDragBehavior()); releaseTree.add(getDropBehavior()); add(releaseTree); } private Behavior getDragBehavior() { return new DragSource(Operation.MOVE) { public void onAfterDrop(AjaxRequestTarget target, Transfer transfer) { target.add(releaseTree); }; @Override public void onBeforeDrop(Component drag, Transfer transfer) throws Reject { Component parent = drag.getParent(); DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent.getDefaultModelObject(); Object object = node.getUserObject(); if (object instanceof Theme) { transfer.setData(object); } else { transfer.reject(); } } }.drag("a"); } private Behavior getDropBehavior() { return new DropTarget(Operation.MOVE) { @Override public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject { Object object = transfer.getData(); if (object instanceof Theme) { // Delete old relation Release release = Release.findReleaseByThemeId(((Theme) object).getId()); release.getThemes().remove(object); release.merge(); // create new relation Component contentComponent = location.getComponent(); Component parent = contentComponent.getParent(); Object newRelease = ((DefaultMutableTreeNode) parent.getDefaultModelObject()).getUserObject(); if (newRelease instanceof Release) { ((Release) newRelease).getThemes().add((Theme) object); ((Release) newRelease).merge(); } else { transfer.reject(); } } else { transfer.reject(); } releaseTree.updateTree(); target.add(releaseTree); } }.dropCenter("a"); } As i said - everything is fine except updating the tree after drop. I hope you understand the problem. Regards, Erik -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SwingTree-to-WicketTree-Drag-Drop-Different-Objects-tp4620927.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubs
Loadable-detachable model for ListView
Hello, Can any one please provide an example for implementing a list view with loadable-detachable model? I am trying to minimize the size of the session. Because sometimes, the size of the list view can be more than 2000, and this occupies lot of space in session. Also is there a better way to handle this list view to populate only 100 at a time and when the user scrolls down the list, we will populate more entries. We have a backend service which support pagination. Thanks, Suresh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Loadable-detachable-model-for-ListView-tp4621232.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: igor's select2 script
I'll post to github shortly. I was thinking it'd be more accessible if rolled into one of these existing Wicket component libraries, but since I haven't had time to coordinate that, I'll just license it ASL and somebody else can do it if desired. Good timing on the reminder... I leave on Friday for a 4-5 month hike! On Wed, May 9, 2012 at 8:12 AM, Igor Vaynberg wrote: > hi Uwe, > > Dan Retzlaff has created a wrapper, but as far as i know he hasnt > publicly shared it yet. i havent really had much time to work on my > own wrapper or to look at his yet. > > my recommendation, barring Dan doesnt share his code, is to create a > very thin integration that you can later replace with either mine or > Dan's or someone else's who takes the time to write a proper > integration. or maybe share your own if you write something that is > worth sharing. > > -igor > > > On Wed, May 9, 2012 at 5:10 AM, Uwe Schäfer wrote: > > hi > > > > in order not to duplicate work: is there a wicket wrapper component out > > there using igor's select2 script, already? > > > > cu uwe > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
SwingTree to WicketTree + Drag Drop + Different Objects
Hi Community, I've got a problem here with a (javax.swing.) tree in Wicket 1.5.4. Everything is working fine, besides the update after drag&drop. Everything according to the database is handled fine and if I recall the page the tree (and its model) is fine. Some theoretical: I'd like to display the following tree Object - AnotherObject - AnotherObject Object - AnotherObject So I've got different classes within the tree based on the deep. My first question is how to handle this with wicket-tree? Is this possible? The other question is about the update of the tree. Here's some code: public MyPage() { releaseTree = new LinkTree("releaseTree", getReleaseTreeModel()) { @Override protected Component newNodeComponent(String id, IModel model) { WebMarkupContainer component = (WebMarkupContainer) super.newNodeComponent(id, model); component.setOutputMarkupId(true); return component; } ... } releaseTree.setOutputMarkupId(true); releaseTree.add(getDragBehavior()); releaseTree.add(getDropBehavior()); add(releaseTree); } private Behavior getDragBehavior() { return new DragSource(Operation.MOVE) { public void onAfterDrop(AjaxRequestTarget target, Transfer transfer) { target.add(releaseTree); }; @Override public void onBeforeDrop(Component drag, Transfer transfer) throws Reject { Component parent = drag.getParent(); DefaultMutableTreeNode node = (DefaultMutableTreeNode) parent.getDefaultModelObject(); Object object = node.getUserObject(); if (object instanceof Theme) { transfer.setData(object); } else { transfer.reject(); } } }.drag("a"); } private Behavior getDropBehavior() { return new DropTarget(Operation.MOVE) { @Override public void onDrop(AjaxRequestTarget target, Transfer transfer, Location location) throws Reject { Object object = transfer.getData(); if (object instanceof Theme) { // Delete old relation Release release = Release.findReleaseByThemeId(((Theme) object).getId()); release.getThemes().remove(object); release.merge(); // create new relation Component contentComponent = location.getComponent(); Component parent = contentComponent.getParent(); Object newRelease = ((DefaultMutableTreeNode) parent.getDefaultModelObject()).getUserObject(); if (newRelease instanceof Release) { ((Release) newRelease).getThemes().add((Theme) object); ((Release) newRelease).merge(); } else { transfer.reject(); } } else { transfer.reject(); } releaseTree.updateTree(); target.add(releaseTree); } }.dropCenter("a"); } As i said - everything is fine except updating the tree after drop. I hope you understand the problem. Regards, Erik -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SwingTree-to-WicketTree-Drag-Drop-Different-Objects-tp4620927.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: igor's select2 script
hi Uwe, Dan Retzlaff has created a wrapper, but as far as i know he hasnt publicly shared it yet. i havent really had much time to work on my own wrapper or to look at his yet. my recommendation, barring Dan doesnt share his code, is to create a very thin integration that you can later replace with either mine or Dan's or someone else's who takes the time to write a proper integration. or maybe share your own if you write something that is worth sharing. -igor On Wed, May 9, 2012 at 5:10 AM, Uwe Schäfer wrote: > hi > > in order not to duplicate work: is there a wicket wrapper component out > there using igor's select2 script, already? > > cu uwe > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Well, find out what are the differences between: hwb.write(fileOut); vs. byte[] bai = hwb.getBytes(); It seems hwb.getBytes() doesn't return all bytes ... On Wed, May 9, 2012 at 5:37 PM, khanshan wrote: > it works! I export data to excell file, browser downloads excell file, > but when I want to open excel file, it gives error as "corrupt in file" and > doesnt open file, but I reopen file by the help. (as you can guess with the > help of excell, corrupted files from left bar) > > I can say that FileoutputStream does work well, coz I can get excel file to > my local without using RequestCycle. > > When I want to get file with RequestCycle via onclick property, I started to > get error on excel file. But I have to output excel file with onclick , I > dont need excell file on my local, client should get it :) > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620633.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force child component enabled
Ok, I stripped down everything to a very basic setup that should work according to Martins suggestions and the wicket documentation. Any ideas why canCallListenerInterface is never called here? J. import java.lang.reflect.Method; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.ajax.markup.html.AjaxLink; import org.apache.wicket.markup.html.WebMarkupContainer; import org.apache.wicket.markup.html.WebPage; public class SandboxPage extends WebPage { public SandboxPage() { WebMarkupContainer container = new WebMarkupContainer("container") { @Override public boolean isEnabled() { return false; } }; AjaxLink link = new AjaxLink("link") { @Override protected boolean isLinkEnabled() { System.out.println(" le"); return true; } @Override public boolean canCallListenerInterface(Method method) { System.out.println(" cc"); return true; } @Override public boolean isEnabled() { System.out.println(" ie"); return true; } @Override public void onClick(AjaxRequestTarget target) { System.out.println("clicked..."); } }; container.add(link); this.add(container); } } Click me! On 09.05.2012 14:29, Jürgen Lind wrote: Hi Martin, thanks for the hint, unfortunatly, it does not work :-( I've been looking through the relevant code and the approach seems right, however at some point, the returned values seem to be ignored and the link is still disabled (i.e. the onclick-handler is not rendered)... I will have to investigate further... J. On 09.05.2012 13:05, Martin Grigorov wrote: Hi, I think it is possible to do that for links. You'll need to override org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and org.apache.wicket.Component#canCallListenerInterface(Method) The first is needed to not render the link as disabled. The second is needed to be able to actually execute the links logic. The second method is added in 1.5.x. On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind wrote: Hi Martin, that was my initial approach. However, I would like the collapsible panels to keep their state between form submits, therefore I would need some sort of Javascript state management or I would simply use ajax links for that purpose. Which is what I would prefer... A later post already mentioned that this wont be too easy, so maybe I will have to go back to JS... J. On 09.05.2012 11:16, Martin Grigorov wrote: Hi, Why don't use plain Javascript for this. It will be faster because it wont make roundtrip to the server and wont be disabled as a Wicket component ? On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind wrote: Hi, I have a little problem in my application and maybe someone has an idea how to solve it: I have a complex form that is structured using a custom collapsible AJAX-panel to show/hide certain parts of the form. Now, if a user does not have the write permission for the form, the form is disabled and therefore all input elements as well (which is good). However, for obvious reaons, I would like the collapsible panels to remain enabled. How could I achieve this? I have already tried to have the ajax-link for the panel to always return true from isEnabled, but that seems to be overriden by the parent component. Any ideas where to look? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
it works! I export data to excell file, browser downloads excell file, but when I want to open excel file, it gives error as "corrupt in file" and doesnt open file, but I reopen file by the help. (as you can guess with the help of excell, corrupted files from left bar) I can say that FileoutputStream does work well, coz I can get excel file to my local without using RequestCycle. When I want to get file with RequestCycle via onclick property, I started to get error on excel file. But I have to output excel file with onclick , I dont need excell file on my local, client should get it :) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620633.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
On Wed, May 9, 2012 at 5:15 PM, khanshan wrote: > Mr. Grigorov, > > Any idea? You didn't tell us what happens after saving the HSSFWorkbook to a file with FileOutputStream. Or I didn't understand your previous message... > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620558.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Mr. Grigorov, Any idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620558.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Single sign on (SSO) for two WicketApplication
Anyone got some experience on this? 1. Maybe using the tomcat built in SSO for two applications? 2. Could one add a filter/Servlet that handles it for the two Wicket Applications? 3. Some products that anyone have good experience with? I have google on this but have not found any good 'how to' or tutorial. Any good links? Jens -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Single-sign-on-SSO-for-two-WicketApplication-tp4620516.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Status of wicketstuff jquery integration
Hi Hielke, It seems I was using an outdated version of WiQuery (1.2.3), but even then, I cant reproduce the extra 10M. It may be that I had the dependencies for WiQuery and something else added to the war at the same time, my apologies. wiquery-core 1.5.5 (and dependencies) adds just over 2MB new quickstart. (Probably worth it). Cheers, Jesse On 09/05/2012 10:38, Hielke Hoeve wrote: Hi Jesse, Your 10mb of WiQuery puzzles me. The wiquery-core jar is 256 KB and the wiquery-jquery-ui jar is 857KB. I wonder which jars you include in your war. If you do not use jQuery UI then there is no need for wiquery-jquery-ui. Hielke -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: woensdag 2 mei 2012 10:48 To: users@wicket.apache.org Subject: Status of wicketstuff jquery integration Hi All, I'm interested in using features of the jquery integration in wicketstuff, but it seems it is not being maintained. The version of jquery packaged with the wicketstuff-jquery jar seems to be 1.3.2, which is quite old already. Am I missing something? Is there a preferred way of integrating jquery into wicket? (WiQuery adds 10Mb to my war. JQWicket looks good, but why choose it over wicketstuff-jquery)? I also note that the wicketstuff-jquery project does not make use of the wicketstuff-jslibraries project. Why not? Is wicketstuff-jslibraries the officially recommended way of including js libraries, or should I look elsewhere? wicketstuff-jquery method of detecting jquery.js presence seems like a hack. Thanks, Jesse - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 and nested forms
Hey Martin, > WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894 > which says that this order is changed in 1.4.15 I upgraded to Wicket 1.5 from Wicket 1.4.20 and it still has been working with 1.4.20. This is the way how it works in 1.5/6.x. I'm not sure why it is not > documented. > > But there are different opinions about it: > > https://issues.apache.org/jira/browse/WICKET-3705 I just thought about it some more and I think the new behavior is quite counter intuitive. For instance my following usecase: final class CompoundForm extends BaseForm { > public CompoundSearchRequestForm(String id, final IModel model) { > super(id, model); > add(new BaseForm("baseForm", model)); > add(new ConfigurationForm("configurationForm", model)); > add(new SettingsForm("settingsForm", model)); > add(new AjaxButton("save") { > @Override > protected void onSubmit(AjaxRequestTarget target, Form form) { // do nothing -> delegated to form's onSubmit > } > }); > } > @Override > protected void onSubmit() { > super.onSubmit(); > listener.saveModel(getModelObject()); > } > } I moved the buttons onSubmit logic to the form's logic to mimic Wicket 1.4 behavior. This works, but the button is now pretty useless and just triggers a form submit. In the form's onSubmit on the other hand I don't have (direct) access to the AjaxRequestTarget so I'd have to split functionality into the two handlers and always think about which order they are called in. The problems get harder if you don't have complete control over the nested form structure. For instance, when you are using the Wizards from wicket-extensions. They always wrap their contents in a compound form. We use ajaxified versions of Wizards extensively and the new form submit flow makes them very hard to use. The next/finish/previous links of the wizard are now called before any of the actual forms inside the wizard had their onSubmit handler called. The buttons in fact *replace* the inner form before it has been submitted and I had to move the wizards state change logic to onConfigure to make it work again: @Override > public void onActiveStepChanged(IWizardStep newStep) { > // do nothing -> logic moved to #onConfigure to prevent replacement of the > form before validation of nested forms > } > @Override > protected void onConfigure() { > super.onConfigure(); > final IWizardStep activeStep = getActiveStep(); > getForm().replace(activeStep.getView(VIEW_ID, this, this)); > getForm().replace(activeStep.getHeader(HEADER_ID, this, this)); > } I worked around these problems but I'd greatly prefer a way to configure the form submit order somewhere. Ideally on the compound form or the ajax button. Thomas On Wed, May 9, 2012 at 1:24 PM, Martin Grigorov wrote: > On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov > wrote: > > Hi Thomas, > > > > On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl > wrote: > >> Hello, > >> > >> I notices a strange behavior after upgrading to Wicket 1.5. Nested forms > >> are submitted in a different order. > >> > >> I have structures like this: > >> > >> - Compound Form > >>> -- Subform 1 > >>> -- Subform 2 > >>> -- Subform 3 > >>> - Submit Link/Button for Compound Form > >> > >> > >> In Wicket 1.4 the order of calls to onSubmit was like this: > >> > >> 1. Subforms > >> 2. Compound Form > >> 3. Submit Link/Button > >> > >> In multiple locations I had logic in the subforms' onSubmit handlers > that > >> do cleanup, re-attaching of models to entities etc. before my links > submit > >> handler is called and persists my model object. > >> > >> In Wicket 1.5 the submit link's handler that I use for my main logic is > >> actually called before the subforms: > >> > >> 1. Submit Link > >> 2. Subforms > >> 3. Compound Form > >> > >> I can fix this by moving all my compound form logic from the > link/buttons > >> onSubmit handler to the compound form's handler, but wanted to check > first > >> if this behavior is intentional? > >> Is this the way to do it in Wicket 1.5? > > > > This is the way how it works in 1.5/6.x. I'm not sure why it is not > documented. > > But there are different opinions about it: > > https://issues.apache.org/jira/browse/WICKET-3705 > > WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894 > which says that this order is changed in 1.4.15 > > > > >> > >> Cheers, > >> > >> Thomas > > > > > > > > -- > > Martin Grigorov > > jWeekend > > Training, Consulting, Development > > http://jWeekend.com > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: TableComponentAsXlsHandler Problem
well, if you say so, we have problem :) I use FileOutputStream while generating excel file. For last hope I write my logic below here, onClick(){ HSSFWorkbook hwb; FileOutputStream fileOut; hwb.write(fileOut); byte[] bai = hwb.getBytes(); ByteArrayResource byteArrayResource = new ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); RequestCycle.get().scheduleRequestHandlerAfterCurrent(new ResourceRequestHandler(byteArrayResource, null)); } Do you have any extra idea? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620360.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
It seems "bai" (the byte array) is corrupted. Try to save it on the file system with FileOutputStream and open it in Excel. If it still says there is an error then this is the problem. On Wed, May 9, 2012 at 3:43 PM, khanshan wrote: > Hi there, > > I am almost handled my problem but. I have annoying problem with excel. > I get excell output file via > > ByteArrayResource byteArrayResource = new > ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); > RequestCycle.get().scheduleRequestHandlerAfterCurrent(new > ResourceRequestHandler(byteArrayResource, null)); > > when I try to open excell file, it gives error as "errors on file" and > doesnt open, Do I have to add some more attributes in some functions or I do > mistakes while generating excell file? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620321.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TableComponentAsXlsHandler Problem
Hi there, I am almost handled my problem but. I have annoying problem with excel. I get excell output file via ByteArrayResource byteArrayResource = new ByteArrayResource("application/vnd.ms-excel", bai, "ayrint.xls"); RequestCycle.get().scheduleRequestHandlerAfterCurrent(new ResourceRequestHandler(byteArrayResource, null)); when I try to open excell file, it gives error as "errors on file" and doesnt open, Do I have to add some more attributes in some functions or I do mistakes while generating excell file? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TableComponentAsXlsHandler-Problem-tp4616754p4620321.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force child component enabled
Hi Martin, thanks for the hint, unfortunatly, it does not work :-( I've been looking through the relevant code and the approach seems right, however at some point, the returned values seem to be ignored and the link is still disabled (i.e. the onclick-handler is not rendered)... I will have to investigate further... J. On 09.05.2012 13:05, Martin Grigorov wrote: Hi, I think it is possible to do that for links. You'll need to override org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and org.apache.wicket.Component#canCallListenerInterface(Method) The first is needed to not render the link as disabled. The second is needed to be able to actually execute the links logic. The second method is added in 1.5.x. On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind wrote: Hi Martin, that was my initial approach. However, I would like the collapsible panels to keep their state between form submits, therefore I would need some sort of Javascript state management or I would simply use ajax links for that purpose. Which is what I would prefer... A later post already mentioned that this wont be too easy, so maybe I will have to go back to JS... J. On 09.05.2012 11:16, Martin Grigorov wrote: Hi, Why don't use plain Javascript for this. It will be faster because it wont make roundtrip to the server and wont be disabled as a Wicket component ? On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind wrote: Hi, I have a little problem in my application and maybe someone has an idea how to solve it: I have a complex form that is structured using a custom collapsible AJAX-panel to show/hide certain parts of the form. Now, if a user does not have the write permission for the form, the form is disabled and therefore all input elements as well (which is good). However, for obvious reaons, I would like the collapsible panels to remain enabled. How could I achieve this? I have already tried to have the ajax-link for the panel to always return true from isEnabled, but that seems to be overriden by the parent component. Any ideas where to look? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
igor's select2 script
hi in order not to duplicate work: is there a wicket wrapper component out there using igor's select2 script, already? cu uwe - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
JIRA Issue https://issues.apache.org/jira/browse/WICKET-4545 with quickstart created. Thanks for the "awkward" hint and for the quick hack. I'll use a Panel instead. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968p4620173.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 and nested forms
On Wed, May 9, 2012 at 2:22 PM, Martin Grigorov wrote: > Hi Thomas, > > On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl wrote: >> Hello, >> >> I notices a strange behavior after upgrading to Wicket 1.5. Nested forms >> are submitted in a different order. >> >> I have structures like this: >> >> - Compound Form >>> -- Subform 1 >>> -- Subform 2 >>> -- Subform 3 >>> - Submit Link/Button for Compound Form >> >> >> In Wicket 1.4 the order of calls to onSubmit was like this: >> >> 1. Subforms >> 2. Compound Form >> 3. Submit Link/Button >> >> In multiple locations I had logic in the subforms' onSubmit handlers that >> do cleanup, re-attaching of models to entities etc. before my links submit >> handler is called and persists my model object. >> >> In Wicket 1.5 the submit link's handler that I use for my main logic is >> actually called before the subforms: >> >> 1. Submit Link >> 2. Subforms >> 3. Compound Form >> >> I can fix this by moving all my compound form logic from the link/buttons >> onSubmit handler to the compound form's handler, but wanted to check first >> if this behavior is intentional? >> Is this the way to do it in Wicket 1.5? > > This is the way how it works in 1.5/6.x. I'm not sure why it is not > documented. > But there are different opinions about it: > https://issues.apache.org/jira/browse/WICKET-3705 WICKET-3705 links to https://issues.apache.org/jira/browse/WICKET-1894 which says that this order is changed in 1.4.15 > >> >> Cheers, >> >> Thomas > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5 and nested forms
Hi Thomas, On Wed, May 9, 2012 at 2:12 PM, Thomas Heigl wrote: > Hello, > > I notices a strange behavior after upgrading to Wicket 1.5. Nested forms > are submitted in a different order. > > I have structures like this: > > - Compound Form >> -- Subform 1 >> -- Subform 2 >> -- Subform 3 >> - Submit Link/Button for Compound Form > > > In Wicket 1.4 the order of calls to onSubmit was like this: > > 1. Subforms > 2. Compound Form > 3. Submit Link/Button > > In multiple locations I had logic in the subforms' onSubmit handlers that > do cleanup, re-attaching of models to entities etc. before my links submit > handler is called and persists my model object. > > In Wicket 1.5 the submit link's handler that I use for my main logic is > actually called before the subforms: > > 1. Submit Link > 2. Subforms > 3. Compound Form > > I can fix this by moving all my compound form logic from the link/buttons > onSubmit handler to the compound form's handler, but wanted to check first > if this behavior is intentional? > Is this the way to do it in Wicket 1.5? This is the way how it works in 1.5/6.x. I'm not sure why it is not documented. But there are different opinions about it: https://issues.apache.org/jira/browse/WICKET-3705 > > Cheers, > > Thomas -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5 and nested forms
Hello, I notices a strange behavior after upgrading to Wicket 1.5. Nested forms are submitted in a different order. I have structures like this: - Compound Form > -- Subform 1 > -- Subform 2 > -- Subform 3 > - Submit Link/Button for Compound Form In Wicket 1.4 the order of calls to onSubmit was like this: 1. Subforms 2. Compound Form 3. Submit Link/Button In multiple locations I had logic in the subforms' onSubmit handlers that do cleanup, re-attaching of models to entities etc. before my links submit handler is called and persists my model object. In Wicket 1.5 the submit link's handler that I use for my main logic is actually called before the subforms: 1. Submit Link 2. Subforms 3. Compound Form I can fix this by moving all my compound form logic from the link/buttons onSubmit handler to the compound form's handler, but wanted to check first if this behavior is intentional? Is this the way to do it in Wicket 1.5? Cheers, Thomas
Re: Force child component enabled
Hi, I think it is possible to do that for links. You'll need to override org.apache.wicket.markup.html.link.AbstractLink#isLinkEnabled() and org.apache.wicket.Component#canCallListenerInterface(Method) The first is needed to not render the link as disabled. The second is needed to be able to actually execute the links logic. The second method is added in 1.5.x. On Wed, May 9, 2012 at 1:47 PM, Jürgen Lind wrote: > Hi Martin, > > that was my initial approach. However, I would like the collapsible panels > to keep their > state between form submits, therefore I would need some sort of Javascript > state management > or I would simply use ajax links for that purpose. Which is what I would > prefer... A later > post already mentioned that this wont be too easy, so maybe I will have to > go back to JS... > > J. > > > On 09.05.2012 11:16, Martin Grigorov wrote: >> >> Hi, >> >> Why don't use plain Javascript for this. It will be faster because it >> wont make roundtrip to the server and wont be disabled as a Wicket >> component ? >> >> On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind >> wrote: >>> >>> Hi, >>> >>> I have a little problem in my application and maybe someone has an idea >>> how >>> to solve it: >>> I have a complex form that is structured using a custom collapsible >>> AJAX-panel to show/hide >>> certain parts of the form. Now, if a user does not have the write >>> permission >>> for the form, the >>> form is disabled and therefore all input elements as well (which is >>> good). >>> However, for >>> obvious reaons, I would like the collapsible panels to remain enabled. >>> How >>> could I achieve >>> this? I have already tried to have the ajax-link for the panel to always >>> return true from >>> isEnabled, but that seems to be overriden by the parent component. Any >>> ideas >>> where to look? >>> >>> Cheers, >>> >>> Jürgen >>> >>> >>> - >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> >> >> > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
I had the same problem. I solved it by using the transparent container as markup provider for the fragment: add(new MyFragment("fragmentId", getTransparentBodyContainer())) It works, but is kind of awkward, as subclasses shouldn't really know about transparent containers in the base class. Thomas On Wed, May 9, 2012 at 12:52 PM, Martin Grigorov wrote: > Hi, > > Create a ticket with a quickstart please. > As a workaround you can put the fragment in the base page's html. > > On Wed, May 9, 2012 at 1:18 PM, Dirk Forchel > wrote: > > Hello, > > I've a question regarding Fragements inside a > TransparentWebMarkupContainer. > > I've a base WebPage with a TransparentWebMarkupContainer to allow > subclasses > > register CSS classes on the body tag. If I add a Fragment to one of these > > subsclasses, the markup of the Fragment is not found. > > > > BasePage.java > > > > Markup of BasePage.html > > > > My subclass looks like: > > > > Markup of FragmentTestPage.html > > > > > > Why is it not possible to do this!? And why doesn't find the > > FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in > the > > providong markup container (Page class FragmentTestPage)? > > > > > > -- > > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
Hi, Create a ticket with a quickstart please. As a workaround you can put the fragment in the base page's html. On Wed, May 9, 2012 at 1:18 PM, Dirk Forchel wrote: > Hello, > I've a question regarding Fragements inside a TransparentWebMarkupContainer. > I've a base WebPage with a TransparentWebMarkupContainer to allow subclasses > register CSS classes on the body tag. If I add a Fragment to one of these > subsclasses, the markup of the Fragment is not found. > > BasePage.java > > Markup of BasePage.html > > My subclass looks like: > > Markup of FragmentTestPage.html > > > Why is it not possible to do this!? And why doesn't find the > FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in the > providong markup container (Page class FragmentTestPage)? > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force child component enabled
Hi Martin, that was my initial approach. However, I would like the collapsible panels to keep their state between form submits, therefore I would need some sort of Javascript state management or I would simply use ajax links for that purpose. Which is what I would prefer... A later post already mentioned that this wont be too easy, so maybe I will have to go back to JS... J. On 09.05.2012 11:16, Martin Grigorov wrote: Hi, Why don't use plain Javascript for this. It will be faster because it wont make roundtrip to the server and wont be disabled as a Wicket component ? On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind wrote: Hi, I have a little problem in my application and maybe someone has an idea how to solve it: I have a complex form that is structured using a custom collapsible AJAX-panel to show/hide certain parts of the form. Now, if a user does not have the write permission for the form, the form is disabled and therefore all input elements as well (which is good). However, for obvious reaons, I would like the collapsible panels to remain enabled. How could I achieve this? I have already tried to have the ajax-link for the panel to always return true from isEnabled, but that seems to be overriden by the parent component. Any ideas where to look? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
MarkupNotFoundException for Fragment and TransparentWebMarkupContainer
Hello, I've a question regarding Fragements inside a TransparentWebMarkupContainer. I've a base WebPage with a TransparentWebMarkupContainer to allow subclasses register CSS classes on the body tag. If I add a Fragment to one of these subsclasses, the markup of the Fragment is not found. BasePage.java Markup of BasePage.html My subclass looks like: Markup of FragmentTestPage.html Why is it not possible to do this!? And why doesn't find the FragmentMarkupSourcingStrategy the markup for Fragment "testFragment" in the providong markup container (Page class FragmentTestPage)? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/MarkupNotFoundException-for-Fragment-and-TransparentWebMarkupContainer-tp4619968.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force child component enabled
Hi! I'd make this case more general -- we have faced the one like this in non-JS-case. For instance, there is a Panel which contains a DataTable. Each row of datatable represents a Document. Each row contains a set of buttons - Edit Confirm and Download. When panel is hidden due to security (isVisibleInHierarchy and authorization strategy) no issues here. However, in a case when we make the whole panel disabled with the permissions, everything would be disabled within this panel. It is good for Edit, Confirm buttons. It is not good for Download button. Requirement and common sense allow for viewing everything. I was unable to get this on easily :( Issue is that Component's both isEnableAllowed (bindings to the auth strategy) and isEnabledInHierarchy(traversing up component tree) are final. Thus there is no way to make an 'exception' for certain components. In our case, if the parent panel is disabled, everything within it would be disabled, with no exceptions. And we need an exception. We had to go the hard way of making our own layer of components which support more flexible enabled/readonly behavior -- extending every single component. Also, instead of using built-in MetaDataRoleAuthorizationStrategy which is looped into component's life cycle we had to bind this behavior in the compat layer component's own lifecycle (binding to onBeforeRender and modifying isEnabled accordingly). Maybe there's some better way that we missed? Using wicket 1.4 Thank you all! br, alex. 2012/5/9 Martin Grigorov > Hi, > > Why don't use plain Javascript for this. It will be faster because it > wont make roundtrip to the server and wont be disabled as a Wicket > component ? > > On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind > wrote: > > Hi, > > > > I have a little problem in my application and maybe someone has an idea > how > > to solve it: > > I have a complex form that is structured using a custom collapsible > > AJAX-panel to show/hide > > certain parts of the form. Now, if a user does not have the write > permission > > for the form, the > > form is disabled and therefore all input elements as well (which is > good). > > However, for > > obvious reaons, I would like the collapsible panels to remain enabled. > How > > could I achieve > > this? I have already tried to have the ajax-link for the panel to always > > return true from > > isEnabled, but that seems to be overriden by the parent component. Any > ideas > > where to look? > > > > Cheers, > > > > Jürgen > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Alexander Cherednichenko [ the only way out is the way up ]
Re: Force child component enabled
Hi, Why don't use plain Javascript for this. It will be faster because it wont make roundtrip to the server and wont be disabled as a Wicket component ? On Wed, May 9, 2012 at 12:06 PM, Jürgen Lind wrote: > Hi, > > I have a little problem in my application and maybe someone has an idea how > to solve it: > I have a complex form that is structured using a custom collapsible > AJAX-panel to show/hide > certain parts of the form. Now, if a user does not have the write permission > for the form, the > form is disabled and therefore all input elements as well (which is good). > However, for > obvious reaons, I would like the collapsible panels to remain enabled. How > could I achieve > this? I have already tried to have the ajax-link for the panel to always > return true from > isEnabled, but that seems to be overriden by the parent component. Any ideas > where to look? > > Cheers, > > Jürgen > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5.6 Relative URL rendering
to create an absolute url use: requestCycle.getUrlRenderer().renderFullUrl(relativeUrl.toString()) On Wed, May 9, 2012 at 12:07 PM, Thomas Heigl wrote: > Hey Martin, > > Thanks for the explanation! > > How exactly the home page is broken ? Do you have custom RequestMapper >> for the home page ? > > > The problem is in absolute URL generation. I generate absolute URLs for > sitemaps, canonical URL tags etc and my logic broke after upgrading to > Wicket 1.5.6 because my "URL absolutizer" was confused by "./." for the > homepage. > > I don't use a request mapper for the homepage. Would it solve the problem > to mount the homepage under "/"? > > Cheers, > > Thomas > > On Wed, May 9, 2012 at 11:00 AM, Martin Grigorov wrote: > >> Hi, >> >> They have always been relative. >> Before 1.5.6: some/relative/url >> After 1.5.6: ./somerelative/url >> >> Both are the same. The reason is >> https://issues.apache.org/jira/browse/WICKET-4260 >> >> How exactly the home page is broken ? Do you have custom RequestMapper >> for the home page ? >> >> On Wed, May 9, 2012 at 11:56 AM, Thomas Heigl wrote: >> > Hello, >> > >> > Since Wicket 1.5.6, the UrlRender generates all URLs prefixed with "./" >> > when using RequestCycle.get().urlFor(pageClass). The Problem is that for >> my >> > application's homepage the generated URL is "./." which does not really >> > make sense. >> > >> > Is there any reason for doing this? What caused the change to relative >> URL >> > rendering? >> > >> > Cheers, >> > >> > Thomas >> >> >> >> -- >> Martin Grigorov >> jWeekend >> Training, Consulting, Development >> http://jWeekend.com >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5.6 Relative URL rendering
Hey Martin, Thanks for the explanation! How exactly the home page is broken ? Do you have custom RequestMapper > for the home page ? The problem is in absolute URL generation. I generate absolute URLs for sitemaps, canonical URL tags etc and my logic broke after upgrading to Wicket 1.5.6 because my "URL absolutizer" was confused by "./." for the homepage. I don't use a request mapper for the homepage. Would it solve the problem to mount the homepage under "/"? Cheers, Thomas On Wed, May 9, 2012 at 11:00 AM, Martin Grigorov wrote: > Hi, > > They have always been relative. > Before 1.5.6: some/relative/url > After 1.5.6: ./somerelative/url > > Both are the same. The reason is > https://issues.apache.org/jira/browse/WICKET-4260 > > How exactly the home page is broken ? Do you have custom RequestMapper > for the home page ? > > On Wed, May 9, 2012 at 11:56 AM, Thomas Heigl wrote: > > Hello, > > > > Since Wicket 1.5.6, the UrlRender generates all URLs prefixed with "./" > > when using RequestCycle.get().urlFor(pageClass). The Problem is that for > my > > application's homepage the generated URL is "./." which does not really > > make sense. > > > > Is there any reason for doing this? What caused the change to relative > URL > > rendering? > > > > Cheers, > > > > Thomas > > > > -- > Martin Grigorov > jWeekend > Training, Consulting, Development > http://jWeekend.com > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Force child component enabled
Hi, I have a little problem in my application and maybe someone has an idea how to solve it: I have a complex form that is structured using a custom collapsible AJAX-panel to show/hide certain parts of the form. Now, if a user does not have the write permission for the form, the form is disabled and therefore all input elements as well (which is good). However, for obvious reaons, I would like the collapsible panels to remain enabled. How could I achieve this? I have already tried to have the ajax-link for the panel to always return true from isEnabled, but that seems to be overriden by the parent component. Any ideas where to look? Cheers, Jürgen - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 1.5.6 Relative URL rendering
Hi, They have always been relative. Before 1.5.6: some/relative/url After 1.5.6: ./somerelative/url Both are the same. The reason is https://issues.apache.org/jira/browse/WICKET-4260 How exactly the home page is broken ? Do you have custom RequestMapper for the home page ? On Wed, May 9, 2012 at 11:56 AM, Thomas Heigl wrote: > Hello, > > Since Wicket 1.5.6, the UrlRender generates all URLs prefixed with "./" > when using RequestCycle.get().urlFor(pageClass). The Problem is that for my > application's homepage the generated URL is "./." which does not really > make sense. > > Is there any reason for doing this? What caused the change to relative URL > rendering? > > Cheers, > > Thomas -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.5.6 Relative URL rendering
Hello, Since Wicket 1.5.6, the UrlRender generates all URLs prefixed with "./" when using RequestCycle.get().urlFor(pageClass). The Problem is that for my application's homepage the generated URL is "./." which does not really make sense. Is there any reason for doing this? What caused the change to relative URL rendering? Cheers, Thomas
RE: Status of wicketstuff jquery integration
Hi Jesse, Your 10mb of WiQuery puzzles me. The wiquery-core jar is 256 KB and the wiquery-jquery-ui jar is 857KB. I wonder which jars you include in your war. If you do not use jQuery UI then there is no need for wiquery-jquery-ui. Hielke -Original Message- From: Jesse Long [mailto:j...@unknown.za.net] Sent: woensdag 2 mei 2012 10:48 To: users@wicket.apache.org Subject: Status of wicketstuff jquery integration Hi All, I'm interested in using features of the jquery integration in wicketstuff, but it seems it is not being maintained. The version of jquery packaged with the wicketstuff-jquery jar seems to be 1.3.2, which is quite old already. Am I missing something? Is there a preferred way of integrating jquery into wicket? (WiQuery adds 10Mb to my war. JQWicket looks good, but why choose it over wicketstuff-jquery)? I also note that the wicketstuff-jquery project does not make use of the wicketstuff-jslibraries project. Why not? Is wicketstuff-jslibraries the officially recommended way of including js libraries, or should I look elsewhere? wicketstuff-jquery method of detecting jquery.js presence seems like a hack. Thanks, Jesse - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket 6.0
I'm back on my Wicket project tomorrow, so I'll give it spin. Dank je. Tom On 2012-05-09 10:31, Hielke Hoeve wrote: Hi Tom, We now have a working WiQuery 6. I will release a new snapshot tonight, but you can clone it from github already. Hielke -Original Message- From: Tom Eugelink [mailto:t...@tbee.org] Sent: vrijdag 13 april 2012 14:44 To: users@wicket.apache.org Subject: Re: wicket 6.0 On 2012-04-13 14:24, Martin Grigorov wrote: How many of you tried beta1 ? I started off with 6, but was afraid things like wiquery would conflict in the usage of jquery, so I returned to safety using 1.5.5. Should that be a problem? Otherwise I'll upgrade back to 6. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wicket 6.0
Hi Tom, We now have a working WiQuery 6. I will release a new snapshot tonight, but you can clone it from github already. Hielke -Original Message- From: Tom Eugelink [mailto:t...@tbee.org] Sent: vrijdag 13 april 2012 14:44 To: users@wicket.apache.org Subject: Re: wicket 6.0 On 2012-04-13 14:24, Martin Grigorov wrote: > > How many of you tried beta1 ? > I started off with 6, but was afraid things like wiquery would conflict in the usage of jquery, so I returned to safety using 1.5.5. Should that be a problem? Otherwise I'll upgrade back to 6. Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org