RE: dynamic DataTable

2011-07-21 Thread Wilhelmsen Tor Iver
Since TextArea can contain any SELECT statement, Column names, count can change every time. So I need a dynamic table that is compatible to view any SELECT Statement result. Since you appear to have no need for performing updates or inserts, try ditching the DataTable in favour of using

RE: Problem in ListView populateItem()

2011-07-26 Thread Wilhelmsen Tor Iver
I have one comma. I followed the same example in the book, which is add(Label,IModel). But something's wrong. Strange example if so: Try instead add(new Label(id, model)); The Model is for the Label. - Tor Iver - To

RE: Dialog Box is not replaced

2011-07-27 Thread Wilhelmsen Tor Iver
@Martin: after calling D1.replaceWith(D2), D1=D2 is done as well. Are you sure you call D2.setOutputMarkupId(true)? Otherwise the Wicket Ajax handler will not find the correct DOM element to replace. - Tor Iver - To

RE: Ten things every Wicket programmer must know?

2011-07-28 Thread Wilhelmsen Tor Iver
Also: * How to avoid excessive use of Labels and AttributeModifiers (with ResourceModels) just for l10n, by using wicket:message in the template instead * compressing code by use of ids matching property names combined with CompoundPropertyModel and/or PropertyListView - Tor Iver

RE: What does this syntax say?

2011-07-29 Thread Wilhelmsen Tor Iver
public W IWrapModelW wrapOnInheritance(Component component,ClassW type) The ClassW parameter is only needed if you intend to do new W(); or the like in the method (the Class is then something the compiler can grab hold of for calling the constructor). For just passing the type parameter to

RE: getInput and getDefaultModelObject and validation

2011-07-29 Thread Wilhelmsen Tor Iver
If I am using some form validator, I notice that getDefaultModelObject does not have the value from the getInput. I am assume this intentional. Is there a way to force wicket to update the modelObject? Yes, form component models are not updated until they pass validation, that is very

RE: getInput and getDefaultModelObject and validation

2011-07-29 Thread Wilhelmsen Tor Iver
Is there a way to force a modelobject update on each individual field and then do my form validation. It seems you want to use getConvertedInput(). Going via the model to get the converted value is just a detour when you are in a validator. If you push data to the model and then decide it is

RE: session closed when adding CSSPackageResource

2011-08-05 Thread Wilhelmsen Tor Iver
When I do this : new ModelQuestionnaire(q) it creates an IModel for Questionnaire, doesn't it? I think he means to make a more dynamic model, e.g. public class QuestionnaireModel extends LoadableDetachabeModelQuestionnaire { private String theKey; public

RE: CheckGroup Model

2011-08-10 Thread Wilhelmsen Tor Iver
How can I do this in a elegant way? Are you sure your Campo class implements equals() properly? Also remember it is better to pass the IModelListCampo (that you will be using later to pick up the values) to the CheckGroup, e.g. in your case a PropertyModel based on where you read out the

RE: rendering component

2011-08-11 Thread Wilhelmsen Tor Iver
 setVisible(false) , actually renders component but disables it via style sheet Isn't that the case only when you use setOutputPlaceholderTag(true)? For other cases, nothing is output AFAIK. - Tor Iver - To unsubscribe,

RE: serialization question

2011-08-16 Thread Wilhelmsen Tor Iver
Is there a hook point to serialization of components? We would like to throw a WicketRuntimeException if we detect that we are about to attempt to serialize out an attached (in our case Hibernate) entity rather than using a LoadableDetachableModel and only serializing the id. I usually solve

RE: Community tools

2011-10-07 Thread Wilhelmsen Tor Iver
So what is the best way (official? permanent?) to link to a previous response? Link to a posting on Nabble or one of the other mailinglist-aggregators out there perhaps? :) - Tor Iver - To unsubscribe, e-mail:

RE: wicket + jasper reports

2011-10-18 Thread Wilhelmsen Tor Iver
URL resource = getClass().getClassLoader().getResource(DOCOferta.jrxml); An aside: This is the equivalent to getClass().getResource(/DOCOferta.jrxml); i.e. a resource on the classpath root. Check your projects to see if the file is in the correct location to be included at runtime.

RE: Drilling Application.getHomePage()

