Yeah, that would be nice. I'm +1 for it.

-Matej

Jonathan Locke wrote:

was just looking at the new database code i've been writing and it seems like i could provide a nice shortcut to add custom resource handling to that... basically you could
override a method like one of these in your DatabaseWebSession subclass:

public void onResource(String path)
{
// default implementation parses path into type and id and calls onResource(String, long)
}

public void onResource(String type, long id)
{
    respond(getMyDao().getBlob(...));
}

this would be an abbreviation for creating your own requestcyclefactory and instantiating a subclass of DatabaseWebRequestCycle that parses the url into a type and id from a form like http://<host>/app/customResource/<type>/<id>. by overriding this method, you could write anything to the response you wanted for the given type and id. in most cases, you'd be using the database, i imagine. there would be a method like DatabaseWebSession.encode(String type, id) to go the other way. could even provide some default code for writing a blob out to the
response like the one suggested above.

Phil Kulak wrote:

If we want to say that this is outside the scope of wicket, then there
needs to be a good way for a Servlet to get at the Wicket session.
Right now they way I'm doign it is a bit of a hack, not portable at
all, and will break as soon as you guys change how you build the
session key:

WicketSession session = (WicketSession) request.getSession().getAttribute("wicket-/app-session");

On 8/5/05, Phil Kulak <[EMAIL PROTECTED]> wrote:
Okay, I see what you mean. I had that exact same requirement recently.
I believe it was discussed on here as well. Right now I'm using a
Spring controller to serve up files dynamically. I'm probably going to
have to make a photo proxy too (as you mention), and it would be very
nice if I could stay in Wicket to do it. I'm definatly +1 on this.

And no, Axis is NOT the way to go for this kind of thing. I didn't
really understand your requirements there.

On 8/5/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:
in fact, i think the total change would be this:

   protected boolean onCustomResource()
   {
      return false;
   }

   protected final boolean parseRequest()
   {
       // Try different methods of parsing and dispatching the request

       if (onCustomResource() || callDispatchedComponentListener())
       {
           // if it is, we don't need to update the cluster, etc, and
return false
       }

      ...

that would allow users to implement any kind of alternative resource
using a URL
format of their own devising.  i could see this being a lot more
efficient for certain
things...  like if you had a photo site, you could implement a custom
resource handler
that turned every http://<site>/app/photo/<id> into the right photo,
avoiding wicket
image component overhead for each photo on the site.  if there are
millions of photos
it might be worth it.

Phil Kulak wrote:

I think integration with Apache Axis would be the way to go here.

On 8/5/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:


i want to be able to do non-html client/server stuff over http using
wicket.  this is
especially useful in having a java applet talk to its originating server
in the presence
of firewalls that block everything but port 80.

in particular i want to send simple representations of database objects
and binary
files pulled out of a database back and forth.

wicket is /almost/ all set up to do that except that there is no URL
syntax for it yet.

one way we could enable a problem like this to be solved would be to
remove the
final keyword from the parseRequest() method in WebRequestCycle.java. this
would permit users to do their own request parsing to solve problems
like this.

but the choice we make here is whether we want to open this up or
instead make
a specific solution to the particular problem of getting and setting
data over http
(which is likely to be a problem for others).

thoughts?

     jon



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to