You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2005/01/07 21:37:09 UTC
RE: JSP bean-- commclipse plugin info
Hi
sounds like a good plugin, but was not able to google
it, can you give the website from where i can download
this plugin
Ashish
--- Jim Barrows <jb...@sssc.com> wrote:
>
> > -----Original Message-----
> > From: fzlists@omnytex.com
> [mailto:fzlists@omnytex.com]
> > Sent: Friday, January 07, 2005 1:12 PM
> > To: user@struts.apache.org
> > Subject: Re: JSP bean
> >
> >
> > I always include the following method in all my
>
> There's a handy plugin called commclipse that I use
> to create my toStrings, equals, hashCodes and
> compareTo's. It also requires the commons-lang jar
> as well.
> Right click->commonclipse->toString and voila it
> either creates it or rewrites it.
> The commons-lang jar has some really cool stuff all
> by itself, including a TostringBuilder. commonclipse
> just makes it a click away.
>
>
> > ActionForms... I'm sure you can do the same in
> whatever bean
> > you have, or adapt it to be able to pass the bean
> to it if
> > you can't modify the bean itself... This will
> actually show
> > you all fields AND their values, but you can of
> course hack
> > it as you need to...
> >
> > import java.lang.reflect.Field;
> >
> > public String toString() {
> >
> > String str = null;
> > StringBuffer sb = new StringBuffer(1000);
> > sb.append(this.getClass().getName() + " [" +
> > super.toString() + "] = { ");
> > try {
> > Field[] fields =
> this.getClass().getDeclaredFields();
> > for (int i = 0; i < fields.length; i++) {
> > if (sb.length() > 0) { sb.append(", "); }
> > sb.append(fields[i].getName() + "=" +
> fields[i].get(this));
> > }
> > sb.append(" }");
> > str = sb.toString().trim();
> > } catch (Exception e) { }
> > return str;
> >
> > }
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> > On Fri, January 7, 2005 3:06 pm, Jim Douglas said:
> > > To all,
> > > I have a bean that's present in a JSP, does
> anyone know how to loop
> > > through
> > > a bean and list out the properties available?
> > >
> > > Here's the cose I have
> > >
> > > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> prefix="bean" %>
> > > <%@ taglib uri="/WEB-INF/struts-logic.tld"
> prefix="logic" %>
> > >
> > > <html><head><title>form.heading</title></head>
> > > <center><body><h4><bean:message
> key="form.heading" /></h4>
> > > <logic:present name="forms">
> > > <table border="1">
> > > <logic:iterate id="forms" name="forms">
> > > <tr><td>
> > > <bean:write name="forms"
> property="formName"/>
> > > </td>
> > > <td>
> > > <bean:write name="forms"
> property="formDesc"/>
> > > </td>
> > > <td><a href="<bean:write name="forms"
> > property="formLocation"/>.do
> > > "/>
> > > <bean:write name="forms"
> property="formLocation"/></a>
> > > </td>
> > > </tr>
> > > </logic:iterate>
> > > </table>
> > >
> > > </logic:present>
> > >
> > > </body></center>
> > > </html>
> > >
> > >
> > > I don't know why but "formDesc" can't be
> found, but the
> > bean is present
> > > in
> > > the JSP/
> > >
> > > I'm using IntelliJ. Does anyone know a good
> IDE or add
> > in for debugging
> > > JSP's?
> > >
> > > Thanks,
> > > Jim
> > >
> > >
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail:
> user-help@struts.apache.org
> > >
> > >
> >
> >
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
>
>
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JSP bean-- commclipse plugin info
Posted by Bryce Fischer <br...@berzerker-soft.com>.
http://commonclipse.sourceforge.net/
Ashish Kulkarni wrote:
> Hi
> sounds like a good plugin, but was not able to google
> it, can you give the website from where i can download
> this plugin
>
> Ashish
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org