Just wanted to share my experience.

To fix this problem with Display tag, i had to download Beanutils 1.7 (1.6 didn't work) and Commons Collections.

Now it works.

All the best everyone, thanks.

Serge

Randy Burgess wrote:
This is working code. No try to it. :)

    <display:table name="userList" id="u" cellpadding="5" cellspacing="0"
rules="all" style="width:600;"
requestURI="securitySelector.action">


Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



From: Serge Bornow <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <user@struts.apache.org>
Date: Tue, 11 Dec 2007 23:07:24 -0500
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: S2 - using display tag with Struts

As i said persons list has getters/setters on Action obviously, this
isn't that simple.

I have read that i needed that line to SET a variable on a request scope
because Display tag cannot read the Value stack of Struts.

Thanks for a try.


Randy Burgess wrote:
I would move your List named persons to action scope and make sure you have
a public getter for it. Then get rid of the <s:set name="persons"
value="persons" scope="request"/> in the jsp. That's how I'm doing. Or you
could put it in request scope in the action using
ActionContext.getContext().getParameters().put("persons", persons);.

That error is from the missing itext library.

Regards,
Randy Burgess
Web Applications Developer
Nuvox Communications



From: Serge Bornow <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <user@struts.apache.org>
Date: Tue, 11 Dec 2007 15:28:21 -0500
To: Struts Users Mailing List <user@struts.apache.org>
Subject: Re: S2 - using display tag with Struts

Hello Wes,

Thanks for the reply.
Actually i do get this but it's not an error.

11-Dec-2007 3:27:10 PM org.displaytag.export.ExportViewFactory <init>
INFO: Initializing ExportViewFactory with type={csv,excel,xml,pdf}
11-Dec-2007 3:27:10 PM org.displaytag.export.ExportViewFactory
registerExportView
WARNING: Unable to instantiate class for pdf export.
org.displaytag.export.PdfView was found, but required libraries are
missing: com/lowagie/text/Element
11-Dec-2007 3:27:10 PM org.displaytag.properties.TableProperties
getLocaleResolverInstance
INFO: No LocaleResolver configured.



Wes Wannemacher wrote:
Is there an error in your App Server log? Sometimes, if there is an
exception while sending output, it can bomb out part of the way
through. Check your logs to see if you find an exception that might
help narrow the problem down a little.

-Wes

On 12/11/07, Serge Bornow <[EMAIL PROTECTED]> wrote:
Hello Everyone,

First of all let me wish you merry Christmas and happy new year.

I have a small question to those that use display tag.

I have a page:

<%@ taglib uri="http://displaytag.sf.net"; prefix="display" %>
<%@ taglib uri="/struts-tags" prefix="s" %>


<html>
    <head>
        <title>Test</title>

        <s:head theme="simple" />
        <s:debug/>
    </head>
    <body>
        <s:set name="persons" value="persons" scope="request"/>


        <display:table name="persons"  id="row" >


            <display:column property="name" title="Name"/>
            <display:column property="gender" />

        </display:table>
    </body>

</html>

I also have a simple POJO called Person with  name and gender as its
fields.


And a  mapped action e.g. myaction so i browse myaction.action
which contains a field private List<Person> persons;
with get and set methods.
In the execute()
i add a few dummy objects to the list
this.persons = new ArrayList();

        Person per = new Person();
        per.setName("serge");
        per.setGender("m");

        this.persons.add(per);

        per.setName("serge Bornow");
        per.setGender("MM");
        this.persons.add(per);

Btw i have the display jar in my classpath

Now when i load that page, nothing shows up.


In fact something screws this process , this is the output: (view source)

<html>
    <head>
        <title>Test</title>

        <script type="text/javascript">
    // Dojo configuration
    djConfig = {
        baseRelativePath: "/TestStruts2/struts/dojo",
        isDebug: false,
        bindEncoding: "UTF-8",
        debugAtAllCosts: true // not needed, but allows the Venkman
debugger
to work with the includes
    };
</script>
<script type="text/javascript"
        src="/TestStruts2/struts/dojo/dojo.js"></script>
<script type="text/javascript"
        src="/TestStruts2/struts/simple/dojoRequire.js"></script>




And not even a closing tag </body>  etc



I would really appreciate an advice.

Thank you kindly,

Serge

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



This email and any attachments ("Message") may contain legally privileged
and/or confidential information.  If you are not the addressee, or if this
Message has been addressed to you in error, you are not authorized to read,
copy, or distribute it, and we ask that you please delete it (including all
copies) and notify the sender by return email.  Delivery of this Message to
any person other than the intended recipient(s) shall not be deemed a waiver
of confidentiality and/or a privilege.

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






This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this Message has 
been addressed to you in error, you are not authorized to read, copy, or distribute it, 
and we ask that you please delete it (including all copies) and notify the sender by 
return email.  Delivery of this Message to any person other than the intended 
recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

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




Reply via email to