Re: ModalWindow alert popup that submits form
Issue Resolved. Another part of the code was found to be setting it back to false in a way that evaded my previous searches. Once that was corrected, the AjaxButton behaves as expected. Sorry to waste your time. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow alert popup that submits form
The panel that launches the modal is not inside the form (it's part of a standard header), so when i remove it from the constructor I get an illegal state exception saying "form was not specified in the constructor and cannot be found in the hierarchy of the component this behavior is attached to" -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow alert popup that submits form
We have a custom popup alert box launched from wicket. It's build around org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow. It works great in most situations where it's just messaging and doing other not-validating things. But one of the buttons in one scenario needs to cause a save (and validate) of the form. The buttons are based on AjaxButton, and the defaultformprocessing flag was set to true on that button during initialization. the button has reference back to the form on the main page (the form is not INSIDE the modal). But everytime I submit, the onSubmit() runs instead of the onError() despite the fact that I deliberately put a validation error in the text that DOES get trapped on the normal submit process. Does anyone have an idea of where I should look? or if this is just something you can't do from inside a modalwindow? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket 1.4 equivalent of FeedbackCollector
I have a little chunk of re-usable code I wrote in some of our more modern apps that I've been asked to add to a couple apps we have that are very old. they're still on wicket 1.4 and the boss doesn't want to invest in upgrading them wholesale, but just wants this one feature put in. It relies on FeedbackCollector. Is there a 1.4 equivalent for the FeedbackCollector? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
Okay, nevermind. I solved that by using a MutationObserver in javascript to look for the thing Wicket makes visible or not and invoke my javascript as needed. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
I just tried that and in terms of timing, it's perfect! However, my front-end guys put together a multi-piece veil that blocks input, displays our spinny, but also does some accessibility stuff and focus stuff that they consider important. I'm going to go talk to them and see if they can live with just a show/hide, but I have a strong hunch they'll balk. Is there a way I can invoke a piece of javascript to show/hide respectively, instead of giving an id to show/hide? Maybe something I can override? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
Sven, I'm afraid I don't know what you mean. Our real jQuery expert quit abruptly and hasn't been replaced yet, so I'm sorry if this is a jQuery thing, but your last two paragraphs don't make sense to me. What is attrs.i? It's not on the object from what I see in the F12 tools. There's alot of one and two letter vars, but not i. I assume by AJAX_CALL_BEFORE you mean subscribe to /ajax/call/before, which I can do. Are you suggesting that I can launch the veil there? I am currently launching it in beforeSend. But how would it automatically remove it? Removing it at the right time is of course the issue. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
And I should add that the third parameter, which the docs imply is the jqXHR object, which is where I would expect the response to be, is null in these callbacks. i tried subscribing to the /ajax/call/success handler as well and it was null there. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
That sounds great. But as I look through the jqEvent and attributes objects I don't see what element is the response headers. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Need an event later than 'done'
That seems promising. If you could look how you did it in your other project that would be great. I suppose if I could get access to the response XML I could look for the redirect in that. I'm not sure where it is though or even if it's provided to this event. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Need an event later than 'done'
In our app we display a veil after any button click that goes to the server to prevent users double-submitting. Which they do. Alot. Double-submits cause a variety of mischief for us ranging from StaleObjectExceptions in hibernate to wicket exceptions about buttons not being enabled and others. So we add the veil, and then (for ajax) close it thusly: Wicket.Event.subscribe('/ajax/call/done', function(jqEvent, attributes, jqXHR, errorThrown, textStatus) { // console.log("done"); if(attributes) { if(attributes.event) { if(isVeiled(attributes.event.currentTarget)) { closeVeil(); } } } } ); The problem is that this /ajax/call/done doesn't seem to fire when the request is REALLY done, but rather a bit BEFORE it's done. We're getting the same behavior, especially when an ajax event transitions from one page to the next. The veil unloads, and there's a pause just before the redirect kicks in during which the user assumes the same page is being seen and their click was ignored...so they click again. Is there a better/later event during which i can unload the veil? A /ajax/call/really_done? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Feedback messages not showing on first request
The isVisible(): assetLookupOptionsFP = new FeedbackPanel("assetLookupOptionsFP"){ private static final long serialVersionUID = 1L; @Override public boolean isVisible() { if (anyMessage()){ return true; } else { return false; } } }; -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Feedback messages not showing on first request
We have a page where we are being required to have multiple feedback panels, and to show messages in various ones depending on the error. Our solution was to use message filters and to put the messages against certain containers to say 'any message in container X goes to feedback panel X'. You can see the code below for example. The request thing is just to set the class of the feedbackpanel to a different value. But we also control the visibility of the panel by checking 'anyMessage()'. So if there's no errors, no feedback shows. This all works...except on the first request. For some reason when I click the button, I can see the error (it's added during the onSubmit(), not during the normal validation step if that makes a difference) added to the assetLookupOptionsWMC, but then when anyMessage() runs, it doesn't find the error. Click the button a second time, and it works perfectly. Any idea why? assetLookupOptionsFP.setFilter(new IFeedbackMessageFilter(){ private static final long serialVersionUID = 1L; @Override public boolean accept(FeedbackMessage msg) { Component reporter = msg.getReporter(); HttpServletRequest request = ((HttpServletRequest) getRequest().getContainerRequest()); if (reporter.getId().equals("assetLookupOptionsWMC")){ if(msg.isError()) request.setAttribute("assetLookupOptionsFeedbackPanelHasError", "TRUE"); return true; } else if (reporter.getParent().getId().equals("assetLookupOptionsWMC")){ if(msg.isError()) request.setAttribute("assetLookupOptionsFeedbackPanelHasError", "TRUE"); return true; } else { return false; } } }); -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Table-ize error messages
Most of our error messages are in property files, but we have a set of them that we need to draw from a database. I'd like to add them to the resources programmatically in the Application object at startup so that pages don't know any difference between whether it was sourced from property files or the database. How can I add them to whatever pool the app is pulling from when I do getString(name)? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Log feedback messages
As part of a larger effort to improve our audit logs, I have been requested to add the feedback messages that appear as part of validation to those audits. So in the onError() of a button or form, where the validation has failed, I need to gather (non-destructively) the feedback messages that will soon be displayed. How can I get this list? getPage().getFeedbackMessages() returns empty because, I presume, the errors are on lower level controls. Is there an API that gathers the messages for me? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Is there a way to control Wicket's id generation?
I work on a government project and one of our rules is that all of our apps scrape the request object and log it so that everything that happens can be reviewed. Partly this is for audit reasons, sometimes it comes in handy for lawsuits, but mostly it's handy for our L2 support team. But when a dev fails to provide an explicit name for something, we get things in the log like 'radio54' and the like. Which is understandable as the dev failed to provide a name (bad dev! *swats dev with newspaper*). A recent lawsuit revealed yet another place where the unhelpful 'radio38' is logged. Our PM asked if we can help our devs out because this mistake is happening too often. Can we disable wicket's natural tendency to generate these names and force an exception instead? Thus, the mistake would be caught early. Wicket often exposes 'strategy' objects or other overrides to do this sort of thing, so I'm wondering if such a facility exists? Even if it weren't an exception, but were some other kind of thing that drew the dev's attention it would be useful. We're in Wicket 6. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Radio button submits encoded value
We have a general audit requirement to capture literally every request and log it and it's parameters. We are stripping these parameters from the HttpServletRequest object in a common method. Works great...except when it doesn't. We have a page where the radio buttons are producing a particularly nonhelpful log record because even though the object declares a model value of 'Y' or 'N', and the HTML has values of 'yes' and 'no', Wicket is putting out 'radio47' and similarly unhelpful things. Our L2 customer service person is great at figuring out what users did wrong from our audit logs. But she can't make heads or tails of 'radio47'. Here's the object declaration: RadioGroup q1 = new RadioGroup("q1", new PropertyModel(adptModel, "seizureArrestedFlag")); add(q1.setRequired(true).setOutputMarkupId(true).setOutputMarkupPlaceholderTag(true)); q1.add(new Radio("q1_yes", Model.of("Y"))); q1.add(new Radio("q1_no", Model.of("N"))); Here's the HTML (I hope this goes through okay) So given that the HTML has values of 'yes' and 'no', and the java has a Model of 'Y' and 'N', I need the request to actually have one of those, not 'Radio47'. Mind you, when the java submit runs, it's getting the right value. This 'Radio47' is clearly just something Wicket is doing internally. I'm just wondering how to get my audit log right. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-jquery-ui autocomplete running slow
The problem is our project is a government one that doesn't let us use Maven (we've tilted at that windmill multiple times). So quick starts aren't that quick for us. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-jquery-ui autocomplete running slow
Identical to the timing of getchoices (the method that contains it). In my most recent test 24ms for both while the full request took 6.5 seconds. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-jquery-ui autocomplete running slow
The browser's network tab reflects pretty closely the number I see in the filter. In my most recent attempt, this was about 6.5 seconds. Meanwhile in the same request, the getchoices took 24 milliseconds. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket-jquery-ui autocomplete running slow
My project is using the wicket-jquery-ui AutoCompleteTextField. We're returning a list that was prefetched and all we do in the getChoices is create a sublist. the entire getChoices runs in milliseconds...usually 20-30, which I know because I put a rudimentary timer in it. Yet, the autocomplete feels very sluggish as we're testing it. So I put a timer in a filter that wraps our wicket calls and timed that. The filter timer shows the entire event is running 2-4 seconds. 2-4 seconds per keystroke when the fattest part of the call, the data retrieval, is only taking 20-30ms seems like something is wrong. The list's max size is being limited to 100 rows, but even when I pared it down to 10 rows the improvement was only marginal. I pasted the code below, but that mostly just shows the getChoices() which, as I said above, is just filtering over a list in memory. Any ideas? AutoCompleteTextField fld = new AutoCompleteTextField(fldId) { protected List getChoices(String input) { long start = System.currentTimeMillis(); if (minInputLen > 0) { if (input == null || input.trim().length() < minInputLen) { return Collections.EMPTY_LIST; // empty list } } List curMatchingList = getFilterList(valList, input, maxFilterListSize); // filters the in memory list valList by the input if (curMatchingList == null) { curMatchingList = new ArrayList(); } if (curMatchingList.size() == 0) { if (noResultsVal != null) { curMatchingList.add(noResultsVal); // no-results option } } System.out.println("GETCHOICES: " + (System.currentTimeMillis() - start)); return curMatchingList; // data list } }; -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket-jquery-ui question
The problem is that my project isn't allowed to use Maven (long story with many arguments). As i understand it, the quickstarts require Maven. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket-jquery-ui question
We recently added wicket-jquery-ui MessageDialog (http://www.7thweb.net/wicket-jquery-ui/dialog/MessageDialogPage;jsessionid=666ECDD526710BAC40AC4EBBFCC7F4F1?0) to our app. But the demo renders the buttons like so: button class="ui-button ui-corner-all ui-widget" id="btn04" type="button" But when we use it in our app, there is no class set. Also, the demo starts with the focus on the Ok button. In ours, the user has to initiate an extra tab before the focus is on the button. The demo code doesn't seem to be adding it explicitly, and our use of it seems pretty mundane. msgDialog = new MessageDialog("exitConfirmDirty", "Unsaved Changes", DIRTY_MESSAGE, DialogButtons.YES_NO, DialogIcon.WARN) { private static final long serialVersionUID = 1L; @Override protected Component newLabel(String id, IModel model) { return super.newLabel(id, new Model(currentMessage)); } @Override public void onClose(AjaxRequestTarget target, DialogButton buttonPressed) { if (buttonPressed.getName().equalsIgnoreCase("Yes")) { doAction(target); } } }; And the button event that opens the dialog looks like: this.msgDialog.open(target); Anyone have any idea why i am getting different behavior than the demo? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WicketModal customization
I wasn't aware of that library, thanks! -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
WicketModal customization
I'm trying to use WicketModal with a newer, more accessibility friendly modal that our front-end guy picked out. http://api.jqueryui.com/dialog/ I copied the source from wicket-extensions ModalWindow and was replacing javascript and customizing until I came to the getWindowOpenJavaScript() method. In that, it's doing alot more than javascript. It has the following code block. So I am guessing this is creating a whole other page because i think the wicket modal is in an iframe. I kind of feel, therefore, that I can dump all of this. Or does it serve some greater purpose than i realize? Page page = createPage(); if (page == null) { throw new WicketRuntimeException("Error creating page for modal dialog."); } CharSequence pageUrl; RequestCycle requestCycle = RequestCycle.get(); page.getSession().getPageManager().touchPage(page); if (page.isPageStateless()) { pageUrl = requestCycle.urlFor(page.getClass(), page.getPageParameters()); } else { IRequestHandler handler = new RenderPageRequestHandler(new PageProvider(page)); pageUrl = requestCycle.urlFor(handler); } -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket forward to static page after logoff?
I want to forward to a static html page in the web content folder (where web-inf resides) after they hit my logoff link. The session is already killed. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Modal with a different javascript modal
Our front-end developer doesn't like some of the behavior of the wicket modal with respect to 508 compliance. He has an alternative modal implementation he'd prefer us to use. Is there any way i can use the existing Wicket modal code on the server side with this other javascript modal? It's this one if that helps: https://allyjs.io/tutorials/accessible-dialog.html I'm hoping there's some way to slip our calls to this dialog into the events that currently launch the wicket modal on the javascript side. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
1.4 version of IRequestCycleListener?
In our Wicket 6 projects, we have a IRequestCycleListener that does some things we want to do for every request (primarily involving auditing and a few other nits). We also have a couple 1.4 apps that we haven't been given permission to upgrade, but we want to add this same auditing listener. Is there an equivalent to IRequestCycleListener in 1.4? I see IRequestListener, but it doesn't seem to have any events, and it's child listeners all seem more specific. I just want a bit of code to run before and after every request. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket event listeners not firing.
Solved - Needed to wrap this in a thing that waited for the jQuery DOM to load. I thought the method would do that itself. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket event listeners not firing.
Hi, I'm trying to do some standard code in response to any wicket ajax event, but the listeners I'm subscribing aren't firing. This is in Wicket 6. I stuck a breakpoint in Chrome and IE11, and neither fire these events. I tried done and init event also. Another action right next to it IS working so I know the code to subscribe is being reached, and there are no js errors in the console. Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes, jqXHR, errorThrown, textStatus) { doMyStuff(); } ); Wicket.Event.subscribe('/ajax/call/complete', function(jqEvent, attributes, jqXHR, errorThrown, textStatus) { doMyStuff(); } ); -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How well does Wicket support multiple tabs for a single session?
I definitely need more info on the 2nd and 3rd items in your list. My designer is bugging me multiple times a day trying to get this answer. You said: > - you can run into problems when the same page is rendered in two > different browser tabs, use AjaxNewWindowNotifyingBehavior to detect this What kind of problems are we talking about, and what would I do in that behavior to counteract them, because showing the same page (albeit different record) in different browser tabs definitely is the design he's pushing for. - working on different tabs might lead to pages being expelled from the page store, see StoreSettings#maxSizePerSession And what would be the consequences of it being expelled? User gets an error? Can we close the window in response to that error? Maybe with a message telling them the page expired and they need to re-open it? Or maybe we could re-open it for them? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How well does Wicket support multiple tabs for a single session?
Thanks Sven, Multi-threading should be easy enough. But thanks for the heads up. Same page in different browser tabs though absolutely is part of the design. What would I *do* in reaction to being notified by that behavior that a new window is opening? And what kinds of problems would I expect? What is the default maxSizePerSession, and what is the consequence of something being removed. Let's say i opened record 72 in a tab and then worked in other tabs for a long time and 72 got expelled. when I returned to 72, would it get an error? Or re-initialize as if they just loaded the record? Or could I get an event that it was being removed and tell the user that it's stale and close that tab? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How well does Wicket support multiple tabs for a single session?
Our page designer wants our newest app to open new tabs for each detail record opened off a list. Within that tab would be potentially multiple pages in varying orders related to that record, and then the user might close it or leave it open, return to the list and move around a few times (ajax and page loads) before opening other details records and so on... We've always been a one tab operation with Wicket. It's pretty stateful, and I told our designer that I was worried give this statefulness how Wicket would react to that design. Am I being overly cautious? How will Wicket handle this possible random moving about. When one moves from one tab to another and therefore to pages whose states are different, how does Wicket handle that? Do I need to design my pages differently or take any special action? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket.Event.subscribe - how to get a response header
Actually, yes, on some of our pages. That might explain it. So then in that case, how would I add a request header or check a response header from the server? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket.Event.subscribe - how to get a response header
Okay, but I am at a breakpoint and it definitely is null. This is in chrome and IE11. We use jQuery v1.12.4 if that makes a difference (I don't think it does). I'm sure I must be doing something to cause the issue, but I've no idea what. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket.Event.subscribe - how to get a response header
For some reason, jqXHR is null when I run subscribe a failure listener. It's the third parameter, correct? function onFailure(jqEvent, attributes, jqXHR, errorThrown, textStatus) { var value = jqXHR.getResponseHeader('myHeader'); if('true' == value) //do something } Wicket.Event.subscribe('/ajax/call/failure', onFailure); -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket.Event.subscribe - how to get a response header
I've defined a javascript event handler using Wicket.Event.subscribe. How would I get a response header in that callback? According to docs I saw, the parameters are: attrs, jqXHR, textStatus, jqEvent, errorThrown. I set a breakpoint and inspected each and didn't see a response header collection that was obvious to me. This is Wicket 6. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Session timeout & ajax
I should have mentioned, we're in Wicket 6. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket Session timeout & ajax
When wicket times out, and the user clicks something ajax oriented, they just get an error in the page in javascript. No message or redirect to the Home page or anything. We'd prefer to redirect them to a home page as if they first arrived in the app. Is there a way to accomplish that? I saw some threads about session timeouts but they didn't seem to want what we want. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modifying componentfeedbackpanel output
I'm not sure what a quickstart would do to demonstrate what I'm after. It's not a bug I am trying to work through, I don't even know how to get control so I can add the tags. The specific tags I'm adding don't even matter. It's static content, but it has to wrap the message. Just imagine I was trying to wrap the "This field is required" with any arbitrary content inside the innermost tags of the feedback panel. Like maybe I wanted every message to be "[start]this field is required.[end]". Where would I get control to write that? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modifying componentfeedbackpanel output
I'm not sure how to make the markup show right in the post. I'll try wrapping it in PRE. //Error: This field is required. Anyway, yes, I am subclassing the component feedback, but it adds the controls and iterates to produce the messages. If I just modify the contents of that inner span in the html, of course it overwrites everything. I would need to get control when the individual message is being worked on, AND then inject my boilerplate. Fortunately, that inner stuff doesn't need to change per message or anything. Just structure so the message will render how they want. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modifying componentfeedbackpanel output
Ooops, I see nabble is hiding the tags. Trying again with and span class="feedbackPanel" span class="feedbackPanelERROR" span class="feedbackPanelERROR"i aria-hidden="true" class="fas fa-exclamation-triangle" title="Error "/ispan class="sr-only"Error: /spanThis field is required./span /span /span -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Modifying componentfeedbackpanel output
Our front-end guy is asking for us to modify how our component feedback messages render. In particular he wants tags around EACH MESSAGE like so: //Error: This is the message. I added an override for the ComponentFeedbackPanel java and html to make everything spans, and I see onComponentTag as a way to add attributes to the top level span, but I am not sure how to get access to the individual message spans or how to write the extra tags before and after the message. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Preventing directory list
That seems to be it. Thanks! -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Preventing directory list
Pretty sure WAS is getting the config. When I comment out all wicket stuff from web.xml, and just run a bare bones EAR, I type: http://localhost:9080/MyApp/images/info1.png And i get that image (thus proving it's responding) I drop to: http://localhost:9080/MyApp/images/ and I get 404. Put Wicket back in place and run the same test and get: ajax-loader.gif info1.png mainLogoHeader_01.png mainLogoHeaderTrans_01.png ui-icons_44_256x240.png ui-icons_55_256x240.png ui-icons_777620_256x240.png ui-icons_77_256x240.png ui-icons_cc_256x240.png ui-icons_ff_256x240.png There's no other filter or servlet in the web.xml at all. Normally there's an anti-XSS filter, but I took that out prior to running this test. Anyway, that's why I think it's Wicket. Or something the presence of Wicket is allowing. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Preventing directory list
But I have "/*" mapped t the wicket servlet. /images is under "/*". I have no servlet mapping enabling /images or other subdirs. further, we're in websphere and in the ibm-web-ext.xml we have directory browsing set to false. You're certain Wicket doesn't do this? I tried removing my wicket servlet and getting to the images folder and it didn't work. We're in Wicket 6 if it matters. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Preventing directory list
The SecurePackageResourceGuard prevents access to files by extension, but I notice that when I type /images into my URL, I get a sort of directory listing of files under that folder. True, they're all public files, but I don't want people to get a listing like that. How can I direct the resource guard to not allow directory listings for ANY directory? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
CSRF Tokens
One of our apps just underwent a security scan, and they complained about Cross-Site Request Forgery (CSRF) vulnerability. Yet, i went to google and found this: https://issues.apache.org/jira/browse/WICKET-1782 Which seems to say that CSRF was fixed in 1.4 of Wicket. We're mostly on 1.6. Is there something we have to do to "turn on" Wicket's CSRF token? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Is there a way to include a message count in the feedback?
We have ComponentFeedbackPanels in our app. But we should a message in a top feedback that is something like "You have errors, please fix them". They'd like to make it include a COUNT of the other messages out there. Is there a specifier for that? Like in the message in the properties file, is there a ${count} or something? And is there a full list of those specifiers that are usable in the properties file? I haven't seen one. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AjaxFormSubmitBehavior need timeout event
I need to get an event on the browser side from one of my AjaxFormSubmitBehaviors in the event of a timeout or a non-200 response (and preferably the ability to distinguish between the two). I'm in Wicket 6.24 in this app. Anyone know how I would plug into that event? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Scroll to feedback on ajax
That sounds plausible. Is there any way to override that behavior? We tried focusComponent() and it didn't seem to work any better. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Scroll to feedback on ajax
We're using Wicket 6. We have a requirement to set focus to the feedback panel anytime it shows. We add our feedback panel in a common module and I put window.scrollTop(0,0) in the renderHead of a behavior on the feedback. This works on some pages but not all. On the pages where it doesn't work I can see the window.scrollTop in the response body in the browser devtools. I put an alert and so I can see it runs. But it only moves the focus up slightly. When I don't add the whole form to the response (it sets field styles, aria tags and there are component feedbacks as well as the main feedback), I can move to the top, but as I add individual parts back in, they don't work entirely right. Has anyone seen anything like this? Can anyone suggest something that doesn't involve me slowly undoing everything in these pages to find the culprit? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to bind a single page class to multiple mounted URLs
We have a couple different 'flows' in our application, but each flow often shares certain pages in common, and we of course reuse the page class. If someone times out and then hit refresh or performs a screen action, my team would like to direct the user to the starting page of THAT FLOW to resume. But I can only mount a particular class to one URL it seems. mount(new MountedMapperWithoutPageComponentInfo("/type", TypePage.class)); mount(new MountedMapperWithoutPageComponentInfo("/contact", ContactPage.class)); If for example the two above pages had roles in flow A, B, and C, I'd like to do this: mount(new MountedMapperWithoutPageComponentInfo("/a/type", TypePage.class)); mount(new MountedMapperWithoutPageComponentInfo("/a/contact", ContactPage.class)); mount(new MountedMapperWithoutPageComponentInfo("/b/type", TypePage.class)); mount(new MountedMapperWithoutPageComponentInfo("/b/contact", ContactPage.class)); mount(new MountedMapperWithoutPageComponentInfo("/c/type", TypePage.class)); mount(new MountedMapperWithoutPageComponentInfo("/c/contact", ContactPage.class)); Then I would try to pick up that URL context from the request to alter which flow the page is part of. But Wicket doesn't seem to want to let me do that. Is there a better way? I tried putting a parameter into the URL, but there definitely seems to be a limitation that I can't repeat the class. I could write a dummy child for each class, but that just seems ugly. What's the right way to solve this problem? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
IndicatingAjaxButton locks other buttons
We have an IndicatingAjaxButton that launches an AjaxDownload of a PDF that we generate on the fly from Crystal Reports. It's spawns the PDF in a separate window. It does the job, but after, every button on the screen of the main form is nonresponsive. Is there some step I am supposed to take to unlock them? The spinner gif went away so it seems like the button knows it's done enough to hide the spinner. As soon as i change the IndicatingAjaxButton to a simple AjaxButton, everything works perfectly. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Where can I get the 6.24 source download?
I need 6.24 source. all of the mirror links seemed dead. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Odd Requirement
We have an odd requirement that I was wondering how to implement in wicket. we're in Wicket 6. The analysis team wants the ability to save a page in an incomplete fashion. Only format validations fire (you can enter nothing, but if you enter anything, you must at least comply with format rules...no entering letters in a date field) on some save events, but when you hit a Continue we validate the whole enchilada. But they also want this exit button that is particularly throwing us for a loop because they want to prompt, asking the user if they want to save first, and if yes, we save with just format validators, and either way invalidate the session. Setting default form processing isn't quite right for us because it turns ALL of the validators on or off, and AFAIK, can't be set after the event is already underway. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Serialized Session Data in Websphere
Our operations team just discovered huge growth of files in a temp folder named [app_name]Wicket-filestore. We're on Wicket 6 (well, most of our apps are). There's clearly some stuff in there that shouldn't be, and our devs are going to need to be more frugal with what they throw into the user session. However, there's quite alot of files that are months old. This seems odd, because my understanding is that Wicket deletes these upon session invalidation. And it must be doing that for the most part, or there would be ALOT more of these things, I suspect. But maybe there are circumstances where it's not cleaning up? Does the cleanup fire when the app is stopped? When Websphere is restarted? I am thinking I am going to instruct our ops team to write a script to automatically delete any files in this directory older than a day. I am wanting to check that folks agree that such an action is appropriate, and what circumstances are known that might cause this buildup. Shutdown is the only one I can think of (no, the server hasn't been crashing). -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Validation messages from properties file not working.
That's perfect. Thanks so much. Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Wed, Aug 23, 2017 at 3:56 PM, Sven Meier [via Apache Wicket] < ml+s1842946n4678590...@n4.nabble.com> wrote: > Hi, > > FormComponent has a special error() method for ValidationErrors. > > You're hitting another method on Component, that just accepts any > serializable: > > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new > ValidationError().addKey("CaptchaRequired")); > > Try the following instead: > > ((WebMarkupContainer) > form.get("wmcCaptchaError")).error(form.getString("CaptchaRequired")); > > Regards > Sven > > > Am 23.08.2017 um 19:18 schrieb Entropy: > > > Yeah, it's definitely related to the component that the > > ComponentFeedbackPanel relates to. If I use a TextField, it finds the > > message perfectly. I change it to a web markup container or > hiddenfield, > > and it fails to find the message. Same name, same code doing the > validation > > and the adding of the validation key. > > > > I tried a TextField with visibility set to false and that didn't even > show > > the error (which makes sense). > > > > -- > > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Validation-messages-from-properties-file- > not-working-tp4678575p4678588.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=0> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=1> > > > > > - > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=2> > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678590=3> > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Validation- > messages-from-properties-file-not-working-tp4678575p4678590.html > To unsubscribe from Validation messages from properties file not working., > click > here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678596.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: Validation messages from properties file not working.
Yeah, it's definitely related to the component that the ComponentFeedbackPanel relates to. If I use a TextField, it finds the message perfectly. I change it to a web markup container or hiddenfield, and it fails to find the message. Same name, same code doing the validation and the adding of the validation key. I tried a TextField with visibility set to false and that didn't even show the error (which makes sense). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678588.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: Validation messages from properties file not working.
The properties file is in the same package as the page, and has the same prefix name, LandingPage_Cp10. Other errors added to TextFields and whatnot from the SAME VALIDATOR are working that use messages from that SAME FILE. I even can add the same message to a regular textfield in that same validator and it works fine. There's definitely something about the fact that it's not a normal textfield that messes it up. Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Wed, Aug 23, 2017 at 2:54 AM, Martin Grigorov-4 [via Apache Wicket] < ml+s1842946n4678577...@n4.nabble.com> wrote: > Hi, > > We need to know the location of the i18n file, the package structure and > the component tree structure to be able to tell why Wicket cannot find it > ... > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, Aug 22, 2017 at 9:33 PM, Entropy <[hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=0>> wrote: > > > We have a javascript widget on our page that doesn't have a wicket form > > component bound to it. We just get the value from the request. We have > a > > ComponentFeedbackPanel (CFP) because that's what we do with all of our > > messages. We fed a WebMarkupContainer (WMC) that is around the CFP in > as > > the Component for the CFP to relate to. We add the validation message > to > > that WMC, and the error DOES show. > > > > However, for some reason it's not finding the validation key from the > > property file. Every other error done the same way DOES, so i have to > > guess > > that it's because we are binding to the WMC that it's not working? > > > > Properties File line: > > CaptchaRequired=The CAPTCHA verification is required. Please complete it > to > > continue. > > > > Where we add the key (in an abstractformvalidator): > > ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new > > ValidationError().addKey("CaptchaRequired")); > > > > Ideas? > > > > > > > > -- > > View this message in context: http://apache-wicket.1842946. > > n4.nabble.com/Validation-messages-from-properties-file- > > not-working-tp4678575.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=1> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4678577=2> > > > > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Validation- > messages-from-properties-file-not-working-tp4678575p4678577.html > To unsubscribe from Validation messages from properties file not working., > click > here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4678575=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc4NTc1fC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575p4678585.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: Button not visible, except that it is...
Nevermind, it's because he didn't have that higher panel in the target for that event. So he set the visibility to false without realizing it, and didn't add it to the target. Mystery Solved. Thanks as always for the quick response. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Button-not-visible-except-that-it-is-tp4678567p4678576.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
Validation messages from properties file not working.
We have a javascript widget on our page that doesn't have a wicket form component bound to it. We just get the value from the request. We have a ComponentFeedbackPanel (CFP) because that's what we do with all of our messages. We fed a WebMarkupContainer (WMC) that is around the CFP in as the Component for the CFP to relate to. We add the validation message to that WMC, and the error DOES show. However, for some reason it's not finding the validation key from the property file. Every other error done the same way DOES, so i have to guess that it's because we are binding to the WMC that it's not working? Properties File line: CaptchaRequired=The CAPTCHA verification is required. Please complete it to continue. Where we add the key (in an abstractformvalidator): ((WebMarkupContainer) form.get("wmcCaptchaError")).error(new ValidationError().addKey("CaptchaRequired")); Ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Validation-messages-from-properties-file-not-working-tp4678575.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: Button not visible, except that it is...
The isVisibleInHierarchy() method returns false. Stepped into that and realized that my co-worker was setting a parent panel false in a panel further up the hierarchy in the onConfigure of a behavior, which fires once at page load and again after the button click that makes this other button/panel visible. But that code hard-coded it to false. It should have rendered the whole panel invisible I would think. Which is not what we want, but I am confused why the panel rendered as visible. onConfigure() javadoc says it fires before render. So that is confusing to me. But we definitely have the problem figured out. Any idea why the panel rendered as if visible? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Button-not-visible-except-that-it-is-tp4678567p4678574.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
Button not visible, except that it is...
We have a form that underwent some re-writing. After the changes, a button starts throwing the below exception. The button is in a panel that starts invisible but is made visible later. In the event that makes it visible we logged out the button's isVisibleInHierarchy() and it was false at the beginning of the method, true at the end. And the button DID render on the page. So if wicket thought the button was visible by it's own method, and chose to render it, why does it later think it's not visible in the very next event? We are not overriding any isVisible() methods in the page. Any ideas? org.apache.wicket.WicketRuntimeException: Submit Button radioWmc2:radioWmc2Step2:btnResResume (path=form:radioWmc2:radioWmc2Step2:btnResResume) is not visible at org.apache.wicket.markup.html.form.Form$2.component(Form.java:456) at org.apache.wicket.markup.html.form.Form$2.component(Form.java:437) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162) at org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:860) at org.apache.wicket.markup.html.form.Form.findSubmittingButton(Form.java:435) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Button-not-visible-except-that-it-is-tp4678567.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
setOutputMarkupId(true) on everything?
While resolving our latest issue, a co-worker asked me why we don't just make a visitor to set every component to have setOutputMarkupId(true)? It seems harmless, and corrects a common mistake people make of not setting it. Is there something I'm not seeing? Is there a way to default this to true for all components other than a visitor in every page? And if I did this, are there side effects that I am not seeing? Some reason why this isn't standard behavior? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/setOutputMarkupId-true-on-everything-tp4678394.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: AjaxButton not calling onError after required validation fail
When the world doesn't make sense, it's amazing how often it turns out to be some simple little mistake we overlook. This was all a cut & paste error in my co-worker's code. He was binding the ComponentFeedbackPanels to the wrong text fields, but the names were close enough to the correct names that a casual inspection by every pair of eyes that tried to help him missed the difference. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-not-calling-onError-after-required-validation-fail-tp4678346p4678393.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: AjaxButton not calling onError after required validation fail
Okay, new info. So, alot of what I said I accepted on faith from a co-worker who was working the problem. I'm posting on his behalf. Turns out some of that was wrong, but we do have a little bit of a poser here nonetheless. I apologize for that. I should make my guys all sign up for this forum rather than using me as a go between. First, the button.onError(target, form) is invoked. However, the ComponentFeedbackPanel is not rendering. We have a custom behavior that writes an error css class onto the control if isValid() is false, and that is working. In debug, I can see the hasFeedbackMessage()==true, and the getFeedbackMessages() returns an error with the right field name on it. Yes the component feedback does not render. I put setOutputMarkupId(true) on literally everything, and setOutputPlaceholderTag(true) on the component feedbacks. That didn't help. I explicitly added each feedback to the target rather than their parent. Yet the ComponentFeedbackPanel doesn't show the errors. I looked in F12 tools and saw that the span for it actually IS there, there's just nothing in it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-not-calling-onError-after-required-validation-fail-tp4678346p4678384.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: AjaxButton not calling onError after required validation fail
Wicket 6.24 Yes, there are other buttons. Somehow, they seem to work under the same conditions. We compared and don't see why they behave differently. There are alternate panels that show/hide based on choices further up the form, and that dictates which buttons and fields are shown. Yes, form.onError() seems to be called. But with no ajax target, how can I add the right feedback panel components to the target? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-not-calling-onError-after-required-validation-fail-tp4678346p4678362.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
AjaxButton not calling onError after required validation fail
We have an AjaxButton, some fields are failing required check, but the onError of the button is not being invoked. This means we can't add the container to the target, and therefore the ComponentFeedbackPanel is not rendering with the message. radioWmc2Step1.add(new AjaxButton("btnResSend", form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { log.debug("btnResSend"); logUserAction(ocpAuthorization.getEmailAddress(), "601", "CP10", "OCP", "Send PIN"); onSendPin(); radioWmc2Step1.setVisible(false); radioWmc2Step2.setVisible(true); target.add(radioWmc2Step1); target.add(radioWmc2Step2); } @Override protected void onError(AjaxRequestTarget target, Form form) { //does not fire on required message target.add(radioWmc2Step1); }; } .setOutputMarkupId(true) .setOutputMarkupPlaceholderTag(true) ); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-not-calling-onError-after-required-validation-fail-tp4678346.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
getString() from Application.init()
I want to run getString() like I might from a Page, but I want to run it in Application.init(). What is the equivalent call here? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/getString-from-Application-init-tp4678053.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: Modal failing to modify it's parent in ajax event
That would explain the javascript part. How would I get Wicket to do that to manipulate the feedback panel? Or would I be better off rewriting using the pnale style instead of the iframe style (which I am starting to lean towards). Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Mon, May 8, 2017 at 3:26 PM, Martin Grigorov-4 [via Apache Wicket] < ml+s1842946n4677801...@n4.nabble.com> wrote: > Hi, > > Since you use PageCreator then your modal page is loaded inside an iframe > and all your findings are valid! > You need to use JavaScript 'parent' or 'top' window references to > manipulate the DOM of the page in the browser tab. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Mon, May 8, 2017 at 9:18 PM, Entropy <[hidden email] > <http:///user/SendEmail.jtp?type=node=4677801=0>> wrote: > > > I have a wicket modal. On clicking a button in it, that is part of the > > form > > in the modal's page, I need to close the modal, put a message in the > > feedback of the parent page, and invoke a javascript method in the > parent > > page. I am using the pagecreator approach to ModalWindow. This is > Wicket > > 6.26. > > > > The problem is that when i go to hit the button, I am getting the > following > > javascipt error: > > > > Wicket.Ajax: TypeError: Unable to get property 'top' of undefined or > null > > reference > > > > It then has two cascaded errors that imply that it is trying to work the > > DOM > > inside the iframe instead of the parent window. Which makes sense, but > I > > am > > almost certain that I've done this sort of thing before (but can't find > an > > example). I don't think I'm doing anything especially different. > > > > I am wondering if I need to run the ModalWindow.closeCurrent() first, > and > > then after it closes, respond to the event from that to do the feedback > and > > javascript call? That chaining seems awkward, so I figured I'd ask > before > > I > > tried it. > > > > -- > > View this message in context: http://apache-wicket.1842946. > > n4.nabble.com/Modal-failing-to-modify-it-s-parent-in-ajax- > > event-tp4677800.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4677801=1> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4677801=2> > > > > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/Modal-failing- > to-modify-it-s-parent-in-ajax-event-tp4677800p4677801.html > To unsubscribe from Modal failing to modify it's parent in ajax event, click > here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4677800=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc3ODAwfC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-failing-to-modify-it-s-parent-in-ajax-event-tp4677800p4677811.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
Modal failing to modify it's parent in ajax event
I have a wicket modal. On clicking a button in it, that is part of the form in the modal's page, I need to close the modal, put a message in the feedback of the parent page, and invoke a javascript method in the parent page. I am using the pagecreator approach to ModalWindow. This is Wicket 6.26. The problem is that when i go to hit the button, I am getting the following javascipt error: Wicket.Ajax: TypeError: Unable to get property 'top' of undefined or null reference It then has two cascaded errors that imply that it is trying to work the DOM inside the iframe instead of the parent window. Which makes sense, but I am almost certain that I've done this sort of thing before (but can't find an example). I don't think I'm doing anything especially different. I am wondering if I need to run the ModalWindow.closeCurrent() first, and then after it closes, respond to the event from that to do the feedback and javascript call? That chaining seems awkward, so I figured I'd ask before I tried it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-failing-to-modify-it-s-parent-in-ajax-event-tp4677800.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 Modal throws exception
Upgrading seems to fix this specific issue. However, I am no getting another odd behavior. I am trying to update some text and button captions on the page. It's working, but gives an error in javascript despite the working. Wicket.Ajax: Wicket.Ajax.Call.processComponent: Component with id [[message]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. It says that, but in fact, I DID call setOutputMarkupId(true) on not just that component, but EVERY component in the modal, overkill though it may be. I also called setOutputPlaceholderTag and setMarkupId just in case. Neither changed anything. The confusing part is that the label change AND the button caption changes ARE working. The relevant part of the ajax event: message.setDefaultModelObject(modalWindow.getMessage()); button.setVisible(true); button.setDefaultModel(new Model(modalWindow.getButtonCaption())); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p460.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 Modal throws exception
6.24. Is there a workaround? We're using modals elsewhere. I am trying to make one that will be more general purpose, but it otherwise seems the same as our others and I am not sure what is so different about it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p4677768.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
Wicket Modal throws exception
I am addding a Wicket Modal. I go to render it on button click and amd getting the below trace. But I don't have _header_ in my page, in the modal, or anywhere in my app actually (I searched the whole workspace), so I'm not sure where it comes from, and therefore am not sure how to fix it. org.apache.wicket.WicketRuntimeException: Cannot replace a component which has not been added: id='_header_', component=[HtmlHeaderContainer [Component id = _header_]]: [Page class = com.mycompany.mypage, id = 0, render count = 1] at org.apache.wicket.MarkupContainer.replace(MarkupContainer.java:734) at org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:170) at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:359) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:159) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764.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
Generic message when component feedback has error
We're using component feedback panels, and when a component has a message we are filtering that message out from the parent with a filter that tosses anything that doesn't link to the form or page. Works fine. However, when there is a component message on any component, we want a generic message like "You have errors" or whatever in the top feedback. Only once. And associated with the poage or form. So I clearly don't want to add it via the validators, I'd get a bunch. Is there a right place to add that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generic-message-when-component-feedback-has-error-tp4677729.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 back button behavior
Hmmm, it's not quite PERFECTLY what I was after, but it may be "close enough". When I go back, I am still taken to previous pages by virtue of the mounted URLs, but I am no longer being taken to old VERSIONS of those pages, which was the main problem. I'll have to check with my requirements team to verify that this is close enough. Thanks for the suggestion and quick reply! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-back-button-behavior-tp4677587p4677651.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 back button behavior
I am trying to set this up. I looked at some docs and I feel like creating a custom PageManager seems like what I want to do. The thing is, no matter how I implement the getPage(int), the Wicket app behaves the same. The back button still does it's default behavior every time. Here's what I did. I capture the maximum page in touchPage(), and then getPage() returns it. When I hit back during my process flow, initially I get a bunch of calls to getPage() which dutifully returns the currentPage I want. But then, after that, touchPage is called with the prior page (the one the user is going BACK to). What's more, it's called with an ID one GREATER than the maximum page ID as returned in getPage(). getPage() is never called again in that request, and the app then renders the prior page, as if it ignored what getPage() returned. It's like I am missing an additional change setting that would make touchPage() cooperate. I also tried raising a RestartResponseException from within the PageManager when BACK was hit, but that just got me sent to the error page. I overrode just the PageManager since I don't want to change how pages a created, just how they are re-used. That's why i differed from SinglePageManager. Am I doing anything obviously wrong? It's all pretty simple right now. i started small to try to build the complexity as I went, but since nothing I do actually changes the app behavior, I seem stuck. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-back-button-behavior-tp4677587p4677649.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
Wicket back button behavior
By default wicket does it's serialized back button thing. For most of our apps, this has been fine. We have a new one where this behavior, showing the page in a previous state and allowing the user to proceed from there, is completely inappropriate. Ideally, when a user tries to go back to a previous page version, I'd like to re-display the current page in it's current state (as if they hit reload instead). Seems like since Wicket is tracking the page version in the query string that should be do-able. I found some articles suggesting how to put Wicket into a "stateless" mode where the page always displays the current/freshest data, but am not getting what I expect. I tried: getPageSettings().setVersionPagesByDefault(false); But this didn't seem to alter behavior at all. I also tried: setStatelessHint(true); on my pages, and that didn't change any behavior either. Maybe I'm barking up the wrong tree? How can I get wicket to just re-render the current page in it's current state if the user tries to use the back button? Basically just like as if they hit the reload button? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-back-button-behavior-tp4677587.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: AjaxButton submits despite form validation failure?
Awaiting confirmation from my co-worker that it worked, but we think we figured it out. He was adding the error message to the page level, above the form. Once he added the message to the form instead, the onSubmit does not fire. We saw the bit in the javadoc suggesting that we use AbstractFormValidator and he is going that way. The only odd part is that it seems like we've done this before and not had this problem. But we haven't gone looking, so can't be sure. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-submits-despite-form-validation-failure-tp4677463p4677472.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
AjaxButton submits despite form validation failure?
A co-worker is having an issue that I am confused by. He has an AjaxButton submitting a form that (among other things) hides on WebMarkupContainer and shows another. But the form goes through a custom IFormValidator that compares a few fields. When he violates the error, we can see the code invoke the error() method on the validator. Yet the onSubmit() fires anyway. He swears that it didn't before he recently redid the page in accordance with requirements changes. The main thrust of the changes is that it used to be that both WebMarkupContainers were visible the entire time. Also, when the code get to onSubmit, he checks the message list, and it shows as empty. He didn't turn defaultFormProcessing off, and I'm not even sure what to look for at this point. I'm kind of hoping this is some common pitfall that someone will recognize instantly. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxButton-submits-despite-form-validation-failure-tp4677463.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 properties file load at startup?
I put getString("Required") in the init of the page. Yet on the event it did the same thing for about the same time. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-properties-file-load-at-startup-tp4677396p4677411.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
Wicket properties file load at startup?
We have a new wicket app that is waiting until the third page in our app before it loads a WHOLE LOT of properties stuff. I turned to debug and got literally thousands of these: [3/22/17 13:56:49:282 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[classpath]' [3/22/17 13:56:49:283 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[webapppath: /]' [3/22/17 13:56:49:290 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[classpath: META-INF/resources/]' [3/22/17 13:56:49:291 EDT] 0142 SystemOut O DEBUG ResourceStreamLocator Attempting to locate resource 'mypackage/ocp/modules/contact/ContactPage_Cp12_en_US.properties' using finder'[webapppath: /OnlineClaimsPetitions/]' It's taking 3.5-5 seconds once per startup. That doesn't sound bad, but it happens on an ajax event that ought to be lightweight and kind of creates a bad user experience for that first person in. I'd like to preload or do this step on startup if possible. How can I make that happen? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-properties-file-load-at-startup-tp4677396.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
Set focus on feedback message?
Is there a way I can implement a common routine or class that would set focus to the feedback panel anytime a feedback panel is updated with an error? I am hoping I don't have to ask our devs to include the behavior manually all over the place. We have a common page that all of our pages inherit from and I was hoping I could add it there. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Set-focus-on-feedback-message-tp4677319.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: Add aria tag and css class to input on error
That looks pretty darn perfect. I'll try that. Thanks! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Add-aria-tag-and-css-class-to-input-on-error-tp4677286p4677288.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
Add aria tag and css class to input on error
We need to add an aria tag to out input controls(and maybe a css class) whenever they have an error on that control. Is there a way to make that happen automagically for a whole form, or would each valdator do it or what? How would one go about that in wicket? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Add-aria-tag-and-css-class-to-input-on-error-tp4677286.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: Disabled links in 6.24
Oh! Duh, setRenderBodyTagOnly(). Forgot about that. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-links-in-6-24-tp4677228p4677235.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: Disabled links in 6.24
I'll ask our CSS guy if that works for him. He tends to like use to not use unnecessary tags, so ideally, I'd like to get rid of the SPAN altogether. Thanks for the quick response. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-links-in-6-24-tp4677228p4677233.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: Disabled links in 6.24
I found setAfterDisabledLink and setBeforeDisabledLink. Setting those the "" gets rid of the EM, but there is still an extra span. How do I suppress that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-links-in-6-24-tp4677228p4677232.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
Disabled links in 6.24
Using Wicket 6.24, when i disable links, they get SPAN and EM tags instead. This throws off our CSS guy. We would like to not do those. How would I go about that? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Disabled-links-in-6-24-tp4677228.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: AjaxSubmitLink not working
Okay, I just did. Control does not get there either. BTW, if onError is something we should always override, perhaps it should be abstract? Still mystified -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-not-working-tp4677120p4677122.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
AjaxSubmitLink not working
I have a header links section in my header that must build in a dynamic way. AjaxSubmitLink link = new AjaxSubmitLink(linkName, formToSubmit) { @Override public void onSubmit(AjaxRequestTarget target, Form form) { //control never gets here. } }; That is being built in a function call that is called from a loop (though I don't think that matters). The HTML (of one example): li wicket:id="contactLi"a wicket:id="contactLink" href="/contact"Contact Information/a/li In the wicket ajax debug window, I am getting this: INFO: focus removed from INFO: focus set on startLinkc INFO: Received ajax response (69 characters) INFO: INFO: Response processed successfully. INFO: refocus last focused component not needed/allowed Implying that it ran, but did nothing? There are no validators in place (yet) on the form. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxSubmitLink-not-working-tp4677120.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: How to do this in wicket
Ha, yeah. I forgot about that. I implemented a solution based on that thread (not exactly the same) but then a bit later it turned out to cause problems for our web designer, hence me being back. I ended up using renderHead() to put out exactly what the web designer needed in the delivered HTML, yet with only the one HTML tag in the template so that the parser would work. So this is resolved for me. Thanks for everyone's quick responses. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-do-this-in-wicket-tp4677103p4677119.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 do this in wicket
Our web designer wants our pages to start like this so he can run his modernizr thing. But I can't have this in our html before Wicket runs against it, because the html parser seems to be unable to handle this...and I don't blame it. So the thought came that we could write the classes out in Wicket, but the modernizr script evidently needs this whole block. So I was thinking I could write it out during render. But I have no idea how to get that done. We are in Wicket 6. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-do-this-in-wicket-tp4677103.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: Generated IDs
Yes, but we have a whole lot of existing pages and fields and links and buttons. I was kind of hoping I could just get wicket's generated IDs to be stable from page run to page run, and avoid getting a work request approved to go back and tweak every field. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generated-IDs-tp4677000p4677002.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
Generated IDs
Our test team wants to run selenium scripts against our pages, and wants stable IDs to go against. Wicket tends to generate random, and most annoyingly, inconsistent ones that change with each run of the page. Obviously, we can setMarkupId on every component manually, but I was wondering if there is a way to get Wicket to generate Ids in a way that is more predictable, so that 1000 runs of the same page with the same code will always produce the same IDs, even if they are generated IDs? Like maybe some setting or overriding some class? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Generated-IDs-tp4677000.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: IMarkupCacheKeyProvider getCacheKey
Perfect. Thanks. Brian Mulholland "For every complex problem, there is an answer that is clear, simple and wrong." --H.L. Mencken "Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies." --Groucho Marx On Wed, Jan 25, 2017 at 3:14 PM, Martin Grigorov-4 [via Apache Wicket] < ml-node+s1842946n4676868...@n4.nabble.com> wrote: > Hi, > > The default impl is org.apache.wicket.markup.DefaultMarkupCacheKeyProvider. > > So instead of implementing the interface you need to extend from this > class > and return null or super.getCacheKey(). > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Wed, Jan 25, 2017 at 8:01 PM, Entropy <[hidden email] > <http:///user/SendEmail.jtp?type=node=4676868=0>> wrote: > > > I am trying to make Wicket NOT cache html templates, but only based on a > > certain system property. So if this property is off, no caching, I > return > > null from getCacheKey() and that seems to work great. But, I am not > sure > > what to do when I WANT caching. > > > > The method takes a MarkupContainer and containerClass parameter, but I > am > > unsure what I am supposed to do with them. I presume I am supposed to > > manufacture a key somehow. But not knowing how the key is used, I am > > unclear how to generate it. Is there a default implementation of this I > > could utilize? Every example I find online is just returning null in > order > > to achieve no caching ALL the time. But I only want it conditionally. > > > > -- > > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/ > > IMarkupCacheKeyProvider-getCacheKey-tp4676864.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4676868=1> > > For additional commands, e-mail: [hidden email] > <http:///user/SendEmail.jtp?type=node=4676868=2> > > > > > > > -- > If you reply to this email, your message will be added to the discussion > below: > http://apache-wicket.1842946.n4.nabble.com/IMarkupCacheKeyProvider- > getCacheKey-tp4676864p4676868.html > To unsubscribe from IMarkupCacheKeyProvider getCacheKey, click here > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code=4676864=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0Njc2ODY0fC05NzMyODEwMzU=> > . > NAML > <http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IMarkupCacheKeyProvider-getCacheKey-tp4676864p4676870.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
IMarkupCacheKeyProvider getCacheKey
I am trying to make Wicket NOT cache html templates, but only based on a certain system property. So if this property is off, no caching, I return null from getCacheKey() and that seems to work great. But, I am not sure what to do when I WANT caching. The method takes a MarkupContainer and containerClass parameter, but I am unsure what I am supposed to do with them. I presume I am supposed to manufacture a key somehow. But not knowing how the key is used, I am unclear how to generate it. Is there a default implementation of this I could utilize? Every example I find online is just returning null in order to achieve no caching ALL the time. But I only want it conditionally. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/IMarkupCacheKeyProvider-getCacheKey-tp4676864.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
RadioGroup ajax update
We have a pair od radiobuttons in our html. They have some html around them, and so forth. They are not dynamic. When the selection changes, we want an ajax event to make other stuff visible or not. RadioGroup rg = new RadioGroup("rg1"); rg.add(new Radio("rg1-opt1",new Model("test1")).setOutputMarkupId(true)); rg.add(new Radio("rg1-opt2",new Model("test2")).setOutputMarkupId(true)); rg.add(new AjaxFormChoiceComponentUpdatingBehavior() { @Override protected void onUpdate(AjaxRequestTarget arg0) { System.out.println("ajax here!"); } }); rg.setMarkupId("rg1"); rg.setOutputMarkupId(true); form.add(rg); The page renders, but the ajax event never arrives. The static html has a ul tag onto which the RadioGroup is mapped, and the two items of the list are inputs of type radio bound to opt1 and 2. So question 1, is why aren't we getting the event, and question 2 is are we using the RadioGroup wrong? It seems wrong. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/RadioGroup-ajax-update-tp4676682.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: Adding comment tags outside the tags
I'd rather have the block in some kind or re-usable thing so that our web designer can maintain it. No alternative there? I will do your version if not. As to your P.S., we're a govt project. We have to support what the govt tells us we have to support, and they tell us we still have to support those. There literally may be nobody using them. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Adding-comment-tags-outside-the-HTML-tags-tp4676476p4676483.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