wicket

Starting Wicket web application with OSGi HTTP Service

為{幸葍}努か 提交于 2019-12-29 08:07:12
问题 I'm trying to start a Wicket Application using Felix implementation of OSGi HTTP service, for that I just register the service using WicketServlet with applicationClassName parameter: props.put("applicationClassName", MainApplication.class.getName()); service = (HttpService)context.getService(httpReference); service.registerServlet("/", new WicketServlet(), props, null); I have also tried using Felix Whiteboard implementation and registering the web service as a Servlet one: props.put("alias"

Access maven project version in Spring config files

久未见 提交于 2019-12-28 13:56:11
问题 I would like to display the currently running version of my web application in the page. The project is based on Maven, Spring, and Wicket. I'd like to somehow get the value of maven's ${project.version} and use it in my spring XML files, similarly to the way I use the Spring PropertyPlaceholderConfigurer to read a property file for settings that I use in my application. If I had the maven project.version available as a variable in my Spring config, I could do something like this: <bean id=

Object equality in context of hibernate / webapp

我只是一个虾纸丫 提交于 2019-12-28 12:28:32
问题 How do you handle object equality for java objects managed by hibernate? In the 'hibernate in action' book they say that one should favor business keys over surrogate keys. Most of the time, i do not have a business key. Think of addresses mapped to a person. The addresses are keeped in a Set and displayed in a Wicket RefreshingView (with a ReuseIfEquals strategy). I could either use the surrogate id or use all fields in the equals() and hashCode() functions. The problem is that those fields

Call Wicket 6 Code from Javascript and return value

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 18:59:32
问题 I have managed to call my Wicket 6 Java code from Javascript using option A in this example: https://stackoverflow.com/a/42612027/1047418 However, I have not been able to find examples for returning data from the Java side back to JavaScript (the generated JavaScript callback function does not even include a return statement). How can this be achieved? Edit: I am not trying to set an attribute in Java and as I've already explained, calling Wicket from JavaScript is not the problem here. I am

Wicket: tell the browser to scroll to certain tag (anchor)

此生再无相见时 提交于 2019-12-25 15:59:31
问题 We are using Wicket and our generated pages are quiet long (a lot of vertical scrolling). Some links or form's onSubmit methods invoke just perform some actions on the database and show the same page again: public class MyPage extends WebPage { public MyPage(PageParameters parameters) { .... final Form<Void> form = new StatelessForm<Void>("formId") { protected void onSubmit() { // some database stuff ... setResponsePage(getClass(), getPageParameters()); } }; ... } } How can I make the

Tomcat but not Jetty: NoSuchMethodError: javax.persistence.JoinColumn.foreignKey()Ljavax/persistence/ForeignKey

﹥>﹥吖頭↗ 提交于 2019-12-25 12:51:28
问题 I have recently upgraded my Wicket 6 application from Spring 3 to Spring 4. When I run the application locally on Jetty 7, it runs fine. When I deploy it to Tomcat 7, I get the following error: [2014-05-07 10:20:47,121] ERROR [org.springframework.web.context.ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init

DropDownChoice wicket get value

亡梦爱人 提交于 2019-12-25 09:40:26
问题 so I have my DropDownChoice in Wicket: final DropDownChoice drop_down_status = new DropDownChoice<String>("status", new PropertyModel<String>(this,"selected_status"), STATUS_LIST); form.add(drop_down_status); How to get the selected value? I have to get it after another button is pressed and prepare sql statement from it. drop_down_status.getRawInput() and drop_down_status.getInput() return null ( at least in my case). cheers 回答1: Since you are constructing your DropDownChoice using a

NullPointerException in HibernateDaoSupport.getSession()

浪子不回头ぞ 提交于 2019-12-25 07:15:19
问题 I'm using Wicket-1.5.x , Spring-3.2 , and Hibernate-3.6 . My application successfully starts and reads from the database, however when I try to actually load a page I get the exception pasted below. Why can't it find the session? From what I can tell its not even the dreaded LazyLoadInitializationException so I'm not even sure where to begin, I'm not sure its gotten far enough in the page render process to tell whether or not if OpenSessionInViewFilter would even have helped. org.apache

Exception java.lang.NoSuchMethodError: org.apache.wicket.AttributeModifier.append(Ljava/lang/String;Ljava/io/Serializable;)

走远了吗. 提交于 2019-12-25 06:47:19
问题 I tried to use an ObjectAutoCompleteBuilder to build ObjectAutoCompleteField as below: ObjectAutoCompleteBuilder builder = new ObjectAutoCompleteBuilder(provider); builder.autoCompleteRenderer(renderer); final ObjectAutoCompleteField autocompleteField = builder.build("searchResource" , new Model()); final TextField searchResource = autocompleteField.getSearchTextField(); searchResource.setRequired(true); but it has thrown this exception : java.lang.NoSuchMethodError: org.apache.wicket

Wicket Wizard gives false information in method isComplete();

社会主义新天地 提交于 2019-12-25 06:02:09
问题 in addition to a previous question, I'm trying to do my own implementation of a Wicket Wizard with a step overview. Now the problem is, that isComplete(); seems to return true, even if the step hasn't been finished. I made 3 wizardsteps and then I'm running this code: public class MainWizard extends Wizard{ private static final long serialVersionUID = 1L; private List<IWizardStep> steps = new ArrayList<IWizardStep>(); private Component overview = newOverviewBar("overview"); private