RE: Scalability

2010-04-11 Thread Alan Garfield
On Mon, 2010-04-12 at 08:31 +1000, Chris Colman wrote:
  I hesitate between the 2 solutions, as I don't need EJBs, but we never
  know !!! .
 
 If you have an app that currently doesn't need EJBs then keep it that
 way!! ;)

More EJB FUD yay


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: WicketStuff and wicket-contrib-javaee

2009-12-08 Thread Alan Garfield
On Tue, 2009-12-08 at 00:26 +0100, Major Péter wrote:
 Hi all,
 
 Lately I had to make some refactoring in wicket-contrib-javaee, and I
 saw, that the project is not well maintained. In the repo I only could
 find the source for v1.0, but only on sourceforge did I found the v1.1
 sources. :s
 So after I had refactored the source to make it work with Wicket 1.5
 trunk, I would like to resurrect, maybe maintain the project for a while.
 I've found these guides:
 http://wicketstuff.org/confluence/display/STUFFWIKI/Developer+Information
 http://wicketstuff.org/confluence/display/STUFFWIKI/WicketStuff+Core+-+Migration+Guide
 Is there something else, that I should be aware of?
 
 Also I'm using NetBeans with Automatic Code Format, but as far as I know
 there are some code format rules for projects (how the code should be
 indented where are the brackets, etc). The only problem is that NetBeans
 auto format doesn't format the code this way, so I may would break these
 rules. Do you know any tool which would solve me this issue? :)
 Thanks
 
 Best Regards,
 Peter Major

Hey Peter,

Well, it would appear there hasn't been a massive response to your
question (which IMHO appears to be pretty common whenever you mention
EJB on this list), but anyway I'm very interested in what you've done
and I really hope you can take over the maintenance of
wicket-contrib-javaee.

Thanks,
Alan.




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Thanks Wicket-Team!

2009-07-29 Thread Alan Garfield
On Thu, 2009-07-30 at 00:38 +0200, Erik Post wrote:

 Having typed all of that, maybe I should just write a tutorial
 myself... Oh well, my 2c.

+1 for that! I'd love to see an more balanced reasoning than the obvious
just use spring too. More JPA/Hibernate/JavaEE integration
documentation would also be nice. 

Cheers,
Alan.




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-05 Thread Alan Garfield
On Tue, 2009-05-05 at 03:03 -0500, Luther Baker wrote:
  Separates the code from the templates so the designers don't have to
  checkout the whole project, also keeps all the content in one directory.
  Even though they are dynamic template files for wicket there is a
  certain amount of static stuff that would be nice to be in one place.
 
 
 If you simply want to separate the file types, you can separate the *.html
 files into the src/main/resources directory. That separates the Java code
 from the HTML templates, it gives you a completely separate directory tree
 for the *.html files and it keeps all the html content in one directory. In
 addition, it is standard Maven practice to separate non-Java files into the
 src/main/resources directory. All standard Maven builds should work just
 fine.

Thanks that's pretty much where I've ended up.

 Additionally, under Netbeans it seems to me to be rather daft that there
  is a folder is called Web Pages in the project view but all it
  contains is image/binary files and the WEB-INF directory.
 
 
 Just a little background, by definition, Wicket defines a non-traditional
 web application structure. It intentionally avoids the use of the web page
 directory structure you are likely used to. It turns out that to do what you
 are asking, you are actually fighting both Wicket and Maven. Traditional
 HTML and JSP pages can be visited directly - but not so with Wicket html
 files. They are read in from the classpath and much more tightly bound to an
 actual Java class.
 
 Trying to fit your Wicket app into a traditional structure can be done ...
 but it is not standard Wicket practice and you're going to end up with
 custom configuration that you'll have to manage.

Thanks for the explanation, that makes sense to me now. You should
probably add something like this to the wiki as I couldn't find a really
good reason and the examples where a little light.


  But the actual
  HTML files end up in the Source Packages or worse Other Sources
  folder. I understand the reasons for putting them in the source packages
  directories but it's not an ideal solution to my mind and my team.
 
 
 That is fair. If you're simply after your aforementioned points, try
 dropping the *.html files into src/main/resources.

Thanks, it does seem a little silly to me as far as Netbeans is
concerned (also the million directories that might be needed to handle
com.foo.bar.web.pages.panels etc), but less than it did after your
explanation. It'll be fine with the files being in Other
Sources/resources.

Many thanks Luther!

Alan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-05 Thread Alan Garfield
On Tue, 2009-05-05 at 07:23 -0400, James Carman wrote:
 Ok, if you really want to do this and you don't want to use
 src/main/resources, have you checked out:
 
 http://wicketstuff.org/wicket13/customresourceloading/
 
 That has some code examples on how to load html templates from the
 document root.  That might help you.

Thanks for that. I only just found that by chance in Google a few
minutes ago. Although upon my response from Luther I think I'll stick
with the files being in the resources directory. It's the least amount
of change (eg. none) and it suits my purposes fully.

Many thanks again,
Alan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-05 Thread Alan Garfield
On Tue, 2009-05-05 at 12:33 +0100, Steve Swinsburg wrote:
 Alan,
 
 The fragment of XML from the pom that I posted IS in the Wicket  
 Quickstart generated via mvn archetype:generate. It's also in the  
 pom when you use the helper code available here: 
 http://wicket.apache.org/quickstart.html
 
 Hence why it's not a hack, it's standard Maven stuff. You don't need  
 the maven war plugin to generate the default war either.

Indeed, but if you read my original post fully I wasn't asking about the
resources folder or the standard way, I was wanting them in the webapp
folder which with the default quickstart wicket pom doesn't work.

