export to excel - displaytag

2010-10-25 Thread Struts User
Hi all,

I am trying to export data to excel using diplaytag. I am able to save the
excel file but the file is empty. Any help is greatly appreciated.
I am setting the export filter and display-tag properties as below.

*web.xml:*

filter
filter-nameResponseOverrideFilter/filter-name

filter-classorg.displaytag.filter.ResponseOverrideFilter/filter-class
/filter

filter-mapping
filter-nameResponseOverrideFilter/filter-name
url-pattern*.do/url-pattern
/filter-mapping
filter-mapping
filter-nameResponseOverrideFilter/filter-name
url-pattern*.jsp/url-pattern
/filter-mapping

*displaytag.properties*

#sort.behavior=list
#sort.amount=list
basic.empty.showtable=true
basic.msg.empty_list=bQuery returned no results./b
basic.msg.empty_list_row=tr class=emptytd colspan={0} img
alt=Warning src=images/iconWarning.gif/nbsp;bQuery returned no
results./b/td/tr
#paging.banner.placement=top
#paging.banner.onepage=span class=pagelinks/span
export.types=csv excel xml pdf rtf
export.excel=true
export.csv=true
export.xml=true
export.pdf=true
export.rtf=true
export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
export.pdf.class=org.displaytag.export.DefaultPdfExportView
export.rtf.class=org.displaytag.export.DefaultRtfExportView
# if set, file is downloaded instead of opened in the browser window
export.excel.filename=logging_report.xls
export.excel.include_header=true

*Table.jsp*

display:table name=lstLoggings class=tablesorter  id=loggings
length=10 export=true 
display:setProperty name=basic.empty.showtable
value=false/
display:setProperty name=basic.msg.empty_list value=/
 display:setProperty name=export.excel
value=true/display:setProperty
display:setProperty name=export.excel.filename
value=LoggingReport.xls/display:setProperty

display:column property=noLogins title=No. of
Logins/display:column
display:column property=sysurAutoKey title=User
Key/display:column
display:column property=userName title=User
Name/display:column
display:column property=emailAddress title=Email
Address/display:column
display:column property=companyName title=Company
Name/display:column
display:column property=companyCode title=Company
Code/display:column

/display:table

Thanks.


redirect with parameter in struts

2010-08-23 Thread Struts User
Hi,

Is it possible in struts1 to include a parameter in the action redirection.
If I have a web application say, http://www..xyz.com/welcome.do and I want
to redirect it to http://www.xyz.com/welcomeredirect.do?cmp=company1 while
value of cmp will be assigned dynamically. how can I achieve this? Any
help or suggestion is greatly appreciated.

Thanks


Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Hi All - Is there any way in Struts2 to handle session sharing across
browsers.
My problem: 
User logs in - session created, user does CTRL+N and opens child window 
now he logs in as admin- session created (it does not create new session)
and now parent window has the admin session, and session data is of admin.
This problem is seen only when browser windows are opened by CTRL+N.

Please suggest 
-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964416.html
Sent from the Struts - User mailing list archive at Nabble.com.


Re: Is there any way in Struts2 to handle session sharing accross browsers

2009-12-29 Thread Struts-User

Thanks Paul, What I mean is not exaclty one session per user rather
preventing or detecting the session which is getting copied when any one
does CTRL+N or in IE7 opens application new TAB. 
In above said cases session remains to be same however session data is
replaced with the recentely logged in user's data. 
This creates problem when employee logs in one window and same employee
tries to log as admin in CTRL+Ned window as admin which will result in
employee session data being replaced by admin data



-- 
View this message in context: 
http://old.nabble.com/Is-there-any-way-in-Struts2-to-handle-session-sharing-accross-browsers-tp26964416p26964689.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts woes

2009-03-31 Thread struts-user

Hi.

I am upgrading from Struts 2.0.11 to 2.1.6, which mostly works as it 
should thanks to the migration guide [1].  A couple of things elude me, 
though:


