[Wicket-user] Best practices for project structure

2007-03-07 Thread Frank Silbermann
Last year I created two Wicket applications for use by customers. The
two applications had a virtually identical navigation struction and
similar kinds of displays, so as you might expect, I built a great many
specialized Wicket panels and parent page classes to be shared by both
applications.

I used an IDE mandated by my employer -- Jbuilder 2006 -- which provides
various builds (web build, ejb build, Javadoc build, etc.) within the
context of a single project. I created one project for application A and
another for application B.

To avoid duplicating the objects I built that were used in both
applications, I placed them in a root project C upon which both
applications A and B were dependent.

All three projects contained a web build:

*   Root project C contained a Wicket web application for trying out
my reusable components.
*   Root project A contained a web build consisting of two Wicket
applications:  (1) a Wicket application for playing with and testing the
reusable components built for that application only, and (2) a Wicket
application for the users. I also added (3) a non-Wicket stateless
servlet.
*   Root project B likewise contained a web build consisting of two
Wicket applications: (1) a Wicket application for testing project B
specific components, and (2) a Wicket application for the users.

I now have the opportunity to upgrade to JBuilder 2007, which is based
on Eclipse and is very different from JBuilder 2006.  (This is exciting
because I may finally get to use the Wicket plug-in.)  My main concern
is that in Eclipse every build type must be a separate project. I do not
like the results I get using the automatic JBuilder 2007 import wizards;
I get the impression that it's not designed for the kind of project
structure I was using. (In particular, most people would probably
consider it weird to have a Web project be dependent upon another Web
project.)

What sort of Eclipse project structure would be appropriate for what
I've done?  Should I create three Eclipse Web projects, with two of them
each depending upon the third?

Or would Eclipse be confused by the attempt to make one web project
depend upon another?  If so, should the root project C be divided into:

1.  a web project with the deployment information for testing, and 
2.  a simple Java project to contain the classes and HTML files
against which the deliverable applications will be compiled, and to be
incorporated into their deployment deliverables?

Is there any reason to divide projects A or B into muliple Eclipse
projects?
 
How, in Eclipse, do I specify whether a projects required dependency
should have its classes deployed in the deliverable (versus, say, the
kind of dependency that you can expect to already be deployed to the web
server's own lib directory)?
 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Best practices for project structure

2007-03-07 Thread Frank Silbermann

OK, I've downloaded 'Better Builds with Maven' and it shows me how I can
build a J2EE project with ejb and web sub projects, with each of those
projects relying on libraries.  How would you suggest I refactor my two
webProjects depending on a common rootWebProject to make use of the
maven-ejb-plugin?

I would want the ability to build at least three separate webmodules --
one for testing the common web components, and one webmodule for each
application using those common components.  Would I have to build a
library jar from the Java/.html code of the root web application, and
have the three web applications depend on that?

Are there any other reasonable options I should consider?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn
Dashorst
Sent: Wednesday, March 07, 2007 3:11 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Best practices for project structure

I'd suggest downloading 'better builds with maven', and base your
project on that... There is no replacement for a good build tool and
setup without IDE's.

mvn eclipse:eclipse -DdownloadSources=true

is your friend :)

Martijn

On 3/7/07, Frank Silbermann [EMAIL PROTECTED] wrote:



 Last year I created two Wicket applications for use by customers. The 
 two applications had a virtually identical navigation struction and 
 similar kinds of displays, so as you might expect, I built a great 
 many specialized Wicket panels and parent page classes to be shared by

 both applications.

 I used an IDE mandated by my employer -- Jbuilder 2006 -- which 
 provides various builds (web build, ejb build, Javadoc build, etc.) 
 within the context of a single project. I created one project for 
 application A and another for application B.

 To avoid duplicating the objects I built that were used in both 
 applications, I placed them in a root project C upon which both 
 applications A and B were dependent.

 All three projects contained a web build:

 Root project C contained a Wicket web application for trying out my 
 reusable components.
 Root project A contained a web build consisting of two Wicket
applications:
 (1) a Wicket application for playing with and testing the reusable 
 components built for that application only, and (2) a Wicket 
 application for the users. I also added (3) a non-Wicket stateless
servlet.
 Root project B likewise contained a web build consisting of two Wicket
 applications: (1) a Wicket application for testing project B specific 
 components, and (2) a Wicket application for the users.

 I now have the opportunity to upgrade to JBuilder 2007, which is based

 on Eclipse and is very different from JBuilder 2006.  (This is 
 exciting because I may finally get to use the Wicket plug-in.)  My 
 main concern is that in Eclipse every build type must be a separate 
 project. I do not like the results I get using the automatic JBuilder 
 2007 import wizards; I get the impression that it's not designed for 
 the kind of project structure I was using. (In particular, most people

 would probably consider it weird to have a Web project be dependent 
 upon another Web project.)

 What sort of Eclipse project structure would be appropriate for what 
 I've done?  Should I create three Eclipse Web projects, with two of 
 them each depending upon the third?

 Or would Eclipse be confused by the attempt to make one web project 
 depend upon another?  If so, should the root project C be divided
into:

 a web project with the deployment information for testing, and a 
 simple Java project to contain the classes and HTML files against 
 which the deliverable applications will be compiled, and to be 
 incorporated into their deployment deliverables?
 Is there any reason to divide projects A or B into muliple Eclipse
projects?

 How, in Eclipse, do I specify whether a projects required dependency 
 should have its classes deployed in the deliverable (versus, say, the 
 kind of dependency that you can expect to already be deployed to the 
 web server's own lib directory)?

 --
 --- Take Surveys. Earn Cash. Influence the Future of IT Join 
 SourceForge.net's Techsay panel and you'll get the chance to share 
 your opinions on IT  business topics through brief surveys-and earn 
 cash 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEV
 DEV ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




--
Learn Wicket at ApacheCon Europe: http://apachecon.com Join the wicket
community at irc.freenode.net: ##wicket Wicket 1.2.5 will keep your
server alive. Download Wicket now!
http://wicketframework.org


-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance

Re: [Wicket-user] Dreamweaver

2007-01-25 Thread Frank Silbermann
Anybody working on generating most of the wicket code from the html as
far as you know?

The wicket-oriented Java code contains the presentation logic.  A big
advantage of Wicket is keeping presentation logic _out_ of the HTML.
(HTML is not object oriented, so presentation logic embedded in the HTML
-- whether in the form of tag-nestings or scripts -- is difficult to
reuse.)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
nilo.de.roock
Sent: Thursday, January 25, 2007 6:30 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Dreamweaver


Hi Otan,

... The good thing about wicket is that it's so easy to insert wicket
components into the markup by putting only the wicket:id and some few
wicket tags into the wicket markups that make it so Dreamweaver-friendly
and page authors-friendly. ... 

Exactly, it's -that- simple! And I have a use case so developing an
extension won't be difficult.

Anybody working on generating most of the wicket code from the html as
far as you know?

Kind regards,
nilo



Otan wrote:
 
 Just like what I said, I can't find any usecase to make a Dreamweaver

 extensions for Wicket.
 
 Who from your team do you expect will use Dreamweaver? The page 
 authors, right? Page authors who are working with the markup concerns 
 only the wicket:id attribute and some wicket tags. Databinder or 
 something? Wicket is not JSF or JSP. The good thing about wicket is 
 that it's so easy to insert wicket components into the markup by 
 putting only the wicket:id and some few wicket tags into the wicket 
 markups that make it so Dreamweaver-friendly and page 
 authors-friendly.
 
 Just my 2 centavos.
 
 On 24/01/07, nilo.de.roock [EMAIL PROTECTED] wrote:


 I was just checking if someone has been doing some DW work. It seems 
 no one has.

 Just thinking out loud whether I should develop something myself ...

 ( ... )

 I agree that a Dreamweaver extension for Wicket may seem useless or 
 overkill if you are a Java developer. Developers prefer vi over DW, I

 suppose. But then ( Java ) developers usually don't excel in 
 designing websites ( have a look at http://www.csszengarden.com/ to 
 see what designers can do without even touching html, let alone if 
 you give them the freedom to change html as well ). The explanation 
 is probably that designers are better in communicating with end-users

 than developers are.

 I strongly propose seperating design ( including coding html and css 
 ) and technical work from architectural design to coding Java.  But I

 am getting off-topic, to the point: a Dreanweaver extension for 
 Wicket.

 I am thinking of... ( in order of increasing complexity )

 #1 The tool should communicate clearly which components the Wicket 
 framework has to offer, what they do and how they should be used.

 #2 The tool should take care of coding wicket:id attributes 
 everywhere, either real-time or as a sort of pre-compile before 
 handing over to the Java team.

 #3 The tool should validate code and naming style.

 #4 There should be an option to temporarily replace data components 
 with dummy data.

 #5 A utility to wicket-ize existing sites. It should be possible to

 automatically generate the .html part of an existing ( data driven ) 
 website.

 I am always open to other ideas...

 I am currently studying Wicket / Databinder as a follow-up of a 
 selection project. The product of my study will be a small site 
 including a set of ( customized ) how to's for developing wicket 
 pages. I'll try to develop a Dreamweaver extension as well covering 
 #1, #2 and if time permits #3 and / or #4. I have to dive into DW but

 if I remember well there is similar stuff for PHP templating so it 
 shouldn't be too hard.

 I'll let you know when I have to something which I can show.
 - nilo de roock



 Otan wrote:
 
  Yeah, Wicket made it possible for us to use dreamweaver again for 
  componentized webpages. Based from my experience, I can't find any
 usecase
  to make a Dreamweaver extensions for Wicket.
 
  On 24/01/07, nilo.de.roock [EMAIL PROTECTED] wrote:
 
 
  Wicket makes coding fun again! I don't have a Mac but I do have 
  Dreamweaver 8. It has been a while since I have been using 
  Dreamweaver so I almost forgot what a superb program it still is. 
  - ( I hope it is not against Wicket ethics to discuss commercial 
  tool$. )
 
  I would like to ask if anyone else is on this list is using
 Dreamweaver
  to
  develop and communicate gui designs to users?
 
  If so, has anyone customized and / or extended Dreamweaver to 
  develop
 and
  validate Wicket html?
 
  --
  View this message in context:
 
 http://www.nabble.com/-Wicket-user--Dreamweaver-tf3070690.html#a85351
 17
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 
 -
 
  Take Surveys. Earn Cash. Influence the Future of IT Join 
  SourceForge.net's Techsay panel and 

Re: [Wicket-user] VOTE: IModel and 'model object' name change

2007-01-23 Thread Frank Silbermann

I don't care much for getValue() because to me the word value suggests
atomic value (or even atomic constant) -- which is not the general
case.

At first I thought of recommending getBusinessObject() to distinguish
the result from the framework-oriented model classes, but that could be
confusing if it were common practices to embed wicket models inside of
wicket models (the Decorator pattern).  If that's they case, I would
deprecate getModelObject() and replace it with getUnwrappedModel().

(Obviously, wicket documentation must somewhere explain the necessity of
_wrapping_ business objects in Wicket model classes to be accessed by
wicket components.  Once that process is understood, multiple levels of
wrapping should not be too difficult to understand.)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Locke
Sent: Tuesday, January 23, 2007 11:35 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] VOTE: IModel and 'model object' name change



yeah.  i agree.  if we did anything it would be better to change IModel
as i said, but then just deprecate getModelObject() and add a preferred
version as
getModelValue() as johan suggested.  this would only break code that
directly uses IModel (a more limited number of users).


Eelco Hillenius wrote:
 
 I voted -1, but here is my opinion about the change proper.
 
 public interface IModelV extends IDetachable
 {
   V getValue();
   void setValue(V value);
 }
 
 This would be for the better imo, though I don't hate the original
 getObject *that* much. It's just what you are used to and I think
 documentation on how models should be used is a lot more important.
 
 
 we would also change getModelObject() to getValue() as well as any
other
 related methods like getModelObjectAsString() to getValueAsString()
(or
 valueAsString() if preferred).  there might be naming conflicts
somewhere
 or
 other problems, but i don't know of any offhand.
 
 Tbh, I actually don't think Component#getValue is for the better. I
 think Component#getModelObject is way clearer than Component#getValue.
 In the end I think both value and object are ambiguous, and this
 should be fixed by documentation and examples.
 
 Btw, If there is *anything* I never liked about the whole model
 business, it is the fact that Component has methods to get the model
 value in the first place (getModelObject etc).
 
 The indirection that IModel provides is something to get used to. It
 is one of the places where we traded clarity and simplicity for
 flexibility. I think it'll be hard to grasp for newbies no matter the
 naming, so the better our documentation and examples are, the quicker
 they will be able to wrap their head around it.
 
 Eelco
 


-
 Take Surveys. Earn Cash. Influence the Future of IT
 Join SourceForge.net's Techsay panel and you'll get the chance to
share
 your
 opinions on IT  business topics through brief surveys - and earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDE
V
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 

-- 
View this message in context:
http://www.nabble.com/revising-the-%22Working-with-Wicket-models%22-page
-tf3016921.html#a8526349
Sent from the Wicket - User mailing list archive at Nabble.com.



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDE
V
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] VOTE: IModel and 'model object' name change

2007-01-23 Thread Frank Silbermann
Yes, perhaps a better way to avoid overloading the word Model or
ModelObject is to use those words to refer to that which is wrapped
(usually a non-wicket oriented business object), and use something else
for the class which does the wrapping and provides access to the wicket
page component.

However, I'm not that keen on the name IModelLocator, as the current
IModel does many things other than merely locating the model.  It
provides string-based access methods to the model's parts; it handles
persistance or detachability, etc.

So I'd prefer to make get/setModel methods of an interface named
IModelManager or IModelWrapper.

The verbs Manage and Wrap are still somewhat vague, but there's only
so much that can be done to tersely document a class that does well lots
more than just one thing.

At least IModelManager or IModelWrapper are not ambiguous (as is
ModelObject), and avoids overloading the word Model.
  


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jonathan
Locke
Sent: Tuesday, January 23, 2007 11:55 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] VOTE: IModel and 'model object' name change



what do you think of gustav and eelco's IModelLocator / get/setModel
idea?


Frank Silbermann wrote:
 
 
 I don't care much for getValue() because to me the word value 
 suggests atomic value (or even atomic constant) -- which is not 
 the general case.
 
 At first I thought of recommending getBusinessObject() to distinguish 
 the result from the framework-oriented model classes, but that could 
 be confusing if it were common practices to embed wicket models inside

 of wicket models (the Decorator pattern).  If that's they case, I 
 would deprecate getModelObject() and replace it with
getUnwrappedModel().
 
 (Obviously, wicket documentation must somewhere explain the necessity 
 of _wrapping_ business objects in Wicket model classes to be accessed 
 by wicket components.  Once that process is understood, multiple 
 levels of wrapping should not be too difficult to understand.)
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Jonathan Locke
 Sent: Tuesday, January 23, 2007 11:35 AM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] VOTE: IModel and 'model object' name change
 
 
 
 yeah.  i agree.  if we did anything it would be better to change 
 IModel as i said, but then just deprecate getModelObject() and add a 
 preferred version as
 getModelValue() as johan suggested.  this would only break code that 
 directly uses IModel (a more limited number of users).
 
 
 Eelco Hillenius wrote:
 
 I voted -1, but here is my opinion about the change proper.
 
 public interface IModelV extends IDetachable {
   V getValue();
   void setValue(V value);
 }
 
 This would be for the better imo, though I don't hate the original 
 getObject *that* much. It's just what you are used to and I think 
 documentation on how models should be used is a lot more important.
 
 
 we would also change getModelObject() to getValue() as well as any
 other
 related methods like getModelObjectAsString() to getValueAsString()
 (or
 valueAsString() if preferred).  there might be naming conflicts
 somewhere
 or
 other problems, but i don't know of any offhand.
 
 Tbh, I actually don't think Component#getValue is for the better. I 
 think Component#getModelObject is way clearer than
Component#getValue.
 In the end I think both value and object are ambiguous, and this 
 should be fixed by documentation and examples.
 
 Btw, If there is *anything* I never liked about the whole model 
 business, it is the fact that Component has methods to get the model 
 value in the first place (getModelObject etc).
 
 The indirection that IModel provides is something to get used to. It 
 is one of the places where we traded clarity and simplicity for 
 flexibility. I think it'll be hard to grasp for newbies no matter the

 naming, so the better our documentation and examples are, the quicker

 they will be able to wrap their head around it.
 
 Eelco
 

 --
 --
 -
 Take Surveys. Earn Cash. Influence the Future of IT Join 
 SourceForge.net's Techsay panel and you'll get the chance to
 share
 your
 opinions on IT  business topics through brief surveys - and earn 
 cash

 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEV
 DE
 V
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 
 
 --
 View this message in context:
 http://www.nabble.com/revising-the-%22Working-with-Wicket-models%22-pa
 ge
 -tf3016921.html#a8526349
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 --
 --
 -
 Take Surveys. Earn Cash. Influence the Future of IT Join

Re: [Wicket-user] Letting users download flat file

2007-01-04 Thread Frank Silbermann
ResourceStreamRequestTarget implements IRequestTarget -- are you
suggesting that instead of instantiating an anonymous class that
implements IRequestTarget that I construct an instance of
ResourceStreamRequestTarget?
 
If so, its constructor requires an implementation of IResourceStream and
a string that contains the responseType.  I suppose I could use
text/plain as the responseType, but where do I get the implementation
of IResourceStream?  (That interface has a whole bunch of methods to
implement.)



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan
Compagner
Sent: Thursday, January 04, 2007 3:59 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Letting users download flat file


you can use the ResourceStreamRequestTarget for that now and use
setFileName() for setting the filename.

johan



On 1/4/07, Frank Silbermann  [EMAIL PROTECTED] wrote: 

I am trying to make a button responde by downloading text to the
user which is saved as a .txt file.  Igor suggested I look at
DownloadLink, which downloads a file when clicked.
 
The code of DownloadLink does not seem to set the content type;
does the system make an assumption based on the file's suffix?
 
Trying to adapt the code in DownloadLink, I came up with the
following event for my Button subclass:
 
  public void onClick() {
getRequestCycle().setRequestTarget(

  new IRequestTarget() {
 
public void detach(RequestCycle requestCycle) {}
public Object getLock(RequestCycle requestCycle) {
return null; }
 
public void respond(RequestCycle requestCycle) {
  WebResponse r =
(WebResponse)requestCycle.getResponse();
  r.setAttachmentHeader(myFilename.txt);
  r.setContentType( text/plain; name=myFileName.txt );
 
  PrintStream printStream = new
PrintStream(r.getOutputStream());
  printStream.println(Line 1);
  printStream.println(Line 2);}

  }
);
  }
 
I expect that when I run it and click the button, the browser
should pop-up a box asking me if I wish to save file myFileName.txt
-- a file that should contain two lines of text.  But when I run
it and click my button, it goes back to the server, but then nothing
happens --the browser does not prompt me to save anything.
 
Do you see anything wrong with what I've done?   



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Vaynberg
Sent: Wednesday, January 03, 2007 11:35 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Letting users download flat file



the proper approach is to push a new request target into the
request cycle, see DownloadLink

-igor



On 1/3/07, Frank Silbermann  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

In my project, I have a button that lets the user
download the contents of a datatable in a form that MSExcel can
interpret:

  Button button = new Button(excelExport) {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( excel/ms-excel;
name=myFilename.xls );
  wr.setHeader(content-disposition,
attachment;filename=myFilename.xls);
}
  };
 
Suppose I want the button to download a text file
containing some arbitrary text (not necessarily the contents of a
DataTable).  Would I do something like this?
 
  Button button = new Button(textfileExport) {
protected void onSubmit() {
 
  StringResponse response = new StringResponse();
  response.write(
  Whatever I want contained in the output
text file...
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( text/plain;
name=myFilename.txt );
  wr.setHeader(content-disposition,
attachment;filename=myFilename.txt);
}
  };
 
If not, what is the proper approach?
 



-
Take Surveys. Earn Cash. Influence the Future of IT
Join

[Wicket-user] Letting users download flat file

2007-01-03 Thread Frank Silbermann
In my project, I have a button that lets the user download the contents
of a datatable in a form that MSExcel can interpret:

  Button button = new Button(excelExport) {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( excel/ms-excel; name=myFilename.xls );
  wr.setHeader(content-disposition,
attachment;filename=myFilename.xls);
}
  };
 