And I quote myself Thanks for that, but that's not really my issue. How
do I make Wicket find the .html files in the __root of the war__? The
hack I have with maven at the moment properly constructs the war by
copying all the .html files into the classes folder for Wicket to find,
but maven also helpfully copies them into __the war's root__ as well
creating duplicates in the war.

As you can see my hack comment wasn't talking about a standard
structure hence my use of the word. My changed directory structure was
the hack. You read hack and completely missed my question for
something else.


 However, since you are doing it in a non standard way then you'll need  
 the maven war plugin to assemble your war in the way you want.

Indeed! Which was the reason for my original question. The war-plugin
helpfully copies the contents of the webapp directory into the war, BUT
if you also declare the resources as per the XML fragment to point at
the webapp dir, then maven will copy the html files twice. Once into the
classes directory structure as needed by Wicket and once into the
webroot of the war as per the defaults of the war-plugin. That was my
question, how do I stop maven (further the war-plugin) or how do you
change the way Wicket loads the HTML so that I don't end up with two
copies of the same files in the war.

I may not have structure my question properly because I'm not fully
versed with maven or wicket so you must excuse my inexperience.


 You said this:
  Thanks for that, but that's not really my issue. How do I make Wicket
  find the .html files in the root of the war?
 
 
 So I gave you a link to do that.  Since your HTML files will now be in  
 a non standard location (ie not next to the classes) you will need to  
 configure your app to look in the location you desire, and that  
 information is available in the wiki link I posted:
  http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html

Again, I even posted that exact same link you quoted in the email you
responded to!


 All of this information is readily available; first search item for  
 the configuration, quickstart for pom.

Well I must be not looking right, because it wasn't really apparent to
me.

I'm going to go with Luther's suggestion and use the default resources
folder to make what I need to happen happen. That way there is no
messing about with modifications to Wicket and no clumsy fiddling with
maven to move files into and out of weird directory structures.

Thanks anyway,
Alan.




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-05 Thread Alan Garfield
On Tue, 2009-05-05 at 08:26 -0400, Richard Allen wrote:
 To make Luther's point more explicit:
 
 Wicket allows you to bundle everything a Wicket component needs (Java code,
 HTML, CSS, images, etc.) into a single JAR and drop that JAR into the
 WEB-INF/lib directory of any WAR, thereby making the JAR essentially
 self-contained and reusable. The benefit this provides is the ability to
 truly componentize (or modularize) your web application. You can break a
 large project up into modules that become separate JAR Maven projects. Or
 you can break out reusable components into separate JAR Maven projects that
 get reused in different web applications.
 
 You can't take advantage of that if you put the resources in the root of
 WAR.

Thanks Richard, that really needs to be in the wiki somewhere. It's
clear and makes the advantages obvious. Previous to my question it all
appeared to be just for the sake of ease, but now it's rather apparent
why it is the way it is. I've read many sites/tutorials/mailing list
archives and the Wicket in Action book but it never was really
explained that well. Some even have their own differing confusing
opinions and variations. But then again maybe I just wasn't looking
right.

Regards,
Alan.





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-04 Thread Alan Garfield
On Mon, 2009-05-04 at 08:55 -0400, Richard Allen wrote:
 If you are using packagingwar/packaging, then the maven-war-plugin will
 automatically pick up the resources in src/main/webapp, which means you do
 not have to configure that directory as a resource. Additionally, the
 maven-resources-plugin automatically picks up resources in
 src/main/resources, so you don't have to explicitly configure that either.
 Try removing that configuration and see what happens.


Thanks for that, but that's not really my issue. How do I make Wicket
find the .html files in the root of the war? The hack I have with maven
at the moment properly constructs the war by copying all the .html files
into the classes folder for Wicket to find, but maven also helpfully
copies them into the war's root as well creating duplicates in the war.
This is what I'm trying to stop as it makes the war bigger than it needs
to be, and is confusing to other developers if they look at the war.

I've also tried to make Wicket load it's .html files from the root of
the war, but I cannot seem to get the incantation right. I've tried to
follow :-

http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3

but I'm having little success.

Thanks,
Alan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Putting HTML files in src/main/webapp

2009-05-04 Thread Alan Garfield
On Mon, 2009-05-04 at 21:07 -0400, James Carman wrote:
 What's the justification of having them in src/main/webapp again?

Separates the code from the templates so the designers don't have to
checkout the whole project, also keeps all the content in one directory.
Even though they are dynamic template files for wicket there is a
certain amount of static stuff that would be nice to be in one place.

Additionally, under Netbeans it seems to me to be rather daft that there
is a folder is called Web Pages in the project view but all it
contains is image/binary files and the WEB-INF directory. But the actual
HTML files end up in the Source Packages or worse Other Sources
folder. I understand the reasons for putting them in the source packages
directories but it's not an ideal solution to my mind and my team.

Looking at the debug from org.apache.wicket.util.resource it looks like
Wicket already looks for all and sundry anyway. How do I make it look in
the webroot?

Thanks,
Alan.



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Putting HTML files in src/main/webapp

2009-05-03 Thread Alan Garfield
Hi all,

Just a quick question, I'd like to move all the .html files so my
directory layout will be :-

.
|-- pom.xml
\-- src
|-- main
||-- java
||\-- com
||\-- foo
|||-- WicketApplication.java
||\-- bar.java
||-- resources
|\-- webapp
||-- com
||\-- foo
||\-- bar.html
|\-- WEB-INF
\-- test

I've setup my pom.xml like :-

build
resources
resource
directorysrc/main/resources/directory
/resource
resource
directorysrc/main/webapp/directory
includes
include**/*.html/include
/includes
/resource
 [..]
/resources
/build

Which works, but I end up with duplicate html files and directories in
the root of the war. I've not found an easy way to change this default.
Anyone else have an idea?

Many thanks!

Alan.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org