I definitely think this would be useful. I am currently working on a
re-usable widget to be used for bounding boxes and this sort of mock up
wold be really useful.
As for where to put it what about just in the same place as Start.java,
under web-app/src/test, since the dependency on jetty is already there?
And all the components should be available on the classpath.
Andrea Aime wrote:
> Hi,
> working on Wicket UI reminds me a little of my old times
> building Swing desktop apps.
> One thing that occurred to me is that I used to start
> working on a new component by fleshing it just its structure,
> and started testing right away by placing a little "main"
> directly in the component to run it in isolation.
>
> This of course worked only in the initial phases of development,
> once I started hooking the component on the persistence backend
> that became harder and harder (unless one mocked per persistence),
> but it was a nice way to quickly check the basics of the component
> itself.
>
> I was wondering if anything similar was possible for Wicket
> webapps, and after some fiddling, I concluded that yeah,
> it was.
> So I put togheter the attached classes that allow one to
> just add a main and run a very quick Wicket webapp around
> a single, still non Catalog dependent component.
>
> I used it to quickly test a server side file browser
> I'm building in my spare time and it worked nicely.
> All I had to do in order to check interactively my
> file list viewer was to add the following to its code:
>
> public static void main(String[] args) {
> WicketTestApplication.start(new IComponentFactory() {
>
> public Component createComponent(String id) {
> FileProvider provider = new FileProvider(new
> File("c:/progetti/gisData"));
> provider.setSort(new SortParam(FileProvider.NAME, true));
> return new FileDataView(id, provider) {
>
> @Override
> protected void linkNameClicked(File modelObject,
> AjaxRequestTarget target) {
> System.out.println(modelObject.getAbsolutePath());
> }
>
> };
> }
> });
> }
>
> And voilĂ , you run it, you have a file browser on the specified
> path that responds to the user clicks.
>
> I was considering contributing this back to GeoServer:
> - do people want it
> - where do we put it?
>
> The second question is a harder one, as it requires jetty
> in the classpath. Maybe we can roll a module of its own,
> and people add it as a provided dependency?
> The testing "main" are imho to be removed or commented out
> once they served their purpose, but in the meantime the
> modules do need those classes and Jetty in the classpath.
>
> Cheers
> Andrea
>
>
> ------------------------------------------------------------------------
>
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel