RE: tags!
Bas, Awesome - thanks for find that! I does explain a few things... My code was something like; Which - from your link - would suggest this is a really bad idea... I'm pretty sure in certain cases this causes the second subComponent2 to render outside the parent, causing a break in the hierarchy, the Ajax responses to not correctly identify the existing components, and in turn causing duplicates. >> There is nothing special in Wicket code about tag. I didn't think this would be a Wicket issue per se, more of DOM or JQuery issue, that had a weird knock-on effect on Wicket. I was wondering if Wicket people had experience of it. I think the upshot of this; don't use tags for random formatting! :) Thanks Martin and Bas - all interesting stuff - I appreciate your inputs! :) Cheers, Col. From: Bas Gooren [b...@iswd.nl] Sent: 10 September 2013 05:52 To: users@wicket.apache.org Subject: Re: tags! Could it be related to http://stackoverflow.com/questions/10763780/putting-div-inside-p-is-adding-an-extra-p ? I've seen odd behavior before when using block-level elements inside p-tags. However, from your e-mail it's not entirely clear what your html looks like. "Subcomponents of mainpanel were wrapped in p-tags" does sound like you may have divs inside p tags. Met vriendelijke groet, Kind regards, Bas Gooren Op 9-9-2013 4:28, schreef Colin Rogers: > Wicketeers! > > I have an odd bug, that has been resolved, but I it doesn't explain what and > why the issue existed - and with a view to avoiding the issue in future, I > thought I should seek some wisdom! :) > > Basically - I have a application where the 'main panel' is replaced as a link > is clicked (along with other panels, too) - oddly, when I hit certain links > repeatedly, instead of the mainPanel simply replacing the old version and > updating, it produced duplicates - no duplicates in the other panels, just > the mainPanel. Meaning I had the same panel repeated from each click down the > page. > > After tons of reverting on code, hacking and experimenting, I finally found > the culprit... yep; tags. When any of my sub-components of mainPanel were > wrapped in tags, it caused the parent to duplicate instead of replace. > Replace the tag with a and everything works fine. So obviously I > have a perfectly good solution! > > Does anyone have an explanation for this? I'm totally stumped as to why > tags would cause issues in the DOM? > > Cheers, > Col. > EMAIL DISCLAIMER This email message and its attachments are confidential and > may also contain copyright or privileged material. If you are not the > intended recipient, you may not forward the email or disclose or use the > information contained in it. If you have received this email message in > error, please advise the sender immediately by replying to this email and > delete the message and any associated attachments. Any views, opinions, > conclusions, advice or statements expressed in this email message are those > of the individual sender and should not be relied upon as the considered > view, opinion, conclusions, advice or statement of this company except where > the sender expressly, and with authority, states them to be the considered > view, opinion, conclusions, advice or statement of this company. Every care > is taken but we recommend that you scan any attachments for viruses. > EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AutoCompleteTextField & suggestions popup position issue when container has scrollbar
Hi, the issue was tracked here https://issues.apache.org/jira/browse/WICKET-5343. You can see the fix in the following commit: https://git-wip-us.apache.org/repos/asf?p=wicket.git;a=commitdiff;h=072dd52e Hi, Can you please provide me the call [new call] details, when you create one. Thanks, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242p4661267.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: tags!
Could it be related to http://stackoverflow.com/questions/10763780/putting-div-inside-p-is-adding-an-extra-p ? I've seen odd behavior before when using block-level elements inside p-tags. However, from your e-mail it's not entirely clear what your html looks like. "Subcomponents of mainpanel were wrapped in p-tags" does sound like you may have divs inside p tags. Met vriendelijke groet, Kind regards, Bas Gooren Op 9-9-2013 4:28, schreef Colin Rogers: Wicketeers! I have an odd bug, that has been resolved, but I it doesn't explain what and why the issue existed - and with a view to avoiding the issue in future, I thought I should seek some wisdom! :) Basically - I have a application where the 'main panel' is replaced as a link is clicked (along with other panels, too) - oddly, when I hit certain links repeatedly, instead of the mainPanel simply replacing the old version and updating, it produced duplicates - no duplicates in the other panels, just the mainPanel. Meaning I had the same panel repeated from each click down the page. After tons of reverting on code, hacking and experimenting, I finally found the culprit... yep; tags. When any of my sub-components of mainPanel were wrapped in tags, it caused the parent to duplicate instead of replace. Replace the tag with a and everything works fine. So obviously I have a perfectly good solution! Does anyone have an explanation for this? I'm totally stumped as to why tags would cause issues in the DOM? Cheers, Col. EMAIL DISCLAIMER This email message and its attachments are confidential and may also contain copyright or privileged material. If you are not the intended recipient, you may not forward the email or disclose or use the information contained in it. If you have received this email message in error, please advise the sender immediately by replying to this email and delete the message and any associated attachments. Any views, opinions, conclusions, advice or statements expressed in this email message are those of the individual sender and should not be relied upon as the considered view, opinion, conclusions, advice or statement of this company except where the sender expressly, and with authority, states them to be the considered view, opinion, conclusions, advice or statement of this company. Every care is taken but we recommend that you scan any attachments for viruses.
Re: How to clear autoComplete textfield in Wicket after submit?
To add: The autoCompleteTextField input field clears the first time, but when I try it again. The string: autoString will be null. So if you choose your selection on first attempt (from the search list provided), hit select button, it gives you the correct string and clears. But when you do it for a second time, selected a provided value, the "autoString" will be null.. and will not get the input value assigned to it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-clear-autoComplete-textfield-in-Wicket-after-submit-tp4661268p4661269.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
How to clear autoComplete textfield in Wicket after submit?
I'm having issues clearing the input of a autoComplete Textfield.. For some reason whenever I call target.add(reference to AutoCompleteTextField); my input values are null... So basically, I can clear the referenced string the input is stored in, but everytime I call an ajaxupdate it nulls. I tried both ajaxButton, and AjaxSubmitLink. Both get the same reactions. I have a button to submit the input from the textField. Code: Select private void autoCompleteForm() { findRoleForm = new Form("autoCompleteForm"); findRoleForm.setOutputMarkupId(true); addOrReplace(findRoleForm); field = new AutoCompleteTextField("autoCompleteTextField", new PropertyModel(this,"autoString")) { @Override protected Iterator getChoices(String input) { if (Strings.isEmpty(input)) { List emptyList = Collections.emptyList(); return emptyList.iterator(); } List choices = new ArrayList(10); for (final Role role : rolesList) { final String roles = role.getRoleName(); if (roles.toUpperCase().startsWith(input.toUpperCase())) { choices.add(roles); if (choices.size() == 10) { break; } } } return choices.iterator(); } }; findRoleForm.addOrReplace(field); findRoleForm.addOrReplace(new AjaxSubmitLink("selectRoleBtn", findRoleForm) { protected void onSubmit(AjaxRequestTarget target, Form form) { System.out.println("here1" + autoString); if(rolesList != null && autoString!= null) { if(rolesList .size() != 0) { for(int i=0; i < rolesList .size(); i++) { System.out.println("here2" + autoString); if(rolesList .get(i).getRoleName().equals(autoString)) { role = rolesList.get(i); roleInformation.addOrReplace(new Label("roleNameTxt", role.getRoleName())); roleInformation.addOrReplace(new Label("roleAliasTxt", role.getRoleAlias())); roleInformation.addOrReplace(new Label("roleOwnerTxt", role.getRoleOwnerId())); roleInformation.addOrReplace(new Label("roleStatusTxt", role.getRoleAccessStatus())); roleInformation.addOrReplace(new Label("roleCategoryTxt", role.getRoleCategoryName())); roleInformation.addOrReplace(new Label("roleDescriptionTxt", role.getRoleDescription())); roleInformation.addOrReplace(new Label("roleValidityTxt", role.getRoleValidityStatus())); roleInformation.addOrReplace(new Label("roleNumUsers", "")); //add adOrReplace(findRoleForm); autoString = ""; target.add(field); target.add(roleInformation); currentRoleSelection = null; target.add(rolesDropDownChoice); break; } } } } } }).add(getIndicatorAppender()); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-clear-autoComplete-textfield-in-Wicket-after-submit-tp4661268.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: AutoCompleteTextField & suggestions popup position issue when container has scrollbar
Hi, Can you please provide me the call [new call] details, when you create one. Thanks, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AutoCompleteTextField-suggestions-popup-position-issue-when-container-has-scrollbar-tp4661242p4661267.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: Securing Wicket 6.x Applications with Java EE, Spring & Jetty
On 09/09/2013 01:21 AM, Martin Grigorov wrote: Thank you very much for sharing your knowledge with us, Shawn! Please let us know when you publish the second document. My pleasure Martin. I've been using this forum and it's time for me to contribute something. Hope it helps. Shawn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Test based on AbstractWicketTest fails with "No RequestCycle is currently set"
On Mon, September 09, 2013, Martin Dietze wrote: > No, nothing of that kind. It's just a helper to make sure noone > uses Ajax on components which are added to the markup as > "..". OK, that one is solved, too. After replacing the Application used in this test by the one created to solve the other problem (related to the resources for JS and CSS), this problem disappeared. Obviously the problem I saw in the stack trace was misleading here. Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Ed is the standard text editor. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Tests based on WicketTester: NPE in ConcatBundleResource.readAllResources
On Sat, September 07, 2013, Martin Grigorov wrote: > > > Is there a chance that you create a bundle without any > > resource(reference) ? > > > > Not quite sure I understand this correctly, > > > > In YourApplication#init() you something like: > getResourceBundles().addXyzBundle(Class, String, resourceReferences*). > For some reason some of the references cannot load its resource data. OK, I've now isolated any code dealing with resource bundles for JS and CSS in my Application and created a TestApplication class in which this isolated method is overridden as empty, so that resources are not used at all. Now the test no longer fails. If I should need this piece to work with tests in the future, I guess I will have to go through the configuration (file system paths for the stuff loaded in the resources) to get this working? Thank you again! M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= Die groessten Liebesgeschichten sind die, die nie stattgefunden haben - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Test based on AbstractWicketTest fails with "No RequestCycle is currently set"
On Sat, September 07, 2013, Martin Grigorov wrote: > > com.mycompany.request.WicketContainerChecker.onInstantiation(WicketContainerChecker.java:48) > > > > What is this doing ? > Does it start a new thread by chance ? > Or doing something like: ThreadContext.detach() / > ThreadContext.setRequestCycle(null) No, nothing of that kind. It's just a helper to make sure noone uses Ajax on components which are added to the markup as "..". The code goes like this: | public class WicketContainerChecker implements IComponentInstantiationListener { | private static final Behavior BEHAVIOR = new Behavior() { | private static final long serialVersionUID = 1L; | | @Override | public void onComponentTag( final Component component, final ComponentTag tag ) { | if ( tag instanceof WicketTag && "container".equals( tag.getName() ) && component.getOutputMarkupId() ) { | throw new IllegalStateException( "Component " + component + " requests a markup id (" + component.getMarkupId() + ") but is attached to " + tag | + "! This will not work in deployment mode!" ); | } | } | }; | | @Override | public void onInstantiation( Component component ) { | component.add( BEHAVIOR ); | } | } Cheers, M'bert -- --- / http://herbert.the-little-red-haired-girl.org / - =+= WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org