Suppose I want the button to download a text file containing some
arbitrary text (not necessarily the contents of a DataTable).  Would I
do something like this?
 
  Button button = new Button(textfileExport) {
protected void onSubmit() {
 
  StringResponse response = new StringResponse();
  response.write(
  Whatever I want contained in the output text file...
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( text/plain; name=myFilename.txt );
  wr.setHeader(content-disposition,
attachment;filename=myFilename.txt);
}
  };
 
If not, what is the proper approach?
 
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Letting users download flat file

2007-01-03 Thread Frank Silbermann
I am trying to make a button responde by downloading text to the user
which is saved as a .txt file.  Igor suggested I look at DownloadLink,
which downloads a file when clicked.
 
The code of DownloadLink does not seem to set the content type; does the
system make an assumption based on the file's suffix?
 
Trying to adapt the code in DownloadLink, I came up with the following
event for my Button subclass:
 
  public void onClick() {
getRequestCycle().setRequestTarget(

  new IRequestTarget() {
 
public void detach(RequestCycle requestCycle) {}
public Object getLock(RequestCycle requestCycle) { return null;
}
 
public void respond(RequestCycle requestCycle) {
  WebResponse r = (WebResponse)requestCycle.getResponse();
  r.setAttachmentHeader(myFilename.txt);
  r.setContentType( text/plain; name=myFileName.txt );
 
  PrintStream printStream = new
PrintStream(r.getOutputStream());
  printStream.println(Line 1);
  printStream.println(Line 2);}

  }
);
  }
 
I expect that when I run it and click the button, the browser should
pop-up a box asking me if I wish to save file myFileName.txt
-- a file that should contain two lines of text.  But when I run it and
click my button, it goes back to the server, but then nothing happens
--the browser does not prompt me to save anything.
 
Do you see anything wrong with what I've done?   



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor
Vaynberg
Sent: Wednesday, January 03, 2007 11:35 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Letting users download flat file


the proper approach is to push a new request target into the request
cycle, see DownloadLink

-igor



On 1/3/07, Frank Silbermann  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]  wrote: 

In my project, I have a button that lets the user download the
contents of a datatable in a form that MSExcel can interpret:

  Button button = new Button(excelExport) {
protected void onSubmit() {
  getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( excel/ms-excel; name=myFilename.xls
);
  wr.setHeader(content-disposition,
attachment;filename=myFilename.xls);
}
  };
 
Suppose I want the button to download a text file containing
some arbitrary text (not necessarily the contents of a DataTable).
Would I do something like this?
 
  Button button = new Button(textfileExport) {
protected void onSubmit() {
 
  StringResponse response = new StringResponse();
  response.write(
  Whatever I want contained in the output text
file...
  );
  getRequestCycle().setResponse(response);

  WebResponse wr=(WebResponse)getResponse();
  wr.setContentType( text/plain; name=myFilename.txt );
  wr.setHeader(content-disposition,
attachment;filename=myFilename.txt);
}
  };
 
If not, what is the proper approach?
 



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance
to share your 
opinions on IT  business topics through brief surveys - and
earn cash

http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDE
V

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user 





-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Why I recommended Wicket...

2006-12-19 Thread Frank Silbermann
Indeed.  One might say that Wicket is better than most other frameworks
for the same reason that C++ is better than C, that Java is better than
Pascal, or that Smalltalk is better than Basic.  Wicket allows you to
use inheritance to help re-use webpages.



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ryan
Sonnek
Sent: Thursday, December 14, 2006 5:02 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Why I recommended Wicket...




Other points of consideration is long term maintenance. A
component oriented framework like Wicket encapsulates component
functionality into a black box that can be used in many different
contexts and still work as designed. The same effect is very difficult
to achieve with custom tags (especially when they have external
dependencies like javascript, etc). 


Well said.  I think this is one of the best accomplishments of wicket.
IMO, re-usable JSP tags are nearly impossible, while reusable wicket
components are extremely quick and easy to use. 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] SortableDataProvider, size() iterator(int first, int count), Correct execution order?

2006-11-24 Thread Frank Silbermann
About DataTable and SortableDataProvider, I believe the designer's
assumptions are that in typical use:

(1) the DataProvider will not cache any data,

(2) each call to iterate() will do a select from the database,

(3) each call to size() will do a select from the database, and

(4) the number of elements in the database will not change between calls
(or if the data does change, we don't care that the screen might show
inconsistent results as the user pages back and forth).


What if we want the pages to show a consistent view, even though the
data might change as the user is paging through it?  If the data volume
is not too huge, I suppose one could page through a snapshot of the
data.  To me, that suggests putting all the data in the webpage and
using JavaScript to page through it without resubmitting.  However,
Wicket-Extensions provides no widget with this sort of client-side
functionality.  Even if we had such a widget, its use would be
impractical if the dataset were too huge for a single page download.

What one can do with the current DataTable -- at least if the number of
concurrent users is small and the size of the result set is reasonable
-- is to have the SortableDataProvide retrieve all the data at once and
cache it in session storage between pages.  Since we don't know whether
size() or iterate() will be called first, each will have to check
whether the data has already been obtained, and if not then to obtain
the data for both methods to use. 



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Manuel
Barzi
Sent: Thursday, November 23, 2006 6:25 AM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] SortableDataProvider, size()  iterator(int
first,int count), Correct execution order?

Hi, there,

I have the following composition:

WebPage ...

... DataView  CustomProvider extends SortableDataProvider

... PagingNavigator  DataView

The ERROR? I found is this:

When clicking on any of the navigation buttons (PagingNavigator), my
CustomProvider implementation is managed by Wicket FW calling its
implemented (abstract in SortableDataProvider) in the following order:

1 size()
2 iterator(int first, int count)

That causes wrong results, because it calls first the size() to check
the results obtained when I havent called the iterator(...) yet, and
inside my implementation of iterator(int first, int count) I obviously
do the call to the API that accesses to my persistent layer obtaining
the results according to the specified (first, count) pair...

So, what happens in practice... that when navigating the size() method
retrieves the before obtained iterator.size(), and not the new one that
will be obtained immediatly after it, when calling to iterator(...).

So, if the order was this:

1 iterator(...)
2 size()

The problem would be solved...

Please, would you mind explaining my how to resolve this issue?

Thank you!

M


-
Take Surveys. Earn Cash. Influence the Future of IT Join
SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDE
V
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Strategy to avoid new instances of pages and panels

2006-11-03 Thread Frank Silbermann
One style of Wicket development is to use a single page for the entire
application, switching components within the page.  If you did that,
your pages could be large components chosen by the single master page.
You could keep these page components in application or session storage
to be re-used.  

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Friday, November 03, 2006 1:31 AM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Strategy to avoid new instances of pages and
panels

Hi all!

I am looking for a pattern, strategy or code example how to avoid
creation of new page Instances when a user reloads a page. Can someone
give my a hint how to achieve following behaviour:

- static pages which have only a single instance during whole
application lifecycle ?
- some kind of page and/or factory or proxy to reuse instances?

Any best practice or some examples would be nice.

Thank you very much,

Maciej Bednarz 




-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Components Entirely In Java?

2006-10-19 Thread Frank Silbermann



To get a set of components that the page developer 
could use without having to write any HTML, the 
application architect could decide on a set of building blocks needed by page 
developers, and implement them with the associated HTML files. 
These could include basic form components, 
and components for arranging subpanels -- e.g. vertical stacking, horizontal 
placement, whatever. Then the user could build pages by instantiating and 
subclassing these pre-build components without adding any new 
HTML. 


  (To insert a subpanel in specified locations 
  of the panel-arranger, the user would create an anonymous subclass of the 
  panel-arranger which overrode the methods for creating the individual panels 
  that get arranged. This is so that the panel-arranger can pass the 
  needed wicket-id to the over-ridden method that creates that panel, without 
  the user having to know the specific wicket-ids coded in the panel-arranger's 
  HTML page.)

The difficulty is in deciding on the set of building blocks 
needed. It's sort of like designing an application-oriented programming 
language. I built my application this way, but I was the sole developer -- 
so I was continually refining and adding to my set of general-pupose and 
application-oriented building blocks as I went along. To build truly 
flexible with general-purpose building blocks that do not limit the developer's 
styling of the application would be a huge project. It would be something 
like implementing the Echo (http://www.nextapp.com/platform/echo1/echo/) 
or Echo2 (http://www.nextapp.com/platform/echo2/echo/) 
framework in Wicket.

In fact, if you really don't want the page-developers to be 
coding any HTML, the Echo or Echo 2 framework may be what you're looking 
for. But then you'll be limited to building upon whatever functionality 
their components provide.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Igor 
VaynbergSent: Wednesday, October 18, 2006 11:27 PMTo: 
wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] 
Components Entirely In Java?
you can encapsulate a great deal of markup and css into the 
components, however unless you go to extremes some basic knowledge of html is 
still needed. wicket doesnt use layout managers so you have to provide some 
basic html - at least span tags to position the components. in 
some cases if the components being added are just stacked you can use a repeater 
like RepeatingView to take care of that so end users can goMyPage() 
{ getNavContainer().add(new MyNewComponnet1());  
getNavContainer().add(new MyNewComponent2()); 
getBodyContainer().add(new 
MyNewCompoenent3());}etc-Igor
On 10/18/06, Jonathan 
Sharp [EMAIL PROTECTED] 
wrote:
I'm 
  a UI developer on a team of about 10 and are in the evaulation process of 
  wicket. Pardon my ignorance if this is obvious or misses the boat... 
  How complex would it be to provide a jar of components to our 
  developers that they can use to build their interfaces without having to touch 
  HTML? The goal would be that they would build the application without having 
  to write any HTML but simply "append" components to each other similar to how 
  you can with the DOM browser side. Our AppBasePage would then have a 
  wicket:child/ tag which is where it would render these components. 
  Does this make sense? Example Components:- Form- FieldSet- 
  FieldPair- SaveButtonDevelopers would then:class 
  MyPage extends AppBaseBase { public MyPage() 
  { Form f = new Form("myForm"); 
   f.add(new SaveButton("id", 
  "Label")); 
  add(f); }}Cheers,-js-Using 
  Tomcat but need to do more? Need to support web services, security?Get 
  stuff done quickly with pre-integrated technology to make your job easier 
  Download IBM WebSphere Application Server v.1.0.1 based on Apache 
  Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___Wicket-user 
  mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user 
  
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DateTable with alternating row color

2006-09-06 Thread Frank Silbermann
Title: Wicket-user Digest, Vol 4, Issue 34



In the Wicket 1.2 Examples I noticed 
thatDefaultDataTablesets the odd/even attribute, and an 
external.CSS file interpreted the attribute to color the rows. I 
don't believe DataTable comes with any such row-coloring rules built in. 
So if you're using DefaultDataTable and not getting odd-even row colors, check 
your .CSS file.



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Stefan 
LindnerSent: Wednesday, September 06, 2006 6:13 AMTo: 
wicket-user@lists.sourceforge.netSubject: DateTable with alternating 
row color


I just wonder about the place where in the 
DataTableExample (in wicket examples) the alternating style for the table rows 
(tr class="even"... and tr class="odd".. has to be set? Or does 
this the DefaultDataTable class for me. Or does it the SortableDataProvider? Or 
do I have to it on my own (as in the displaytag examples)?
If it should happen automatically, it does not work in 
Wicket 2.0.

Stefan
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WebObjects open source?

2006-08-31 Thread Frank Silbermann
The WOLips Eclipse plugin sounds pretty impressive!

Yes, keeping the Wicket component hierarchy in sync between the Java
file and the HTML file can be annoying.  (That's one reason I am
intrigued by the Echo2 approach -- treat HTML as machine language and
eliminate it from the application definition completely!)  My approach
for Wicket is to work in terms of panels and to keep the nesting in any
single component or page trivially simple.  (It's analogous to the
principle of keeping function/method definitions short enough to fit on
one screen.)

If you don't like the way Java flattens the component hierarchy with a
series of comp.add(...) instead of tag nesting, you can use nonstandard
indentation to show the hierarchy:

... Build components ...
 page.add(cI);
cI.add(cIA);
   cIA.add(cIA1);
   cIA.add(cIA2);
cI.add(cIB);
 page.add(cII);
cII.add(cIIA);
   cIIA.add(cIIA1);
   cIIA.add(cIIA2);
  cIIA2.add(cIIA2i);
  cIIA2.add(cIIA2ii);
cII.add(cIIB);



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alexis
Sent: Thursday, August 31, 2006 5:16 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] WebObjects open source?



How you do (refactoring) with WO : WOLips (eclipse plugin) create a new
component (juste give it a name), open in WOBuilder (WYSIWYG editor for
editing simlessly both HTML template and binding file, in fact you don't
have to know there's 2 files), cut (or copy) past the part of your
existing page you want to be isolated in the new component. Define the
component API with WOBuilder.
That's it, drop it in your existings pages, set the bindings. That's why
the tools are here. (read the manuals about WObuilder if your
interested)

Now another question for wicket and refactoring, how can you keep in
sync HTML file and Java code without tools ? I'm not only talking about
wicket:id attributes, but also all the component hierarchy ? If you
doing big refactoring, that's 2 files to maintain. By the way, yes HTML
is difficult to read, but i prefer reading HTML + bindings in WOBuilder
where you could see in 5 secondes the hierarchy than only Java where you
have to look for
comp.add(...) all flatened.
That would be awesome if the eclipse (or netbeans) plugin could
synchronize this, that might be tricky to do but interesting.

That's also the reason why i like WO, you open a large page or component
and within 1 mins you have a good idea of his behaviour. Now with
Wicket, you must have some computer brain to understand in 1 mins what a
page is doing.

Now don't get me wrong, i appreciate a lot of good stuff about wicket
and the efforts you guys are putting in it. And let's face it, WO's core
developpers are/were not doing it for free :)
--
View this message in context:
http://www.nabble.com/WebObjects-open-source--tf2177391.html#a6076647
Sent from the Wicket - User forum at Nabble.com.



-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WebObjects open source?

2006-08-30 Thread Frank Silbermann
Why do I assume that Web Objects provides only a fixed and limited set
of components to work with?  Just my knowledge of most other web
frameworks.

I read a book on JSF, and most of it was about referencing a fixed and
limited set of components from within my enhanced-HTML file.  The
chapter on creating new components looked very complicated to me -- it
appeared that one had to understand the internals of JFS to build a new
component. 

I read a book on ASP.NET -- again, most of the book was about how to
write tags to instantiate and configure a pre-built component into a web
page; again, the chapter(s) on creating and using new components (even
merely by subclassing or assembling groups of interacting standard
componets) looked very difficult.  Even if the component creation part
was not difficult, one still had to configure it into the Visual Studio
tool to access it -- unless one wants to hack into the huge ugly
enhanced-HTML tag file Visual Studio generates (which was most users
never look at).

I read a book on JSP, and the chapters on creating custom tags made the
process look like a big production.  First of all, the methodology for
programming a tag seemed peculiar, with all the special values I had to
return (use the body, don't use the body, ...), and the fact that the
Java code had to create and return properly-escaped strings of HTML
text.  Then I then had to insert an entry into an XML tag library
descriptor file, and I had to add an XML descriptor into my web page to
tell it to use that tag library.  Let me just say that I was already a
SCJP, yet the process of creating custom tags was far from intuitive to
me.

If I embed several JSF, JSP or ASP.NET tags in an HTML page and then
discover that I need something similar on many other pages, there is no
easy way to refactor my application to abstract that portion of my page
into a new component.  I'm not talking about mere include files; I'm
talking about components with a choice of possible contructors taking
various types of parameters.

Given how horrendously complex this seemingly mundane task is in most
web frameworks, it would be a pleasant surprise indeed to learn that Web
Objects makes it easy.  

The reason the task is easy in Wicket is that one doesn't build web
pages by nesting custom framework-oriented tags in a tage file.  Simple
attributes in plain HTML tells me where in the HTML file a component
should be rendered, but everything else about that component's
definition, configuration and use is done in Java code.  So building and
using custom web display components is no more difficult in principle
than subclassing and using classes from the standard J2SE packages.  

Is everything in WebObjects also done in Java code, or do you build web
pages by embedding special WebObject tags and subtags in your HTML file
just as in most other frameworks?  What is Web Object's process for
abstracting part of a page into a new component with its own API?  
  

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anders
Peterson
Sent: Wednesday, August 30, 2006 2:21 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] WebObjects open source?

Frank Silbermann wrote:


 What facility does Web Objects provide that lets you avoid having to 
 re-set those properties fifty times?

... and however you choose to construct your web display object it is
(naturally) also a component that can be used as a building block for
other web display objects.

 (Isn't the inconvenience of adding slightly-customized variations of 
 components to the toolset the reason most Swing GUI programmers end up

 building their GUI in code instead of using some IDE's graphical
 GUI-painter?)

Most people just don't want to change their way of doing things (and
some graphical GUI-painters are not very good).

You seem to think there is only a fixed and limited set of components to
work with - why assume something like that?

/Anders

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Anders

 Peterson
 Sent: Tuesday, August 29, 2006 12:51 PM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] WebObjects open source?
 
 Not sure what to say... it makes me productive...
 
 It's not really fair to compare Wicket and WebObjects (WO). WO is a 
 whole package of frameworks and tools that function well together (but

 can be used independently). Wicket needs team mates to replace WO 
 entirely.
 
 With Wicket any html and java editors will do just fine. This is 
 generally a good thing (I think) but it's also a restriction. With 
 WebObjects the tools are part of what makes the package great:
 
 Start up the WOBuilder tool, create a WODisplayGroup instance and 
 start
 (visually) combining WOComponents and binding them to data. It's fast 
 and intuitive...
 
 /Anders
 
 http://developer.apple.com/documentation/WebObjects/Conceptual/WO53_WO
 Bu
 ilderGuide/
 
 http

Re: [Wicket-user] WebObjects open source?

2006-08-30 Thread Frank Silbermann



The _Java_ code is cleaner and simpler withWeb 
Objects, but in Wicket the HTML-based tag file is much cleaner. That 
component configuration information has to go _somewhere_!

Personally, I find it much easier to read Java 
syntaxthan HTML.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Igor 
VaynbergSent: Wednesday, August 30, 2006 3:43 PM

- 
  Java code is MUCH cleaner with WO, you keep in code only data pushed in 
  thepresentation layer and actions. No need to add components and configure 
  them in java code.how is this MUCH cleaner? just because 
there is no code? you can say code for a framework that is configured via xml is 
also cleaner because there isnt any configuration code.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WebObjects open source?

2006-08-30 Thread Frank Silbermann
Igor has already mentioned one advantage of declaring and configuring 
components in code -- it is easy to make the presentation very dynamic.  For 
example, when displaying products from a catalog, the page constructor can vary 
the display-components used depending upon the type of product chosen by the 
user.  (You could have different types of panels for different types of 
products, any one of which is embedded into the same basic page object.)  But I 
have another consideration in mind.

The advocates of Extreme Programming argue that it is naïve to think one can 
always design first and then implement.  They argue that it is more realistic 
to start coding a few use cases and refine the design along the way, as 
experience adds insight and as the user's requirements become clearer.  To 
refine the design of existing code they recommend _refactoring_ (see Martin 
Fowler's book on that topic).

Suppose I've built a page and later decide, in view of the DRY (Don't Repeat 
Yourself) principle that a portion of my page should be refactored into a 
custom component.  With Wicket I can move some of the page's Java code into my 
new panel class, and move HTML snippets from the page's associated HTML to the 
panel's HTML file.  This process seems not too far removed from Fowler's 
Extract Class refactoring.  To me, the ability to easily refactor is one 
advantage of having the components added and configured in code.

To do such a refactoring in Web Objects, I am guessing that one would have to 
work with the generated tag files (a mixture of HTML and component 
configuration tags), which I doubt is practical to do by hand.  So unless the 
tool implements this kind of refactoring directly (which I doubt), you would 
create the re-usable component _from_scratch_ using the display-painting tool 
again, throwing away components that were painted earlier.  I fear that this 
wasted effort may be a disincentive against presentation-layer refactoring -- 
with the result that final designs won't be as tight as they could have been.  
(On the other hand, if the Web Objects tool makes re-doing the work 
sufficiently easy, the waste of redoing work may be insignificant.)

I can see that some applications might be easier to build with Web Objects, 
just as for building certain types of fat clients Visual Basic 6 is easier to 
use than Swing.  But for more sophisticated presentation logic, the Wicket 
approach will facilitate the use of design patterns, refactoring, and other 
modern OO techniques.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex
Sent: Wednesday, August 30, 2006 3:15 PM
To: wicket-user@lists.sourceforge.net

- Java code is MUCH cleaner with WO, you keep in code only data pushed in the 
presentation layer and actions. No need to add components and configure them in 
java code.

- Components are declared in HTML, configured in another file, binding 
(configuring) the component with the java class. This approach need tools, WO 
has some nice tools for this.

- Both frameworks make creation of custom components easy (unlike JSF!!!)

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WebObjects open source?

2006-08-29 Thread Frank Silbermann
Just glancing at your link for a few seconds, and reading the earlier
comment that it looks like ASP.NET with VS.NET, I would guess that Web
Objects provides a library of components that you can paint onto your
pages, automatically generating the custom tags in your HTML file.

Suppose you are customizing a component by setting many properties, and
using it with those settings on fifty different webpages.  In Wicket, I
can create a method which instantiates a web display object, sets its
properties and returns it.  I can then call that method every time I
want to instantiate a web object with those settings.

What facility does Web Objects provide that lets you avoid having to
re-set those properties fifty times? 

(Isn't the inconvenience of adding slightly-customized variations of
components to the toolset the reason most Swing GUI programmers end up
building their GUI in code instead of using some IDE's graphical
GUI-painter?)

/Frank

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Anders
Peterson
Sent: Tuesday, August 29, 2006 12:51 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] WebObjects open source?

Not sure what to say... it makes me productive...

It's not really fair to compare Wicket and WebObjects (WO). WO is a
whole package of frameworks and tools that function well together (but
can be used independently). Wicket needs team mates to replace WO
entirely.

With Wicket any html and java editors will do just fine. This is
generally a good thing (I think) but it's also a restriction. With
WebObjects the tools are part of what makes the package great:

Start up the WOBuilder tool, create a WODisplayGroup instance and start
(visually) combining WOComponents and binding them to data. It's fast
and intuitive...

/Anders

http://developer.apple.com/documentation/WebObjects/Conceptual/WO53_WOBu
ilderGuide/

http://developer.apple.com/documentation/webobjects/Reference/API/com/we
bobjects/appserver/WODisplayGroup.html
http://developer.apple.com/documentation/Webobjects/Reference/API/com/we
bobjects/appserver/WOComponent.html

Eelco Hillenius wrote:
 :) It's one of my favorite parts of Wicket, so sure.
 
 What about the strong points of WebObjects, what are the things you 
 really like about that?
 
 Eelco
 
 On 8/29/06, Anders Peterson [EMAIL PROTECTED] wrote:
 Sure, if it has to be just like Wicket to compete; you win. ;-)

 
 --
 --- Using Tomcat but need to do more? Need to support web services, 
 security?
 Get stuff done quickly with pre-integrated technology to make your job

 easier Download IBM WebSphere Application Server v.1.0.1 based on 
 Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=1216
 42


--
http://ojalgo.org/

Mathematics, Linear Algebra and Optimisation with Java


-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Creating Panel to display a list of Panels

2006-08-17 Thread Frank Silbermann



I had a similarneed. I wanted apanel that 
would displayseveral arbitrary sub-panels 
side-by-side:

abstract public class HorizontalPanelGrouper extends 
Panel{
 public HorizontalPanelGrouper( 
Stringid ) {
 
super(id);

 add( 
"wicketIdForPanel1", createPanel1("wicketIdForPanel1") ); // 
"wicketIdForPanel1" matches HTML 
file
 add( 
"wicketIdForPanel2", createPanel1("wicketIdForPanel2") ); // 
"wicketIdForPanel2"matches HTML 
file
 add( 
"wicketIdForPanel3", createPanel1("wicketIdForPanel3") ); // 
"wicketIdForPanel3" matchesHTML file 

}
 abstract Panel createPanel1(String 
id);
 abstract 
Panel createPanel2(String id);
 abstract 
Panel createPanel3(String 
id);
}


Whenever I needed my 
panel-of-panels I would instantiate an anonymous subclass that overrode the 
createPanelX methods:

Panel p = new 
HorizontalPanelGrouper(wicketIdForContainerPanel) 
{
 Panel 
createPanel1(String id) {
 return 
new SomePanelClass( id, 
...);
 
}
 Panel 
createPanel2(String id) {
 return 
new AnotherPanelClass( id, 
...);
 
}
 Panel 
createPanel3(String id) {
 return 
new YetAnotherPanelClass( id, 
...);
 
}
}

This way, I didn't have 
to remember the actual wicket:id used by the HorizontalPanelGrouper's HTML file 
when creating sub-panels for the HorizontalPanelGroup 
object.

If I wanted to modify 
the layout, all I had to do was create a trivial subclass (i.e. one which 
extended the base class without changing or adding anything at the java leve), 
but associated with a new HTML 
file.

If you wanted a variable 
number of sub-panels, instead of abstract methods you could have implement some 
of the sub-panels to be trivially empty panels. Alternately, you could 
have HorizontalPanelGrouper implement those methods with empty invisible panels 
as defaults. Then youneed override only some of the panel-creating 
functions.

The same approach could 
be used if you wanted a panel containing a ListView of sub-panels: 


public class 
PanelList_Panel extends Panel 
{ public PanelList_Panel(String id) 
{ 
super(id);
 add( 
new ListView("panelList", createPanelList("panelListElement") ) { 
//literal strings are fromHTML 
file 
protected void populateItem(ListItem listItem) 
{ 
listItem.add( (Panel) listItem.getModelObject() 
); 
} 
} ); 
}
 abstract 
ListPanel createPanelList( String id 
);}

When using 
PanelList_Panel I would create an anonymous subclass that implemented the 
abstract method:

Panel p = new 
PanelList_Panel(wicketIdForAggregatorPanel ) 
{
 public 
ListPanel createPanelList( String id ) 
{
 ...CREATE A 
BUNCH OF PANELS USING id AND ADD THEM TO A java.util.List AND RETURN 
IT
 
}
}

When building 
components, my natural inclination is to make them configurable via constructor 
parameters and methods to be called post-construction. With Wicket, 
however, I frequently had to design my components to accept configuration via 
the overriding of abstract or default methods by anonymous subclasses. It 
felt weird, but eventually I got used to it. I was a functional programmer 
in a past life, and it might have felt more natural if I could have passed 
functions (like C# delegates) as values to my constructors, but Java doesn't 
make that easy.

Alternatively, I suppose 
I could have built helper classes much like Swing's event-handler classes. 
The helper classes could have contained the abstract methods, and I could have 
passed concrete subclasses to my component constructors. But I didn't want 
to have to define seperate helper classes whose only purpose was to contain 
overrideable methods.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Charles A 
DealSent: Thursday, August 17, 2006 2:44 PMTo: 
wicket-user@lists.sourceforge.netSubject: [Wicket-user] Creating 
Panel to display a list of Panels
I am in the process of attempting to 
rebuild our non-framework, completely homegrown web application as a Wicket 
application. So, I am very new to the Wicket way and find myself 
struggling with different things such as proper page construction techniques for 
relatively complex data-enabled pages. So far, I have been successful in 
getting a Wicket app running that resembles our existing app, just a lot 
cleaner. I am having trouble implementing a GUI comcept that we use quite 
frequently in our current app. In 
our current app, we typically have long pages of data fields available to the 
user, in an attempt to avoid information overload, we implemented "toggle 
sections" that hide the contents of a section of the page until the section 
header or "twistee" is clicked, at which point the contents become 
visible. This is relatively simple in our app, there are two divs, one for 
the header (name of section, usually one line) and the other for the contents. 
The content div is "display:none" when the page loads and when the header 
is clicked to open, that attribute is removed. Pretty simple. 
I know that I could do the same think in 
the Wicket app, but it didn't seem to take advantage of Wicket's 

Re: [Wicket-user] Discussing Wicket

2006-08-09 Thread Frank Silbermann

Igor Vaynberg [EMAIL PROTECTED] 7/29/06:
 we do evangelize the OO wherever we can, but it mostly falls on deaf
ears.
 have you ever seen a struts app? in most struts apps the notion of a 
 class is used mostly as a namespace to group some functions together.

 its hard to explain something when most people dont understand what 
 you are talking about. at least this has been my frustrating 
 experience. like that blog from the tapestry guy ( 

http://greggbolinger.blogspot.com/2006/01/i-say-tapestry-you-say-wicke
 t.html and discussion we had here on the list ) saying listview is
too 
 complex to understand because it has an abstract callback method you 
 have to implement and because it is an anoymous class.

Wicket is complex, in the same way that Swing is more complex than
coding simple HTML form elements.  (In fact, many people complain about
the complexity of Swing, but that complexity is there for a reason.
Unfortunately, simplest possible examples do not motivate the need for
the complexity.)

I think we need to come up with some reasonable examples that motivate
the use of OO in development of presentation logic -- examples in which
Wicket elegantly factors out redundancy that would make applications in
other frameworks sprawl like the suburbs of Houston.  The challenge is
to come up with an example which is small enough to fit in a short blog
article.

What were the compelling examples which convinced people of the need for
OO-programming fifteen years ago?  How would a Swing text author
motivate the need for object-orientation in the presentation logic of a
desktop application?  We could adapt those examples to the web domain.


On 7/29/06 Eelco Hillenius wrote:
 Yeah. It seems to be a sad reality that many frameworks have it
 as their holy grail to save their users from writing any code.

Whereas I prefer the idea of a web framework that saves users from
having to write any HTML, CSS or Javascript -- or at least one that at
least lets users hide those ugly details, just as a data access object
hides the ugly SQL strings.


 And many programmers seem to agree that's what they want.

Those are the ones we've got to try to put out of business.  :-)
 

 That's how you get those famous 'framework coders'.

However, I think we're using the word `framework' with a different
connotation.  The framework programmers described in recent blogs are
generally competent programmers who avoided having to learn messy
framework API details hidden by architectural code provided by others in
the project.  In contrast, most web developers revel in the messy
web-API details, but don't understand the fundamentals of programming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Discussing Wicket

2006-08-09 Thread Frank Silbermann



You don't _need_ to know / use OO to program in Java or 
C++, but at least they _allow_ you to use OO in your programs. With all 
the reading I've done on JSF, I still don't have a clue as to the 
waysomeone who _wanted_ to use OO in structuring the presentation layer 
could do so.




From: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Igor 
VaynbergSent: Saturday, July 29, 2006 9:54 AMTo: 
wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] 
Discussing Wicket
its not only that - most frameworks are not built around OO so the 
developer is not required to know it/use it. i think the skill is mostly lost in 
the webspace.-Igor
On 7/29/06, Eelco 
Hillenius [EMAIL PROTECTED] 
wrote:
On 
  7/29/06, Igor Vaynberg [EMAIL PROTECTED] 
  wrote: we do evangelize the OO wherever we can, but it mostly falls on 
  deaf ears. have you ever seen a struts app? in most struts apps the 
  notion of a class  is used mostly as a namespace to group some 
  functions together. its hard to explain something when most people 
  dont understand what you are talking about. at least this has been my 
  frustrating experience. like that blog from  the tapestry guy 
  ( http://greggbolinger.blogspot.com/2006/01/i-say-tapestry-you-say-wicket.html 
  and discussion we had here on the list ) saying listview is too complex to 
   understand because it has an abstract callback method you have to 
  implement and because it is an anoymous class.Yeah. It seems 
  to be a sad reality that many frameworks have it astheir holy grail to 
  save their users from writing any code. And many programmers seem to agree 
  that's what they want. That's how you getthose famous 'framework 
  coders'.Eelco-Take 
  Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's 
  Techsay panel and you'll get the chance to share youropinions on IT  
  business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user 
  mailing listWicket-user@lists.sourceforge.net 
  https://lists.sourceforge.net/lists/listinfo/wicket-user
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Discussing Wicket

2006-08-09 Thread Frank Silbermann
As long as you separate the business logic (e.g. authentication rules)
from the presentation logic (the HTML), you can use the base language's
object-orientation with most any framework.  The real winner for wicket
is the use of object-orientation in the display logic.  I think you may
be onto something with the shopping cart style application.  You define
an abstract product display panel which is subclassed by a variety of
concrete leaf classes for various products and product types, and you
define a component (e.g. a tabbed panel) to display an arbitrary
collection of these products.

For each product the database could contain a display type and a
serialized property-list that tells the application whatever it needs to
know for displaying the product.  Then you could add a new product and
its display simply by adding a record to the database. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Scott
Swank
Sent: Wednesday, August 09, 2006 11:36 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Discussing Wicket

We have two applications that are largely the same.  However, (along
with some minor variations between them) they have completely different
authentication strategies.  The call center version entails logging in
once at the start, while the retail version entails authenticating
yourself every time a purchase is made.  While I don't have this working
yet --largely due to the fact that I'm still figuring out how Wicket's
authentication model works.  I am however thoroughly confident that the
approach Wicket takes will make this far easier to implement than is has
been in our legacy apps.

For an article-length review of the advantages of an OO web framework, I
really like a shopping cart style app that sells at least two
substantially distinct products.  Maybe something like...

main page

 tabbed panel
  product A panel (extends abstract product panel, which contains a 
  date picker and a list view of abstract product) -- this panel adds 
  the product A item to the abstract product panel's list view product

  B panel (extends product panel) -- add product B

 shopping cart contains a list view of abstract product
  add product A or product B


Initially there could just be html for the AbstractProductPanel, however
then html could be added for the ProductAPanel to restructure its
layout.

Or is that simply too much for an article?



On 8/9/06, Frank Silbermann [EMAIL PROTECTED] wrote:


 You don't _need_ to know / use OO to program in Java or C++, but at 
 least they _allow_ you to use OO in your programs.  With all the 
 reading I've done on JSF, I still don't have a clue as to the way 
 someone who _wanted_ to use OO in structuring the presentation layer
could do so.

  

 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Igor 
 Vaynberg
 Sent: Saturday, July 29, 2006 9:54 AM
 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] Discussing Wicket


 its not only that - most frameworks are not built around OO so the 
 developer is not required to know it/use it. i think the skill is 
 mostly lost in the webspace.

 -Igor



 On 7/29/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
  On 7/29/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   we do evangelize the OO wherever we can, but it mostly falls on 
   deaf
 ears.
   have you ever seen a struts app? in most struts apps the notion of

   a
 class
   is used mostly as a namespace to group some functions together. 
   its hard
 to
   explain something when most people dont understand what you are 
   talking about. at least this has been my frustrating experience. 
   like that blog
 from
   the tapestry guy (
  
 http://greggbolinger.blogspot.com/2006/01/i-say-tapestry-you-say-wicke
 t.html
   and discussion we had here on the list ) saying listview is too 
   complex
 to
   understand because it has an abstract callback method you have to
 implement
   and because it is an anoymous class.
 
  Yeah. It seems to be a sad reality that many frameworks have it as 
  their holy grail to save their users from writing any code. And many

  programmers seem to agree that's what they want. That's how you get 
  those famous 'framework coders'.
 
  Eelco
 
 
 --
 ---
  Take Surveys. Earn Cash. Influence the Future of IT Join 
  SourceForge.net's Techsay panel and you'll get the chance to share
 your
  opinions on IT  business topics through brief surveys -- and earn 
  cash
 
 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEV
 DEV
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 --
 --- Using Tomcat but need to do more? Need to support web services, 
 security

[Wicket-user] Discussing Wicket

2006-07-28 Thread Frank Silbermann



It 
seems to me that most descriptions of Wicket that I've seen on the web focus on 
two properties: the absence of configuration files and the radical 
separation of HTML from Java code. (Then readers debate whether the 
absence of configuration files limit flexibility and whether the use of standard 
tool-friendly HTML is all that important.)

It 
seems to me that Wicket evangelists should put more effort on Wicket's object 
orientation. The key questions we should ask when comparing Wicket to 
another component-oriented framework (e.g. Tapestry or JSF) are the 
following:

(1) If the user wishes to create a panel that assemblesvisual 
components or sub-panels that react to each others events, and which 
provide/handle events to be hooked to other arbitrary components on the page, 
what facility does your framework provide to packagesuch anassembly 
in a re-usable format?

(2) If I have a complex, feature-rich component that I want to use on 
many web-pages, and some of the configuration choices will be set the same way 
for all of them, what facility does your framework give me for creating a facade 
around this component that will set these defaults for me -- so I don't have to 
repeat myself on page after page?

(3) If some of the pages which use this component need it to provide 
extra enhanced or specialized behavior, how does your framework make it easy for 
me to create a new component thatextends the properties and behavior of 
the base component?

We should identify a few simple examples of such usesto contrast 
Wicket's powerwith other frameworks' shortcomings. After the 
big-deal object-orientation revolution of the late-1980s/early-1990s, it 
astounds me that so many programmers can ignore the importance of 
object-orientationfor coding presentation 
logic.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataView (extentions)

2006-07-12 Thread Frank Silbermann



Several months ago I mentioned that I was developing 
classes based on WicketExtensions' DataTable and SortableDataProvider to display 
arbitrary SQL SELECT result sets, with arbitrary sorting capability 
built-in.

My approachis only appropriate for small result 
sets or for prototyping, as theResultSet's datais kept in the data 
provider between page renderings:

  
  The developer overrides the method that generates the 
  SQL query string. If the generated text varies from one postback to the 
  next (or if an event sets a special flag), the data is replaced by a new query 
  to the database. 
  
  A general routine handles sorting events 
  (column-header clicks) by delegating to column type's default comparator and 
  the built-in ArrayList sorting capability. 
  
  A hook isprovidedwhere thedeveloper 
  canspecify massaging of the databetween download and presentation, 
  e.g.to compute and adda summary row, to insert additional computed 
  columns, or toreplace date or number objectsby formatted strings 
  (to bypass DataTable's default rendering of these 
  objects).
(Perhaps someone can adapt some of my ideas to a more 
general solution that doesn't keep result-set data in the DataProvider between 
postbacks.)

My 
implementationconsists of just a few hundred lines of code infour 
classes,two of which are trivial javabeans. A few readers of this 
group expressed interest; what would be the easiest way of sharing? I 
suppose I could build a tiny jar file and attach it to an e-mail, but it might 
be easier to discuss the implementation if I send a few e-mails, each directly 
containing the source code for one or two classes. Would that be an 
appropriate use of this mailing list?



From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent 
JenksSent: Wednesday, March 15, 2006 9:29 AMTo: 
wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] DataView 
(extentions)
I'd love to see this (along w/ an example or two on usage) ;)
On 3/15/06, Frank 
Silbermann [EMAIL PROTECTED]  
wrote:

  
  
  I have come up with 
  my own subclass of DataTable and implementation of IDataProvider to display 
  any arbitrary database java.sql.ResultSet. The basic idea 
  is that my IDataProvider implementation contains a List of rows, each row 
  consisting of a List of Object. Also in the implementation 
  is an array of descriptors, one per column, each of which contains the column 
  name and an indicator as to whether I want to be able to sort on that 
  column. (The column name comes from the ResultSetMetadata; 
  a method is provided to set the sortability flag.) My 
  implementation of the abstract method to deliver a sequence of rows will 
  delegate to the List.sublist() command from the Java Collections API, and each 
  time the DataTable delivers a sort criteria I apply the Collections.sort() 
  method to my list of rows, passing it a Comparator that delegates to the 
  Comparator of the Object at the relevant column index. My 
  implementation of IDataProvider can also look at my array of column 
  descriptors and generate a list of IColumn objects (needed to construct the 
  DataTable).
  It's actually a bit 
  more complicated than that, because sometimes the user needs to add one or more 
  summaryrows or add computed 
  columns.
  The code is actually 
  quite compact; when I'm finished I'll post it to the list if there is any 
  interest.
  
  
  
  -Original 
  Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Igor VaynbergSent: Tuesday, March 14, 
  2006 5:21 
  PMTo: wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] DataView 
  (extentions)
  
  there is also a 
  DataTable component which wraps 
  DataView+paging+sorting.-Igor
  
  On 3/14/06, Vincent 
  Jenks  
  [EMAIL PROTECTED] wrote:
  I'm using 1.1.1 Are there any plans to whittle 
  down the amount of code it takes to implement paging  sorting? Has 
  it changed at all in 1.2? I spent a lot of time w/ ASP.NET (which wicket feels quite similar to) and there's a 
  DataGrid component that has properties to set paging  sorting w/o any 
  extra work. Something like that would be really convenient. 
  
  

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataView (extentions)

2006-07-12 Thread Frank Silbermann
I suppose it could go into: 

Wicket Wiki
// Reference Library 
 How To Do Things in Wicket
// Database Interaction 

-- though it would be much longer than any of the other articles (aside
from those which are external links).  Also, how would I create the new
page into which I could enter my text?  (Would I have to submit my words
and code as HTML?  Embarassing to say, but I don't have much experience
with this, or with Wikis ...)


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn
Dashorst
Sent: Wednesday, July 12, 2006 11:20 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] DataView (extentions)

Why don't you create a wiki article on this subject?

Martijn


On 7/12/06, Frank Silbermann [EMAIL PROTECTED] wrote:


 Several months ago I mentioned that I was developing classes based on 
 WicketExtensions' DataTable and SortableDataProvider to display 
 arbitrary SQL SELECT result sets, with arbitrary sorting capability
built-in.

 My approach is only appropriate for small result sets or for 
 prototyping, as the ResultSet's data is kept in the data provider
