You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andrew Myers <ab...@netscape.net> on 2002/07/29 06:42:53 UTC

Components....

Hi,

I have a bit of a problem which I'm hoping some of the brainy people here might be able to help me with. :)

My boss wants me to write a "component" (which he defines as a series of JSPs and associated business logic beans) that allows you to search for a property by its address.  The end result is that you would get back the primary key of the property.  This "component" could be used in numerous processes.

So my problem basically is how do I get to a certain step in a process, call this component (essentially as a "subroutine"), and then return to where I came from and continue on once I have identified the property?  

Given that the intention is to reuse the JSPs, the input page of my search component will always have to submit to the same action won't it?  Does that mean I have to have a bit fat action for the search component which somehow identifies which process you have come from (via hidden fields or something?) and then redirect you back to wherever you came from?  This seems pretty ugly to me but I'm not sure how else to achieve it.

Any advice would be greatly appreciated.

Thanks in advance!

Andrew.


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Components....

Posted by Eddie Bush <ek...@swbell.net>.
... and if that's not acceptable you could try tacking on a "bookmark" 
that you would use to return to wherever you initiate this search from:

?returnUrl=/path/to/where/I/am/now?with=your&parameters=and&stuff=tacked&on=end

... and then at the end of your search (whatever marks "completion" of 
your "component's" run), just take the value of the returnUrl and 
forward/redirect there.

HTH,

Eddie

Jacob Hookom wrote:

>My suggestion is to have a text box, with a search button that would
>take the data from the text box and use it in a query action in a new
>pop up window.  The pop up window would return search results and upon
>selecting a result, it would re-populate the original form and close
>itself (the pop-up).
>
>If you want to globalize this component, then also have the search
>button also pass hidden field params to the popup via normal get or URL
>writing with javascript.
>
>Jacob Hookom 
>Comprehensive Computer Science 
>University of Wisconsin, Eau Claire 
>
>
>-----Original Message-----
>From: Andrew Myers [mailto:abmyersa@netscape.net] 
>Sent: Sunday, July 28, 2002 11:43 PM
>To: struts-user@jakarta.apache.org
>Subject: Components....
>
>Hi,
>
>I have a bit of a problem which I'm hoping some of the brainy people
>here might be able to help me with. :)
>
>My boss wants me to write a "component" (which he defines as a series of
>JSPs and associated business logic beans) that allows you to search for
>a property by its address.  The end result is that you would get back
>the primary key of the property.  This "component" could be used in
>numerous processes.
>
>So my problem basically is how do I get to a certain step in a process,
>call this component (essentially as a "subroutine"), and then return to
>where I came from and continue on once I have identified the property?  
>
>Given that the intention is to reuse the JSPs, the input page of my
>search component will always have to submit to the same action won't it?
>Does that mean I have to have a bit fat action for the search component
>which somehow identifies which process you have come from (via hidden
>fields or something?) and then redirect you back to wherever you came
>from?  This seems pretty ugly to me but I'm not sure how else to achieve
>it.
>
>Any advice would be greatly appreciated.
>
>Thanks in advance!
>
>Andrew.
>
>
>__________________________________________________________________
>Your favorite stores, helpful shopping tools and great gift ideas.
>Experience the convenience of buying online with Shop@Netscape!
>http://shopnow.netscape.com/
>
>Get your own FREE, personal Netscape Mail account today at
>http://webmail.netscape.com/
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>---
>Incoming mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
> 
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
> 
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Components....

Posted by Jacob Hookom <ho...@uwec.edu>.
My suggestion is to have a text box, with a search button that would
take the data from the text box and use it in a query action in a new
pop up window.  The pop up window would return search results and upon
selecting a result, it would re-populate the original form and close
itself (the pop-up).

If you want to globalize this component, then also have the search
button also pass hidden field params to the popup via normal get or URL
writing with javascript.

Jacob Hookom 
Comprehensive Computer Science 
University of Wisconsin, Eau Claire 


-----Original Message-----
From: Andrew Myers [mailto:abmyersa@netscape.net] 
Sent: Sunday, July 28, 2002 11:43 PM
To: struts-user@jakarta.apache.org
Subject: Components....

Hi,

I have a bit of a problem which I'm hoping some of the brainy people
here might be able to help me with. :)

My boss wants me to write a "component" (which he defines as a series of
JSPs and associated business logic beans) that allows you to search for
a property by its address.  The end result is that you would get back
the primary key of the property.  This "component" could be used in
numerous processes.

So my problem basically is how do I get to a certain step in a process,
call this component (essentially as a "subroutine"), and then return to
where I came from and continue on once I have identified the property?  

Given that the intention is to reuse the JSPs, the input page of my
search component will always have to submit to the same action won't it?
Does that mean I have to have a bit fat action for the search component
which somehow identifies which process you have come from (via hidden
fields or something?) and then redirect you back to wherever you came
from?  This seems pretty ugly to me but I'm not sure how else to achieve
it.

Any advice would be greatly appreciated.

Thanks in advance!

Andrew.


__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas.
Experience the convenience of buying online with Shop@Netscape!
http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at
http://webmail.netscape.com/


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.380 / Virus Database: 213 - Release Date: 7/24/2002
 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>