1) I am not able to get fetch static files from dojo.  They are supposed 
to be in the classpath per default [2],  but the 
/struts/dojo/struts_dojo.js path only gives me a 404.  These files are 
in the struts2-dojo-plugin jar, and the jar is included in my War (under 
WEB-INF/lib/)


2) I also get NullPointers in 
com.opensymphony.xwork2.util.TextParseUtil.java (155) and 
com.opensymphony.xwork2.util.LocalizedTextUtil.findText (318) when 
accessing certain pages.  It seems that it's unable to fetch the strings 
in under WEB-INF/classes/my/app/package.properties


Best regards,
Henrik

[1] 
http://cwiki.apache.org/S2WIKI/troubleshooting-guide-migrating-from-struts-20x-to-21x.html

[2] http://struts.apache.org/2.x/docs/configuration-files.html

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE struts PUBLIC
-//Apache Software Foundation//DTD Struts Configuration 2.0//EN
http://struts.apache.org/dtds/struts-2.0.dtd;
struts
package name=my.app namespace=/my-app extends=struts-default
interceptors
interceptor name=login class=my.app.LoginInterceptor/
!-- interceptor name=ssl class=my.app.SSLInterceptor/ --

interceptor-stack name=defaultLoginStack
!--  interceptor-ref name=ssl/ --
!-- Our SSLInterceptor --
interceptor-ref name=servletConfig/
interceptor-ref name=params/
interceptor-ref name=login/
!-- Our LoginInterceptor --
interceptor-ref name=prepare/
interceptor-ref name=chain/
interceptor-ref name=modelDriven/
interceptor-ref name=fileUpload/
interceptor-ref name=staticParams/
interceptor-ref name=params/
interceptor-ref name=conversionError/
interceptor-ref name=validation/
interceptor-ref name=workflow/
/interceptor-stack

interceptor-stack name=defaultInsecureStack
!--  interceptor-ref name=ssl/ --
!-- Our SSLInterceptor --
interceptor-ref name=servletConfig/
interceptor-ref name=params/
interceptor-ref name=prepare/
interceptor-ref name=chain/
interceptor-ref name=modelDriven/
interceptor-ref name=fileUpload/
interceptor-ref name=staticParams/
interceptor-ref name=params/
interceptor-ref name=conversionError/
interceptor-ref name=validation/
interceptor-ref name=workflow/
/interceptor-stack

/interceptors

default-interceptor-ref name=defaultLoginStack/

global-results
result name=login/my-app/Login.jsp/result
result name=login-success/my-app/LoginSuccess.jsp/result
/global-results

!-- we could have used the catchall (*) action here, but specify it
   explicitly so that we can use defaultInsecureStack --
action name=Dummy class=my.app.my-appSupport
result/my-app/Dummy.jsp/result
interceptor-ref name=defaultInsecureStack/
/action

!-- action name=Login_* method={1} class=my.app.Login
result type=redirect-actionAboutOTTO/result
result name=input/my-app/Login.jsp/result
  /action --

action name=Login class=my.app.Login
result/my-app/Login.jsp/result
result name=input/my-app/Login.jsp/result
/action

action name=AboutOTTO class=my.app.AboutOTTO
result/my-app/AboutOTTO.jsp/result
interceptor-ref name=defaultInsecureStack/
/action

action name=Hellomy-app class=my.app.Hellomy-app
result/my-app/Hellomy-app.jsp/result
interceptor-ref name=defaultInsecureStack/
/action

action name=Welcome class=my.app.Hellomy-app
result/my-app/Welcome.jsp/result
interceptor-ref name=defaultInsecureStack/
/action

action name=Home class=my.app.Home
result/my-app/LoginSuccess.jsp/result
/action

