wicket

How can I add an image column to a table in wicket framework?

对着背影说爱祢 提交于 2019-12-12 18:25:13
问题 I want to add a column containing images in each cell of a table in wicket framework. I make the table in a java class and have a createColumns() method as the following: private List<IColumn> createColumns() { List<IColumn> columns = new ArrayList<IColumn>(); // Create the columns that will be displayed, second param is the sort // order // Use column position for aggregate functions // Otherwise the query uses column aliases so these need to match here columns.add(new PropertyColumn(new

How can I get the responsePage from a RequestCycle in Wicket 1.5?

二次信任 提交于 2019-12-12 15:02:25
问题 In Wicket 1.4 I used my own WebRequestCycle to store the page in the session when it was detached - in order to implement a 'back' link. getRequestCycleListeners().add(new AbstractRequestCycleListener() { @Override public void onDetach(RequestCycle cycle) { squirrelAwayPreviousPage(cycle); } private void squirrelAwayPreviousPage(RequestCycle cycle) { Page responsePage = cycle.getResponse(); if (responsePage != null) ((MySession) getSession()).setPreviousPage(responsePage); } }); Now in Wicket

What method to use for logout in wicket application?

纵然是瞬间 提交于 2019-12-12 13:13:55
问题 Wicket org.apache.wicket.authroles.authentication.AuthenticatedWebSession has 2 methods: signOut and invalidate . The javac says that signOut mark use not logged in while invalidate do the same (e.g. call signOut ) but remove the logon data from where ever they have been persisted At first glace for logout action signOut should be called. But for security reasons session must be invalidated immediately after user logins or logouts. So from this point invalidate should be called. So what to

How to return link to an external URL in Wicket?

こ雲淡風輕ζ 提交于 2019-12-12 12:03:09
问题 I have a web application with form. When I click to save, application creates some file and returns some url. How I can display this url to web page? 回答1: Use ExternalLink . A normal static link: new ExternalLink("link", "http://some.url", "This is a some.url link"); Depending on the context may be better to use this other constructor that admits and IModel of your href and label parameters: ExternalLink(final String id, final IModel<String> href, final IModel<?> label) 回答2: One way is to

In the Wicket DropDownChoice how can you replace “Choose one” to another text

℡╲_俬逩灬. 提交于 2019-12-12 10:34:03
问题 I have a DropDownChoice like below: final DropDownChoice<Term> terms = new DropDownChoice("terms", new Model<Term>(), new Model(new ArrayList(termDao.findAll())), new IChoiceRenderer<Term>() { public Object getDisplayValue(Term object) { return object.getIdentifier(); } public String getIdValue(Term object, int index) { return object.getId().toString(); } }); I want to have "Choose All" instead of "Choose one". How can I do that? 回答1: I tried Goli's suggestion under wicket 6.4 and it doesn't

support for Multi Window wicket 6.x

扶醉桌前 提交于 2019-12-12 09:55:43
问题 Hi i am using wicket and getting page expire when ever two pages are open and I am trying to submit in on after the other is there a way to support getPageSettings().setAutomaticMultiWindowSupport(true) in wicket 6.8 回答1: You've to know how big your pages will get and how many sessions you've in parallel. I think your page size (serialized) is bigger than maxSizePerSession and because of that only last page is stored on disk. you can tweak your IPageStore settings a bit (but this will

Can a wicket:child tag be nested under another Component on the Page?

时光毁灭记忆、已成空白 提交于 2019-12-12 09:45:08
问题 In Wicket 1.4, I'm trying to allow child pages to alter a CSS class on a tag in the parent page, which I do all the time. What is odd about this case is that the tag I want to target wraps the child page markup . Here's a simplified snip of what I tried: ParentPage.html <div id="main" wicket:id="main"> <wicket:child /> </div> ParentPage.java public abstract class ParentPage { private WebMarkupContainer main; protected ParentPage() { main = new WebMarkupContainer("main"); add(main); } public

Dynamic markup in Wicket

僤鯓⒐⒋嵵緔 提交于 2019-12-12 08:21:23
问题 Is it possible to generate the markup for a MarkupContainer dynamically, i.e. without storing an HTML file for it? I thought about reading the markup as a plain string from the database to offer CMS-like functionality. 回答1: Interesting question and I'm not sure if it is possible, but my guess would be to start off looking at the IMarkupLoader and IMarkupResourceStreamProvider interfaces and implementing classes and see how far you get from there. I'd be interested in anything you find /

Architecture Question: GWT or Vaadin to create Desktop Application?

拟墨画扇 提交于 2019-12-12 08:15:04
问题 We're planning on creating a feedreader as a windows desktop- and iPad application . As we want to be able to show Websites AND to run (our own) JavaScript in this application, we thought about delivering the application as HTML/CSS/JavaScript, just wrapped by some .NET control or a Cocoa Touch webbrowser component. So the task at hand is to find out which framework to use to create the HTML/CSS/JS files to embed in the application. For the development of the HTML/CSS/JavaScript we would be

Wicket http post, get raw data from servletrequest?

百般思念 提交于 2019-12-12 07:23:45
问题 I try do POST some data to a Wicket WebPage. This works fine if the data is in a form. However, I want to post the data with jQuery's ajax-post. I am unable to get this data in my Page-constructor. This is my jquery command: $.ajax({ type: "post", cache: false, url: "http://localhost:8888/testjson", data: JSON.stringify({"aap":"noot"), contentType: 'application/json', success: function(ydata){alert("aap");}, failure: function(errMsg) {alert(errMsg);}, contentType: false, dataType: "json" });