[Wicket-user] wicket 1.1.1:radiochoice default selected value?

2006-03-16 Thread Nino Wael
Title: wicket 1.1.1:radiochoice default selected value? Hi I need to have a default value selected when rendering a radiochoice, should I overide getdefault choice for to do this? -regards Nino

Re: [Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Igor Vaynberg
ah, if you are on 1.1 then we already have examples that do this.check out wicket-examples under display tag examples. there should be an export example there.-Igor On 3/16/06, Timo Stamm <[EMAIL PROTECTED]> wrote: Thanks Igor, I like this suggestion:add(new Link("export-link") {onclick() {

Re: [Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Timo Stamm
Thanks Igor, I like this suggestion: add(new Link("export-link") { onclick() { getRequestCycle().setRequestTarget(new ComponentRequestTarget(dt)); WebResponse wr=(WebResponse)getResponse(); wr.setHeader(blah); } } But it requires wicket 1.2. I tried to use a simple

Re: [Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Igor Vaynberg
hi Timo,please see this thread for a way to do it:http://www.nabble.com/Rendering-DataTable-or-DataView-%28or-model%29-as-Excel-sheet-t1042760.html#a2711299 -IgorOn 3/16/06, Timo Stamm <[EMAIL PROTECTED]> wrote: Hi,I have a filterable table (based on DataView - nice work, thanks Igor)and need a but

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
That would be awesome Eelco if that happens.  It does make more sense to have the request available before the session is created.  Please let me know if and when you make this change so I can change my code and/or test this for you. On 3/16/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: It's actua

Re: [Wicket-user] Re: Re: Get version of Wicket from program

2006-03-16 Thread shumbola
What about using Package interface? Class cls = Class.forName("wicket.Application"); Package pkg = cls.getPackage(); String name = pkg.getName(); String specTitle = pkg.getSpecificationTitle(); String specVendor = pkg.getSpecificationVendor(); String specVersion

[Wicket-user] Starting download after form submission [Wicket 1.1.1]

2006-03-16 Thread Timo Stamm
Hi, I have a filterable table (based on DataView - nice work, thanks Igor) and need a button to export selected entries as CVS. After form submission, I can simply get the selected entries from an extended IDataProvider implementation and generate the CSV data. But how do I get the data to

Re: [Wicket-user] Difference between Panel and Border

2006-03-16 Thread Eelco Hillenius
Heh. Maybe I should restate that. The description isn't whacky on second read. I thought I wrote it myself :) Eelco On 3/16/06, Gwyn Evans <[EMAIL PROTECTED]> wrote: > Looks like it's from > http://www.wicket-wiki.org.uk/wiki/index.php/Panels_and_borders if you > want to edit it! > > /Gwyn > > >

Re: [Wicket-user] Difference between Panel and Border

2006-03-16 Thread Eelco Hillenius
Maybe 'around' is a bit a weird term too. A more visual explanation: Panel: blah, blah Panel contents more blah vs Border: Border before blah, blah more blah Border after So in fact, a border puts markup before and after a component, while a panel is put inside it.

Re: [Wicket-user] Difference between Panel and Border

2006-03-16 Thread Gwyn Evans
Looks like it's from http://www.wicket-wiki.org.uk/wiki/index.php/Panels_and_borders if you want to edit it! /Gwyn On 17/03/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > The description is a bit whacky. A panel is a container that replaces > any contents. I.e. you can draw a box on your scree

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Eelco Hillenius
It's actually pretty awfull. I don't really see the point of having to create the session upfront AND delegating the creation of the request cycle to the session which in turn delegates it to the factory which is set in the application. The problems I have with the current handling: 1) It seems to

Re: [Wicket-user] objects in session

2006-03-16 Thread Eelco Hillenius
It is a major goal of Wicket to simplify things. But not the only/ utmost. There are a couple of good reasons for the way we implemented session: 1) Discourage direct usage of HttpSession. - If you play by the rules and use the Wicket Session, you may later decide to store the session e.g. in a

Re: [Wicket-user] objects in session

2006-03-16 Thread Igor Vaynberg
UserSession us = new UserSession(EditProductApp.get());this is wrong, you dont create the session yourself, you let wicket create it for you (thats why you return a factory)so in your page:UserSession session=(UserSession)getSession(); sometimes nice to have this wrapped in a basepage.-IgorOn 3/16/

Re: [Wicket-user] Difference between Panel and Border

2006-03-16 Thread Eelco Hillenius
The description is a bit whacky. A panel is a container that replaces any contents. I.e. you can draw a box on your screen and if that was a panel, that whole box would be replaced by the contents of the panel. A box is kind of te opposite. It is meant to decorate a component; it draws around it. P

Re: [Wicket-user] objects in session

2006-03-16 Thread Vincent Jenks
I see, well I'm not complaining but my point is; it's just not simple to use and in most other aspects...wicket is worlds easier than JSP + Servlets.  Perhaps there needs to exist a sub-implementation of WebSession that is global and easy to access & use...just for those of us who don't need to use

Re: [Wicket-user] objects in session

2006-03-16 Thread Jonathan Cone
One thing to keep in mind is that you could put a method in your page subclass like:   public class MyWebPageSubclass extends Webpage { public User getUser() {     return ((MySessionObject)getSession()).getUser(); }}   this would allow you to abstract some of the chained invocations if that'

Re: [Wicket-user] objects in session

2006-03-16 Thread Igor Vaynberg
we do not provide that get/setObject() method because we want to encourage type safety.furthermore the session is also used to store application logic, like logic related to authentication/authorization or anything else youd like. it is not a simple Map like http session, it can be much much more.

Re: [Wicket-user] objects in session

2006-03-16 Thread Vincent Jenks
Just as an observation, this seems a bit cumbersome to simply add/access/remove objects from the HttpSession (but that's just my opinion.)It make sense, it just seems like a lot of work to tap into session values. I suppose if I had a single getter/setter that used an Object parameter I could make

[Wicket-user] Difference between Panel and Border

2006-03-16 Thread Tom van Zummeren
Hi, A beginners question, what is the difference between a Panel and a border component? I tried to use them both and I couldn't tell the difference between the two. I found this description on wicket-wiki: |The Panel component is a component that groups together a collection of other components

Re: [Wicket-user] objects in session

2006-03-16 Thread Igor Vaynberg
yep.-IgorOn 3/16/06, Vincent Jenks <[EMAIL PROTECTED]> wrote: MySessionObject being a class you created subclassing WebSession?On 3/16/06, Jonathan Cone <[EMAIL PROTECTED] > wrote: Hey Vincent,   What I would do is override getSessionFactory in your application class, something like this:  

Re: [Wicket-user] objects in session

2006-03-16 Thread Jonathan Cone
Yep - so then any instance variables you put in that class will be stored in the session. - Original Message - From: Vincent Jenks To: wicket-user@lists.sourceforge.net Sent: Thursday, March 16, 2006 5:26 PM Subject: Re: [Wicket-user] objects in session MySes

Re: [Wicket-user] objects in session

2006-03-16 Thread Vincent Jenks
MySessionObject being a class you created subclassing WebSession?On 3/16/06, Jonathan Cone <[EMAIL PROTECTED] > wrote: Hey Vincent,   What I would do is override getSessionFactory in your application class, something like this:    @Override protected ISessionFactory getSessionFactory() {  r

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Igor Vaynberg
great.On 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: Yeah it works.  However, since the new request cycle is called on every request I had to put in an if statement to test for session.isNew().  On 3/16/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: let me know if that worked.-IgorOn 3/16/06

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
Yeah it works.  However, since the new request cycle is called on every request I had to put in an if statement to test for session.isNew().  On 3/16/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: let me know if that worked.-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: Cool.  Thanks Ig

Re: [Wicket-user] objects in session

2006-03-16 Thread Jonathan Cone
Hey Vincent,   What I would do is override getSessionFactory in your application class, something like this:    @Override protected ISessionFactory getSessionFactory() {  return new ISessionFactory() {    public Session newSession() {return new MySessionObject(YourApplicationClass.this)

Re: [Wicket-user] Examples of model decorators

2006-03-16 Thread Igor Vaynberg
not really sure what you mean...but here is a simple decorator that does uppercase on the model object, assuming of course its a string.class UpperCaseModel implements IModel {   private IModel delegate;      public UpperCaseModel(IModel delegate) { this.delegate=delegate; }      Object getObject(C

Re: [Wicket-user] objects in session

2006-03-16 Thread Igor Vaynberg
create a WebSession subclass and instead fo storing it in your page stored it there instead. then you can get to it from anywhere.-IgorOn 3/16/06, Vincent Jenks <[EMAIL PROTECTED]> wrote: If objects used in a page are stored in a session, how do I access those objects when I redirect to a new page

Re: [Wicket-user] Resource not found: Enable debug messages?

2006-03-16 Thread Igor Vaynberg
do you call getResourceSettings().getResourceFinder(wpath).add(wpath) ?-IgorOn 3/16/06, Matthias Albert < [EMAIL PROTECTED]> wrote:Thanks, that helped. I changed the wrong file. Now I still have to analyse the messages. I moved the html file from the classpath to adifferent folder "content" and con

[Wicket-user] objects in session

2006-03-16 Thread Vincent Jenks
If objects used in a page are stored in a session, how do I access those objects when I redirect to a new page?  Say I have public users who login and I want to display their name on pages and keep their user info in-session...on each page, how would I call those values? Thanks!

[Wicket-user] Examples of model decorators

2006-03-16 Thread Frank Silbermann
Are there any examples of model decorators I could look at?  I have a model that consists of one of several code values, and I would like a label to automatically display a text string associated with the code value.

Re: [Wicket-user] Resource not found: Enable debug messages?

2006-03-16 Thread Johan Compagner
you still have the package structure in the content dir?That is still a requirement or else you have to do the resource loading completely yourselfjohanOn 3/16/06, Matthias Albert <[EMAIL PROTECTED]> wrote:Thanks, that helped. I changed the wrong file. Now I still have to analyse the messages. I m

Re: [Wicket-user] Javascript error when using AjaxCheckBox - Wicket-1.2-beta1

2006-03-16 Thread Igor Vaynberg
is that verbatim? i dont see anywhere in our code "WicketAjaxPost" which should in fact be "wicketAjaxPost". could you please attach the generated html and the complete output of the debug console. -IgorOn 3/16/06, Mark Southern <[EMAIL PROTECTED]> wrote: I'm now using the latest s

Re: [Wicket-user] Resource not found: Enable debug messages?

2006-03-16 Thread Matthias Albert
Thanks, that helped. I changed the wrong file. Now I still have to analyse the messages. I moved the html file from the classpath to a different folder "content" and configured that as WebApplicationPath wpath = new WebApplicationPath( getWicketServlet().getServletContext()); wpath.add("con

RE: [Wicket-user] Javascript error when using AjaxCheckBox - Wicket-1.2-beta1

2006-03-16 Thread Mark Southern
I’m now using the latest source from the repository. That doesn’t appear to be the answer.   After testing in FireFox and using the _javascript_ console there I get the error message: “WicketAjaxPost is not defined”.   Thanks for the continuing help!   From: [EMAIL PROTECTED]

Re: [Wicket-user] Resource not found: Enable debug messages?

2006-03-16 Thread Igor Vaynberg
the error means that wicket could not find the markup file for your page or panel. make sure it is named propely.as far as logging goes, usually you need to add wicket=debug, stdout <== that stdout is the name of the logger defined. see the log4j webpage for details. -IgorOn 3/16/06, Matthias Alber

[Wicket-user] Resource not found: Enable debug messages?

2006-03-16 Thread Matthias Albert
Could anyone give me a hint how to "enable debug messages for wicket." package, please? I found log4j in the dependencies, looked on the website of log4j, tried to edit a sample properties file, but without success. The error message on my console is: ERROR - RequestCycle -

[Wicket-user] 优惠代开发票!

2006-03-16 Thread 腾达实业有限公司
您好! 腾达实业有限公司因进项较多,每月有部分结余发票可优惠对外代开. 普通发票,运输发票(税率0.8%-1.5%左右).增值发票(税率6%左右),可验证 后付款. 联系电话:13927434328(张先生) --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media.

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Igor Vaynberg
let me know if that worked.-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: Cool.  Thanks Igor.On 3/16/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: instead of using a session factory try using a request cycle factory and setting the style into the created websession there. -IgorOn 3/16/0

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
Cool.  Thanks Igor.On 3/16/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: instead of using a session factory try using a request cycle factory and setting the style into the created websession there. -IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: It looks like the RequestCycle is not fil

Re: [Wicket-user] Javascript error when using AjaxCheckBox - Wicket-1.2-beta1

2006-03-16 Thread Igor Vaynberg
i think the problem is that you didnt call checkbox.setOutputMarkupId(true) so its markup id never made it into the markup.i made the ajax behavior smarter, it will now call that for you whenever it is attached. so either do the call yourself, or update to trunk.-IgorOn 3/16/06, Mark Southern <[EM

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Igor Vaynberg
instead of using a session factory try using a request cycle factory and setting the style into the created websession there.-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: It looks like the RequestCycle is not filled in until RequestCycle cycle = session.newRequestCycle(request, respons

[Wicket-user] Javascript error when using AjaxCheckBox - Wicket-1.2-beta1

2006-03-16 Thread Mark Southern
I’m getting a _javascript_ error: “Error: Object expected” when clicking on a checkbox in a form. The server request is not sent.   The java code and rendered html are shown below. I note that wicket adds a js script to the page and that the path for this doesn’t exist.     Any help w

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
It looks like the RequestCycle is not filled in until RequestCycle cycle = session.newRequestCycle(request, response); in WicketServlet (line 209 for Wicket 1.2 Beta 1)On 3/16/06, Andrew Berman <[EMAIL PROTECTED]> wrote: I should've mentioned that I already tried that and when I call RequestCycle.

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
I should've mentioned that I already tried that and when I call RequestCycle.get(), I get a null.On 3/16/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:you can try: ((WebRequest)RequestCycle.get().getRequest()). -IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED] > wrote:I have a requirement where

Re: [Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Igor Vaynberg
you can try: ((WebRequest)RequestCycle.get().getRequest()).-IgorOn 3/16/06, Andrew Berman <[EMAIL PROTECTED] > wrote:I have a requirement where I need to parse the URL to extract a username on session creation.  For example, http://username.foo.com/..., I need to pull out the username and set

[Wicket-user] Parsing URL upon session creation

2006-03-16 Thread Andrew Berman
I have a requirement where I need to parse the URL to extract a username on session creation.  For example, http://username.foo.com/..., I need to pull out the username and set a style in the session.  So, I figured that upon session creation I could parse the request and set the style.  In my appl

Re: [Wicket-user] What about Wicket Javascript and Browser errors?

2006-03-16 Thread Igor Vaynberg
i dont use netbeans, and the ant build fails, so i cant build a war and check it out. this is why i asked you to reproduce the problem in wicket-quickstart project - so that i can quickly launch it. if you cant do that then maybe someone who uses netbeans can help you. -IgorOn 3/16/06, Ayodeji Alad

Re: [Wicket-user] What about Wicket Javascript and Browser errors?

2006-03-16 Thread Ayodeji Aladejebi
igor,   I work with Netbeans 5.0 bundled with tomcat 5.5.9   so i have uploaded the tinyest netbeans project sample as i copied it code for code in the ajax example  My headache is that most of my applications involving _javascript_ like dojo-contribs works fine under wicket 1.1.1.   but when i swi

Re: [Wicket-user] Wicket Tree Usage

2006-03-16 Thread Ayodeji Aladejebi
great works fine..thanks On 3/16/06, Ingram Chen <[EMAIL PROTECTED]> wrote: try this:PackageResourceReference ref = new PackageResourceReference(MyPage.class, "Knob.gif") ;return new Image(Tree.JUNCTION_IMAGE_NAME, ref) ;Knob.gif and MyPage.class should place at the same directory . On 3/16/06,

Re: [Wicket-user] Overriding onRender() for BookmarkablePageLink

2006-03-16 Thread Gili
Absolutely, I can see why it would be useful to override getEnabled() when your state depends on many factors (some of which you cannot hook). I can also see the case where setEnabled() is simply easier to use for more static or hookable factors. Anyway, good to know. Gili Eelco Hillenius

Re: [Wicket-user] What about Wicket Javascript and Browser errors?

2006-03-16 Thread Igor Vaynberg
its been tested on IE6 and worked fine. so must be something weird. can you package a distilled example into a quickstart project so i can start it locally and take a look?-Igor On 3/16/06, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: well IE6 on Windows 2003 running tomcat 5.5.9 On 3/15/06, Igor V

Re: [Wicket-user] link behaviour for area tag.

2006-03-16 Thread Eelco Hillenius
Did you check out wicket.markup.html.link.ImageMap? If I understand you correctly, that's the component you are looking for. Eelco On 3/16/06, karthik Guru <[EMAIL PROTECTED]> wrote: > I have the following html tag in my template and I need link like behaviour. > wicket Link doesn't check for 'ar

Re: [Wicket-user] Overriding onRender() for BookmarkablePageLink

2006-03-16 Thread Eelco Hillenius
> Playing devil's advocate here: so what's the point/benefit of > preventing a call to setEnabled() if one can override isEnabled and > "modify the hierarchy" beyind Wicket's back anyway? > That setEnabled method records a change and is thus useful for a visibility flag that has to roll ba

Re: [Wicket-user] Wicket Tree Usage

2006-03-16 Thread Ingram Chen
try this:PackageResourceReference ref = new PackageResourceReference(MyPage.class, "Knob.gif") ;return new Image(Tree.JUNCTION_IMAGE_NAME, ref) ;Knob.gif and MyPage.class should place at the same directory . On 3/16/06, Ayodeji Aladejebi <[EMAIL PROTECTED]> wrote: Please can does any one have samp

[Wicket-user] link behaviour for area tag.

2006-03-16 Thread karthik Guru
I have the following html tag in my template and I need link like behaviour. wicket Link doesn't check for 'area' tag. So s'd i just have a simple WebmarkupContainer that adds the href attribute like wicket link and use that instead?         thanks, -- karthik --

[Wicket-user] Wicket Tree Usage

2006-03-16 Thread Ayodeji Aladejebi
Please can does any one have sample on how to make use to the Wicket Tree     add(new Tree("tree", new DefaultTreeModel(rootTreeNode)){    public Image getJunctionImage(DefaultMutableTreeNode node){    return new Image(Tree.JUNCTION_IMAGE_NAME , "Knob.gif");    }   

Re: [Wicket-user] Overriding onRender() for BookmarkablePageLink

2006-03-16 Thread Johan Compagner
you can use setEnabled just fine.But not in the render phase. That should be done in the onclick or something like that.johanOn 3/16/06, Gili <[EMAIL PROTECTED]> wrote: Playing devil's advocate here: so what's the point/benefit ofpreventing a call to setEnabled() if one can override isEnab

Re: [Wicket-user] Overriding onRender() for BookmarkablePageLink

2006-03-16 Thread Gili
Playing devil's advocate here: so what's the point/benefit of preventing a call to setEnabled() if one can override isEnabled and "modify the hierarchy" beyind Wicket's back anyway? I personally prefer explicit calls to setEnabled() from onRender() than subclassing because it allows me to

Re: [Wicket-user] What about Wicket Javascript and Browser errors?

2006-03-16 Thread Ayodeji Aladejebi
well IE6 on Windows 2003 running tomcat 5.5.9 On 3/15/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote: what browser/version do you use? -Igor On 3/15/06, Ayodeji Aladejebi <[EMAIL PROTECTED] > wrote: i get your point right igor but my headache is is even more of the fact that i always get this Err