action name=Logout class=my.app.Logout
result/my-app/Logout.jsp/result
/action
action name=ShowActivate class=my.app.Activatemy-app
param name=activationCode=${activationCode}/param
result/my-app/activate.jsp/result
interceptor-ref name=defaultInsecureStack/
/action
action name=Activate class=my.app.Activatemy-app method=activate
result name=input type=chainShowActivate/result
result name=success/my-app/activate_success.jsp/result
interceptor-ref name=defaultInsecureStack/
/action

[EMAIL PROTECTED]

2006-01-09 Thread struts-user
[EMAIL PROTECTED]



[EMAIL PROTECTED]

2006-01-08 Thread struts-user
[EMAIL PROTECTED]



Re: [STRUTS] Issues switching context paths

2004-12-10 Thread Chad Lauritsen (Struts User)
In the struts-config.xml, you still leave things as /appEntryPoint, and
the same holds true for custom tags e.g.

html:form action=/appEntryPoint/html:form
html:link action=/appEntryPoint/html:link

The struts controller and the taglibs will take /appEntryPoint, find
matching actions, and translate into /ice/appEntryPoint.do for you.

Keep in mind that if you don't use the custom tags, then you may have to
prepend /ice, and add the .do (or whatever you specified in web.xml)
suffix e.g.
form action=/ice/appEntryPoint.do/form
a href=/ice/appEntryPoint.do?.../form

 I just upgraded to struts 1.2.4, and now we want to move from our app at
 /, to being /ice/ So I modified my application.xml to be /ice and then
 pre-pended /ice to all of my actions. So I went from /appEntryPoint to
 /ice/appEntryPoint in the struts-config.xml

 Now when I navigate to http://www.localhost/ice/appEntryPoint.do: I
 get Invalid Path to /appEntryPoint requested.

 Any ideas on what is wrong?

 
 Mick Knutson
 Wells Fargo Business Direct Information Systems
 (415) 222-1020

 This message may contain confidential and/or privileged information. If
 you are not the addressee or authorized to receive this for the
 addressee, you must not use, copy, disclose, or take any action based on
 this message or any information herein. If you have received this
 message in error, please advise the sender immediately by reply e-mail
 and delete this message. Thank you for your cooperation.
 



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


-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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


Re: Struts, file upload, Websphere 5.0.1 'Read timed out'

2004-12-09 Thread Chad Lauritsen (Struts User)
Sean,

Is there a proxy server involved in the upload request?

csl


Sullivan, Sean C - MWT said:

 I am using Struts 1.1 in Websphere 5.0.1

 I am trying to use Struts' FormFile feature to receive an uploaded file.

 The file upload is failing due to a Read timed out error.  The error
 occurs when Struts is trying to read data from the InputStream for the
 HttpServletRequest object.

 Is this a known issue in Websphere 5.0.1?  Is there a solution and/or
 workaround?

-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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



Re: [STRUTS] Struts or straight HTML button for action w/ no assoc. form?

2004-12-09 Thread Chad Lauritsen (Struts User)
how about

html:link action=/BuildPostMessageViewActionPost message
   for this classmate/html:link


or perhaps you could create a throw-away DynaActionForm for this action if
you really want it to be a button.

csl

 [ServletException in:/classmateInfoData1.jsp] Cannot retrieve
 definition for form bean null' javax.servlet.jsp.JspException: Cannot
 retrieve definition for
  form bean null at
 org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:831)
  at...
  ...
-- 
Chad S. Lauritsen |
3658 Daleford Rd  | 216-751-4709
Shaker Heights, OH 44120-5255 | http://planetlauritsen.com




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



Re: [OT] how do i get context-param

2004-11-24 Thread Struts User
I had the same feeling that servlet spec. should be more specific when
I just started working with J2EE:)

But, my experience tells me that a specification tells you What you
need to have in a servlet container and not How to implement a
servlet container.

If I want to learn servlet programming, I usually pick up Jason Hunter's book.

Lee

