[flexcoders] dataTipFunction on DataGridColumn with custom itemRenderer?

2007-02-13 Thread Todd Breiholz
Is it just me, or is it not possible to set a dataTipFunction on a
DataGridColumn that uses a custom itemRenderer?

I have the following DataGridColumn defined:


mx:DataGridColumn headerText=Days dataField=daysOfWeek
sortable=false editable=false
itemRenderer=com.meredith.newmedia.bhgdesktop.view.admin.blogDaysIcon
width=40 showDataTips=true dataTipFunction=showDaysToolTip/

And my function is defined like this:

public function showDaysToolTip(obj:Object): String {
trace(in showDaysToolTip);
return testing;
}

But this is never getting called.

Am I doing something unsupported?

Thanks!

Todd


Re: [flexcoders] Modules and Cairngorm

2007-01-25 Thread Todd Breiholz

It would appear that you are trying to use the CairngormEventDispatcher to
dispatch a standard Flash event instead of a CairngormEvent (or subclass).
I'd have to see the code to be more specific though.

Todd

On 1/24/07, Bjorn Schultheiss [EMAIL PROTECTED] wrote:


  Hey Can anyone give me the lowdown on this error

TypeError: Error #1034: Type Coercion failed: cannot convert
flash.events::[EMAIL PROTECTED] to com.adobe.cairngorm.control.CairngormEvent
.
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction
()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.cairngorm.control::CairngormEventDispatcher/dispatchEvent
()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\control\CairngormEventDispatcher.as:113]
at com.adobe.cairngorm.commands::SequenceCommand/executeNextCommand
()[C:\dev\swat\projects\ac_emea\Cairngorm\com\adobe\cairngorm\commands\SequenceCommand.as:134]

To give some context i've got 3 modules in a viewstack, when i returned to
a previously viewed child 'module' i get this error.
Any help would be appreciated.


Regards,

Bjorn


 



Re: [flexcoders] Cairngorm web service not getting results

2007-01-24 Thread Todd Breiholz

The problem is that the service call is asynchronous. You need to look for
the result in your command. When you instantiate your Delegate (from your
Command, I assume) you pass the Command instance to the constructor as the
responder. When the service call is completed, the Flex framework will call
your result or fault method in the command. That's where you need to look at
the result.

HTH

Todd

On 1/23/07, achegedus [EMAIL PROTECTED] wrote:


  I have a small login app that is calling a web service to determine if
the login is valid. The web service currently only returns a string.

Here is the code:

in Services.mxml
mx:WebService id=Service
wsdl=http://localhost/GSSData/service.asmx?WSDL;
showBusyCursor=true
useProxy=false
makeObjectsBindable=false
/mx:WebService

in LoginDelegate.as:

public function login (loginVO:LoginVO):void{
service.loadWSDL();

DebugWindow.debug(service.wsdl:  + service.wsdl.toString());
var token:AsyncToken = service.login(loginVO.username,
loginVO.password);
DebugWindow.debug(After login: + token.result.toString());
token.addResponder(responder);
}

My problem is that I am seeing the web service get called and the
response is returned, but it doesn't seem like my app is taking the
response. When I try to view the response in my debug window i get an
error:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.

as though the web service isn't returning a value. I'm totally at a
loss here, I'm trying to learn Cairngorm, but i'm really struggling.
I basically am trying to rework this sample app:


http://www.alex-uhlmann.de/flash/adobe/blog/cairngormlogin/CairngormLogin.html

to use a web service and I having little to no success. can anyone
see what I'm doing wrong?

Thanks,
A

 



Re: [flexcoders] HTTPService POST with request parameters

2006-12-06 Thread Todd Breiholz

Jeff

Thanks for the reminder about the additional ATG methods to the query
parameters (getURLParameter()). However, that didn't help in this case.
Turns out I had to append my query parameters to the URL of the HTTPService
in ActionScript (i.e. getSponsor.url += ?o=sponsora=put) to get Flex to
send them.

Todd

On 12/5/06, Jeff Vroom [EMAIL PROTECTED] wrote:


   Possibly the issue is due to the fact that you have both query string
parameters and POST data parameters in the same request.  I think that ATG
used to have a bug where the query parameters are not returned by the
getParameter method if the request has method=POST.  They expose another
method on the DynamoHttpServletRequest called getQueryParameter which will
always return the query parameters.  I vaguely recall that bug got fixed at
some point but it has been a long time since I worked for ATG.



One nice thing about ATG is that if you do a toString on the request
object, it dumps out all of the state of the request.  That might be a way
to ensure that the query parameters are at least making it to the server in
the URL.



Jeff


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Todd Breiholz
*Sent:* Tuesday, December 05, 2006 2:57 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders] HTTPService POST with request parameters



Tracy

Correct, the model data is getting there, but not the querystring
parameters.

I also noticed about the mx:objects in the post. It was an error and I was
getting really screwy data on the server. I've since changed the bindings to
point to the text property of the objects and the post body is being sent
correctly (I also had to add contentType=application/xml to my
HTTPService.

After making those changes, I am still seeing the same behavior as before
(with a valid post body, now).

The server platform is ATG (Java servlet based). When I try to extract the
2 request parameters, I get null for both of them.

Thanks!

Todd

On 12/5/06, *Tracy Spratt* [EMAIL PROTECTED] wrote:

So the model data is getting into the server, but the url querystring
parameters are not?



Also, you are passing an mx:Object in the post body to the server.  Is
that working?  What does it look like on the server?



What is the server platform?



Tracy


 --

*From:* [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] *On
Behalf Of *Todd Breiholz
*Sent:* Tuesday, December 05, 2006 3:43 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] HTTPService POST with request parameters



