Attaching stuff to pages

2008-04-10 Thread David Leangen

I know this type of question has been asked before, so if somebody can
point me to a previous thread or some doc, that would be cool.


I have a page like books mounted on /books. When the user sees the
page mounted at /books, she gets a list of all available books. Each
available book should be located at /books/bookIsbn.

If a user directly accesses the URL /books/bookIsbn, then either that
book information should be displayed, or a 404 should be returned (maybe
with a friendly message saying that such book doesn't exist).

Now, the only way to know which books are available is to browse the
database. This means that I can't actually mount a separate page for
each book. This processing needs to be done dynamically.


I suspect that I need to do all this logic in the books page itself, and
that I need to implement my own custom URL handler that works with the
books page. 

During a debugging session, I traced through
IRequestTargetUrlCodingStrategy, but didn't see anything that looked
like what I needed...


Could somebody point me in the right direction?


Thanks!
-dml-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Attaching stuff to pages

2008-04-10 Thread Igor Vaynberg
mount a page using indexed url coding strategy then in the page check
if there is a parameter. if there is one add the details panel, if not
add the list panel

-igor




On Thu, Apr 10, 2008 at 7:39 PM, David Leangen [EMAIL PROTECTED] wrote:

  I know this type of question has been asked before, so if somebody can
  point me to a previous thread or some doc, that would be cool.


  I have a page like books mounted on /books. When the user sees the
  page mounted at /books, she gets a list of all available books. Each
  available book should be located at /books/bookIsbn.

  If a user directly accesses the URL /books/bookIsbn, then either that
  book information should be displayed, or a 404 should be returned (maybe
  with a friendly message saying that such book doesn't exist).

  Now, the only way to know which books are available is to browse the
  database. This means that I can't actually mount a separate page for
  each book. This processing needs to be done dynamically.


  I suspect that I need to do all this logic in the books page itself, and
  that I need to implement my own custom URL handler that works with the
  books page.

  During a debugging session, I traced through
  IRequestTargetUrlCodingStrategy, but didn't see anything that looked
  like what I needed...


  Could somebody point me in the right direction?


  Thanks!
  -dml-




  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Attaching stuff to pages

2008-04-10 Thread David Leangen

Cool! 

Thank you for the ultra-rapido reply. :-)



On Thu, 2008-04-10 at 19:44 -0700, Igor Vaynberg wrote:
 mount a page using indexed url coding strategy then in the page check
 if there is a parameter. if there is one add the details panel, if not
 add the list panel
 
 -igor
 
 
 
 
 On Thu, Apr 10, 2008 at 7:39 PM, David Leangen [EMAIL PROTECTED] wrote:
 
   I know this type of question has been asked before, so if somebody can
   point me to a previous thread or some doc, that would be cool.
 
 
   I have a page like books mounted on /books. When the user sees the
   page mounted at /books, she gets a list of all available books. Each
   available book should be located at /books/bookIsbn.
 
   If a user directly accesses the URL /books/bookIsbn, then either that
   book information should be displayed, or a 404 should be returned (maybe
   with a friendly message saying that such book doesn't exist).
 
   Now, the only way to know which books are available is to browse the
   database. This means that I can't actually mount a separate page for
   each book. This processing needs to be done dynamically.
 
 
   I suspect that I need to do all this logic in the books page itself, and
   that I need to implement my own custom URL handler that works with the
   books page.
 
   During a debugging session, I traced through
   IRequestTargetUrlCodingStrategy, but didn't see anything that looked
   like what I needed...
 
 
   Could somebody point me in the right direction?
 
 
   Thanks!
   -dml-
 
 
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Attaching stuff to pages

2008-04-10 Thread David Leangen

I'm using MixedParamUrlCodingStrategy. Beautiful stuff!

Just one prob on line 154:

  String value = (String)parameters.get(parameterName);

This throws a ClassCastException, since parameters.get() returns
String[] and not String.


Doesn't this have to do with an api change in javax.servlet?


Should I submit a patch?


Cheers,
-dml-



On Fri, 2008-04-11 at 11:45 +0900, David Leangen wrote:
 Cool! 
 
 Thank you for the ultra-rapido reply. :-)
 
 
 
 On Thu, 2008-04-10 at 19:44 -0700, Igor Vaynberg wrote:
  mount a page using indexed url coding strategy then in the page check
  if there is a parameter. if there is one add the details panel, if not
  add the list panel
  
  -igor
  
  
  
  
  On Thu, Apr 10, 2008 at 7:39 PM, David Leangen [EMAIL PROTECTED] wrote:
  
I know this type of question has been asked before, so if somebody can
point me to a previous thread or some doc, that would be cool.
  
  
I have a page like books mounted on /books. When the user sees the
page mounted at /books, she gets a list of all available books. Each
available book should be located at /books/bookIsbn.
  
If a user directly accesses the URL /books/bookIsbn, then either that
book information should be displayed, or a 404 should be returned (maybe
with a friendly message saying that such book doesn't exist).
  
Now, the only way to know which books are available is to browse the
database. This means that I can't actually mount a separate page for
each book. This processing needs to be done dynamically.
  
  
I suspect that I need to do all this logic in the books page itself, and
that I need to implement my own custom URL handler that works with the
books page.
  
During a debugging session, I traced through
IRequestTargetUrlCodingStrategy, but didn't see anything that looked
like what I needed...
  
  
Could somebody point me in the right direction?
  
  
Thanks!
-dml-
  
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]