On Wed, 24 Nov 2004 14:57:14 -0500, Erik Weber [EMAIL PROTECTED] wrote:
 Good point. I guess the J2EE tutorial would be the place for stuff like
 that (I was trying to only speak of official documentation).
 
 Erik
 
 
 
 
 Craig McClanahan wrote:
 
 It's important to remember that the Servlet Specification target
 audience isn't application developers -- it's people that are
 implementing servlet containers (such as the group that creates
 Tomcat).  It is about defining requirements, not illustrating use
 cases.
 
 For application level questions, and especially for beginners, you'll
 find any of the plethora of books, magazine articles, tutorials, and
 mailing lists that are available to be somewhat more accessible.
 (Personally, I still agree with your PS about the spec being required
 reading -- just need to set your expectations correctly :-).
 
 As for your specific question about accessing a context init
 parameter, you do have it right.
 
 Craig
 
 
 On Wed, 24 Nov 2004 14:26:23 -0500, Erik Weber [EMAIL PROTECTED] wrote:
 
 
 Well, I have to criticize my own advice. I just read over the Servlet
 2.4 spec. It doesn't explain this well at all, in my opinion. It still
 uses the same old, nearly meaningless, obscure language like used by
 the Servlet container to communicate with a Servlet, and stuff like
 that, which doesn't help anyone who actually wants to write a program.
 It does mention the getInitParameter methods of ServletContext and
 ServletConfig, but nowhere that I could find does it simply say, use one
 with this element in web.xml and the other with that element in web.xml,
 and/or why you would choose one or the other.
 
 Why can't the spec just say what I wrote below instead of trying to be
 so conceptual? Is what I wrote wrong? This is the stuff that .NET
 people criticize and that frustrates new programmers (in my experience).
 
 Here is a partial outline of how it should be explained:
 
 Initializing a Servlet
 -
 
 I. Initialization parameter that is global to your Web application (all
 Servlets)
 
 A. web.xml
 
 web-app
 . . .
 context-param
 param-nameglobalDateFormatString/param-name
 param-value-MM-dd/param-value
 /context-param
 . . .
 /web-app
 
 B. Java
 
 // store the date format String, but not a DateFormat,
 // as an instance variable or class variable
 // (DateFormat can't always be used concurrently)
 protected String globalDateFormatString;
 . . .
 public void init() throws ServletException, UnavailableException {
 globalDateFormatString =
 getServletContext().getInitParameter(globalDateFormatString);
 // try to instantiate a SimpleDateFormat with the String;
 // if the String is invalid, throw an Exception to make the Servlet
 unavailable
 }
 
 II. Initialization parameter that is specific to one Servlet
 
 A. web.xml
 
 servlet
 . . .
 init-param
 param-namespecificDateFormatString/param-name
 param-value|EEE, d MMM  HH:mm:ss Z|/param-value
 /init-param
 . . .
 /servlet
 
 B. Java
 
 protected String specificDateFormatString;
 . . .
 public void init() throws ServletException, UnavailableException {
 globalDateFormatString =
 getServletConfig().getInitParameter(specificDateFormatString);
 }
 
 Please correct me if I have it wrong, or show me the light if I missed
 something in the spec. I know I learned this somewhere, but can't
 remember where (the tutorial maybe?).
 
 Shouldn't this be the way the spec reads, or does this type of example
 belong somewhere else?
 
 Erik
 
 P.S. The spec is still required reading. ;-)
 
 
 
 
 Bill Siggelkow wrote:
 
 
 
 Thanks for the clarification, Erik.
 
 Erik Weber wrote:
 
 
 
 I think you want ServletContext.getInitParameter here. That is used
 with the context-param element (global to your web app).
 ServletConfig.getInitParameter is used with the init-param element
 (specific to one Servlet).
 
 In addition to the JavaDocs, you should read the Servlet
 specification, which tells you how Servlets and Servlet containers
 are supposed to work. Trust me, it is required reading:
 
 http://www.jcp.org/aboutJava/communityprocess/final/jsr154/
 
 Erik
 
 
 
 
 Bill Siggelkow wrote:
 
 
 
 MyServlet extends HttpServlet {
 public void init (ServletConfig config) {
 String paramValue = config.getInitParameter(myContextParamName);
 }
 }
 
 Personally, I have found the JavaDocs invaluable for this kind of
 stuff; you can find the Servlet 2.4 Javadocs online at
 http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/index.html.
 
 -Bill Siggelkow
 
 Nishant wrote:
 
 
 
 hi
 can anyone 