2011-10-21 Thread Wilhelmsen Tor Iver
Q / Problem) Since Application.getHomePage() returns Class? extends Page and in my case Multiple pages are mounted to point to the same WebPage. How to I specify the Home Page. getHomePage() returns what Page to use for a request when the URL does not refer to a mounted Page or other

RE: PageMap locking...

2011-10-24 Thread Wilhelmsen Tor Iver
Once the user has clicked a link to another page (Or switched a tab if it is a tabed page), is there a way to terminate the request to prevent a load on the server for a page that will not be displayed? Normally: no, because these are separate requests. The first request will cancel only when

RE: CheckGroup losing state on invalid submission

2011-10-25 Thread Wilhelmsen Tor Iver
Environment: Wicket 1.5.1 I have the same happen in 1.4.19. It's as if the Check's input state is reset (to the CheckGroup model state? I.e. it perhaps checks the model and cannot find the Check's equivalent value there?). - Tor Iver

RE: LDMs load too early - hold outdated application data.

2011-10-26 Thread Wilhelmsen Tor Iver
It seems to me that Wicket should detach its models again after events have triggered, in addition to after rendering has completed. That would reset the state of all models to what the developer expects it to be before rendering begins. That's nearly always - then you are just as well

RE: UTF-8 encoding RFE for warning?

2011-11-02 Thread Wilhelmsen Tor Iver
It's a known fact for me aswell now :) Note that even though properties files need to be in the default encoding, you can use non-iso-latin characters by way of the \u syntax, though a bit more cumbersome than raw Unicode characters. - Tor Iver

RE: Upgrading of Wicket application on server without losing state

2011-11-02 Thread Wilhelmsen Tor Iver
Is there a convenient way to shut down a wicket application so that it saves its complete state to e.g. the filesystem and the next wicket app that boots up initially reads the state from those files? anyone else handling server upgrades differently and in a better way? Well, if you put the

RE: EOFException(java.net.SocketException: Connection reset by peer: socket write error)

2011-11-16 Thread Wilhelmsen Tor Iver
*this.getRequestCycle().getOriginalResponse().setContentType(jpg);* Looks wrong, typically the content type is a MIME content type, which has two components, e.g. image/jpeg - Tor Iver - To unsubscribe, e-mail:

RE: Apache Wicket is a Flawed Framework

2011-11-17 Thread Wilhelmsen Tor Iver
Ah, it's been a while since a JSF/JSP zealot bothered to annoy Wicket users. Now go away and cook up a tag library or five. - Tor Iver

RE: Update Component on TextField Entry

2011-11-18 Thread Wilhelmsen Tor Iver
use the TextField component and add OnChangeAjaxBehavior to it, then from inside onEvent() you can repaint the list. And remember to put a WebMarkupContainer around the repeater since repeaters cannot be addressed by Ajax (due to reused markup and resulting synthesized ids). - Tor Iver

RE: Handling ReplaceHandlerException on continueToOriginalDestination in wicket 1.5

2011-11-24 Thread Wilhelmsen Tor Iver
continueToOriginalDestination() does alway sthrow the replacehandler exception. this is how that method works... In 1.5 perhaps, in 1.4 it returns false if it was not a redirect; that might be the cause of confusion. - Tor Iver

RE: Regarding Reset

2011-11-29 Thread Wilhelmsen Tor Iver
1.how do i use reset in java code.I have just declare a reset button in my html which is working as expected but wana know is there any other alternative of doin it. A HTML input of type=reset will by default do nothing server-side but just reset input fields of a form to the initial values.

RE: message internationalization

2011-12-02 Thread Wilhelmsen Tor Iver
When I enter first time on page I change my local to de-De. A better place to do that is in Application.newSession(). Or you can tell your browser to prefer de_DE and let Wicket pick up using Accept-Language: header (IIRC it does that for you). - Tor Iver

RE: message internationalization

2011-12-05 Thread Wilhelmsen Tor Iver
The label components are not refreshed after changing locale. Do you know why. My guess is that the labels are not using a Locale-aware model like ResourceModel, but instead have been set using construction-time getString() or the like. Another problem is that when I change the locale I

RE: Freemarker+ExtJS vs Wicket questions

2011-12-06 Thread Wilhelmsen Tor Iver
Plus another problem I see is if I have to use separate templates for each script tag I may end up with lots of small files so my logic will be peppered around. How is that much different from using a bunch of Wicket classes with templates instead of placing all webapp logic in a

RE: It is not a good idea to reference the Session instance in models directly as it may lead to serialization problems.

2012-01-04 Thread Wilhelmsen Tor Iver
// Indirection for PropertyModel object public class MySessionModel extends AbstractReadOnlyModelMySession { public MySession getObject() { return (MySession) Session.get(); } } - Tor Iver -Original Message- From: Rahman USTA

RE: Handling POST, PUT and DELETE from a resource

2012-01-05 Thread Wilhelmsen Tor Iver
Look into restlet.org Reference implementation for JAX-RS (ignore that it sorts under the Glassfish section, it runs fine in other containers too): http://jersey.java.net/ An older REST implementation that started before the JAX-RS spec but has been modified to conform (AFAIK):

RE: Populate DropDownChoice, set Object Model and still keep Please Select option

2012-01-30 Thread Wilhelmsen Tor Iver
I tried using DropDownChoice.setNullValid(true); but that only works for the dropdown choices in which no model has been set. Then you probably also need setRequired(false); Otherwise it will not show the null choice for non-null models. - Tor Iver

RE: MulitFileUploadField looses state after validation error

2012-02-06 Thread Wilhelmsen Tor Iver
No, the only workaround is probably to do the FileUpload logic during validation, and flag the upload field as completed somehow (or just show that files have been uploaded) - Tor Iver -Original Message- From: Daniel Meier [mailto:meier_dan...@sunrise.ch] Sent: 6. februar 2012 14:34

RE: Wicket in a Dot Net World

2012-02-08 Thread Wilhelmsen Tor Iver
I don't suppose anyone has ported Wicket to .NET? What, and lose all the non-designable ASP.Net or Razor goodness? :) - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail:

RE: Problem DatePicker, ModalWindow and IE8

2012-02-09 Thread Wilhelmsen Tor Iver
When i put my mouse over one of those buttons (close or change month), i don't have the pointer cursor and when i click it does nothing. Welcome to the wonderful world of IE compatibility mode. You probably need to add a DOCTYPE declaration to the top of your HTML: !DOCTYPE html PUBLIC

RE: Serving different content depending on User Agent

2012-02-13 Thread Wilhelmsen Tor Iver
I would like to know what is the best way to serve slightly different content depending on the User Agent string coming from the browser. You can pick it up in Application.newRequestCycle() or WebApplication.newWebRequest(), and use it to pick a value for Session.setStyle() and then use

RE: Get the Wicket Session from HttpServletSession

2012-02-13 Thread Wilhelmsen Tor Iver
I dont understand why WebSession is not a derivative of the native session and while from Wicket, one can access the raw session or request, the other way round doesn't seem part of officially charted waters. Because a Wicket session can be stored elsewhere if you want. Storing it in the

RE: Get the Wicket Session from HttpServletSession

2012-02-13 Thread Wilhelmsen Tor Iver
What about the part that would solve my problem -- wicket:wicket.wicketapp:session , do I just use that or there is some higher order function available :) WebApplication. getSessionAttributePrefix(WebRequest, String) seems to set it, but afterwards it's harder to get at: But once set you