between page renderings:


 The developer overrides the method that generates the SQL query 
 string.  If the generated text varies from one postback to the next 
 (or if an event sets a special flag), the data is replaced by a new
query to the database.

 A general routine handles sorting events (column-header clicks) by 
 delegating to column type's default comparator and the built-in 
 ArrayList sorting capability.

 A hook is provided where the developer can specify massaging of the 
 data between download and presentation, e.g. to compute and add a 
 summary row, to insert additional computed columns, or to replace date

 or number objects by formatted strings (to bypass DataTable's default 
 rendering of these objects).
 (Perhaps someone can adapt some of my ideas to a more general solution

 that doesn't keep result-set data in the DataProvider between 
 postbacks.)

 My implementation consists of just a few hundred lines of code in four

 classes, two of which are trivial javabeans.  A few readers of this 
 group expressed interest; what would be the easiest way of sharing?  I

 suppose I could build a tiny jar file and attach it to an e-mail, but 
 it might be easier to discuss the implementation if I send a few 
 e-mails, each directly containing the source code for one or two 
 classes.  Would that be an appropriate use of this mailing list?

  
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Vincent 
 Jenks
 Sent: Wednesday, March 15, 2006 9:29 AM

 To: wicket-user@lists.sourceforge.net
 Subject: Re: [Wicket-user] DataView (extentions)


 I'd love to see this (along w/ an example or two on usage) ;)



 On 3/15/06, Frank Silbermann [EMAIL PROTECTED]  wrote:
 
 
 
 
 
  I have come up with my own subclass of DataTable and implementation 
  of
 IDataProvider to display any arbitrary database java.sql.ResultSet.  
 The basic idea is that my IDataProvider implementation contains a List

 of rows, each row consisting of a List of Object.  Also in the 
 implementation is an array of descriptors, one per column, each of 
 which contains the column name and an indicator as to whether I want
to be able to sort on that column.
 (The column name comes from the ResultSetMetadata; a method is 
 provided to set the sortability flag.)  My implementation of the 
 abstract method to deliver a sequence of rows will delegate to the 
 List.sublist() command from the Java Collections API, and each time 
 the DataTable delivers a sort criteria I apply the Collections.sort() 
 method to my list of rows, passing it a Comparator that delegates to 
 the Comparator of the Object at the relevant column index.  My 
 implementation of IDataProvider can also look at my array of column 
 descriptors and generate a list of IColumn objects (needed to
construct the DataTable).
 
 
  It's actually a bit more complicated than that, because  sometimes 
  the
 user needs to add one or more summary rows or add computed columns.
 
 
  The code is actually quite compact; when I'm finished I'll post it 
  to the
 list if there is any interest.
 
 
 
 
 
 
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Igor 
 Vaynberg
  Sent: Tuesday, March 14, 2006 5:21 PM
  To: wicket-user@lists.sourceforge.net
  Subject: Re: [Wicket-user] DataView (extentions)
 
 
 
  there is also a DataTable component which wraps
DataView+paging+sorting.
 
  -Igor
 
 
 
 
  On 3/14/06, Vincent Jenks  [EMAIL PROTECTED] wrote:
 
  I'm using 1.1.1  Are there any plans to whittle down the amount of 
  code it
 takes to implement paging  sorting?  Has it changed at all in 1.2?  I

 spent a lot of time w/ ASP.NET (which wicket feels quite similar to) 
 and there's a DataGrid component that has properties to set paging  
 sorting w/o any extra

[Wicket-user] Displaying arbitrary SQL Query result sets

2006-07-12 Thread Frank Silbermann
Since I've already created the .jar file for Michael, I might as well
offer it to everyone.

I haven't included any examples for actually creating a subclass of my
dataprovider (common.rdbms.QueryResult).  At a minimum, you can simply
override:

 protected String generateQueryString() { return select * from
table; }  

After you have created the QueryResult object (myQueryResult), but
before you create an instance of common.rdbms.QueryResultDataTable with
it, you may call 

 public void setColumnSortable(int column)

on the QueryResult object to indicate that the data should be sortable
on this column (my indexes are zero-based, for a five-column table you
may call this with values of 0 through 4).  If you do that, then when
you create the QueryResultDataTable it will know to make that column
header a sort link. 

Look at components.QueryDataPanel for a reusable panel that creates a
QueryResultDataTable for a QueryResult and displays it in a wicket
Panel.  It also does a bunch of other stuff that you won't be interested
in, e.g. providing a label which is optionally a pop-up link, and adds a
button that lets the user download the table as a MS Excel file).  But
removing features is easier than adding them!

Please let me know what you think, or any questions about the more
sophisticated options. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Michael
Welter
Sent: Wednesday, July 12, 2006 11:45 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] DataView (extentions)

Hello Frank,

I have just begun developing an application using paged tables and
IDataProvider.  My environment is hibernate with thousands of items to
display, so hopefully the laze instantiation will keep memory
utilization low.

Anyhow, I would like to take a peek at your code.   If you don't mind, 
just tar the directory and attach to a personal email.

Thanks,
Mike

Frank Silbermann wrote:
 Several months ago I mentioned that I was developing classes based on 
 WicketExtensions' DataTable and SortableDataProvider to display 
 arbitrary SQL SELECT result sets, with arbitrary sorting capability 
 built-in.
  
 My approach is only appropriate for small result sets or for 
 prototyping, as the ResultSet's data is kept in the data provider 
 between page renderings:
 
 *
   The developer overrides the method that generates the SQL query
   string.  If the generated text varies from one postback to the
   next (or if an event sets a special flag), the data is replaced
by
   a new query to the database. 
 *
   A general routine handles sorting events (column-header clicks)
by
   delegating to column type's default comparator and the built-in
   ArrayList sorting capability. 
 *
   A hook is provided where the developer can specify massaging of
   the data between download and presentation, e.g. to compute and
   add a summary row, to insert additional computed columns, or
   to replace date or number objects by formatted strings (to
bypass
   DataTable's default rendering of these objects). 
 
 (Perhaps someone can adapt some of my ideas to a more general solution

 that doesn't keep result-set data in the DataProvider between 
 postbacks.)
  
 My implementation consists of just a few hundred lines of code in four

 classes, two of which are trivial javabeans.  A few readers of this 
 group expressed interest; what would be the easiest way of sharing?  I

 suppose I could build a tiny jar file and attach it to an e-mail, but 
 it might be easier to discuss the implementation if I send a few 
 e-mails, each directly containing the source code for one or two 
 classes.  Would that be an appropriate use of this mailing list?
  




-
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


showingResultSets.jar
Description: showingResultSets.jar

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Displaying arbitrary SQL Query result sets

2006-07-12 Thread Frank Silbermann



Ifsomeone provides mea sample quickstart 
project that includes something like hsqldb and populates a database on 
start-up,I'll modify it to display some database queries using my 
classes!


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Igor 
VaynbergSent: Wednesday, July 12, 2006 12:57 PMTo: 
wicket-user@lists.sourceforge.netSubject: Re: [Wicket-user] 
Displaying arbitrary SQL Query result sets
it would be really great if you could provide a quickstart that 
includes something like hsqldb and populates a database on startup so we can 
actually see it in action.at least thats what it will take for me to 
give it a looksee due to my busy schedule - if you want feedback that is. 
-Igor
On 7/12/06, Frank 
Silbermann [EMAIL PROTECTED] 
wrote:
Since 
  I've already created the .jar file for Michael, I might as welloffer it to 
  everyone.I haven't included any examples for actually creating a 
  subclass of mydataprovider (common.rdbms.QueryResult).At a 
  minimum, you can simply override: 
  protected String generateQueryString() { return "select * fromtable"; 
  }After you have created the QueryResult object (myQueryResult), 
  butbefore you create an instance of common.rdbms.QueryResultDataTable 
  withit, you may call public void 
  setColumnSortable(int column)on the QueryResult object to indicate 
  that the data should be sortableon this column (my indexes are zero-based, 
  for a five-column table you may call this with values of 0 through 
  4).If you do that, then whenyou create the 
  QueryResultDataTable it will know to make that columnheader a sort 
  link.Look at components.QueryDataPanel for a reusable panel that 
  creates a QueryResultDataTable for a QueryResult and displays it in a 
  wicketPanel.It also does a bunch of other stuff that you won't 
  be interestedin, e.g. providing a label which is optionally a pop-up link, 
  and adds a button that lets the user download the table as a MS Excel 
  file).Butremoving features is easier than adding 
  them!Please let me know what you think, or any questions about the 
  moresophisticated options. -Original Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED] 
  ] On Behalf Of MichaelWelterSent: Wednesday, July 12, 2006 11:45 
  AMTo: wicket-user@lists.sourceforge.netSubject: 
  Re: [Wicket-user] DataView (extentions) Hello Frank,I have 
  just begun developing an application using paged tables 
  andIDataProvider.My environment is hibernate with thousands of 
  items todisplay, so hopefully the laze instantiation will keep memory 
  utilization low.Anyhow, I would like to take a peek at your 
  code. If you don't mind,just tar the directory and attach to a 
  personal email.Thanks,MikeFrank Silbermann wrote: 
  Several months ago I mentioned that I was developing classes based on  
  WicketExtensions' DataTable and SortableDataProvider to display 
  arbitrary SQL SELECT result sets, with arbitrary sorting capability 
  built-in. My approach is only appropriate for small result 
  sets or for  prototyping, as the ResultSet's data is kept in the data 
  provider between page 
  renderings: 
  * The developer overrides the 
  method that generates the SQL 
  query string.If the 
  generated text varies from one postback to the 
   next (or if an event sets a 
  special flag), the data is 
  replacedby a new query to the 
  database. 
  * A general routine handles 
  sorting events (column-header 
  clicks)by delegating to column 
  type's default comparator and the 
  built-in ArrayList sorting 
  capability. 
  * A hook is provided where the 
  developer can specify massaging of 
  the data between download and presentation, e.g. to compute 
  and add a summary row, to insert 
  additional computed columns, or to 
  replace date or number objects by formatted strings 
  (tobypass DataTable's default 
  rendering of these objects).  (Perhaps someone can adapt some 
  of my ideas to a more general solution that doesn't keep 
  result-set data in the DataProvider between 
  postbacks.) My implementation consists of just a few hundred 
  lines of code in four  classes, two of which are trivial 
  javabeans.A few readers of this group expressed interest; 
  what would be the easiest way of sharing?I suppose I 
  could build a tiny jar file and attach it to an e-mail, but  it might 
  be easier to discuss the implementation if I send a few e-mails, each 
  directly containing the source code for one or two 
  classes.Would that be an appropriate use of this mailing 
  list?-Using 
  Tomcat but need to do more? Need to support web services,security?Get 
  stuff done quickly with pre-integrated technology to make your job easier 
  Download IBM WebSphere Application Server v.1.0.1 based on 
  ApacheGeronimohttp://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 
  ___Wicket-us

[Wicket-user] Panel visibility

2006-07-07 Thread Frank Silbermann



I'm using Wicket 1.2, and I've included on my page a 
subclass of Panel. In response to an event, I called 
"myPanel.setVisible(false)" but the panel remains visible. Is this a known 
bug, or do I need to do something to implement "void setVisible(boolean)" in my 
subclass?
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Panel visibility

2006-07-07 Thread Frank Silbermann
I did not modify the client header, but I don't think it's a caching
issue, because other widgets are changing as expected on postback.

I modified my program in a way that should not have made a difference,
and it seems to work now.  Perhaps I had some sort of programming error
that's now gone.  Oh, well. 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Juergen
Donnerstag
Sent: Friday, July 07, 2006 2:28 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Panel visibility

Are you sure it not a caching issue? Your browser caching the page?
Did you modify the response header to disable client caching?

Juergen

On 7/7/06, Frank Silbermann [EMAIL PROTECTED] wrote:


 I'm using Wicket 1.2, and I've included on my page a subclass of 
 Panel.  In response to an event, I called myPanel.setVisible(false) 
 but the panel remains visible.  Is this a known bug, or do I need to 
 do something to implement void setVisible(boolean) in my subclass?
 Using Tomcat but need to do more? Need to support web services,
security?
 Get stuff done quickly with pre-integrated technology to make your job

 easier Download IBM WebSphere Application Server v.1.0.1 based on 
 Apache Geronimo
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=1216
 42


 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user




Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Is it possible to embed jsp in wicket ?

2006-06-28 Thread Frank Silbermann



I don't see why it would be any harder than embedding 
JSP in an ASP.NET page (or vice-versa).


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Ingram 
ChenSent: Wednesday, June 28, 2006 11:58 AMTo: 
wicket-user@lists.sourceforge.netSubject: [Wicket-user] Is it 
possible to embed jsp in wicket ?
 We want to merge wicket into exist struts project 
and there are some parts of system still requires jsp. Could I include jsp 
(output of jsp) in wicket page ? Any suggestion are welcome 
!
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Wicket fundamentals

2006-06-26 Thread Frank Silbermann



I find 
that I like using Wicket very much, but there are some aspects which I found 
quite strange at first that may confuse and put off new users unless the 
textbooks being written can motivate the Wicket way of doing things. One 
stumbling block for me was the requirement that the Wicket:id be known at the 
time of a component's construction.

For 
example, suppose my application is based on a template with a 
Wicket:idmarking the place whereI insert a Panel that differs page 
by page. On some pages I want to place there two existing panels side by 
side in that spot -- not the same two panels every time, butvarious pairs 
of panels on each page. It seems silly to create a different Panel class 
for each different pair of panels I might want to display; it makes more sense 
is to create a Panel object that displays any two arbitrary sub-panels 
side-by-side -- call it HorizontalPanels_panel..

I 
think most Java programmers would expect that this class might have a 
constructor that takes two Panel objects as input. Or, perhaps, it might 
contain methods that would allow a user to assign component panels to the 
object. Neither is the Wicket way. You see, in order to display two 
panels side-by-side the HorizontalPanels_panel requires HTML that contains the 
Wicket:id for each sub-panel.When writing HorizontalPanels_panel I 
can choose whatever values I please for thoseWicket:id's, but these values 
must be known by whoever constructs the component panels-- a low-level 
implementation detail that should not concern them.

To 
avoid burdening users of this class with the need to remember such arbitrary, 
low-level HorizontalPanels_panel implementation details,instead of 
accepting the sub-panel's as constuctor or method arguments I make my 
HorizontalPanels_panel class abstract, with abstract methods that build the 
sub-panels (to be implemented by the user) which take the Wicket:id as an input 
argument:

public 
class HorizontalPanels_panel {

 
public HorizontalPanels_panel(String parentPanelWicketId) throws Exception 
{
 ...create a component container using 
parentPanelWicketId...

 ...call the abstract methods 
createLeftPanel(wicketId1) and 
createRightPanel(wicketId2)...
 

 ...add to the component container the panels 
returned by these
 abstract 
methods...
 
}

 
abstract public Panel createLeftPanel(String wicketId) throws 
Exception;
 
abstract public Panel createRightPanel(String wicketId) throws 
Exception;
}

Anywhere in the application where I need to create a Panel displaying two 
sub-panels side-by-side I simply instantiate an anonymous subclass of 
HorizontalPanels_panel that implements the methods creating the 
sub-panels.

This 
approach works, and seems to be the Wicket way of doing things. A similar 
approach is taken with ListView -- the user cannot provide the ListView with a 
list of components to display, rather, the user must createa sub-class of 
ListView that implements a methodto create each component in the list 
(based on a list of data sets, one set for each component to be 
constructed). Here again, the abstract method provides the Wicket:id for 
each list component being contructed.

I must 
confess that this approach was far from intuitive to me; in fact it seemed quite 
weird. It would have been much more intuitive if I could have accepted the 
input components as arguments, and then let the HorizontalPanel_panel set their 
id's to match the Wicket:id's in the HTML. Apparently, there must be some 
crucial reasons based on the way Wicket works that would make this abad 
idea. This is one of the issues that I hope the coming textbooks 
explain.


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Multipleforms good idea?

2006-06-23 Thread Frank Silbermann



I don't think HTML forms can be nested. This will 
hinder re-use of components that contain their own forms. My solution is 
to build components with their own submit buttons with behavior built in, but 
which rely on being placed inside a form that covers the page as a 
whole.


From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Nino 
WaelSent: Friday, June 23, 2006 2:48 AMTo: 
wicket-user@lists.sourceforge.netSubject: [Wicket-user] Multipleforms 
good idea?


Hi 

Ive been creating some different 
components with wicket, so that I can reuse them. On some of my pages there is 
stuff which does not encourage reuse. All my components have their own form, 
none of them have regular submit buttons. This is handled in another component, 
which also handles what is next and previous page.

So I wanted to hear what you have to 
say about this approach?

Some of the pros 
are:

Dont have to worry about placing 
the component tags within a form since they bring their 
own.

Might have some advantage in case of 
sub updating the page(ajax?)?


Cons:

How does this affect updating the 
model of separate forms when one forms submit button are 
clicked.

Not sure how multiple forms perform 
versus single form.




Regards 
Nino
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Is Wicket ok for DDA web applications?

2006-06-22 Thread Frank Silbermann
Wicket's markup is clear and intuitive for people with web skills, but a
Wicket application's presentation logic is written in Java, not mark-up.
Someone with weak understanding of object-oriented design and
programming (e.g., someone whose web skills are based on tools like
ASP/VB-6 or Cold Fusion) will not be able to make the best use of the
Wicket approach, and may even have trouble learning the framework.

It may get easier for such people to learn Wicket when textbooks reach
the market, but for now I occasionally had to resort to reading the
object-oriented Wicket implementation code.  (For example, my problem
required me to subclass DataTable.  To figure out how to do this I had
to study the code behind DefaultDataTable -- a wicket-provided subclass
that didn't solve my problem, but whose implementation illustrated the
kinds of things I needed to do in my own subclass).

If you can use Wicket, I'd recommend doing so.  Compared with the
ASP.NET application I'm rewriting, my code-base is about one-fourth the
size (mainly because Wicket made it much easier to abstract fragments of
presentation logic, appearing with minor variations on page after page,
into my own reusable components).  The tag-files generated by ASP.NET
were huge compared to the little ones I had to write with Wicket, though
to be fair, I had to write my tag files whereas the ASP.NET tagfiles
were generated by the IDE.  On the other hand, I didn't have to keep
drag-dropping the same patterns of components onto page after page as
did the ASP.NET developer.

(I imagine that JSF programming is very similar to ASP.NET programming
-- but without the benefit of so powerful an IDE.)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andrew
Bate
Sent: Thursday, June 22, 2006 9:47 AM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Is Wicket ok for DDA web applications?

Hi,

I'm considering looking at Wicket after a painful two weeks on JSF
(actually Apache MyFaces) and thinking there has to be a better 
way...!.   Most of my work over the last 5 years has been JSP/Struts
etc...

I'm a J2EE developer but coming firmly from the web side rather than a
back-end developmer.  I want to use a framework that has clean markup
and is intuitive for people with web skills.  (Anyone who has seen the
ghastly JSF tabular layouts and poor Tomahawk div implementation will
understand!)

I am about to start work on a webapp where one of the requirements is
for a DDA compliant interface.  If I were to use Wicket, does it have
any reliance on Javascript or anything else that may jeopardise a DDA
interface?

Thanks,

Andrew


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] tracking website usage

2006-05-18 Thread Frank Silbermann










If all the pages in my Wicket application
extend a common base page, what are some of the ways I could keep track of the
each pages popularity? Im
thinking of something I could put on the base page that, upon construction,
would identify the actual subclass being constructed and add it to that class
counter in persistent storage. 



Have any of you done something like this? If
so, how did you architect that capability?










RE: [Wicket-user] tracking website usage

2006-05-18 Thread Frank Silbermann








Probably only in contruction. I want to know how often users are using
various pages, and not the number of operations they perform on each one. (In other words, the question is, How
important is this page to the users? rather than How much impact
does this page have on the performance of my website?) So I guess the page constructor is the right
place for it.



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: Thursday, May 18, 2006 10:55
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
tracking website usage



storing the getClass() and a counter looks to me like
the best thing to do.
Except is in construction only what you want or when the page is used
(rendered)

johan





On 5/18/06, Frank Silbermann [EMAIL PROTECTED]
wrote:









If all the pages in my Wicket application
extend a common base page, what are some of the ways I could keep track of the
each page's popularity? I'm thinking of something I could put on the base
page that, upon construction, would identify the actual subclass being
constructed and add it to that class' counter in persistent storage. 



Have any of you done
something like this? If so, how did you architect that capability?




















RE: [Wicket-user] Google Web Toolkit integration ?

2006-05-17 Thread Frank Silbermann
I, personally, don't care for HTML, and perhaps I might enjoy
programming in Echo2 better.

But suppose an employer maintained an HTML fragment with links to their
entire portfolio of web applications, and wanted this fragment to appear
on every page of each web application.  Since someone else is
maintaining that scrap and keeping it up-to-date, I would not want to
translate it into Echo 2 and maintain my own copy.

