How do you use Parsley with GraniteDS in Flex? -
i want use parsley framework , want use graniteds remoting. of 2.1, graniteds generates as3 service classes java code local proxies, , want use these classes in parsley.
i can inject service classes parsley when call of methods null object error
at org.granite.tide::component/http://www.adobe.com/2006/actionscript/flash/proxy::callproperty()[c:\workspace_\graniteds\as3\framework\org\granite\tide\component.as:172] @ library::bookservicebase/get()[c:\documents , settings\medlinetec\adobe flash builder 4\library\src\library\bookservicebase.as:36]
this because parsley creating instances of service classes without injecting them relevant "context" graniteds remoting. need figure out how give graniteds context service classes parsley instantiates. saw a post on parsley forums recommended:
<parsley:contextbuilder> <parsley:flexconfig type="{usermanagerconfig}"/> <parsley:runtimeconfig instances="{[tidecontext]}" /> </parsley:contextbuilder> ... [bindable] private var tidecontext:context = spring.getinstance().getspringcontext();
but didn't work me. i'm familiar graniteds not parsley maybe solution applying correctly above head.
if has going framework swiz or spring actionscript please pass solution on might similar.
update: figured out reading granite source code after inject service parsley (e.g. bookservice), if run
private var tidecontext:context = spring.getinstance().getspringcontext(); bookservice.meta_init("bookservice", tidecontext);
then can use service. guess need know how in sort of automatic way services declare in parsley.
i'd take @ pimento instead of graniteds. it's spicefactory actionscript library too, parsley
Comments
Post a Comment