RE: Serving different content depending on User Agent

2012-02-13 Thread Wilhelmsen Tor Iver
Could someone explain the meaning of the string argument to Session.setStyle()? It's used in parsing resource names, and often in code as well, e.g. hiding detail views for mobile browsing. If you have a Locale of no_NO and a style of mobile Wicket will look for e.g.

RE: refresh and AjaxFallbackDefaultDataTable

2012-02-14 Thread Wilhelmsen Tor Iver
Thus the browser still shows the old version in the URL. But all future Ajax requests are targetting a different page version than visible in the browser URL :(. Can't you fix that with a getPage().dirty(); in the Ajax request handler? - Tor Iver

RE: Component specific JavaScript

2012-02-19 Thread Wilhelmsen Tor Iver
Thanks a lot. One last stupid question: is this supposed to work for Wicket 1.4? Doubful, the event system was added in 1.5 - Tor Iver - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands,

RE: How to skip a page on back button

2012-03-01 Thread Wilhelmsen Tor Iver
Is there any way to skip a page using back button. i.e. Forward sequence: HomePage-Page1-Page2 If the link from Page1 to Page2 is a Javascript link that does a location.replace('url for Page2') the browser should not remember Page1 in the history, if memory serves. Removing from the

RE: Customizing AjaxIndicatorAppender and indicator

2012-03-06 Thread Wilhelmsen Tor Iver
See org.apache.wicket.ajax.IAjaxIndicatorAware. With this you can provide your own indicator which will be shown/hidden before/after the Ajax request I think the poster wants to use visibility: hidden instead of display: none for when it is not shown (the taking up space requirement). - Tor

RE: WICKET JAVASCRIPT

2012-03-07 Thread Wilhelmsen Tor Iver
Now , i am changing browser language from IE. I am able to get message from properties file for label and another things. But i am still unable to show above alert message in different languages. Can you solve this problem. Please reply soon. Typically, you would do this by

RE: Tree onClick() question...

2012-03-09 Thread Wilhelmsen Tor Iver
My question is why is target always null in the onClick handler? Typically that happens for AjaxFallback* components when the click is not an Ajax request, e.g. the user has disabled Javascript. In those cases target is null and the whole page will be rendered in the (normal) response. - Tor

RE: Control panels through Ajax

2012-03-14 Thread Wilhelmsen Tor Iver
My problem is how to redirect the ajax target from one Panel to the other. If Panel A needs to invoke anything in Panel B then Panel A should have a reference to Panel B (or to a mediator object that knows about it), and send the AjaxRequestTarget (which applies to the entire Page's component

RE: Control panels through Ajax

2012-03-14 Thread Wilhelmsen Tor Iver
I´m really new to web programming, so how should that solve my Problem? If I got it right the mediator does only know the colleagues which would be Panels in my case. But the methods of these colleague Panels are hidden because of inheritance (myPanel is child of Panel). Could you describe

RE: Serialize exceptions

2012-03-21 Thread Wilhelmsen Tor Iver
Hi I get a serialize exception in a panel of mine its correct that one of the contained fields cannot be serialized, however this field are injected and should not be touched by the checker, the field are marked with the @inject annotation. I'm using guice for injection.. Any thing obvious

RE: Homepage runs 2 times if I mount it as /

2012-03-26 Thread Wilhelmsen Tor Iver
/;jsessionid=6730E8A6F6FED95C9AC24E7A37F3A35A?0 This is added by the web container in case the browser does not support cookies. It is added on the first response regardless, and also on subsequent ones if the browser does not accept cookies, or you turn it off (e.g. using cookies=false in

RE: mouseover in wicket

2012-03-26 Thread Wilhelmsen Tor Iver
is possible to create mouseover and show tooltip (wicket panel with html) when I move cursor over html element/text/link. Is there any way how to do it in wicket? I have used the wicketstuff Mootip extensions to do that earlier, worked fine. Only drawback was that the MootipBehaviour

RE: Could not find child with id: cart:prezzo in the wicket:enclosure

2012-03-27 Thread Wilhelmsen Tor Iver
Last cause: Could not find child with id: cart:prezzo in the wicket:enclosure You are running into an issue with repeaters: Their subelements have the index as part of the path, so the relative element id for the first row element would be cart:0:prezzo - and with no rows there is no element

RE: AjaxIndicatingDropDownChoice

2012-03-27 Thread Wilhelmsen Tor Iver
How do I change the cursor to Wait as long as the spinner is also spinning? Use CSS (cursor: progress;) for the element used as the busy indicator, either on id or on class with or without the :hover pseudoclass. - Tor Iver

RE: Creating a submit form which takes date and a string as input and displays the data from database(mysql) using simple jdbc

2012-03-27 Thread Wilhelmsen Tor Iver
I want to know how to input date into database using form. I am using Timestamp in mysql. The Wicket-related psrt of that question is that you use a TextFieldDate with a model, and you then get the model object value in onSubmit() and use normal SQL to insert or update. - Tor Iver

RE: log4j.properties

2012-03-29 Thread Wilhelmsen Tor Iver
Additionally you can put log4j.properties in its own jar and put it in $tomcat/lib. That's the default for Tomcat 6+, but formally the location for shared classpath entries is defined in the property common.loader in $tomcat/conf/catalina.properties. So e.g. to re-establish the older

RE: Accessing .properties file

2012-03-30 Thread Wilhelmsen Tor Iver
I am using netbeans for maven project(with added wicket framework) and i want to access something.properties from a java class. Are the properties files not being put into the output jar/war files? Remember that Maven by default sets up a structure where *.java goes into src/main/java and

RE: Accessing .properties file

2012-03-30 Thread Wilhelmsen Tor Iver
Coiuld u please give me a sample of the code for the pom.xml for accessing .properties file Not sure what you mean, you don't usually put code in pom.xml. Look into configuring the resource elements to include the correct file types and folders. - Tor Iver

RE: Wicket 1.5 markup id for a reused TextField is the same

2012-04-09 Thread Wilhelmsen Tor Iver
In 1.4 version of wicket there was no impact, but in 1.5.5 the id is not overwritten by wicket. Presumably they changed it so that it would work as a markup equivalent to setMarkupId(), though I haven't checked the changes list to verify that. :) - Tor Iver

RE: How to embedded CheckBox in the DropDownChoice Options

2012-04-09 Thread Wilhelmsen Tor Iver
I want to embedded CheckBox in the DropDownChoice Options so that I can select multi options in the page. Browsers render multiple-select controls differently, adding checkboxes to a DropDownChoice (single-select) makes no sense since the browser will be sending one value anyway. Look into

RE: Wicket cannot find id in inner enclosure...but has no problem in outer one!!!

2012-04-17 Thread Wilhelmsen Tor Iver
Hi, can anyone tell me any other alternative of enclosure if the above problem cant be bugged out?? You can do explicitly what the enclosure does more conveniently, by using a WebMarkupContainer where isvisible() delegates to the child's isVisible(). - Tor Iver

SV: Check validator existence

2008-04-14 Thread Wilhelmsen Tor Iver
is there an API in wicket to know if a Validator instance has been added to a form? Two solutions: 1) Call iterator() and test with instanceof IValidator on each element until you get true. This will only find validators on the form and not on the subcomponents... 2) Make a Component.IVisitor

Wicket portles in Sun Portal

2008-04-14 Thread Wilhelmsen Tor Iver
We have (wisely :) ) chosen Wicket as web framework, but also chosen Sun Portal as the portal engine (not just Pluto but the commercial product). This causes a problem since Sun apparently haven't implemented the two interfaces required by Apache's bridge, so Wicket 1.3.x portlets do not work