Would it not likely be easier to incorporate such an HTML scrap into a
Wicket application, versus one written in a framework such as Echo 2
that abstracted away the HTML completely?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Wednesday, May 17, 2006 10:58 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Google Web Toolkit integration ?

 It's certainly an intriguing idea (have a look at haxe.org if you find
 it interesting), ...
...
Yeah. I see some advantages of using layout managers - basically the
same promise as Swing has - but currently I would still prefer using
HTML for layout. If I would like the GWT way of developing
applications, I would have choosen Echo 2 a long time ago. GWT looks
like a next gen Echo to me, though with a very big name behind it, and
some cool innovations. ... Eelco



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Google Web Toolkit integration ?

2006-05-17 Thread Frank Silbermann
I think it would have been a good thing if the web had begun this way.
After all, builders of retail-quality fat-client software products have
always been able to use non-programming professional designers (when
they were willing to pay for them).  There's no need for graphic artists
to contribute actual code.

But the way things have developed, we're going to have to integrate
HTML-based components from time to time.  It's sort of like the reason
serious programmers for so long had to use C or C++ instead of Pascal.
It takes a lot of trial and error to develop a framework which, like
Java, is so complete that access to the lower levels is unnecessary for
most users.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Jenks
Sent: Wednesday, May 17, 2006 4:53 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Google Web Toolkit integration ?

You see Igorwe're not so different...you and I.

I agree...and simply because we're building web applications we're
likely to be working with web designers and web developers who are
well versed in markup  CSS and are able to take part of the
application maintenance upon themselves.

Using a pure-code framework can put a lot of design  layout work on
the developer and help to reduce the division of labor...which isn't
necessarily a good thing.

On 5/17/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 allow myself to quote...myself

 || imho, html is the best layout manager out there for browser apps.
add css
 to the mix and you have a great skin manager as well.

 i never said css was great for layout manager :) and yes the box model
is
 broken.

 -Igor


 On 5/17/06, Johan Compagner [EMAIL PROTECTED] wrote:
 
  ha! and css is easier then layout manager in java...
  hmm that is not how i see it.
  CSS is just plain horrible stupid box thing..
 
  And what is a layout manager in css? There isn't one everything is
sort of
 absoluut positioned and then you can do in swing also
  (not recommended ofcourse)
 
 
  johan
 
 
 
 
 
  On 5/17/06, Igor Vaynberg  [EMAIL PROTECTED] wrote:
 
  
   imho, html is the best layout manager out there for browser apps.
add
 css to the mix and you have a great skin manager as well.
  
   the one thing you always hear swing developers bitching about is
how
 they have to fight the layout managers to get the results they want.
 gridbaglayout is poweful but its a huge pain to work with.
  
   matisse+grouplayout are the holy grail for swing devels, its nice
and
 easy to create layouts. but it still requires a gui to do this, while
i can
 do html easily by hand. also browser screen space doesnt translate
easily to
 the desktop space. in desktop space you are pixel aware, you are also
pixel
 aware of your fonts and the south east corner of the window. in html
you
 have none of these things.
  
   look at wingS framework examples, they use layout managers. look
how
 rectangular their examples look.
  
  
   -Igor
  
  
  
  
  
  
  
   On 5/17/06, Frank Silbermann [EMAIL PROTECTED] wrote:
  
I, personally, don't care for HTML, and perhaps I might enjoy
programming in Echo2 better.
   
But suppose an employer maintained an HTML fragment with links
to
 their
entire portfolio of web applications, and wanted this fragment
to
 appear
on every page of each web application.  Since someone else is
maintaining that scrap and keeping it up-to-date, I would not
want to
translate it into Echo 2 and maintain my own copy.
   
Would it not likely be easier to incorporate such an HTML scrap
into a
Wicket application, versus one written in a framework such as
Echo 2
that abstracted away the HTML completely?
   
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] ] On
 Behalf Of Eelco
Hillenius
Sent: Wednesday, May 17, 2006 10:58 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Google Web Toolkit integration ?
   
 It's certainly an intriguing idea (have a look at haxe.org if
you
 find
 it interesting), ...
...
Yeah. I see some advantages of using layout managers - basically
the
same promise as Swing has - but currently I would still prefer
using
HTML for layout. If I would like the GWT way of developing
applications, I would have choosen Echo 2 a long time ago. GWT
looks
like a next gen Echo to me, though with a very big name behind
it, and
some cool innovations. ... Eelco
   
   
   
   
 ---
Using Tomcat but need to do more? Need to support web services,
 security?
Get stuff done quickly with pre-integrated technology to make
your job
 easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache
 Geronimo
   
 http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user

RE: [Wicket-user] Free Maven2 book

2006-05-15 Thread Frank Silbermann
I received an unusually low number of posts this weekend from the Wicket
user group, and none today.  Is the mailing list down?  If not, have I
been dropped from the list?


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Concurrent Modification Exception

2006-05-09 Thread Frank Silbermann








I created a CheckboxData type containing a
boolean (checked) and a label.



I created a CheckboxDataPanel whose
constructor takes a CheckboxData object, and which displays a checkbox and the
label  each using a PropertyModel built from the Checkbox Data object.



I constructed a ListView using a
ListCheckboxData, which displays a CheckboxDataPanel for each item.



I have a button which removes from the ListCheckboxData every CheckboxData object whose check field is unchecked. When I click this button, I would expect the ListView would shrink  perhaps down to nothing if none were checked. When I press it to remove the last remaining item, however, I get a java.util.ConcurrentModificationException.What am I doing wrong? Ive been using an ArrayList as my List implementation, but I get the same result using a Vector. Could I avoid this problem by using a CheckboxGroup instead of my own ListView? 










RE: [Wicket-user] Concurrent Modification Exception -- NEVER MIND!

2006-05-09 Thread Frank Silbermann








Never mind! The problem had nothing to do with
Wicket. My error was trying to
delete elements of the very list I was iterating:

 for (CheckboxData cbd :
listToBePruned ){

 if (
!cbd.isChecked() ) {


listToBePruned.remove(cbd);

 }

 }



A different looping strategy solved
it. /Frank



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Tuesday, May 09, 2006 12:35 PM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Concurrent
Modification Exception



I created a CheckboxData
type containing a boolean (checked) and a label.



I created a
CheckboxDataPanel whose constructor takes a CheckboxData object, and which
displays a checkbox and the label  each using a PropertyModel built from
the Checkbox Data object.



I constructed a ListView
using a ListCheckboxData, which displays a CheckboxDataPanel for each
item.



I have a button which removes from the ListCheckboxData every CheckboxData object whose check field is unchecked. When I click this button, I would expect the ListView would shrink  perhaps down to nothing if none were checked. When I press it to remove the last remaining item, however, I get a java.util.ConcurrentModificationException.What am I doing wrong? Ive been using an ArrayList as my List implementation, but I get the same result using a Vector. Could I avoid this problem by using a CheckboxGroup instead of my own ListView? 










RE: [Wicket-user] The other side of Wicket ...

2006-05-05 Thread Frank Silbermann
For the last couple of months I've been building in Wicket to replace an
ASP.NET application.  My impression is that ASP.NET is the best thing
I've ever seen for doing a one-of.  Any page content that I'm going to
build and use in just one page (or simply include with no
modifications in a variety of places) is incredibly easy to do in
ASP.NET.

Wicket is far superior for situations where I need to do the same _kind_
of thing in a variety of different places, but with variations.  With
Wicket it is easier to build and use a component with a variety of
constructors, and with methods that can be easily replaced each time I
use it.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Jenks
Sent: Thursday, May 04, 2006 5:49 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] The other side of Wicket ...

Oh yeah, just jokes, .NET is a pretty great technology...though it
still requires far more work than the EJB3+Wicket combo.

MS's tools are great, they have a snazzy IDE...but I still prefer
Eclipse...perhaps because of its open nature and breadth of industry
support both pro  amateur.

The tools are also the problemyou can't rely on much else outside
of MS's visual studio tools to do the job.  I personally hate WYSIWYG
environments and writing asp.net pages, controls, etc. w/o the editor
can be quite tedious.

JSF's similarity to ASP.NET is one reason I didn't want to use
it...not to mention all of the strange issues I had heard of w/ JSF
1.1.

.NET has it's place...but now that EJB3 is a finalized spec...I doubt
it can keep up w/ Java EE 5 and beyond in a one-on-one comparison.
stinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] auto-submit when done picking date

2006-05-05 Thread Frank Silbermann








My problem is that Id like the
textbox fed by the DatePicker to autosubmit
only when the DAY part of the date changes. Since the DatePicker
changes the month and year as one navigates the DatePickers
pop-up, I cannot rely on submitting on just any change to the textbox.



Rather than modifying the DatePicker component, a simpler solution for my use-case
might be to replace my _javascript_ onChange=this.form.submit with onChange=some
more complex _javascript_ that submits only if the day portion of the date
differs from the initial value.



But I am new to both _javascript_ and
Wicket; can anyone point me to an example in which a component in a panel does
something like this? Though my
_javascript_ code is likely to be a few lines long, can I put it all in the
attribute definition, or would I have to define a function in the HTML
head, placed there using wicket:head?



Also, since I am pretty new to _javascript_,
does anyone have a Wicket example in which the _javascript_ references the value
of an input box?



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: Thursday, May 04, 2006 3:09
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
auto-submit when done picking date



as eelco is saying. Dig into the _javascript_ of that
datepicker.
See how it works and if you can patch it to only set the date when you close
it.

the _javascript_ is not written by us. We only use it. and intergrated it into
wicket. 

johan





On 5/4/06, Frank Silbermann [EMAIL PROTECTED]
wrote:

Well, is there a configuration option only to change
the date when a day
is chosen, but not when shifting to a new month?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Eelco
Hillenius
Sent: Thursday, May 04, 2006 12:23 PM 
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] auto-submit when done picking date

 What I'd really like is to post back not when the texbox changes, but 
 rather, when the datePicker closes.Any suggestions
how?Would I
need to
 associate the datePicker with something other than a span/
tag?On
which
 event would I put the this.form.submit () ?

I'm afraid you'll have to dig deeper in the _javascript_ part of the
datepicker for this. If you find something that works, and you have an
idea on how this could be integrated with the component, we'll be 
happy to accept a patch.

Eelco


---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job 
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier 
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmdlnkkid0709bid3057dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user












RE: [Wicket-user] DatePicker not work for 1.2RC3 ?

2006-05-04 Thread Frank Silbermann








I have a different problem. Its popping up, but when I select
todays date it gives me



02/05/2170


^^



for todays date. 



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of smallufo
Sent: Wednesday, May 03, 2006
11:20 PM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] DatePicker
not work for 1.2RC3 ?



Hi
Anybody has problem about DatePicker on 1.2 RC3 ?
It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and
wicket-extensions) , 
it doesn't work , the calendar doesn't pop-up anymore...
Anybody has this problem too ? 








RE: [Wicket-user] DatePicker not work for 1.2RC3 ?

2006-05-04 Thread Frank Silbermann








To be more precise, with 1.2R3 my
DatePicker is now popping up a calendar for the year 2170 instead of 2006.



Also, with no change in configuration it
is now producing dates in the form DD/MM/ whereas before it gave me
/MM/DD.



I dont care which format it gives
me, as long as I have stability. (I
dont know how to configure the format.) But I do need it to default to the
current month in the current year.



The lack of a DatePicker is going to be
real embarrassing to me, as I was about to turn over an early version of my
application for user testing.



/Frank



-Original Message-
From: Frank Silbermann 
Sent: Thursday, May 04, 2006 9:10 AM
To:
'wicket-user@lists.sourceforge.net'
Subject: RE: [Wicket-user]
DatePicker not work for 1.2RC3 ?



I have a different
problem. Its popping up, but
when I select todays date it gives me



02/05/2170


^^



for todays date. 



-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of smallufo
Sent: Wednesday, May 03, 2006 11:20 PM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] DatePicker
not work for 1.2RC3 ?



Hi
Anybody has problem about DatePicker on 1.2 RC3 ?
It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and
wicket-extensions) , 
it doesn't work , the calendar doesn't pop-up anymore...
Anybody has this problem too ? 








RE: [Wicket-user] date picker settings first day

2006-05-04 Thread Frank Silbermann
Title: date picker settings first day









Is
there any way to prevent the DatePicker from closing when one clicks the link
to change the month? When my user wants
to change the date from, say, May 5th to April 30th, he
has to pop-up the DatePicker twice  once to change the month and once to
change the day.



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lusebrink, Scott E CTR DISA GIG-CS
Sent: Thursday, May 04, 2006 9:47
AM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] date picker
settings first day



the datepickersettings.setFirstDate does not
work. this is due to a typo in the DatePickerSettings.toString

if (getFirstDay() != 0)
{
b.append(\n\tfistDay : ).append(getFirstDay()).append(,);
}

this should read firstDay :

also considering that the default for the date picker is to have monday (1) as
default the if statement does not allow you to set sunday as the first
day. I suggest changing the _javascript_ to have sunday as the first day by
default otherwise change the if to != 1

I hope this can be fixed soon

Scott 








RE: [Wicket-user] DatePicker not work for 1.2RC3 ?

2006-05-04 Thread Frank Silbermann








Apparently, my initial value in the old
default value is confusing the DatePicker; if I
reformat my initial value the DatePicker pops up the
correct year and month.



Since the default format apparently
changed, it may not be safe for me to rely on it. What ifformat
string, and how do I use it to control the DatePickers
format? I dont see it used
in the FormInput example:



label
wicket:id=dateLabel
for="" class=SpellE>datePropertyDate/label

input
wicket:id=dateProperty
id=dateProperty type=text
size=40/

span wicket:id=datePicker/span



/Frank



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: Thursday, May 04, 2006 10:30 AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DatePicker not work for 1.2RC3 ?



what is the ifformat string that is embedded in youre
html file for that datepicker??

And what does it say at first in the field itself? how is it formatted then?

johan





On 5/4/06, Frank Silbermann [EMAIL PROTECTED]
wrote:





I have a different
problem. It's popping up, but when I select today's date it gives me



02/05/2170 


^^



for today's date. 







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of smallufo
Sent: Wednesday, May 03, 2006
11:20 PM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] DatePicker
not work for 1.2RC3 ?



Hi
Anybody has problem about DatePicker on 1.2 RC3 ?
It worked on 1.2 RC2 , but after I upgrade to 1.2 RC3 (both wicket and
wicket-extensions) , 
it doesn't work , the calendar doesn't pop-up anymore...
Anybody has this problem too ? 
















RE: [Wicket-user] auto-submit when done picking date

2006-05-04 Thread Frank Silbermann








Apparently, when you click the datePickers link to change the month, it writes the
change immediately to the associated textbox. Since I have auto-postback
_javascript_ on that input field, the postback is
causing my datePicker to disappear, and the form to
be submitted before the day of the month can be changed:



input wicket:id=dateProperty type=text
size=10 readonly 
class=SpellE>this.form.submit()/

span wicket:id=datePicker/span



What Id really like is to post back
not when the texbox changes, but rather, when the datePicker closes.
Any suggestions how? Would I
need to associate the datePicker with something other
than a span/ tag? On which
event would I put the this.form.submit()
?



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: Thursday, May 04, 2006 10:40 AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] date
picker settings first day



it doesn't close at my place.
I tested this in IE en FF 
i can press it quicly once so that it jumps one month at a time or hold it and
scroll to the month i want and the release to select it.
And then the datepicker still doesn't go away. 

johan





On 5/4/06, Frank Silbermann [EMAIL PROTECTED]
wrote:





Is there any way to
prevent the DatePicker from closing when one clicks the link to change the
month? When my user wants to change the date from, say, May 5th
to April 30th, he has to pop-up the DatePicker twice  once to
change the month and once to change the day.







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Lusebrink, Scott E
CTR DISA GIG-CS
Sent: Thursday, May 04, 2006 9:47
AM
To: wicket-user@lists.sourceforge.net
Subject: [Wicket-user] date picker
settings first day



the datepickersettings.setFirstDate does not
work. this is due to a typo in the DatePickerSettings.toString

if (getFirstDay() != 0)
{
b.append(\n\tfistDay : ).append(getFirstDay()).append(,);
}

this should read firstDay :

also considering that the default for the date picker is to have monday (1) as
default the if statement does not allow you to set sunday as the first
day. I suggest changing the _javascript_ to have sunday as the first day by
default otherwise change the if to != 1

I hope this can be fixed soon

Scott 


















RE: [Wicket-user] auto-submit when done picking date

2006-05-04 Thread Frank Silbermann
Well, is there a configuration option only to change the date when a day
is chosen, but not when shifting to a new month?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Thursday, May 04, 2006 12:23 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] auto-submit when done picking date

 What I'd really like is to post back not when the texbox changes, but
 rather, when the datePicker closes.  Any suggestions how?  Would I
need to
 associate the datePicker with something other than a span/ tag?  On
which
 event would I put the this.form.submit() ?

I'm afraid you'll have to dig deeper in the javascript part of the
datepicker for this. If you find something that works, and you have an
idea on how this could be integrated with the component, we'll be
happy to accept a patch.

Eelco


---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] The other side of Wicket ...

2006-05-04 Thread Frank Silbermann
My great hope is that Wicket can provide great productivity and power to
people who have a true mastery of object-oriented techniques, raising
their pay and status above that of ordinary code-monkeys and
API-memorizers.

My great fear is that the market will reject Wicket because
procedurally-oriented code-monkeys won't be able to use it.

:-)

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Vincent
Jenks
Sent: Thursday, May 04, 2006 3:41 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] The other side of Wicket ...

I don't hear great things about Struts!  My experience w/
Java/J2EE/Java EE before wicket was Servlets+JSP+Hibernate (and JDBC),
and I've only been doing Java for about a year.  I had made a living
off of Microsoft technologies for years prior to that, specifically C#
and the .NET framework.

I guess you could say I had a far worse infection than even a reformed
Struts user would have had :D

Seriously though, I looked at Struts and tried to walk through a few
tutorials.  If I can't grasp the framework, even at a very basic,
high-level after doing a couple tutorials...it's probably too complex.

Just glancing over the Wicket examples was enough for me to know it
was something worth pursuing.

On 5/4/06, Johan Compagner [EMAIL PROTECTED] wrote:


  and doing all of this while training a new developer who just joined
  the company and is not familiar w/ Java, Wicket, or even web apps
  development in general.



 lucky you!!! because they are not completely infected by the mvc
(struts)
 way of working!
 Because that would be much worse :)

 johan





---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] GridView option?

2006-04-25 Thread Frank Silbermann








On each page of a GridView
(Wicket Extensions 1.2) the elements enter the grid in row-order, from top to
bottom. Is there a way to have the DataProvider populate the grid in column-order  filling
one column from top to bottom before moving onto the next column to the right?



If not, maybe this could be considered a
feature request.








RE: [Wicket-user] DataTable formatting

2006-04-11 Thread Frank Silbermann








The CSS attribute empty-cells: show
works in Mozilla, but not in IE 6.0  are there any work-arounds?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, April 10, 2006 4:12
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable formatting



Have you tried the CSS attribute 'empty-cells: show;'
?



On 4/10/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:



To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 


















RE: [Wicket-user] DataTable formatting

2006-04-10 Thread Frank Silbermann






To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 










RE: [Wicket-user] DataTable formatting

2006-04-10 Thread Frank Silbermann








Thank you!



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, April 10, 2006 4:12
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable formatting



Have you tried the CSS attribute 'empty-cells: show;'
?



On 4/10/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:



To draw lines separating every cell in my DataTable I tried: table border=1 wicket:id=datatableas Igor recommended. It worked fine, except for when the IDataProvider provided either a null or an empty string for a particular cell. Then the line separators were missing. Do you think the more complex CSS approach would do better?--or even table border=1 wicket:id=datatable-IgorOn 3/31/06, Igor Vaynberg [EMAIL PROTECTED] wrote: style table.datatable td { border:0; border-bottom: 1px solid black; border-right: 1px solid black; } /style table class=datatable wicket:id=datatable . -Igor On 3/31/06, Frank Silbermann [EMAIL PROTECTED] wrote:   Is there a way to make the DataTable draw a line between every row and  column ? like a grid? 


















RE: [Wicket-user] Question about DataTable and IDataProvider restated

2006-04-05 Thread Frank Silbermann
Me:
 I suppose the usual approach is to trigger the download of 
 IDataProvider's data via the event handler of the submit button.
 That way, the data would be available for both Iterator 
 IDataProvider.iterate(first, count) and int IDataProvider.size().

Eelco Hillenius Sent: Tuesday, April 04, 2006 5:58 PM:

 It's the responsibility of the model(s). Components may rely on models
 being properly initialized and available whenever they want to access
 them. Model implementations may or may implement detachable behavior,
 caching etc.