Re: Problem downloading file

2004-11-23 Thread Struts User
Here is a good article related to the problem:

http://www.javaworld.com/javatips/jw-javatip94_p.html

Lee


On Tue, 23 Nov 2004 18:38:30 -0500, Erik Weber [EMAIL PROTECTED] wrote:
 
 
 Dakota Jack wrote:
 
 Weber, you're the best.  Thanks a million.
 
 Jack
 
 
 
 You're quite welcome.
 
 P.S.  Would you like a gmail invite?
 
 
 
 Why, thank you. But, I already have a gmail account. Unfortunately, my
 main email address long has been posted all over the Web (I didn't know
 any better), so what the hell, I might as well keep using it.
 Earthlink's spam filtering is getting better and better anyway. :-)
 
 Erik
 
 
 
 
 
 On Tue, 23 Nov 2004 13:31:54 -0500, Erik Weber [EMAIL PROTECTED] wrote:
 
 
 Morales de Frías wrote:
 
 
 
 Hi¡
 
 I already know that this problem have been resolved before, but i can't 
 find the solution searching in this post. (Or solutions founded don't help 
 me).
 
 I have an action that generates pdf files, and zip them. And i want to 
 download it... but i have two problems:
 
 -- File that appears in dialog is Action'sNameA.do, no MyFile.zip
 
 
 
 
 Probably you already saw this, but if not it might help:
 
 http://www.mail-archive.com/user@struts.apache.org/msg10189.html
 
 
 
 
 
 code is like this
 -
 
   if (gz.exists()) {
 
   response.setContentType(application/zip);
   
  response.setHeader(Content-Disposition,attachment; fichero=\ + 
  nombreBaseFichero + \;);
   response.setContentLength((int)gz.length());
 
 
   ServletOutputStream sos;
   sos = response.getOutputStream();
 
   FileInputStream stream = new 
  FileInputStream(gz);
   BufferedInputStream  bis = new 
  BufferedInputStream(stream);
   InputStream is = new 
  BufferedInputStream(bis);
   int count;
   byte buf[] = new byte[4096];
   while ((count = is.read(buf))  -1)
   sos.write(buf, 0, count);
 
   is.close();
   sos.close();
   }
 -
 
 --- Dialog appears two times, and next any action i take, download's 
 dialog appears. I read that action must return null but iit doesn't work.
 
 
 Can you help me, please???
 
 Thanks in advance.
 
 
 
 
 
 -
 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: AW: talking about paradigms

2004-11-16 Thread Struts User
I agree with Jack. There are pointers everywhere in Java. Java learns
from C++ mistake by hiding error prone functionality such as
pointers.

Joshua Block's book is not a Java Book for beginner. It is target for
experience developer. Probably you should look into Bruce Eckel's
on-line book for more information - http://64.78.49.204/

I hope this helps.

Lee

