Why don't you use another jsp to delegate the requests
to the correct jsp page? Every time user clicks on any
of the vendors it will go to thru this jsp. It will be
between vendors.jsp and vendorparts.jsp. This jsp will
not have any ui part but just the logic to forward to
vendorparts.jsp and to set the bean with the correct
vendor name. This is more elegant and cleaner approach
I think.
Good luck
--- Rick Snide <[EMAIL PROTECTED]> wrote:
> I have a page "vendors.jsp" where (using a bean) I
> display a list of vendors to choose from. This list
> of vendors is a list of hyperlinks that the user can
> click. I want the user to click the link and then
> see the parts that are associated with that vendor
> (vendorparts.jsp). My thought was to use the
> HREF=vendorparts.jsp and also use the onclick method
> to set the vendor number selected in the bean for
> the vendorparts.jsp to know whose parts to display.
>
> my list of links (created by my bean) has items like
> this for the user to choose:
> <A HREF=vendorparts.jsp
> ONCLICK="submit_onclick('0001234')">Janes
> Plumbing</A>
> <A HREF=vendorparts.jsp
> ONCLICK="submit_onclick('0005678')">Joes
> Plumbing</A>
>
> My problem is that I don't have a good way to set
> the bean value (setVendor) before the page in the
> link is called. I want to accomplish it with "xml
> style" setting the bean properties rather than
> mixing in alot of "pure java".
>
> 1. If I try to use a "normal" java method, the
> submit_onclick method can not be found.
> 2. If I try to use a function instead, I apparently
> can not pass a value to the function.
> 3. I don't want to pass parms such as
> HREF=vendorparts.jsp?vendor=0001234 to prevent the
> user from looking at someone else's parts.
>
> Is there a better way to do this?
>
> Thanks in advance - and sorry for being so wordy.
> ��칻 �&ޙ����b�� ��ڽ�.��&�+an�r�('���H�
LDDI1h�� z�fj)m�X��ǫ�6�j˧r�� �[�ܬz�R<�S L2 $Ңg�zW�j{E (����'��W��Ƨm��wZ�
m��ڭ�b��#j���w(���)�z��� f� m���j���w(��k�ۜ��㲟�j�m�Xm����
���j{h��'���������a�� � 0� ���&����)�{ � m���� �)�r�
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com