Problem including CSS with CSSPackageResource
Hello, I need to dynamically include different style sheet files for different browser types. Trying to go with add(CSSPackageResource.getHeaderContribution("css/common.css")); from by BasePage.java, which is the base class all my pages inherit from (net.myself.myproject.BasePage.java) For some reason, the generated code is I cannot get rid of this (wrong!) "../" in the path. The layout in myapp.war is a very basic one: /WEB-INF /images /css I am calling my wicket application like this: http://www.server.com/myapp So, I can, by hand, reach my css by http://www.server.com/myapp/css/common.css But exactly this last path is impossible to create with wicket. I am wondering what is wrong with above code... Thanks so much for your help! Benjamin
NonCachingImage for CSS?
Hello, I am including dynamic images into my webapp, using code like this: add(new NonCachingImage("image", new AbstractReadOnlyModel() { @Override public Object getObject() { return new ImageResource(verify.getImage(), "jpg"); } })); Now, I also have a background image, referenced from a .css file, which I want to be served dynamically. (How) can I do it? I was thinking of writing my own image servlet that gets referenced in the css, like: #welcomeMessage a { background: url('/servlet/images/welcome') left top no-repeat; display: block; ... instead of #welcomeMessage a { background: url('../images/home_willkommen.jpg') left top no-repeat; display: block; ... But it would be interesting if there's also a wicket way of doing it. Thanks! Benjamin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
input type number
Hello, how can I create input fields with input type number (html 5). With TextField, I get "must be applied to a tag with 'type' attribute matching 'text', not 'number'". But there's no NumberField in the Wicket API?! Please help! Best, Benjamin
label for & radio input don't match
Hello, in the following code, the id of the radio input is changed by wicket, so that it does not match the "for" attribute of the corresponding label anymore. How can I make sure that this does not happen? Thanks, Benjamin Verkaufsunterlagen Ich verzichte auf die gesetzlichen Verkaufsunterlagen Ich möchte die gesetzlichen Verkaufsunterlagen einsehen public class OrderInputEnrichedDocumentsPanel extends Panel { public OrderInputEnrichedDocumentsPanel(String id, Form verifyForm) { super(id); RadioGroup docChoice = new RadioGroup("docchoice"); docChoice.add(new Radio("0", new Model(OrderSecondQuery.Choice.NO))); docChoice.add(new Radio("1", new Model(OrderSecondQuery.Choice.YES))); verifyForm.add(docChoice); add(docChoice); } } - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Multiple submit buttons - CompoundPropertyModel not updated
Hello, I have a problem with a form that shall have two submit buttons. One finally submits the form with all plausibility checks, etc... the other just opens up a search form, to lookup some data for inclusion in the form. This submit shall NOT do all the checks on e.g. .setRequired(true), etc..., but it DOES HAVE to update my CompoundPropertyModel values, to deal with the user's (partially) entered values so far. I cannot get this together: setDefaultFormProcessing(false) will not update my models, setDefaultFormProcessing(true) will finally submit my form, also calling the form's onSubmit, which is not what I want. I am using an anonymous form class with the default onSubmit(), and an additionally attached Button, which has its own onSubmit(). Do you understand what I mean, and can anybody point me to the right direction? It seems to me like a very basic, fundamental thing to do, two form buttons, that deal - independently from each other - with the entered data, but it seems to be tricky nevertheless... Thanks, Benjamin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org