Re: [flexcoders] Re: No debugging information available for invocation of methods on server-side

2005-04-11 Thread Dan Tropp







Hi Andrew,

{Tomcat_home}/logs/stdout.log is the only file that gets anything and
it is minimal. I don't seem to have a catalina.out, but perhaps this
is stdout.log under Tomcat 5.0?

Thanks for the reminder about the net debugger. I picks up my calls
but the information is limited. For example, when my java method threw
a NullPointerException the NetDebugger gave me the following fairly
cryptic message...
DebugId: 0
EventType: "Status"
MovieUrl: "http://localhost:8080/ge-flex/eMotor.mxml.swf"
Protocol: "http"
Source: "Client"
Time: 1113200308656
Date (object #1)
."Mon Apr 11 16:18:28 GMT+1000 2005"
Status (object #2)
.code: "Server.Processing"
.description: (undefined) 
.details: ""
.level: "error"
.type: ""
.rootcause (object #3)
..code: (undefined) 
..description: (undefined) 
..details: ""
..level: "error"
..type: ""

Have you got an example of debug output from remote calls from your
logs? I'm interested what it looks like.

cheers

Dan

Andrew Spaulding wrote:

  
Hey Dan,
  
have you tried looking at catalina.out?
  
Also if you have turned on all of the debugging on the flex-config how
about running the NetConnectionDebugger ? It will help monitor all
remoteObject calls and the result/fault returns from your java backend.
  
  
You can find it in your flex install directory
/extras/netConnectionDebugger/
  
Andrew
  
btw I use Flex 1.5, Tomcat 4.1.30, Windows XP
  
  
--- In flexcoders@yahoogroups.com, Dan Tropp [EMAIL PROTECTED] wrote:
 This is getting really frustrating. I have turned all the debug
flags 
 to true in the flex-config.xml file and the logging level to
debug, and 
 I still get nothing!
 
 I can't locate any flashlog.txt (or similar) on the client and no
debug 
 information is appearing in my WEB-INF/flex/logs/flex.log or in my
  
 Tomcat server logs. Have I missed some simple setting?
 
 I also installed the Debug Flash Player, but the Debugger option
from 
 the context menu is always greyed out.
 
 What debugging information do people work with?
 
 Many thanks,
 
 Dan
 (Tomcat5, Flex1.5, Windows XP)
 
 PS It has taken me a couple of hours to realise my server-side
Java 
 method was throwing a Null Pointer exception. The only
information I 
 was getting was "Error: An error occurred during service
invocation" in 
 my Tomcat log. Urgh!
  
  
  
  











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.















Re: [flexcoders] Re: Error: Cannot invoke method when using a VO

2005-04-11 Thread Dan Tropp









class vo.ApplicantVO implements ValueObject
{
 public static var registered:Boolean = 
  Object.registerClass( "vo.ApplicantVO", ApplicantVO ); 
   Do you have a
line like this in your AS class? 
...
}

If you don't register the Java/AS class mapping it defaults to ASObject.

cheers

Dan

Christoph Guse wrote:

Hi cazzaran,
  
how did you solve your problem? I'm interested in a solution, because I
  
have a very similar problem. In my case I have an object (OgoJobVO) in 
which is another object (OgoAccountVO) in which is another object 
(OgoPersonVO).
When I get the Job-Object from the Server, everything works fine. When
I 
try to call a function in a POJO where a Job-Object as an argument, I 
get the following error in the NetConnectionDebugger:
  
Status (object #2)
.code: "Server.Processing"
.description: "Cannot invoke method 'insertJob'."
.details: "The expected argument types are (ogo.OgoJobVO, 
java.lang.String, java.lang.String) but the supplied types were 
(flashgateway.io.ASObject, java.lang.String, java.lang.String) and 
converted to (null, null, null)."
.level: "error"
.type: ""
.rootcause (object #3)
..code: (undefined)
..description: "Type ogo.vo.OgoJobVO not found"
..details: ""
..level: "error"
..type: ""
  
The call looks like this:
 var call = service.insertJob(jobarg,login,password);
  
I tested the argument jobarg with
  
 if(jobarg instanceof OgoJobVO){
 text="type of OgoJobVO";
 }
 else{
 text="is not type of OgoJobVO";
 }
 mx.core.Application.application.debugtext = text;
  
This returns "type of OgoJobVO".
  
I really would like to use nested Objects.
  
I appreciate for any suggestions.
  
Christoph
  
cazzaran wrote:
  

 Found it... but it doesn't make total sense...

 here's the response trace:

 Info: Serializing response
 (Message #0 targetURI=/1/onStatus, responseURI=null)
 (Object #0)
 level = "error"
 code = "Server.Processing"
 type = ""
 rootcause = (Object #1)
 level = "error"
 code = null
 type = ""
 details = ""
 description = "Could not set object null on class
 pojos.Group's method setOrganization"
 details = "The expected argument types are (pojos.Group) but
the
 supplied types were (flashgateway.io.ASObject) and converted to
(null)."
 description = "Cannot invoke method 'addGroup'."


 Below's the serialized request. You can see that the organization
IS
 being serialized... I'm not sure why it thinks that the expected
 argument types are Group. The addGroup requires a Group, but the
 Group.setOrganization method takes an Organization. They all have
 _remoteClass assigned, too. Weird...

 Info: Deserializing request
 (Message #0 targetURI=groupDelegate.addGroup, responseURI=/1)
 (Array #0)
 [0] = (Object #1)
 _flag = "Envelope"
 headers = (Array #2)
 [0] = (Array #3)
 [0] = "ServiceType"
 [1] = false
 [2] = "stateful-class"
 data = "" #4)
 [0] = (Typed Object #5 'pojos.Group')
 organization = (Typed Object #6 'pojos.Organization')
 _remoteClass = "pojos.Organization"
 contactNumber = null
 address1 = null
 roles = (Array #7)
 [0] = (Typed Object #8 'pojos.Role')
 roleRights = "a, d, m"
 users = (Array #9)
 _remoteClass = "pojos.Role"
 userRights = "d"
 groupRights = "a, d, m"
 name = "Local Message Creator"
 id = "402881e500523eca0100523ffc040001"
 organization = (Ref #6)
 superuser = false
 [1] = (Typed Object #10 'pojos.Role')
 roleRights = "adm"
 users = (Array #11)
 [0] = (Typed Object #12 'pojos.User')
 password = "passger"
 organizationId = null
 _remoteClass = "pojos.User"
 username = "cazzaran"
 email = "[EMAIL PROTECTED]"
 role = (Ref #10)
 roleID = "1"
 firstName = "Josh"
 id = "1"
 organization = (Ref #6) the rest
 truncated




 *Yahoo! Groups Sponsor*
 ADVERTISEMENT
 click here 
 http://us.ard.yahoo.com/SIG=1290ag9o1/M=298184.6018725.7038619.3001176/D=groups/S=1705007207:HM/EXP=1112321921/A=2593423/R=0/SIG=11el9gslf/*http://www.netflix.com/Default?mqso=60190075
  





 *Yahoo! Groups Links*

 * To visit your group on the web, go to:
 http://groups.yahoo.com/group/flexcoders/
 
 * To unsubscribe from this group, send an email to:
 [EMAIL PROTECTED]

mailto:[EMAIL PROTECTED]
 
 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
 Service http://docs.yahoo.com/info/terms/.


  
-- 

Christoph Guse
Lhstrae 34
41747 Viersen
Tel. 0 21 62 / 50 24 066
Mobil 01 72 / 160 74 84
VoIP 0 12 12 / 39 64 48 831

  
  











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.















Re: [flexcoders] Use mx:Model as well as Cairngorm ViewHelper pattern? -- Best-practice for using validators?

2005-04-11 Thread Dan Tropp







I've removed my models and just have the ViewHelper. My field
validators are just bound directly to the controls rather than to the
mx:Model. What is best practice - locating validators in your
.mxml or programatically in you .as ViewHelper??

Dan

Dan Tropp wrote:

The book hasn't arrived yet...in the meantime.
  
Is it a good idea to bind your components to a Model and have the 
ViewHelper use the Model (eg. myModel.foo), or are you better off just 
having your ViewHelper subclass directly access the components (eg. 
fooLabel.text)
It feels like having the Model doesn't buy you anything - afterall the 
ViewHelper is supposed to be the facade between the UI controls and
your 
Commands.
  
I tried to use a Model and am having trouble trying to set values on
the 
Model (to reflect them in the UI). I think I'm having trouble because 
the binding from the controls to the Model is one-way, yes? Do you
need 
two models - one bound inward and one bound outward (seems ugly)?
  
cheers
  
Dan
  
  











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.















Re: [flexcoders] flex and jsp

2005-04-10 Thread Dan Tropp







I think you want thissearch the Flex documentation for
"flashvars". AFAIK this is the only way to pass data into your Flex
app.

Dan
Using flashVars
You can pass variables to your Flex applications using the flashVars
property in the object and embed
tags in your HTML wrapper. You do this either when you write your own
custom HTML wrapper or when you use the Flex JSP Tag Library's flash
and mxml tags to generate the HTML output that
displays the Flex application. 
The following example sets the values of the firstname,
middlename, and lastname flashVars
properties:
object classid='' codebase='' width='500' height='500'
   param name='flashVars' value='firstname=Reinermiddlename=Tlastname=Knizia'
   param name='src' value='vartest.mxml.swf'
  embed pluginspage='http://www.macromedia.com/go/getflashplayer' width='500' height='500' flashVars='' src='' /
/object

To pass flashVars to a Flex application in a JSP, add
the flashvar tag that defines the flashVars
properties to the flash or mxml
tag, as the following example shows:
%@ taglib uri="FlexTagLib" prefix="mm" %
h2FlashVars Parameters/h2
mm:flash source="jsptest2.swf" supportembed="false" border="5"
   mm:flashvar name="firstname" value="Reiner" /
   mm:flashvar name="middlename" value="T" /
   mm:flashvar name="lastname" value="Knizia" /

/mm:flash



Andrew Spaulding wrote:

  
Hi all,
  
I'm trying to pass a param to my mxml file via jsp.
  
Here is my code:
  
mm:mxml source="/myDir/myFile.mxml"
 mm:param name="REMOTE_ADDR" value="%= request.getRemoteAddr()
%" /
/mm:mxml
  
If I echo the jsp code at the top of the page it workes fine, it just
doesnt get passed to my mxml file. I have REMOTE_ADDR declared in a
script block at the beginning of my mxml file.
  
I have also tried the sample from the this article
  http://www.macromedia.com/devnet/flex/articles/server_perf_05.html
as
follows (this also doesnt work):
  
% session.setAttribute("username", "brandon"); %
%@ taglib uri="FlexTagLib" prefix="mm" %
mm:mxml
mm:param name="userName" value="%=
session.getAttribute("username")
%" /
 mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
width="200" height="200"
 mx:Script
 var userName:String;
 /mx:Script
 mx:Label id="uName" text="Hi {userName}"/
 /mx:Application
/mm:mxml
  
  
Any ideas on how I can get these to work?
  
Andrew.
  
  
  
  
  
  











Yahoo! Groups Links

To visit your group on the web, go to:http://groups.yahoo.com/group/flexcoders/
To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.















Re: [flexcoders] HTTPService.send

2005-04-08 Thread Dan Tropp

Not sure about the first two, but for 3. the call to the HTTPService 
generates a pending call which is not executed until you leave the 
current scope (allowing you to bind to the result event).  So I don't 
think there are any race conditions.

cheers

Dan

viraf_bankwalla wrote:


 The HTTPService.send has the following signature

 send( parameters: Object) :  Object

 1.  Could someone please explain how to progmatically build the
 parameters.  In the examples mx:request is used but I could not
 find the mx:request documented.

 2.  send returns an object HTTP call that can be used for tracking
 multiple requests.  Could someone please explain this object and
 what operations may be performed on it.

 3.  If the returned object is a handle to the request, can I set the
 decodeXML, encodeXML, fault, result properties on it?  If so, how
 does one handle race conditions (i.e. result received before
 properties being set).

 Thanks.






 
 *Yahoo! Groups Links*

 * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/

 * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]

 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
   Service http://docs.yahoo.com/info/terms/.






 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Use mx:Model as well as Cairngorm ViewHelper pattern?

2005-04-08 Thread Dan Tropp

The book hasn't arrived yet...in the meantime.

Is it a good idea to bind your components to a Model and have the 
ViewHelper use the Model (eg. myModel.foo), or are you better off just 
having your ViewHelper subclass directly access the components (eg. 
fooLabel.text)
It feels like having the Model doesn't buy you anything - afterall the 
ViewHelper is supposed to be the facade between the UI controls and your 
Commands.

I tried to use a Model and am having trouble trying to set values on the 
Model (to reflect them in the UI).  I think I'm having trouble because 
the binding from the controls to the Model is one-way, yes?  Do you need 
two models - one bound inward and one bound outward (seems ugly)?

cheers

Dan



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Can't run CairngormApplication inside Flex Builder - doesn't recognise it as an mx:Application!

2005-04-07 Thread Dan Tropp

Do other people have this problem?
Or is there a configuration setting that I have missed?
I also does get code hinting for my own custom components (MXML and AS).

Any help appreciated.

Dan



 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] How to get access to HttpSession in a stateful-c lass

2005-04-05 Thread Dan Tropp

Steven,

Thanks for the reply.  I realise my question wasn't quite clear - I 
wanted to access objects in the request object on the client.  Or more 
specifically, pass a complex object that is available to the JSP into 
the Flex app.

This page was what I was after...
http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?href=2253.htm
But it seems that I am limited to passing simple strings.  So to use 
complex data for the flex app to initialize I need to call a remote 
service (RemoteObject, HTTP, Webservice), yes?

Dan

Steven Webster wrote:

Dan,

  

This may be a stupid question, but if your flex app is 
wrapped in in a jsp file (using something like mm:mxml 
source=.../) can you access variables in request scope?  
Or can you pass selected variables into a flex app?



There's also a section in the docs Passing Request Data to Flex
Applications:

http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/js/html/w
whelp.htm?href=2247.htm

basically, you just declare a public var on your application for
anything you intend passing in as a request param, and then these
request params are assigned to your public vars.

Hope that helps,

Steven

--
Steven Webster
Technical Director
iteration::two
 
This e-mail and any associated attachments transmitted with it may contain
confidential information and must not be copied, or disclosed, or used by
anyone other than the intended recipient(s). If you are not the intended
recipient(s) please destroy this e-mail, and any copies of it, immediately.
 
Please also note that while software systems have been used to try to ensure
that this e-mail has been swept for viruses, iteration::two do not accept
responsibility for any damage or loss caused in respect of any viruses
transmitted by the e-mail. Please ensure your own checks are carried out
before any attachments are opened.

  





 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





Re: [flexcoders] How to get access to HttpSession in a stateful-c lass

2005-04-04 Thread Dan Tropp

This may be a stupid question, but if your flex app is wrapped in in a 
jsp file (using something like mm:mxml source=.../) can you access 
variables in request scope?  Or can you pass selected variables into a 
flex app?

I got around it by having initialize=callHttpServiceToGetInitData() in 
my mx:Application, but this seemed like a bit of a code smell.

cheers

Dan

Matt Chotin wrote:

 TADA!  
 http://livedocs.macromedia.com/flex/15/flex_docs_en/2247.htm :-)

  

 Matt

  

 

 *From:* cazzaran [mailto:[EMAIL PROTECTED]
 *Sent:* Monday, April 04, 2005 6:23 PM
 *To:* flexcoders@yahoogroups.com
 *Subject:* [flexcoders] How to get access to HttpSession in a 
 stateful-class

  


 I have some remote business delegates that are stateful. Is there a
 way to get access to the session that they are being held in?

 For example, I have a UserDelegate that handles user based business
 logic for the current logged in user, and it maintains a member
 variable of the user so I don't need to keep passing User stuff over
 the network. I also have a GroupDelegate, that obviously handles Group
 stuff. I need to be able to access the User variable in the
 UserDelegate so I can figure out some information about the user
 before I perform the Group operations (i.e. authorization, etc). My
 problem is that my Delegates are just POJOs, and so have no knowledge
 of requests, or sessions. Is there a way to get to the session that
 the stateful-class is being held in, or get at the request that is
 associated with that session?

 I know I could pass User information over the wire to my
 GroupDelegate, but this is inefficient, since the data's right there
 in memory on the server.

 Any help is appreciated!





 
 *Yahoo! Groups Links*

 * To visit your group on the web, go to:
   http://groups.yahoo.com/group/flexcoders/

 * To unsubscribe from this group, send an email to:
   [EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]

 * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
   Service http://docs.yahoo.com/info/terms/.






 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/