I am using the viewLocator and viewHelper in a fds2b3 prototype, and they
function correctly, although  a post from Steve Webster states that:

"My quick response is that we really don't anticipate you needing to use
ViewHelpers as much (if at all).  Use ModelLocator instead (that's why I
left it out the article series"

However, I think I understand when you say that:

"It seems that the command class has no idea where the view is."

Thus I use the command class to set the variable, and that is all.  If I
have a complex value object that I need to iterate through to get single
value to be displayed in a view (although I know that there might be
arguments for doing all this on the java layer, however ...), I would
rather call a viewHelper to handle this (one that is linked intrinsically
with a view) rather than fill the command class with business logic.

So ... this is probably a long winded way to say that, 'yes' the viewHelper
and viewLocator work fine  in fds2b3.






                                                                                                                
                                                                                                                
             "Larry Liang"                     To: flexcoders@yahoogroups.com                                   
             <[EMAIL PROTECTED]>            cc:                                                              
             Sent by:                          Subject:  [flexcoders] Are ViewHelper and ViewLocator deprecated 
             flexcoders@yahoogroups.com          in Cairngorm 2?                                                
             05/15/2006 07:52 AM                                                                                
             Please respond to                                                                                  
             flexcoders                                                                                         
                                                                                                                
                                                                                                                




Hi all,

I just donwloaded the latest cairngorm framework for fb2 beta 3. I
found that the viewhelper and viewlocator are still included in the
package. I remeber (please correct me if I'm wrong) that these two
classes are deprecated for flex 2.

If this is the case, then suppose a command class needs to update a
view, should it only do that throuhg ModelLocator class. It seems
that the command class has no idea where the view is. For example, if
a command class need to set a label on a view to say "downloading..."
before start a webservice call and after the rpc call comes back, the
command class sets the label text to be empty. How should the command
class handle this situation if it does not know where the view is.

The only way that I can think of is to have a string variable in
ModelLocator class which is bound to the label text property. and
then command class can update the label text through this string
variable. I'm sure there is a better (best practice) way to update a
view in a command class. Please give me some hints.

Thanks
Larry







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links











---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to