Perhaps the method IModel IDataProvider.model(Object) has something to
do with this.  How is this method to be used?


 However, I do not have a single submit button - I have various sets
of
 radio-buttons and a change to any one causes an immediate postback.
I do
 not want to code an event handler for each one of them; I'd rather
put my
 database query in a method that is called before the page is rendered
 _regardless_ of the reason.  Can you suggest a suitable method?

Eelco:
 So, make that part of your model's implementation. Look at for example
 LoadableDetachableModel for ideas, or you can use the implementation
 directly too if you want.

I am guessing that the input to IModel IDataProvider.model(Object) is
some object in the session that provides the information needed for the
database download.  Any IDataProvider method that needs database data,
e.g. int count() and Iterator iterate(first,count) must call IModel
IDataProvider.getModel(Object) to get the wrapper, and then ask that
wrapper to provide the database-filled result.

In this way, whichever IDataProvider method needs the database data
first is the one that causes the database refresh.

Is that the idea?



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2006-04-05 Thread Frank Silbermann












-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, April 04, 2006 6:32 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
?Contract for Iterator IDataProvider.iterator(int first, int count)
???











If so, I would ask _which_ framework method _should_ trigger the retrieval of database
information needed by both IDataProvider methods? If I knew which of the
two methods were called first  I could put the database query
there. Or, perhaps the database query should be triggered by some other
framework method which is called before either of them.









you are meant to do two queries:

size() { return { select count(*) from blah } }

iterator(int first, int count) { return { select *
from blah where rownum=first and rownumfirst+count }}

-Igor

These
two methods could return inconsistent results if other users intervening
CRUD operations affected the number of rows returned.

So if I
want to guard against that, I should allow either one of these methods to
download the rows and count them. Each
method should do that only if the other method hasnt done it first. Is
that the idea?








RE: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2006-04-04 Thread Frank Silbermann




















I have a question about the intended use of the DataTable components
provided in Wicket Extensions. The DataTable
relies upon an IDataProvider to provide the data. To do this, we implement: 

Iterator
iterate(first, count)

Lacking any advice to the contrary, I assumed that this is
the method which would retrieve data from the database, but this does not seem
to be working well for me.

My database query is parameterized based on page-component
model values, and these may change with each rendering. My problem is that when
one rendering presents a short data set, on the next rendering the DataTable is
not always requesting all of the rows.
The count seems to be affected by the number of rows
returned by the previous rendering.

I suspect this is because my implementation of int DataProvider.size() assumes
that it will be called _after_ Iterator
iterate(first, count) pulls down the data  so its always
one rendering behind.

Should I give the int IDataProvider.size()
method the responsibility for figuring out the query string and going to the
database? (How else would it be
able to tell the DataProvider how many rows to request?)






















RE: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2006-04-04 Thread Frank Silbermann








Assuming that the database query depends
upon whatever page-component selections prompted the post-back, both int
IDataProvider.size() and Iterator IDataProvider.iterator(first,count)
require information that can only
be gotten by a database query.:



Therefore, for each post-back, Ill
need to query the database before _either_
of these methods return.



If both methods query the database
independently, intervening CRUD operations may cause them to return
inconsistent results (a size that is too small or too large). I can and should retrieve both the rows
and their number with a single query.
The question is where I should do this.



My present implementation retrieves the
ResultSet when iterator(first,count) is called, setting a size variable that the
size() method relies upon. 

MY PROBLEM is that Im seeing an
inconsistent number of rows displayed for the same query. It seems to depend upon how large the
previous querys results were.



If the value of count in Iterator
IDataProvider.iterate(first,count) depends upon the results returned by int
IDataProvider.size() that
would explain my problem, because the value of count would have
been based on obsolete information (it would be based on the previous query). I am wondering whether this is the cause
of my problem.



If so, I would ask _which_ framework method _should_ trigger the retrieval of database
information needed by both IDataProvider methods? If I knew which of the two methods were
called first  I could put the database query there. Or, perhaps the database query should be
triggered by some other framework method which is called before either of them.



What are my options?





.



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, April 04, 2006 3:56
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
?Contract for Iterator IDataProvider.iterator(int first, int count)
???



the iterator() and size() are not meant to be used
together and there is no, nor ever be, a contract that guarantees
any ordering of invocations between these two methods.

size() is meant to return the total number of rows 

iterator() is used to return a window that will be displayed

those are the only contracts.

what exactly is the problem?

-Igor





On 4/4/06, Frank Silbermann [EMAIL PROTECTED]
wrote:

















I have a question about
the intended use of the DataTable components provided in Wicket
Extensions. The DataTable relies upon an IDataProvider to provide the
data. To do this, we implement: 

Iterator
iterate(first, count)

Lacking any advice to the
contrary, I assumed that this is the method which would retrieve data from the
database, but this does not seem to be working well for me.

My database query is
parameterized based on page-component model values, and these may change with
each rendering. My problem is that when one rendering presents a short data
set, on the next rendering the DataTable is not always requesting all of the
rows. The count seems to be affected by the number of rows
returned by the previous rendering.

I suspect this is because
my implementation of int DataProvider.size() assumes that it
will be called _after_
Iterator iterate(first, count) pulls down the data  so it's
always one rendering behind.

Should I give the
int IDataProvider.size() method the responsibility for figuring out
the query string and going to the database? (How else would it be able to
tell the DataProvider how many rows to request?)






























RE: [Wicket-user] Question about DataTable and IDataProvider restated

2006-04-04 Thread Frank Silbermann








I suppose the usual approach is to trigger
the download of IDataProviders data via the event handler of the submit
button. That way, the data would be
available for both Iterator IDataProvider.iterate(first,
count) and int IDataProvider.size().



However, I do not have a single submit
button  I have various sets of radio-buttons and a change to any one
causes an immediate postback. I do
not want to code an event handler for each one of them; Id rather put my
database query in a method that is called before the page is rendered _regardless_ of the reason. Can you suggest a suitable method?



I tried putting the database query in Iterator
IDataProvider.iterate(first, count) but that doesnt seem to work,
perhaps because it comes too late for int IDataProvider.size() to
have the information. Putting the
database query in int IDataProvider.size()
may simply reverse the problem.



Into which method _should_ I place the database query?
What are my options?







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Tuesday, April 04, 2006 3:33
PM
To:
wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user]
?Contract for Iterator IDataProvider.iterator(int first, int count)
???















I have a question about
the intended use of the DataTable components provided in Wicket
Extensions. The DataTable relies
upon an IDataProvider to provide the data.
To do this, we implement: 

Iterator
iterate(first, count)

Lacking any advice to the
contrary, I assumed that this is the method which would retrieve data from the
database, but this does not seem to be working well for me.

My database query is
parameterized based on page-component model values, and these may change with
each rendering. My problem is that when one rendering presents a short data
set, on the next rendering the DataTable is not always requesting all of the
rows. The count seems
to be affected by the number of rows returned by the previous rendering.

I suspect this is because
my implementation of int
DataProvider.size() assumes that it will be called _after_ Iterator iterate(first,
count) pulls down the data  so its always one rendering
behind.

Should I give the
int IDataProvider.size() method the responsibility for figuring
out the query string and going to the database? (How else would it be able to tell the
DataProvider how many rows to request?)






















RE: [Wicket-user] Wicket 1.2-beta3 is available

2006-04-03 Thread Frank Silbermann








My application uses DataTables whose column headers come from ResultSetMetaData and whose data comes from ResultSet. With
the new .jars, Im getting the column headers, but not the table
contents. I clicked something and
got a no such method exception.



Have the DataTable
extensions been re-factored since 1.2B2?



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn Dashorst
Sent: Sunday, April 02, 2006 4:55
PM
To: Wicket User; Wicket Developers
Subject: [Wicket-user] Wicket 1.2-beta3
is available



All,

I have created and uploaded the third beta release of Wicket 1.2. We have
solved quite some bugs, but there are some nasty one's still unsolved. This is
why we chose to release another beta instead of moving into the end game of our
1.2 release schedule. You can monitor the bug list at sourceforge (http://sourceforge.net/tracker/?group_id=119783atid=684975)
to see which are still open and which are solved. 

The outstanding bugs shouldn't hurt development efforts, so if you are in the
process of upgrading to Wicket 1.2, please continue to do so with this release
(or bake your own from SVN trunk). This release is not considered stable enough
to use in production. 

Help us finalize this release by downloading and test driving this release. The
more bugs you find now, the better the final release will be!

You can download the release(s) of the different projects at the usual download
location: 
http://sourceforge.net/project/showfiles.php?group_id=119783

This release contains the following projects:

o wicket
o wicket-extensions 
o wicket-spring
o wicket-spring-annot
o wicket-auth-roles
o and all example projects for each release.

Have fun!

- the Wicket team

-- 
Wicket 1.2 is coming! Write Ajax applications without touching _javascript_! 
-- http://wicketframework.org 








RE: [Wicket-user] Wicket 1.2-beta3 is available

2006-04-03 Thread Frank Silbermann








Never mind. It looks like a problem with my own
incomplete re-compiles. /Frank



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Monday, April 03, 2006 2:16 PM
To: wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user] Wicket
1.2-beta3 is available



My application uses
DataTables whose column headers
come from ResultSetMetaData and whose data comes from ResultSet. With the new .jars, Im getting the
column headers, but not the table contents.
I clicked something and got a no such method exception.



Have the DataTable
extensions been re-factored since 1.2B2?



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn Dashorst
Sent: Sunday, April 02, 2006 4:55 PM
To: Wicket User; Wicket Developers
Subject: [Wicket-user] Wicket
1.2-beta3 is available



All,

I have created and uploaded the third beta release of Wicket 1.2. We have
solved quite some bugs, but there are some nasty one's still unsolved. This is
why we chose to release another beta instead of moving into the end game of our
1.2 release schedule. You can monitor the bug list at sourceforge (http://sourceforge.net/tracker/?group_id=119783atid=684975)
to see which are still open and which are solved. 

The outstanding bugs shouldn't hurt development efforts, so if you are in the
process of upgrading to Wicket 1.2, please continue to do so with this release
(or bake your own from SVN trunk). This release is not considered stable enough
to use in production. 

Help us finalize this release by downloading and test driving this release. The
more bugs you find now, the better the final release will be!

You can download the release(s) of the different projects at the usual download
location: 
http://sourceforge.net/project/showfiles.php?group_id=119783

This release contains the following projects:

o wicket
o wicket-extensions 
o wicket-spring
o wicket-spring-annot
o wicket-auth-roles
o and all example projects for each release.

Have fun!

- the Wicket team

-- 
Wicket 1.2 is coming! Write Ajax
applications without touching _javascript_! 
-- http://wicketframework.org 








[Wicket-user] Wicket/Tomcat configuration: Where is System.out ???

2006-03-31 Thread Frank Silbermann








To debug an application Ive inserted
a System.out.println command. Where is System.out
when Im running Wicket on Tomcat?
Is it captured by some special Wicket logfile
(I cant find any)? It doesnt
seem to be going to any of the Tomcat logfiles that I
can see, nor to the console window (unless Im just missing it).\



Is this something I have to configure in
Tomcat to see the output of System.out?








RE: [Wicket-user] Wicket/Tomcat configuration: Where is System.out ???

2006-03-31 Thread Frank Silbermann








Possibility 1: What does the Wicket application have to
do to pass the System.out.println() statements?



Possibility 2: If its not off-topic, could
someone please give me a hint what I might have done wrong in configuring
Tomcat? I didnt actually
configure it myself; I took the easy way out and downloaded a configured-for-development
version from: http://www.coreservlets.com/Apache-Tomcat-Tutorial/



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn Dashorst
Sent: Friday, March 31, 2006 3:22
PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Wicket/Tomcat configuration: Where is System.out ???



There are 2 possibilities:

1. the application doesn't pass the system.out.println() statements
2. you didn't configure tomcat right.

usually tomcat spits out the system.out into the logs/ subdirectory, or on the
console itself where it starts. if you run on linux, you'll have to redirect
that output to a log file. 

Martijn



On 3/31/06, Frank Silbermann [EMAIL PROTECTED]
wrote:





To debug an application I've inserted a
System.out.println command. Where is System.out when I'm running Wicket
on Tomcat? Is it captured by some special Wicket logfile (I can't find
any)? It doesn't seem to be going to any of the Tomcat logfiles that I
can see, nor to the console window (unless I'm just missing it).\



Is this something I have
to configure in Tomcat to see the output of System.out?
















[Wicket-user] DataTable formatting

2006-03-31 Thread Frank Silbermann








Is there a way to make the DataTable draw a line between every row and column 
like a grid?








[Wicket-user] Wicket versus Echo

2006-03-29 Thread Frank Silbermann








I was browsing some of the framework
comparisons on the web and realized that though Wicket is in key ways most
similar to Echo. Yet, very little
has been written to contrast these two.
The one difference that I can ascertain is that Wicket exposes the
underlying html whereas Echo completely hides the html from the developer. What are
some of the implications of this difference that would make Wicket better than
Echo? (I dislike html, so thats
a point for Echo, but maybe access to the html is sometimes necessary 
which would be a point for Wicket).



What other differences are there?








RE: [Wicket-user] Location of image files

2006-03-28 Thread Frank Silbermann








I wanted a panel constructed with an image
filename which would popup the image in another window. I wanted my code in one place, my static
image files stored in the WEB-INF folder of my web module, and couldnt
figure out how to make Image component find them. Igor replied:



If they live outside a jar in a
static location then why do you even need an Image component? Add a webmarkup
container with an attribute modifier that rewrites the src
attri to point at an image, and attach that to img markup.



What Igor
suggested is exactly what I want to do, but Im having trouble changing
the src attribute on my image display
page. My HTML for the pop-up panel
is:

html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en lang=en

head/head

body


img wicket:id = picture alt=Picture src=REPLACE_THIS.png/

/body

/html



My code is:



public class PicturePage extends WebPage {




public PicturePage( PageParameters pageParameters ) {

 String pictureFile
= pageParameters.getString(pictureFile);



 WebMarkupContainer
wmc = new WebMarkupContainer(picture);

 wmc.add( new AttributeModifier( src,
new Model(pictureFile) ) );

 add(
wmc );


}

}



But it is not changing my src attribute.
What am I doing wrong?










RE: [Wicket-user] Location of image files

2006-03-28 Thread Frank Silbermann








But my src attribute to be
modified _is_ in my HTML, as you
can see (value shown is REPLACE_THIS.png). The problem is that the existing src
attributes value was not replaced.
What do I need to do differently?



-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Igor Vaynberg
Sent: Tuesday, March 28, 2006
11:56 AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Location of image files



attribute modifiers do
not add attributes into your markup by default - they only modify the ones
thats there, if you want to add an attribute you need to add another
constructor argument: 

new AttributeModifier( src, /true/, new Model(pictureFile) )

also you cannot link to resources under WEB-INF so your static folder will have
to be higher then that. 

-Igor





On 3/28/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:





I wanted a panel
constructed with an image filename which would popup the image in another
window. I wanted my code in one place, my static image files stored in
the WEB-INF folder of my web module, and couldn't figure out how to make Image
component find them. Igor replied:



If they live
outside a jar in a static location then why do you even need an Image
component? Add a webmarkup container with an attribute modifier that
rewrites the src attri to point at an image, and attach that to img
markup.



What Igor suggested is exactly what I want
to do, but I'm having trouble changing the src attribute on my
image display page. My HTML for the pop-up panel is:

html xmlns= http://www.w3.org/1999/xhtml
xmlns:wicket=http://wicket.sourceforge.net/
xml:lang=en lang=en

head/head

body


img wicket:id = picture alt=Picture
src="">

/body

/html



My code is:



public class PicturePage
extends WebPage {



 public
PicturePage( PageParameters pageParameters ) {

 String
pictureFile = pageParameters.getString(pictureFile);




WebMarkupContainer wmc = new WebMarkupContainer(picture);


wmc.add( new AttributeModifier(  src, new Model(pictureFile)
) );

 add(
wmc );

 }

}



But it is not changing my
src attribute. What am I doing wrong?


















RE: [Wicket-user] Location of image files

2006-03-28 Thread Frank Silbermann












-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, March 28, 2006 12:46 PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Location of image files



it should work, what does the finished output look
like. btw for tag w/out body you should use WebComponent not
WebMarkupContainer.

-Igor



OK, I start with a class called PicturePage with the following HTML. Note that there is a src
attribute hardcoded to BagsPosition.png
for the sake of previewing:



html xmlns=http://www.w3.org/1999/xhtml
xmlns:wicket=http://wicket.sourceforge.net/
xml:lang=en lang=en

head


link rel=stylesheet
type=text/css href=style.css/

/head

body


img wicket:id = picture alt=Picture src=BagsPosition.png/

/body

/html



My PicturePage
class with the changes youve suggested is:



package common.components.pictures;

import wicket.markup.html.WebPage;

import wicket.PageParameters;

import wicket.AttributeModifier;

import wicket.model.Model;

import wicket.markup.html.WebComponent;



public class PicturePage extends WebPage {




public PicturePage( PageParameters pageParameters ) {

 String pictureFile
= pageParameters.getString(pictureFile);



 WebComponent
wmc = new WebComponent(picture);

 wmc.add( new AttributeModifier( src,
true, new Model(pictureFile) ) );

 add( wmc );


}

}



My test-page with two links, each of which
should cause an image to pop-up was rendered by Wicket as:



html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en lang=enhead link rel=stylesheet type=text/css href=style.css//headbody span wicket:id=link1wicket:panel a href=/SpssWebModule/commonTest?wicket:bookmarkablePage=popupPageMap:common.components.pictures.PicturePageamp;filename=PrimaryChutes.png wicket:id=popupLink onclick=window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no,width=1000,height=500'); return false; span wicket:id=popupTextPrimary Chutes/span /a /wicket:panel/span br / span wicket:id=link2wicket:panel a href=/SpssWebModule/commonTest?wicket:bookmarkablePage=popupPageMap:common.components.pictures.PicturePageamp;filename=Secondary.png wicket:id=popupLink onclick=window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no,width=1000,height=500'); return false; span wicket:id=popupTextSecondary/span /a /wicket:panel/span/body/html



Note that the page parameters seem to be
set correctly to two different image files (PrimaryChutes.png and Secondary.png). Clicking on the first one yields the
original hardcoded default picture (BagsPosition.png). When I view page source I get:



html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en lang=enhead link rel=stylesheet type=text/css href=style.css//headbody img wicket:id=picture src=BagsPosition.png alt=Picture//body/html



Note that my src
attribute was not replaced. In
fact, it appears as if nothing at all has been done to the HTML file upon which
PicturePage is based.










RE: [Wicket-user] Location of image files

2006-03-28 Thread Frank Silbermann








Ah, I think I see. It looks like a disagreement over the name of
the page parameter  filename versus pictureFile.

Rather than setting the parameter to null,
it leaves it as it was. Thanks!



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Tuesday, March 28, 2006 1:08 PM
To:
wicket-user@lists.sourceforge.net
Subject: RE: [Wicket-user]
Location of image files







-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, March 28, 2006 12:46 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Location of image files



it should work, what does the finished output look
like. btw for tag w/out body you should use WebComponent not
WebMarkupContainer.

-Igor



OK, I start
with a class called PicturePage with the following HTML. Note that there is a src attribute hardcoded
to BagsPosition.png for the sake of previewing:



html
xmlns=http://www.w3.org/1999/xhtml
xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en
lang=en

head

 link rel=stylesheet
type=text/css href="">

/head

body

 img wicket:id =
picture alt=Picture
src="">

/body

/html



My PicturePage class with
the changes youve suggested is:



package
common.components.pictures;

import
wicket.markup.html.WebPage;

import
wicket.PageParameters;

import
wicket.AttributeModifier;

import
wicket.model.Model;

import
wicket.markup.html.WebComponent;



public class PicturePage
extends WebPage {



 public PicturePage( PageParameters
pageParameters ) {

 String pictureFile =
pageParameters.getString(pictureFile);



 WebComponent wmc = new
WebComponent(picture);

 wmc.add( new AttributeModifier(
src, true, new Model(pictureFile) )
);

 add( wmc );

 }

}



My test-page with two
links, each of which should cause an image to pop-up was rendered by Wicket as:



html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en lang=enhead link rel=stylesheet type=text/css href=style.css//headbody span wicket:id=link1wicket:panel a href=/SpssWebModule/commonTest?wicket:bookmarkablePage=popupPageMap:common.components.pictures.PicturePageamp;filename=PrimaryChutes.png wicket:id=popupLink onclick=window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no,width=1000,height=500'); return false; span wicket:id=popupTextPrimary Chutes/span /a /wicket:panel/span br / span wicket:id=link2wicket:panel a href=/SpssWebModule/commonTest?wicket:bookmarkablePage=popupPageMap:common.components.pictures.PicturePageamp;filename=Secondary.png wicket:id=popupLink onclick=window.open(href, '', 'scrollbars=yes,location=no,menuBar=no,resizable=yes,status=no,toolbar=no,width=1000,height=500'); return false; span wicket:id=popupTextSecondary/span /a /wicket:panel/span/body/html



Note that the page parameters seem to be set correctly to two
different image files (PrimaryChutes.png
and Secondary.png).
Clicking on the first one yields the original hardcoded default picture
(BagsPosition.png). When I
view page source I get:



html xmlns=http://www.w3.org/1999/xhtml xmlns:wicket=http://wicket.sourceforge.net/ xml:lang=en lang=enhead link rel=stylesheet type=text/css href=style.css//headbody img wicket:id=picture src=BagsPosition.png alt=Picture//body/html



Note that my src attribute was not replaced. In fact, it appears as if nothing at all has
been done to the HTML file upon which PicturePage is based.










[Wicket-user] Need session subclass example

2006-03-27 Thread Frank Silbermann








I understand that
the Wicket way to store data in the session is to subclass WicketSession
and override getSessionFactory() in the application
object. Im having trouble
making it work  Im getting a class cast exception where I try to
retrieve my session subclass.



Would someone please
point me to a good example program which subclasses WicketSession? 








[Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Frank Silbermann








I am working with a database that is kind
of strange. Someone provides a new
table with each days data. Thus,
the database can cause an SQLException as a normal result for the use case
where the user requests data that hasnt been produced yet.



When my Iterator IDataprovider.iterate(int
first, int count) method is called and I go to the database, I would
like to handle the SQLException to call void Component.setResponsePage(
Class.responsePage) to tell the user what has happened, passing in
PageParameters to enable the user to continue.



It seems that DataTable does not like me
jumping out of the iterate(first,count) method like that. It tries to set the ResponsePage to the
Wicket error page, which causes a serious failure saying that one cannot set
the ResponsePage twice.



What are my options for solving this
problem?



Is it simply a matter of making my iterate(first,count)
return an empty iterator to satisfy the DataTable caller before my setResponsePage()
can take effect? 



Here is the relevant section from the
Tomcat logfile:



Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL:
http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule:
Redirect URL: http://jakarta.apache.org]]

Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:03 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM org.apache.catalina.core.ApplicationContext log

INFO: ContextListener:
contextInitialized()

Mar 24, 2006 8:11:10 AM org.apache.catalina.core.ApplicationContext log

INFO: SessionListener:
contextInitialized()

Mar 24, 2006 8:11:20 AM org.apache.catalina.core.StandardWrapperValve invoke

SEVERE: Servlet.service() for servlet
MEM_Application threw exception

wicket.WicketRuntimeException: Internal
Error: Could not render error page class
wicket.markup.html.pages.InternalErrorPage

 at
wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106)

 at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76)

 at
wicket.RequestCycle.step(RequestCycle.java:971)

 at
wicket.RequestCycle.steps(RequestCycle.java:1005)

 at
wicket.RequestCycle.request(RequestCycle.java:451)

 at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212)

 at
wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250)

 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)

 at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

 at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)

 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)

 at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

 at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

 at
java.lang.Thread.run(Thread.java:595)

Caused by: wicket.WicketRuntimeException:
Already redirecting to '/MEMSpssWebModule/mem?wicket:interface=:0:1:'. Cannot
redirect more than once

 at
wicket.protocol.http.BufferedWebResponse.redirect(BufferedWebResponse.java:88)

 at
wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:205)

 at
wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:60)

 at
wicket.request.compound.DefaultResponseStrategy.respond(DefaultResponseStrategy.java:49)

 at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:66)

 at
wicket.RequestCycle.respond(RequestCycle.java:877)

 at
wicket.RequestCycle.step(RequestCycle.java:946)

 ...
20 more

Mar 24, 

RE: [Wicket-user] DataTable and IDataProvider question

2006-03-24 Thread Frank Silbermann








Are we not expected to go to the database
when the iterate(first, count) method is called? Thats when the database tells me (through
an SQLException) that the table hasnt been created yet.



I am beginning to wonder about assumed
invariants that I did not take into consideration in my current design. When the user changes some query
parameters, then the next page refresh should replace the data in the table
based on the new query. Ive
assumed that I can handle this merely by changing the results returned by
IDataprovider.iterate(first, count), but now Im beginning to wonder.



A change in the query changes the result
of IDataProvider.size(). If DataTable
does not deal will with changing data sizes, maybe I have to respond to a
change in SQL query at a higher level  not merely to have the
IDataProvider reflect the changes, but to replace the whole table. What do you think? Anyway, here is the result I got. Do you need the log file? (Or do I just need to back up and
realize that the DataTable is not quite as flexible as Id assumed.)



type Exception report

message 

description The server encountered an
internal error () that prevented it from fulfilling this request.

exception 

wicket.WicketRuntimeException: Internal Error: Could not render error page class wicket.markup.html.pages.InternalErrorPage wicket.request.compound.DefaultExceptionResponseStrategy.respond(DefaultExceptionResponseStrategy.java:106) wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond(AbstractCompoundRequestCycleProcessor.java:76) wicket.RequestCycle.step(RequestCycle.java:971) wicket.RequestCycle.steps(RequestCycle.java:1005) wicket.RequestCycle.request(RequestCycle.java:451) wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:212) wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:250) javax.servlet.http.HttpServlet.service(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

note The full stack trace of the root
cause is available in the Apache Tomcat/5.5.9 logs.









-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 11:06
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



how did it crash? what was the output?

another thing is cant you try this before the datatable is even rendering? why
do the check so late in the game?

-Igor





On 3/24/06, Frank Silbermann [EMAIL PROTECTED]
wrote:





I'm using 1.2 B2







-Original
Message- 
From: [EMAIL PROTECTED]
[mailto:
[EMAIL PROTECTED]] On
Behalf Of Igor Vaynberg





Sent: Friday, March 24, 2006 10:41 AM
To: wicket-user@lists.sourceforge.net
Subject: Re:
[Wicket-user] DataTable and IDataProvider question







request cycle. are you using 1.2 head?


-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I did that, and it
crashed. Who is supposed to catch the RestartResponseException to restart
the response? 







-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:13
AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataTable and IDataProvider question



try throwing RestartResponseException.

-Igor



On 3/24/06, Frank
Silbermann 
[EMAIL PROTECTED]  wrote:





I am working with a
database that is kind of strange. Someone provides a new table with each
day's data. Thus, the database can cause an SQLException as a normal
result for the use case where the user requests data that hasn't been produced
yet.



When my Iterator
IDataprovider.iterate(int first, int count) method is called and I go to
the database, I would like to handle the SQLException to call void
Component.setResponsePage( Class.responsePage) to tell the user what has
happened, passing in PageParameters to enable the user to continue.



It seems that DataTable
does not like me jumping out of the iterate(first,count) method
like that. It tries to set the ResponsePage to the Wicket error page,
which causes a serious failure saying that one cannot set the ResponsePage
twice.



What are my options for
solving this problem?



Is it simply a matter of
making my iterate(first,count) return an empty iterator to satisfy the
DataTable caller before my setResponsePage() can take effect?




Here is the relevant
section from the Tomcat logfile:



Mar 24, 2006 8:11:03 AM
org.apache.catalina.core.ApplicationContext log

INFO:
org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain:
[org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News /
Redirect URL: http://www.cnn.com],
[org.apache.webapp.balancer.rules.RequestParameterRule: Target param name:
paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com],
[org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http

RE: [Wicket-user] ?Contract for Iterator IDataProvider.iterator(int first, int count) ???

2006-03-24 Thread Frank Silbermann








That suggests to me that the
implementation might assume it always gets all the rows it asks for, and may
raise an exception otherwise. Is
that correct?



If so, then any change in the number of
rows between displays requires not merely that the DataTable page be reset to 1
(assuming page headers), but that the whole DataTable should be replaced for
each response if the data is not static.
Was that the intent?



If DataTable assumes that the number of
rows is static, and if the implementers assumed that in the usual case IDataProvider.iterate(first,count)
would go to the database each time rather than storing data, then isnt
there a danger that the total size will change while paging through the data 
as other users insert and delete while one traverses the DataTable pages?





-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Friday, March 24, 2006 10:41
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
?Contract for Iterator IDataProvider.iterator(int first, int count)
???



the implementation will trim to size()

-Igor





On 3/24/06, Frank Silbermann [EMAIL PROTECTED] 
wrote:







To use the Wicket-extensions 1.2 DataTable,
we must provide an implementation of IDataProvider. 



IDataProvider , in turn,
requires that we implement 



int
size() 

and

Iterator
iterator(int first, int count)



If the DataTable is
paging data, is it likely that count on the last page will be larger
than the result determined by size()  so that we must return
count rows or however many remain, whichever is less -- or does the
DataTable reduce count on the last page so that first +
count never exceeds size()?




















[Wicket-user] wicket.markup.html.form.FormComponent and wicket.markup.html.form.Form

2006-03-22 Thread Frank Silbermann








I created a page using a DropDownChoice, overriding the void wantOnSelectionChangedNotifications() to return
TRUE.



I noticed that it worked, even though I
neglected to embed it within an HTML form, adding it simply to the page (and
not to a wicket.markup.html.form.Form). That made me think the component
contains its own form.



But then, it should also work if I add it
to a form  it is, after all, a subclass of FormComponent. Yet, the HTML specifications seem quite clearly
to forbid nested forms!



Why is this working? Does a Wicket FormComponent
check to see whether it is contained within a form, generating its own HTML
form markup only if not? Or is the
ability to set page parameters and post back something that the embedded _javascript_ can perform even in the absence of an HTML form?








[Wicket-user] Keeping components mutually in sync

2006-03-17 Thread Frank Silbermann








I have two RadioChoice
components which postback immediately. Whenever onSelectionChanged() is
called on one, I may need to modify the model of the other RadioChoice
(thus changing its selected value).
This behavior is mutual.



Is it possible to get into an infinite
loop of calls to onSelectionChanged()? Or is this
method called only when the user changes the selection, but not when the
selection is changed in code?












[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] DataView (extentions)

2006-03-15 Thread Frank Silbermann








The DataTable in Wicket Extensions 1.1
handles paging and sorting, but you must build a custom IDataProvider that accumulates
the sorting instructions from the DataTable and provides sorted subsets of the
data when requested by the DataTable (which handles the actual paging display).



DataTable and supporting classes have been
greatly refactored in Wicket Extensions 1.2 to give the user much more
flexibility in the set of features desired. The API changes will break Wicket 1.1
programs, so if you need to subclass anything to modify its behavior, I would
suggest going to Wicket 1.2 now. Otherwise, you can upgrade fairly easily
at any time by replacing Wicket 1.1 DataTable with Wicket 1.2
DefaultDataTable. Wicket 1.2
DataTable is more flexible but less complete; DefaultDataTable subclasses it to
provide defaults which make it behave like the Wicket 1.1 DataTable.



I have come up with my own subclass of
DataTable and implementation of IDataProvider to display any arbitrary database
java.sql.ResultSet. The basic idea
is that my IDataProvider implementation contains a List of rows, each row
consisting of a List of Object.
Also in the implementation is an array of descriptors, one per column, each
of which contains the column name and an indicator as to whether I want to be
able to sort on that column. (The
column name comes from the ResultSetMetadata; a method is provided to set the
sortability flag.) My implementation
of the abstract method to deliver a sequence of rows will delegate to the List.sublist()
command from the Java Collections API, and each time the DataTable delivers a
sort criteria I apply the Collections.sort() method to my list of rows, passing
it a Comparator that delegates to the Comparator of the Object at the relevant
column index. My implementation of
IDataProvider can also look at my array of column descriptors and generate a
list of IColumn objects (needed to construct the DataTable).



Its actually a bit more complicated
than that (and a work in progress), because I have complicated the above
mechanisms to deal with the possibility of a summary row at the end, and when
rows are requested, the query string will be recalculated based on form data --
and if it has changed since the last request then the data will be refreshed
from the database and the current page set back to 1.



The code is actually quite compact; when Im
finished Ill post it to the list if there is any interest.





-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, March 14, 2006 5:21 PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DataView (extentions)



there is also a DataTable component which wraps
DataView+paging+sorting.

-Igor





On 3/14/06, Vincent Jenks  [EMAIL PROTECTED] wrote:

I'm using 1.1.1 Are there any plans to whittle
down the amount of code it takes to implement paging  sorting? Has
it changed at all in 1.2? I spent a lot of time w/ ASP.NET (which
wicket feels quite similar to) and there's a DataGrid component that has
properties to set paging  sorting w/o any extra work. Something like
that would be really convenient. 







On 3/14/06, Igor Vaynberg  [EMAIL PROTECTED]
wrote:

are you using 1.1 ? or 1.2 ?
there used to be a constructor that took model in 1.1 i think. the model object
must be of type IDataProvider.





-Igor





On 3/14/06, Vincent Jenks [EMAIL PROTECTED]
wrote:

Sorry, I didn't mention that the List is wrapped in a
detached modelso it's an IModel, not List in the constructor.







On 3/14/06, Igor Vaynberg  [EMAIL PROTECTED]
wrote:

yes DataView works with IDataProvider instead of list.
not sure why you didnt get a compile error since there is no (String,List)
constructor.


there are examples of dataview and datatable under wicket-examples/repeaters 

-Igor







On 3/14/06, Vincent Jenks 
[EMAIL PROTECTED] wrote: 

So, I'm trying to use a DataView so I can page a
collection of objects
from a session bean. 

I create the List collection (loadingModel) and pass it into the DataView:

DataView productsDataView = new DataView(productsDataView,
loadingModel) 

...but I'm getting an exception at runtime:

Caused by: java.lang.ClassCastException: java.util.ArrayList

I assume then, it's not like the ListView in that it will not take a
List directly? Or, have I done something wrong? 

Thanks! 








































[Wicket-user] Location of image files

2006-03-14 Thread Frank Silbermann
I am writing code that will be shared between two web applications.  The
common code will be packaged in a .jar to be included by both web
applications.

One common component has a requirement to display an image whose
filename (or some other handle) it takes as a parameter.  The images
that will be passed to this component to display are different for the
two web applications.  Therefore, my image files must reside separately
from the code which constructs the wicket.markup.html.image.Image
component. 

The constructor for wicket.markup.html.image.Image can take a string
representing the image's file name.  In all of the examples, the image
file exists in the same directory as the component that creates the
Image component.  If the image exists in some other arbitrary location,
what are the rules for absolute or relative path addressing of the image
filename?



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Location of image files

2006-03-14 Thread Frank Silbermann








Its not that I want the images to
be served from a .jar; I just want them to exist in a different place from the
code that is creating the Image component.



Suppose I have a hundred images I want to
be able to pass as a parameter to a page or panel  I have to do all this
a hundred times?



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, March 14, 2006
10:13 AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Location of image files



there are two parts to this if you want the image to
be served from a jar.

one. you have to create an initializer and bind the image as a package
resource:
public void init(Application application)
{
  PackageResource.bind(application,
Tree.class, blank.gif);
 ...
}

the Tree.class acts as a scope - the image is assumed to be in the same package
as the scope class.

the initializer is needed for clustering reasons. look at wicket.properties and
Initializer code in wicket package.

two. you must create a resource reference to your image:
 /** Blank image. */
 public static final ResourceReference BLANK = new
PackageResourceReference( Tree.class, blank.gif);

after this you can create a url for the image in the package like so
RequestCycle.get().urlFor(BLANK);

hope this helps,
-Igor






On 3/14/06, Frank Silbermann [EMAIL PROTECTED]
wrote:

I am writing code that will be shared between two web
applications.The
common code will be packaged in a .jar to be included by both web
applications.

One common component has a requirement to display an image whose 
filename (or some other handle) it takes as a parameter.The images
that will be passed to this component to display are different for the
two web applications.Therefore, my image files must reside
separately 
from the code which constructs the wicket.markup.html.image.Image
component.

The constructor for wicket.markup.html.image.Image can take a string
representing the image's file name.In all of the examples, the
image 
file exists in the same directory as the component that creates the
Image component.If the image exists in some other arbitrary
location,
what are the rules for absolute or relative path addressing of the image 
filename?



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast 
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmdlnkkid0944bid$1720dat1642

___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user












[Wicket-user] Best practice for handling exceptions?

2006-03-13 Thread Frank Silbermann








I have a DataTable
(Wicket-extensions) that gets data from JDBC. My implementation of:



java.util.Iterator IDataProvider.iterator(int first,
int count) 



throws a variety of API exceptions (e.g. SQLException) which I have to catch, because the IDataProvider interface does not allow my method to throw
them. There is nothing I can do to
recover; I just want to do the standard default correct thing.



I suppose my application should have an
error page registered, and my exception handler should link to it. Would someone please point me to an
example or send me some sample code demonstrating the standard Wicket way of
doing this?



Thank you.








[Wicket-user] Popping up a static file

2006-03-08 Thread Frank Silbermann
What is the easiest way of creating a link that pops up a static file
(e.g. a .png drawing) in a new window?  The Linkomatic example shows how
an arbitrary BookmarkablePageLink can be made to pop-up, but this
approach would require me to construct an HTML file with a Wicket ID to
hold the image, and a Wicket WebPage class to insert the image.  That
seems like overkill.  Is there a simpler way?

(I suppose I could use pure HTML, but then what relation does my .png
file have to the rest of my Wicket application?)

I am flexible as to where in my directory hierarchy the static .png file
can reside.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Rendering DataTable or DataView (or model) as Excel sheet

2006-03-07 Thread Frank Silbermann














On 3/6/06, Frank Silbermann
[EMAIL PROTECTED]
wrote:



From 2006/02/01:

 Of greater
concern is that if I try to download the Excel file a second
 time (clicking
the download button again), I get an error.If from the 
 error page I use my
browser's back button, my page returns and the
 download
button works again -- once.

 In other
words, I must re-request my page between each download request,
 or I get an error.What is actually going on
here, and how do I correct 
 this
behavior?Is it because I am using a submit button instead of a
 Link to
trigger the download?How can I change my code to avoid
 invalidating
the page which offered the download?






im not sure why this happens. i can look into it if
you reproduce it in a quickstart project. 
-Igor



Im not sure what a quickstart project is.
Do you mean a zipped minimal web application that demonstrates the
behavior? /Frank












RE: [Wicket-user] Rendering DataTable or DataView (or model) as Excel sheet

2006-03-07 Thread Frank Silbermann








I tried with the 1.2beta1; same
problem. /Frank



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner
Sent: Tuesday, March 07, 2006 7:44
AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
Rendering DataTable or DataView (or model) as Excel sheet



MarkupContainer [Component id = 1, page = No
Page, path =1.MyDataTable$1]] 

component id == 1, DataTable?
It looks like a Item in the table that was removed.

Which version do you use?
Because there was an error that is recently fixed that sets the parents to the
right values if 
a markupcontainer children did get rollbacked.

Can you try with 1.2beta1?

johan





On 3/7/06, Frank Silbermann [EMAIL PROTECTED]
wrote:











On 3/6/06, Frank
Silbermann [EMAIL PROTECTED]
wrote:







From 2006/02/01:






 Of
greater concern is that if I try to download the Excel file a second
 time
(clicking the download button again), I get an error.If from the 
 error
page I use my browser's back button, my page returns and the
 download
button works again -- once.

 In
other words, I must re-request my page between each download request,
 or
I get an error.What is actually going on here, and how do I correct

 this
behavior?Is it because I am using a submit button instead of a
 Link
to trigger the download?How can I change my code to avoid
 invalidating
the page which offered the download?






im not sure why this happens. i can look into it if you reproduce
it in a quickstart project. 





-Igor



I'm not sure what a
quickstart project is. Do you mean a zipped minimal web application that
demonstrates the behavior? /Frank





Root cause:

java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = 1, page = No Page,
path = 1.MyDataTable$1]]
 at wicket.Component.getPage(Component.java:1033)
 at wicket.Component.hasErrorMessage(Component.java:1246)
 at
wicket.markup.html.form.Form$14.component(Form.java:808)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:670)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:685)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:685)
 at wicket.MarkupContainer.visitChildren(MarkupContainer.java:710)
 at wicket.markup.html.form.Form.anyFormComponentError(Form.java:804)
 at wicket.markup.html.form.Form.hasError(Form.java:505)
 at wicket.markup.html.form.Form.process(Form.java:702)
 at wicket.markup.html.form.Form.onFormSubmitted(Form.java:245)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:162)
 at
wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
 at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:62)
 at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
 at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:818)
 at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:851)
 at wicket.RequestCycle.step(RequestCycle.java:931)
 at wicket.RequestCycle.steps(RequestCycle.java:1005)
 at wicket.RequestCycle.request(RequestCycle.java:451)
 at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208)
 at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:235)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)

Complete stack:

wicket.WicketRuntimeException: Method onFormSubmitted
of interface wicket.markup.html.form.IFormSubmitListener
targeted at component [MarkupContainer [Component id
= exportToExcelForm, page

RE: [Wicket-user] Rendering DataTable or DataView (or model) as Excel sheet

2006-03-06 Thread Frank Silbermann
From 2006/02/01:  

Me: 
 ASP.NET has an easy way to return a DataGrid as an MSExcel file:

  Dim stringwriter As New System.IO.StringWriter()
  Dim htmlwriter As New System.Web.UI.HtmlTextWriter(stringwriter)

  DataGrid1.RenderControl(htmlwriter)
  Response.AppendHeader(content-disposition,
attachment;filename=name.xls)
  Response.Write(stringwriter.ToString())
  Response.End()

  What is nice is that the Excel worksheet reflects the styling of the
  DataGrid.  ... I downloaded the Excel file produced by the ASP.NET
  application, saved it, and opened it in a text editor. The content
  was simply the table portion of an HTML file.

  How do I do this in Wicket?

Igor Vaynberg: 
 In Wicket 1.2 you can do this:

 DataTable dt=...;

 add(new Link(export-link) {
   onclick() {
   getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dt));
   WebResponse wr=(WebResponse)getResponse();
   wr.setHeader(blah);
   }
 }

I used a submit button in a form.  To make it work I also had to set the
content-type:

protected void onSubmit() {
 getRequestCycle().setRequestTarget(new
ComponentRequestTarget(dataTable));
 WebResponse wr=(WebResponse)getResponse();
 wr.setContentType(excel/ms-excel; name= + msExcelFilename);
 wr.setHeader(content-disposition,
attachment;filename= + msExcelFilename);
}

It did not reflect the DataTable's stylesheet attributes -- this is not
a showstopper, but can I make it happen?


Of greater concern is that if I try to download the Excel file a second
time (clicking the download button again), I get an error.  If from the
error page I use my browser's back button, my page returns and the
download button works again -- once.

In other words, I must re-request my page between each download request,
or I get an error.  What is actually going on here, and how do I correct
this behavior?  Is it because I am using a submit button instead of a
Link to trigger the download?  How can I change my code to avoid
invalidating the page which offered the download?

Here is the error:

Unexpected RuntimeException
Root cause:java.lang.IllegalStateException: No Page found for component
[MarkupContainer [Component id = 1, page = No Page, path =
1.MyDataTable$1]] at wicket.Component.getPage(Component.java:1033)
at wicket.Component.hasErrorMessage(Component.java:1246) at
wicket.markup.html.form.Form$14.component(Form.java:808) at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:670) at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:685) at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:685) at
wicket.MarkupContainer.visitChildren(MarkupContainer.java:710) at
wicket.markup.html.form.Form.anyFormComponentError(Form.java:804) at
wicket.markup.html.form.Form.hasError(Form.java:505) at
wicket.markup.html.form.Form.process(Form.java:702) at
wicket.markup.html.form.Form.onFormSubmitted(Form.java:245) at
java.lang.reflect.Method.invoke(Method.java:585) at
wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:162
) at
wicket.request.target.component.listener.ListenerInterfaceRequestTarget.
processEvents(ListenerInterfaceRequestTarget.java:74) at
wicket.request.compound.DefaultEventProcessorStrategy.processEvents(Defa
ultEventProcessorStrategy.java:62) at
wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEve
nts(AbstractCompoundRequestCycleProcessor.java:57) at
wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:818)
at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:851)
at wicket.RequestCycle.step(RequestCycle.java:931) at
wicket.RequestCycle.steps(RequestCycle.java:1005) at
wicket.RequestCycle.request(RequestCycle.java:451) at
wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:208) at
wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:235) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
6) at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC

RE: [Wicket-user] Replacing Page components in response to user input

2006-03-03 Thread Frank Silbermann

Me:
 However, at any time the user can re-set the options and re-submit,
 causing a completely different DataTable based on a new DataProvider.

Eelco Hillenius:
 First of all, ask yourself whether it is a completely different
 datatable, or whether the it's just a different model.

Suppose it's just a different model.  DataTable seems to have no
constructor that takes a PropertyModel so that the IDataProvider can
change dynamically, nor a method in DataTable to replace the
IDataProvider manually.

In this case, would you recommend simply to changing the state of my
IDataProvider so that IDataProvider.iterator(first, count) method
returns the new data, and call DataTable.setCurrentPage(1)?


Me:
 How do I code a page to replace one component with a new one
 in response to user input?  (I see plenty of examples of adding
 a component to a page, but only in the constructor -- and no
 examples of removing/replacing a component.)

Eelco Hillenius:
 If it *is* a completely different datatable and you want to
 replace it with something completely different, use panels.
 Put your different options in different panels, and use
 'replace' to replace one component with the other.

Would that be the MarkupContainer.replace(component) method?  This
method returns a MarkupContainer -- is the return value merely self --
a convenience in case you want to replace several components in one
line?

I can see the motivation for putting my replaceable components in a
Panel if the HTML requirements differ.  Likewise, if I have enough
components to replace that I'd rather not have to replace them one at a
time.  But if it's just a single component that I'm replacing, is there
really any need to put it in its own panel? 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Replacing Page components in response to user input

2006-03-03 Thread Frank Silbermann












I can see the motivation for putting my replaceable
components in a 
Panel if the HTML requirements differ.Likewise, if I have enough
components to replace that I'd rather not have to replace them one at a
time.But if it's just a single component that I'm replacing, is
there
really any need to put it in its own panel?






panel is the basic piece of wicket composition. so you will use them often. for
some situation (when the panel is not really reusable outside the page) you
might want to use Fragments because they make things tidier and easier. 
-Igor







Yes, but if I have but a single span
wicket:id=myDataTable in my HTML, and my Page is to replace
my DataTable component with another, couldnt I do without a separate
Panel _or_ Fragment? Why would I need _any_ special HTML container for my
DataTable?



(Or are we saying the same thing in that,
in its implementation, a DataTable _is_
a Panel?)








[Wicket-user] Replacing Page components in response to user input

2006-03-02 Thread Frank Silbermann

I have a form which provides the user with a number of options.  Based
on those options chosen, I will display a DataTable.  The user can play
with the DataTable in terms of paging through it, re-sorting the
columns, and so on.

However, at any time the user can re-set the options and re-submit,
causing a completely different DataTable based on a new DataProvider.

What tools does Wicket provide to allow me to replace one DataTable with
a new one?  Or, to be more general, how do I code a page to replace one
component with a new one in response to user input?  (I see plenty of
examples of adding a component to a page, but only in the constructor --
and no examples of removing/replacing a component.)

For simplity, assume that the replacement component can use the same
Page mark-up, e.g. replacing one Panel with another.  Putting all the
possible components on the page and disabling/hiding all but one at a
time is not an option for me.
 


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] New snapshots available

2006-02-27 Thread Frank Silbermann
The old DatePicker which didn't work in IE had in the documentation some
sample code for using it to load a textbox.  We also saw its use in the
FormInput example.

I know the new Calendar was just added to Wicket, and quite rapidly
after the problem with the old DatePicker was identified, I might add.
But could someone post a snippet of code showing how to use the new
Calendar component (e.g. to set a datestring into a textbox)?

Also, the concept of markup fragments (inline panels) sounds intriguing.
As anyone written anything about how these are used?  (Would I find much
about them in a search on this mailing list, for example?)

Thank you!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn
Dashorst
Sent: Monday, February 27, 2006 1:29 AM

I have uploaded a new snapshot release for a lot of Wicket projects:
 ...
Most notable changes to wicket:
 o new date picker (Yahoo), old datepicker has been deprecated
 o markup fragments (inline panels)
...


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DataTable

2006-02-24 Thread Frank Silbermann
In Wicket-Examples, Repeaters, there's an example of a DataTable from
Wicket-Extensions.  The data provider supplies lists of javabeans, each
bean representing a row in the table.  The PropertyColumn object for
each column of the table gives information about the column title, its
sortability, and the non-OGNL string used for pulling a cell's data out
of the bean.

In this example, the column names are hardcoded as bean properties, but
what I want is to display any arbitrary JDBC ResultSet in a DataTable.
Has anyone written code to do that?  (And if so, could I see it?
ASP.NET has this feature, and I'm rewriting code that uses it.)

If not, I was thinking that I could implement IDataProvider to contain
information about the number and names of the columns taken from the
ResultSetMetaData.  

The data provider would hold a list of row objects, each of which would
be (or contain) an indexed sequence (an Array or ArrayList) of atomic
data objects, obtained by calling resultSet.getObject(index) varying
index within the column count.

My subclass of DataTable would be constructed with this data provider as
an argument.  A loop (indexed within the column count) would create a
list of PropertyColumn objects -- each with the display model based on
the column name recorded from the ResultSetMetaData, and a non-OGNL
property expression that makes use of List/Array indexing to access the
specific field in the row.

Does this sound like a good approach, or am I re-inventing the wheel
here?


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] DatePicker won't pop up in IE

2006-02-23 Thread Frank Silbermann








Ive done some further testing on
the DatePicker popping up when running the FormInput example, and here are the
results:



wicket-examples-1.1.1  works
in both InternetExplorer and Mozilla

wicket-examples-1.2-20060221 works in Mozilla, but not
InternetExplorer



So the DatePickers inability to
work with InternetExplorer is a bug introduced in the new version under
development. I dont think my
employer would accept a requirement for users to go to Mozilla, but I need the
features of Wicket 1.2 -- so I hope this bug is fixed soon.





-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, February 20, 2006
10:12 PM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DatePicker won't pop up



I don't know what JAR versions the Forminput example
is using. I've updated the priority from 5 to 7. Here's the bug: 
https://sourceforge.net/tracker/?func=detailatid=684975aid=1434895group_id=119783

I tried loading each of the resources the DatePicker adds to wicket:head and
that worked fine. The _javascript_ added to the page, next to the text
field, is what seems to be causing the problem. 

Another question is if the underlying date picker _javascript_ code has changed.



On 2/20/06, Frank Silbermann 
[EMAIL PROTECTED]  wrote:



I've just noticed that it
works for me in Mozilla.



But why, then, does the
FormInput example's DatePicker work for me in IE? Is there some
configuration or property file setting needed to make it work in IE? Some
Cascading stylesheet setting required?





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Nick Heudecker
Sent: Monday, February 20, 2006
11:59 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DatePicker won't pop up



I'm having this problem on IE, but it works fine on FF. I've
opened a bug on this issue.
















[Wicket-user] question re DropDownList

2006-02-22 Thread Frank Silbermann

In most of the component examples we use a PropertyModel so the model is
automatically updated.  I presume that with the DropDownList the model
would be set to the selected string.

What is the purpose of its void updateModel() method?  Is this
something to override so that instead of setting the model object to the
selected string we can compute some other value (a value typically
computed _using_ on the selected string?



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: Results so far (was Re: [Wicket-user] VOTE)

2006-02-22 Thread Frank Silbermann
I may be offering an opinion on something already decided, but it seems
to me that if we change the constructors in an earlier release, and then
go to Java 1.5 on a subsequent release, if that makes maintenance of two
versions easier (post-1.5 and pre-1.5) easier.  Advantages:

(1) Less future work for the developers means faster improvement to
Wicket in the long run.

(2) The applications produced by users who cannot upgrade to 1.5 yet
will be easier to upgrade when they finally can do so -- the obsolete
user code they're accumulating won't be quite so obsolete.

(3) The inconvenience of upgrading user code in two phases (for those
who have no impediments to using Java 1.5 now) is a transitory problem.

Of course, one could make this argument about any code-breaking change
to the API, delaying the upgrade to Java 1.5 indefinitely.  But I'm
assuming that the constructor changes are an unusually severe break in
the API.

/Frank

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Eelco
Hillenius
Sent: Wednesday, February 22, 2006 10:15 AM
To: wicket-user@lists.sourceforge.net
Subject: Re: Results so far (was Re: [Wicket-user] VOTE)

I agree with Johan here. I want to start discussing it on the admin
list shortly. But it looks like there are enough for 2 - not the
majority, but enough - to make seperate releases. We should decide on
whether 1.2. (we might call that version differently actually, but
that's another question) or 1.3. is going to be our long running
supported version. I think the latter, and 1.2. based on requests, but
we have yet to discuss that. Btw Jonathan's vote was #2 - he sent me
that offline.

We'll give you an update later this week or this weekend. Thanks for
voting all!

Eelco


On 2/22/06, karthik Guru [EMAIL PROTECTED] wrote:
 and yeah more expected to come in :)

 On 2/22/06, karthik Guru [EMAIL PROTECTED] wrote:
  Ok for the benefit of others, the summary of vote that actually
matters - .
 
  Igor - 1
  Johan - 2
  Eelco - 1
 
  So ,
 
  2 votes for both at once (constructor and JDK5)
  1 vote for split releases
 


 --
  -- karthik --


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=kkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] JavaScript files in Wicket-Examples

2006-02-22 Thread Frank Silbermann








In the webapp
folder of Wicket Examples I noticed several _javascript_ files:



effects.js

prototype.js

scriptaculous.js



What do they do? Do I need them any of them on my
project? Could these have anything
to do with the fact that the Wicket-Extensions DatePicker
works in the FormInput example even with InternetExplorer, but not the DatePicker
in my own code?










RE: [Wicket-user] Wicket:link question

2006-02-21 Thread Frank Silbermann
Suppose my page that displays the links is at a deeply nested level, and
I want to use wicket:link to go to a page closer to the root.  Would
it work if I defined a Panel at the top level and put my wicket:link
in there (to be included by pages that were deeply nested)?

If not, what is the easiest way to hardcode a static list of many Wicket
links, some of which go up the hierarchy?  If the list is static and no
parameters are being passed, it seems like overkill to have to write
code for each link.

/Frank

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Juergen
Donnerstag
Sent: Thursday, February 16, 2006 4:17 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user] Wicket:link question

wicket:link is realy for convinience only and doesn#t have the full
flexibility of Links etc. But they support subpackages like
sub/myPage.html. You can not do ../xxx and absolute paths are excluded
as well.

Juergen

On 2/16/06, Frank Silbermann [EMAIL PROTECTED] wrote:


 I've seen that within a wicket:link tag we can write ordinary HTML
links
 and have Wicket lings automatically generated.  The Component
Reference
 examples use it as follows:



   wicket:link

  ul

  lia
 href=PanelPage.htmlwicket.markup.html.panel.Panel/a/li

  lia
 href=BorderPage.htmlwicket.markup.html.border.Border/a/li

  /ul

   /wicket:link



 But in all the examples, the linked pages were in the same package as
the
 page doing the linking.  Can we use wicket:link to link to pages in
other
 packages of our application?  If so, then how do we indicate the path
(so as
 to distinguish between page classes with the same name in different
 packages)?



 Would I use something like Unix relative path notation?



 Or is wicket:link only useful for linking within a package?


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=kkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] filling a drop-down with links ?

2006-02-21 Thread Frank Silbermann








My application will have about 25 pages,
all mutually linked. If I listed
all those links at the top of every page it would take up too much space. Id like something that would only
show the links when requested, e.g. a drop-down box of links. Im not sure how to do that in
Wicket. The Wicket DropDownChoice seems inappropriate, since Im not
really choosing anything.



Would it be feasible to create in a panel an
ordinary HTML drop-down, and use a ListView to
populate it with, say, BookMarkable links? That way if the user wanted to select
another page, hed have to click on the drop-down to show them, but
otherwise theyd be out of the way.



/Frank








RE: [Wicket-user] filling a drop-down with links ?

2006-02-21 Thread Frank Silbermann










What is the formula for determining the
URL of a (bookmarkable?) wicket Page, so I can set the Options VALUE
attribute?


[EMAIL PROTECTED]
On Behalf Of Igor Vaynberg
Sent: Tuesday, February 21, 2006 4:43 PM



sure, wicket just produces html, you can put a
listview inside a select as long as it outputs option elements.

select


option wicket:id=listview
valur=urlspan wicket:id=title/option
/select

then add an attrib modifier to the listitem that adds the url into the value
attribute and you are done. 

-Igor





On 2/21/06, Frank Silbermann
[EMAIL PROTECTED]
wrote:



My application will have about 25 pages,
all mutually linked. If I listed all those links at the top of every page
it would take up too much space. I'd like something that would only show
the links when requested, e.g. a drop-down box of links. I'm not sure how
to do that in Wicket. The Wicket DropDownChoice seems inappropriate,
since I'm not really choosing anything.



Would it be feasible to
create in a panel an ordinary HTML drop-down, and use a ListView to populate it
with, say, BookMarkable links? That way if the user wanted to select
another page, he'd have to click on the drop-down to show them, but otherwise
they'd be out of the way.



/Frank














[Wicket-user] DatePicker won't pop up

2006-02-20 Thread Frank Silbermann

What could prevent the Extensions project's DatePicker from popping up
when I click the DatePicker icon?

It works fine in the FormInput example, so it's not my browser settings.

For the sake of help, I've reduced my code to a bare minimum, taken
directly from the JavaDoc.  Here's my HTML:

html xmlns=http://www.w3.org/1999/xhtml;
xmlns:wicket=http://wicket.sourceforge.net/; xml:lang=en lang=en
head/head
body
 input type=text wicket:id=dateField size=10 /
 span wicket:id=dateFieldPicker /
/body
/html

And here's my Page class:

package mem.work;
import wicket.markup.html.*;
import wicket.markup.html.form.*;
import java.util.Date;
import wicket.extensions.markup.html.datepicker.DatePicker;

public class DatePickerTest extends WebPage {
  public DatePickerTest() {
TextField dateField = new TextField(dateField, Date.class);
add(dateField);
add(new DatePicker(dateFieldPicker, dateField));
  }
}

What am I missing to make it pop up?  (By the way, I'm using the Feb 12,
2006 Wicket 1.2 snapshot).


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] DatePicker won't pop up

2006-02-20 Thread Frank Silbermann








Ive just noticed that it works for
me in Mozilla.



But why, then, does the FormInput examples
DatePicker work for me in IE? Is there some configuration or property
file setting needed to make it work in IE?
Some Cascading stylesheet setting required?



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Nick Heudecker
Sent: Monday, February 20, 2006
11:59 AM
To:
wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
DatePicker won't pop up



I'm having this problem on IE, but it works fine on
FF. I've opened a bug on this issue.








[Wicket-user] question on DatePicker in FormInput example

2006-02-17 Thread Frank Silbermann
In the FormInput example, we build a subclass of
wicket.markup.html.form.Form to contain the date inputbox and
DatePicker.  For this input, the HTML inside the form is:

label wicket:id=dateLabel for=datePropertyDate/label
input wicket:id=dateProperty id=dateProperty type=text
size=40/
span wicket:id=datePicker/span

On the java side, adding the DatePicker to the Form subclass is:

WebMarkupContainer dateLabel = new WebMarkupContainer(dateLabel);
add(dateLabel);
TextField datePropertyTextField = new TextField(dateProperty,
Date.class);
add(datePropertyTextField);
add(new DatePicker(datePicker, dateLabel, datePropertyTextField));

Questions:
(1) What is the significance of the label's for='dateProperty'
attribute, and the passing of the dateLabel to the DatePicker's
constructor?  Is this to prevent the pop-up from covering the label?

(2) Why to we make dateLabel a WebMarkupContainer, rather than an
ordinary wicket.markup.html.basic.Label ?


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Question about Panel in Form

2006-02-17 Thread Frank Silbermann
I've seen examples of putting widgets into a Form, but I've not seen one
where a Panel is added to a Form.

Suppose I have a collection of form widgets (text boxes, radio buttons,
etc.) that I need to put in forms on many different pages.

If I put these components in a Panel, does adding the Panel to each Form
give me the same effect as adding to each form all the widgets contained
in the Panel (but with re-use of the Panel's HTML)?

 


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] conceptual question

2006-02-17 Thread Frank Silbermann

I am wondering where I can get a conceptual overview of how Wicket
works.  My questions are:

What sort of application data is automatically stored in the wicket
servlet's HttpSession (for simplicity, assume that models are not
detachable).

What sort of data, if any, is stored in secret fields in the HTML on the
client's browser?

If I declare a variable in a Wicket object's constructor, what happens
to its value when the constructor completes its execution?  Does it
vanish, or is it saved somewhere for the next time the page is built?

I notice that users never seem to declare instance variables in their
subclasses of Wicket objects.  Why is this?  If I did create an instance
variable, how would Wicket use it?


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


  1   2   >