You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bailey, Shane C." <SH...@saic.com> on 2003/06/09 19:53:40 UTC

Is it always bad to pass middle tier object to view?

 

I am thinking if you have a User object similar to:

 

public class User extends  ThirdPartyObjSayForStorageReasons implements
UserAsSeenByView

{

            ...

}

 

 

and you are using it in the view layer as UserAsSeenByView and you didn't
have to add 

any extra methods to implement the view  then it seems much more efficient
than using reflection

or calling a bunch of getters and setters to simple pass the object along.


 

At any given time in the future if you didn't like that way, you could
actually make UserAsSeenByView

an instantiable (doesn't sound correct?) class, then in your action fill it
(BeanUtils), and pass it back.  

There would be not much difference.

 

Is this only a big deal if using RMI or something and passing a possibly
much heavier object than 

need be over the remote connection?

 

 


RE: ActionErrors cannot be resolved

Posted by Mike Jasnowski <mj...@bea.com>.
Are you sure this compiled? It looks like your trying to cast something to
the ActionErrors type but that "something" is missing:

ActionErrors aes = (ActionErrors)something;

Maybe??
Mike

-----Original Message-----
From: Carlos Saraiva [mailto:r1100s@carlossaraiva.com]
Sent: Monday, June 09, 2003 2:22 PM
To: Struts Users Mailing List
Subject: ActionErrors cannot be resolved


Would someone please tell me what I'm doing wrong here? This same code
compiled well yesterday, and is giving me the error "ActionErrors cannot be
resolved" today.

..
<%@ page import="org.apache.struts.action.*,java.util.*"%>
..
			<%

			ActionErrors aes = (ActionErrors);
			if (aes != null) {

..

Thanks in advance,

--
Best regards,
Carlos Saraiva
Raleigh, NC



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



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


RE: ActionErrors cannot be resolved

Posted by Carlos Saraiva <r1...@carlossaraiva.com>.
>
> ActionErrors aes = (ActionErrors);<-- where is the object you are casting?
>
> Where is your ActionErrors object? You're casting nothing to aes.
>
> Brandon Goodin


Thanks <blushing/>. I guess it's time to take a break and go swimming or
something. It did compile yesterday. I must have erased the rest of the
statement inadvertently, and then added the ";"

--
Best regards,
Carlos Saraiva
Raleigh, NC



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


RE: ActionErrors cannot be resolved

Posted by Brandon Goodin <ma...@phase.ws>.
ActionErrors aes = (ActionErrors);<-- where is the object you are casting?

Where is your ActionErrors object? You're casting nothing to aes.

Brandon Goodin
 

-----Original Message-----
From: Carlos Saraiva [mailto:r1100s@carlossaraiva.com]
Sent: Monday, June 09, 2003 12:22 PM
To: Struts Users Mailing List
Subject: ActionErrors cannot be resolved


Would someone please tell me what I'm doing wrong here? This same code
compiled well yesterday, and is giving me the error "ActionErrors cannot be
resolved" today.

..
<%@ page import="org.apache.struts.action.*,java.util.*"%>
..
			<%

			ActionErrors aes = (ActionErrors);
			if (aes != null) {

..

Thanks in advance,

--
Best regards,
Carlos Saraiva
Raleigh, NC



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



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


ActionErrors cannot be resolved

Posted by Carlos Saraiva <r1...@carlossaraiva.com>.
Would someone please tell me what I'm doing wrong here? This same code
compiled well yesterday, and is giving me the error "ActionErrors cannot be
resolved" today.

..
<%@ page import="org.apache.struts.action.*,java.util.*"%>
..
			<%

			ActionErrors aes = (ActionErrors);
			if (aes != null) {

..

Thanks in advance,

--
Best regards,
Carlos Saraiva
Raleigh, NC



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