On Tue, 16 Nov 2004 06:42:32 -0800, Dakota Jack [EMAIL PROTECTED] wrote:
 Hello, Leon,
 
 There are pointers in Java.  Every object is referenced by a pointer.
 Indeed, how else could an object be referenced?  I am not sure why you
 cited Joshua Bloch's book on this.  There is not, as Eddie said,
 pointer arithmetic.
 
 Jack
 
 On Tue, 16 Nov 2004 11:46:05 +0100, Rosenberg, Leon
 [EMAIL PROTECTED] wrote:
 
 
  And, taking in risk bringing in boredom in your life, there are NO
  _pointers_ in java; if you don't believe me, try some books written by
  java developers (i.e. Joshua Bloch, Effective Java Programming Language
  Guide,
  Regards
  Leon
 
 --
 You can't wake a person who is pretending to be asleep.
 
 ~Native Proverb~
 
 Each man is good in His sight. It is not necessary for eagles to be crows.
 
 ~Hunkesni (Sitting Bull), Hunkpapa Sioux~
 
 -
 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: contrib/struts-shale-mailreader

2004-11-14 Thread Struts User
Thanks for the great explaination, Batien! 

It certainly makes sense to have tiles to work with any JSF implementation!

Lee

On Sun, 14 Nov 2004 10:37:27 -0700, BaTien Duong
[EMAIL PROTECTED] wrote:
 Struts User wrote:
 
 
 
 Having said all this, the framework is powerful for sophisticated web
 production side, where all fragments of each page are completely dynamic
 based on built-in backend intelligence. Tiles is appropriate for such
 page, rather than each page need a backing bean.
 
 
 
 Hi Batien,
 
 I am running the struts-shale-mailreader and just started to look into
 Java Server Faces and Shale. Thus, I am not totally familiar with the
 new frameworks and hope you can bear with me.
 
 Are you saying that Tile and backing bean don't have to co-exist? I
 thought Tiles and backing bean are two different things. Backing bean
 is sort of like ActionForm in Struts. More accurately, backing bean is
 like OzPage in Tak's introductory document.
 
 
 
 Backing beans and tiles need to co-exist in any decent dynamic web or
 portlet application. This is a very powerful presentation framework.
 
 Backing bean is a power tool under jsf. In a typical dynamic page, there
 is NOT a 1-to-1 mapping between a backing bean and a navigated page. A
 page is made of many dynamic fragments, each fragment has its own
 backing bean to receive data input from user and to push relevant data
 back to the user depending on user request context. Jsf provides this
 required infrastructure and fully configurable under managed beans. For
 example, if user asks any information related to company X in your
 portal directory, the portal supply requested information together with
 user existing authorized services under a complete layout of company X
 name brand (with company X logo vision, product vision, and copyright,
 etc) by just changing the contents of the company backing bean. The
 components and layouts to make up a page are re-useable.
 
 Tiles enables you to encapsulate the layouts and insert dynamic
 fragments to the page. For example, your portal enables user with
 different portal tabs so user can organize his/her authorized services
 in relevant portal tab, named by the user in his/her own language. Each
 portal tab has differnet layout designed for its purpose. The design of
 your portlet authorized services may follow a typical portlet layout
 with a portlet header for current status of PortletMode and portlet
 WindowState, followed by portlet contents. Hence, in each portal tab
 page, you have a tab layout and the portlet layout as raw templates. You
 insert relevant contents to the raw components having their own backing
 beans in the raw templates. Tiles is a very clean and powerful for this job.
 
 Under Shale, Tiles can be a plug in, similar to current tiles under
 struts. The design can be similar to what has been done under MyFaces
 for tiles. Each nagigated page is routed to a tiles definition with its
 own layout. Any attribute in a definition can be a page fragment or
 another definition. This enables you to be simple at the beginning and
 further drill down for more dynamic content implementation. I hope
 someone has time to port Tiles under Shale so it can be used under any
 compliant JSF implementation. If i have time i will do it. But life will
 not always go according to your wishes.
 
 Currently, i use MyFaces + Tiles + Spring IoC. I will use Shale as a
 framework for application filter to leverage on whatever developed under
 Shale, while inserting whatever servlet filters you already have for
 your current applications using common-chain in Shale.
 
 BaTien
 DBGROUPS
 
 
 
 Please correct me if I am wrong.
 
 Thanks!
 Lee
 
 -
 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: contrib/struts-shale-mailreader

2004-11-13 Thread Struts User
 Having said all this, the framework is powerful for sophisticated web
 production side, where all fragments of each page are completely dynamic
 based on built-in backend intelligence. Tiles is appropriate for such
 page, rather than each page need a backing bean. 

Hi Batien,

I am running the struts-shale-mailreader and just started to look into
Java Server Faces and Shale. Thus, I am not totally familiar with the
new frameworks and hope you can bear with me.

Are you saying that Tile and backing bean don't have to co-exist? I
thought Tiles and backing bean are two different things. Backing bean
is sort of like ActionForm in Struts. More accurately, backing bean is
like OzPage in Tak's introductory document.

Please correct me if I am wrong.

Thanks!
Lee

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



Re: contrib/struts-shale-mailreader

2004-11-12 Thread Struts User
On Thu, 11 Nov 2004 14:42:30 -0800, Craig McClanahan [EMAIL PROTECTED] wrote:
 There's another dependency when you try to compile
 struts-shale-mailreader ... you have to have run the dist target on
 the shared database code in struts-examples/mailreader first (along
 with struts-contrib/struts-shale of course).

Craig, 

Can you elaborate more on running the dist target on the shared
database code in struts-examples/mailreader first (along with
struts-contrib/struts-shale)? Are saying I have to run those two at
the same time? Also, I could not find the shared database code in the
folder.

Thanks!
Lee

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



Re: VO usage

2004-11-09 Thread Struts User
On Tue, 9 Nov 2004 12:45:48 -0500, Robert Taylor [EMAIL PROTECTED] wrote:
 Yes. Wendy is absolutely correct.
 Although the I described will work technically,
 you will run into issues as Wendy already mentioned.

I use Robert's approach and make my VO as a JavaBean which only
accepts String and boolean. I validate user input using struts
validator. If a user entered character instead of an integer, struts
validator will catch it and redisplay the error input.

Lee

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



Display message beside input field using struts validator

2004-11-08 Thread Struts User
Hello,

Currently, I am using struts validator to validate the fields in my ActionForm. 

Before I updated to struts 1.2.4, I could add an error this way - errors.add(
username, new ActionError(error.username.required));

If the validation failed, the error message for username will be
displayed right beside the user name text field if I use PUsername:
html:text property=username//P.

Can someone tell me how to display error message beside an input field
using struts validator?

Thanks,
Lee

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



Re: Display message beside input field using struts validator

2004-11-08 Thread Struts User
Thanks, Joe and Erik.

I got it to work using the following code:

html:messages property=userName id=error message=false
   bean:write name=error filter=false/
/html:messages

Struts validator returns error object instead of message object.

Thanks!
Lee


On Mon, 8 Nov 2004 16:08:26 -0600, Joe Germuska [EMAIL PROTECTED] wrote:
 At 3:49 PM -0600 11/8/04, Struts User wrote:
 
 
 Hello,
 
 Currently, I am using struts validator to validate the fields in my
 ActionForm.
 
 Before I updated to struts 1.2.4, I could add an error this way - errors.add(
 username, new ActionError(error.username.required));
 
 If the validation failed, the error message for username will be
 displayed right beside the user name text field if I use PUsername:
 html:text property=username//P.
 
 Can someone tell me how to display error message beside an input field
 using struts validator?
 
 I've never seen any automatic message placement.  You can access
 messages like this:
 
 html:messages property=username id=msg/html:messages
 
 html:messages is effectively a combination logic/iterator tag.  If
 there are any username messages in the ActionMessages object saved
 as the errors messages, the body of html:messages will be evaluated
 once for each, with a scripting variable of type String defined with
 the name specified in the id attribute.  You can use c:out or
 bean:write to display this value, wrapped with span, div, or other
 tags which format your messages correctly.
 
 I kind of think someone talked on the list once about making
 something which rendered an HTML label tag and which was also
 smart about the presence of errors.  I like the idea of something
 like that in general, but wonder if you'd be able to specify
 something suitably general for inclusion in Struts.  Seems like it
 might be better left for local development.
 
 Joe
 
 --
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
 In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
 back; I'll know I'm in the wrong place.
- Carlos Santana


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