SV: Wicket portles in Sun Portal

2008-04-16 Thread Wilhelmsen Tor Iver
For b) I hope to get started on that ASAP. Excellent news! :) (Since this is so significant for us I might have a go at adding the support later this week if I can wrap my head around the source and API docs... testing for the presence of the Portlet 2.0 API as you mentioned is probably the

Re: stream content with an IndicatingAjaxLink

2008-05-20 Thread Wilhelmsen Tor Iver
Take on account that in Ajax, the browser does not make a normal HTTP request, but an XmlHttpRequest from Javascript, and then expects an XML fragment as a response (a piece of DOM tree as far as I know). I cannot imagine how could you transmit an image via Ajax, but if it is possible,

Re: Wicket portles in Sun Portal

2008-06-13 Thread Wilhelmsen Tor Iver
To dig up this old thread: I now use Ate Douma's patch for JSR-286 support from https://issues.apache.org/jira/browse/WICKET-1620 which has removed the need for the portal to implement the Apache portlet bridge's two interfaces. A small step for man etc. :) There now is an issue - the same I had

SV: Wicket portles in Sun Portal

2008-06-16 Thread Wilhelmsen Tor Iver
Thijs Vonk wrote: Ate Douma wrote: Thanks to both of you! Note though that you have to build a svn copy of the portlet-container. RC2 contains a bug I found which prevents Ajax to work correctly. Will try that. - To

Re: Wicket portles in Sun Portal

2008-06-16 Thread Wilhelmsen Tor Iver
Got it to work after building portlet-bridges-common from the trunk source. - The change I made to PortletWindowUtils which seems to work (so far *crosses fingers*): public static String getPortletWindowId(PortletSession session) { final Object tmp =

Re: Regarding Loacale

2008-06-23 Thread Wilhelmsen Tor Iver
When I, on the fly, change the language to something else (de_CH), the Locale in my application is not changed. Looking at Wicket 1.3 and 1.4 sources, the locale is picked up in the Session constructor, so presumably you need to nuke the Wicket session or let it expire before trying a new

<    1   2   3