Re: HTML:tags in a Tag
The coding of Tag classes is actually not a very difficult thing to learn. I recommend you take a look at the source from Abey Mullassery's image tags in commons sandbox to see how you can do all this. It really is not hard. After about ten minutes study and ten minutes coding, I had successfully subclassed the class to do some custom stuff I wanted. Jack On 4/20/05, Fogleson, Allen <[EMAIL PROTECTED]> wrote: > Scott, > > The short answer is you can't use a "tag" in a taglib class.. however > there are ways "around" that. You could subclass the tag so that the > processing can still occur. You could (though this would likely be > messy) call the taglibs classes yourself. But you would basically then > have to manage the lifecycle. Like I said messy. > > Al > > > -Original Message- > From: Scott Purcell [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 20, 2005 10:21 AM > To: user@struts.apache.org > Subject: HTML:tags in a Tag > > Hello, > > While finishing up a project, I found the need to create a Tag to use in > my JSP file. > > Problem is, I have created all view using the HTML:tags. Can the > HTML:tags be used in a Tag file? In my tag, I have access to a > JspWriter, but I am not sure how to use the tags in the class, since it > is a class. > > Can this be done? Any ideas of workarounds? > > Thanks, > Scott > > - > 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] > > -- "You can lead a horse to water but you cannot make it float on its back." ~Dakota Jack~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTML:tags in a Tag
In doEndTag() I have some code like: String includeFile = "/shared/tagsupport/somepage.jsp?somearg=" + someargval; pageContext.include(includeFile ); return EVAL_PAGE; And that's it. What isn't working for you? Paul > -Original Message- > From: David Whipple [mailto:[EMAIL PROTECTED] > Sent: 2005/20/04 17:54 > To: Struts Users Mailing List > Subject: RE: HTML:tags in a Tag > > > Can you elaborate a bit on this? I couldn't get this to work > when I was > trying it, but maybe I didn't do what you are doing. > > It would be great to get this to work - I have a need to do > this in our > project. > > Thanks, > Dave > > > > > > > Paul McCulloch > > > <[EMAIL PROTECTED]To: > 'Struts Users Mailing List' > > ystems.com> cc: > (bcc: David Whipple/DTCC) > > Subject: > RE: HTML:tags in a Tag > > 04/20/2005 11:39 AM > > > Please respond to > > > "Struts Users Mailing > > > List" > > > > > > > > > > I achieve this by having my tag include > (pageContext.include() ) a JSP page > which has the other custom tags I want to use. > > Paul > > > -Original Message- > > From: Scott Purcell [mailto:[EMAIL PROTECTED] > > Sent: 2005/20/04 16:21 > > To: user@struts.apache.org > > Subject: HTML:tags in a Tag > > > > > > Hello, > > > > While finishing up a project, I found the need to create a > > Tag to use in my JSP file. > > > > Problem is, I have created all view using the HTML:tags. Can > > the HTML:tags be used in a Tag file? In my tag, I have access > > to a JspWriter, but I am not sure how to use the tags in the > > class, since it is a class. > > > > Can this be done? Any ideas of workarounds? > > > > Thanks, > > Scott > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > Axios Email Confidentiality Footer > Privileged/Confidential Information may be contained in this > message. If > you are not the addressee indicated in this message (or > responsible for > delivery of the message to such person), you may not copy or > deliver this > message to anyone. In such case, you should destroy this message, and > notify us immediately. If you or your employer does not > consent to Internet > email messages of this kind, please advise us immediately. Opinions, > conclusions and other information expressed in this message > are not given > or endorsed by my Company or employer unless otherwise indicated by an > authorised representative independent of this message. > > WARNING: > While Axios Systems Ltd takes steps to prevent computer > viruses from being > transmitted via electronic mail attachments we cannot guarantee that > attachments do not contain computer virus code. You are > therefore strongly > advised to undertake anti virus checks prior to accessing the > attachment to > this electronic mail. Axios Systems Ltd grants no warranties > regarding > performance use or quality of any attachment and undertakes > no liability > for loss or damage howsoever caused. > > > - > 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]
RE: HTML:tags in a Tag
Hello David, I had some display that could use a bit of logic. So instead of creating a jsp page with a lot of logic, I thought it would e cleaner to create a class that extends Tag, and use this for my logic, and of course for reuse. Here is a pieceof the code from a method inside a Tag class. public void draw(JspWriter out, DealerGroupBean groupBean) throws Exception { out.println("draw method called."); out.println(""); out.println(""); out.println(""); out.println("" + groupBean.getGroupName() + ""); out.println(""); out.println(""); out.println(""); out.println(""); out.println(""); I could just use HTML code, but I like using the html:img tags, etc. But it just prints what it sees, in my case, no images, just the code in the src. Thanks, Scott -Original Message- From: David Whipple [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 11:54 AM To: Struts Users Mailing List Subject: RE: HTML:tags in a Tag Can you elaborate a bit on this? I couldn't get this to work when I was trying it, but maybe I didn't do what you are doing. It would be great to get this to work - I have a need to do this in our project. Thanks, Dave Paul McCulloch <[EMAIL PROTECTED]To: 'Struts Users Mailing List' ystems.com> cc: (bcc: David Whipple/DTCC) Subject: RE: HTML:tags in a Tag 04/20/2005 11:39 AM Please respond to "Struts Users Mailing List" I achieve this by having my tag include (pageContext.include() ) a JSP page which has the other custom tags I want to use. Paul > -Original Message- > From: Scott Purcell [mailto:[EMAIL PROTECTED] > Sent: 2005/20/04 16:21 > To: user@struts.apache.org > Subject: HTML:tags in a Tag > > > Hello, > > While finishing up a project, I found the need to create a > Tag to use in my JSP file. > > Problem is, I have created all view using the HTML:tags. Can > the HTML:tags be used in a Tag file? In my tag, I have access > to a JspWriter, but I am not sure how to use the tags in the > class, since it is a class. > > Can this be done? Any ideas of workarounds? > > Thanks, > Scott > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL P
RE: HTML:tags in a Tag
Can you elaborate a bit on this? I couldn't get this to work when I was trying it, but maybe I didn't do what you are doing. It would be great to get this to work - I have a need to do this in our project. Thanks, Dave Paul McCulloch <[EMAIL PROTECTED]To: 'Struts Users Mailing List' ystems.com> cc: (bcc: David Whipple/DTCC) Subject: RE: HTML:tags in a Tag 04/20/2005 11:39 AM Please respond to "Struts Users Mailing List" I achieve this by having my tag include (pageContext.include() ) a JSP page which has the other custom tags I want to use. Paul > -Original Message- > From: Scott Purcell [mailto:[EMAIL PROTECTED] > Sent: 2005/20/04 16:21 > To: user@struts.apache.org > Subject: HTML:tags in a Tag > > > Hello, > > While finishing up a project, I found the need to create a > Tag to use in my JSP file. > > Problem is, I have created all view using the HTML:tags. Can > the HTML:tags be used in a Tag file? In my tag, I have access > to a JspWriter, but I am not sure how to use the tags in the > class, since it is a class. > > Can this be done? Any ideas of workarounds? > > Thanks, > Scott > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - 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: HTML:tags in a Tag
I achieve this by having my tag include (pageContext.include() ) a JSP page which has the other custom tags I want to use. Paul > -Original Message- > From: Scott Purcell [mailto:[EMAIL PROTECTED] > Sent: 2005/20/04 16:21 > To: user@struts.apache.org > Subject: HTML:tags in a Tag > > > Hello, > > While finishing up a project, I found the need to create a > Tag to use in my JSP file. > > Problem is, I have created all view using the HTML:tags. Can > the HTML:tags be used in a Tag file? In my tag, I have access > to a JspWriter, but I am not sure how to use the tags in the > class, since it is a class. > > Can this be done? Any ideas of workarounds? > > Thanks, > Scott > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: HTML:tags in a Tag
Scott, The short answer is you can't use a "tag" in a taglib class.. however there are ways "around" that. You could subclass the tag so that the processing can still occur. You could (though this would likely be messy) call the taglibs classes yourself. But you would basically then have to manage the lifecycle. Like I said messy. Al -Original Message- From: Scott Purcell [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 10:21 AM To: user@struts.apache.org Subject: HTML:tags in a Tag Hello, While finishing up a project, I found the need to create a Tag to use in my JSP file. Problem is, I have created all view using the HTML:tags. Can the HTML:tags be used in a Tag file? In my tag, I have access to a JspWriter, but I am not sure how to use the tags in the class, since it is a class. Can this be done? Any ideas of workarounds? Thanks, Scott - 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]