I am trying to post an XML payload to an HTTPService that has
additional request parameters (e.g.
http://www.mysite.com/get?o=sponsora=save).

I created my HTTPService as such:

mx:HTTPService
id=getSponsor
method=POST
resultFormat=e4x
result=getResultOK(event)
fault=getResultFault(event)
url=http://www.mysite.com/get
mx:request
osponsor/o
aput/a
/mx:request
/mx:HTTPService

And call it like this:

private function addSponsor():void {
getSponsor.send(sponsorModel);
}

With sponsorModel:
mx:Model id=sponsorModel
sponsor
id{txtId}/id
name{tiName}/name
imageUrl{tiImageUrl}/imageUrl
linkUrl{tiLinkUrl}/linkUrl
/sponsor
/mx:Model

It looks like the request parameters are not being sent (I am not
seeing them on the server). Is this supported in Flex 2?

Thanks

Todd



 



[flexcoders] HTTPService POST with request parameters

2006-12-05 Thread Todd Breiholz
I am trying to post an XML payload to an HTTPService that has
additional request parameters (e.g.
http://www.mysite.com/get?o=sponsora=save).

I created my HTTPService as such:

mx:HTTPService
id=getSponsor
method=POST
resultFormat=e4x
result=getResultOK(event)
fault=getResultFault(event)
url=http://www.mysite.com/get
mx:request
osponsor/o
aput/a
/mx:request
/mx:HTTPService

And call it like this:

   private function addSponsor():void {
   getSponsor.send(sponsorModel);
   }

With sponsorModel:
mx:Model id=sponsorModel
sponsor
id{txtId}/id
name{tiName}/name
imageUrl{tiImageUrl}/imageUrl
linkUrl{tiLinkUrl}/linkUrl
/sponsor
/mx:Model

It looks like the request parameters are not being sent (I am not
seeing them on the server). Is this supported in Flex 2?

Thanks

Todd


Re: [flexcoders] HTTPService POST with request parameters

2006-12-05 Thread Todd Breiholz

Tracy

Correct, the model data is getting there, but not the querystring
parameters.

I also noticed about the mx:objects in the post. It was an error and I was
getting really screwy data on the server. I've since changed the bindings to
point to the text property of the objects and the post body is being sent
correctly (I also had to add contentType=application/xml to my
HTTPService.

After making those changes, I am still seeing the same behavior as before
(with a valid post body, now).

The server platform is ATG (Java servlet based). When I try to extract the 2
request parameters, I get null for both of them.

Thanks!

Todd

On 12/5/06, Tracy Spratt [EMAIL PROTECTED] wrote:


   So the model data is getting into the server, but the url querystring
parameters are not?



Also, you are passing an mx:Object in the post body to the server.  Is
that working?  What does it look like on the server?



What is the server platform?



Tracy


 --

*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *Todd Breiholz
*Sent:* Tuesday, December 05, 2006 3:43 PM
*To:* flexcoders@yahoogroups.com
*Subject:* [flexcoders] HTTPService POST with request parameters



I am trying to post an XML payload to an HTTPService that has
additional request parameters (e.g.
http://www.mysite.com/get?o=sponsora=save).

I created my HTTPService as such:

mx:HTTPService
id=getSponsor
method=POST
resultFormat=e4x
result=getResultOK(event)
fault=getResultFault(event)
url=http://www.mysite.com/get
mx:request
osponsor/o
aput/a
/mx:request
/mx:HTTPService

And call it like this:

private function addSponsor():void {
getSponsor.send(sponsorModel);
}

With sponsorModel:
mx:Model id=sponsorModel
sponsor
id{txtId}/id
name{tiName}/name
imageUrl{tiImageUrl}/imageUrl
linkUrl{tiLinkUrl}/linkUrl
/sponsor
/mx:Model

It looks like the request parameters are not being sent (I am not
seeing them on the server). Is this supported in Flex 2?

Thanks

Todd

 



[flexcoders] Training from the Source - Can't find my error

2006-10-31 Thread Todd Breiholz
I am working through the Adobe Flex 2 - Training from the Source book.
(Excellent book, BTW). I am in chapter 11 on the section Create an
inline MXML Item Renderer for Displaying the Remove Button. I can't
get beyond this section, because my code won't compile with the
following error:

1120: Access of undefined property
valueObjects.   FlexGrocer/views/ecomm  Cart.mxml   
/FlexGrocer/views/ecomm/Cart.mxml   1162264545587   243

Here's my data grid:

mx:DataGrid
id=cartView
dataProvider={cart.aItems} width=100% height=100%
editable=true draggableColumns=false
variableRowHeight=true
mx:columns
mx:DataGridColumn dataField=product 
headerText=Product
itemRenderer=renderer.ecomm.ProductName 
editable=false/
mx:DataGridColumn dataField=quantity
itemEditor=mx.controls.NumericStepper
editorDataField=value editable=true 
headerText=Quantity /
mx:DataGridColumn dataField=subtotal 
headerText=Amount
labelFunction=renderPriceLabel editable=false /
mx:DataGridColumn editable=false
mx:itemRenderer
mx:Component
mx:VBox
mx:Button
label=Remove

click=outerDocument.removeItem(valueObjects.ShoppingCartItem(data));/
/mx:VBox
/mx:Component
/mx:itemRenderer
/mx:DataGridColumn
/mx:columns
/mx:DataGrid

It's choking on the click event of the inner Button component.

I've even copied the code from the CD into my project but I get the same error.

Anyone see what I'm doing wrong?

Thanks!

Todd


--
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

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

* Your email settings:
Individual Email | Traditional

* To change settings online go to:
http://groups.yahoo.com/group/flexcoders/join
(Yahoo! ID required)

* To change settings via email:
mailto:[EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]

* 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/