[flexcoders] what's the difference between remoting service and URLStream
so far as I know, calling remoting service (Remote object) is asynchronous , however URLStream is not asynchronous. if the data on Flex are streamed as AMF in URLStream,compare this data service with remoting server, how about is the performance? below is the code: public function loadData():void{ var url:String = http://abc.com/ProcessServlet?id=3;; var request:URLRequest=new URLRequest(url); request.method=URLRequestMethod.GET; var urlStream:URLStream =new URLStream(); urlStream.addEventListener(complete, handleDataShow) urlStream.addEventListener(ioError, loadDataError) try { urlStream.load(request); }catch (error:Error){ Alert.show(error.toString()); } } private function handleDataShow(event:Event):void{ var urlStream:URLStream=URLStream(event.target); var byte:ByteArray=new ByteArray; urlStream.readBytes(byte, byte.length); byte.uncompress(); var obj:Contact =byte.readObject() as Contact; }
[flexcoders] SSL Https communication between swf and data service / life cycle is failed
below is the source code of swf: mx:RemoteObject id=authenticationRemoteService destination=authentication-remoteobject showBusyCursor=true result=result( event ); fault=fault( event ); /mx:RemoteObject public function getUserData():void{ authenticationRemoteService.getUserData(); } public function result(data:Object):void{ . } public function fault(info:Object):void{ mx.controls.Alert.show(info); } when I open https://localhost:9444/life-flex/Login.swf and click the event to call getUserData() method, fault method throws the following exception: [INFO]: [RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.BadVersion: : url: 'http://localhost:9444/life- flex/messagebroker/amf'] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa ultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AbstractInvoker.as:195] at mx.rpc::Responder/fault() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\Responder.as:56] at mx.rpc::AsyncRequest/fault() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:110] at mx.messaging::ChannelSet/faultPendingSends() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\ChannelSet.as:1113 ] at mx.messaging::ChannelSet/channelFaultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\ChannelSet.as:851] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.messaging::Channel/connectFailed() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\Channel.as:928] at mx.messaging.channels::PollingChannel/connectFailed() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\PollingCh annel.as:255] at mx.messaging.channels::AMFChannel/statusHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\AMFChanne l.as:346] Even though I visit application with https link , SWF still use http protocol to call AMF gateway. Who has any experience on this issue? Thanks.
[flexcoders] How to enable the data grid editable if the data grid has no data
If the data grid has no data, even the editable property is set as 'true' ,the column in data grid can not be editable. For example, mx:DataGrid width=100% editable=true id=productGrid height=100% doubleClick=viewProduct() mx:columns mx:DataGridColumn headerText=Product Code editable=true dataField=productCode / /mx:columns /mx:DataGrid I want to edit the column 'Product Code' and input some text. Has anyone such experience? Thanks
[flexcoders] How to get the selected text in textArea
Hi All, I glad to get your help. I can not find the method in flex document, -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] How to user setInterval() to call the remoteobject method?
Hi All, I have a piece of code below: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml initialize=test() mx:RemoteObject id=EJBUserProxy source=net.wind.proxy.UserProxy mx:method name=getUserInfo result=setCurrentUser (event.result)/mx:method /mx:RemoteObject mx:Script ![CDATA[ function test(){ setInterval(getUser,1); } function getUser(){ EJBUserProxy.getUserInfo(qaz); } function setCurrentUser(obj){ if(obj!=null) mx.controls.Alert.show(execute); } ]] /mx:Script /mx:Application it seems the setInterval function can't execute remoteobject method, Who has such experience,wait for your help, Thanks -- 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 Visit your group "flexcoders" on the web. To unsubscribe from this group, send an email to:[EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[flexcoders] How to detect the session time out in flex application
I have a approach that use setInterval() in application page to detect the session time out,howerver, it seems difficult, who have experience in detecting session ? I'd like to get your help. Thanks. -- 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/ * 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] why does the data in datagrid cellrender lose?
I used the textInput cellrenderer in datagrid, and input text in textInput, but after add two items, the inputed data lost, 1.flex page: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; initialize=initDg() mx:Script ![CDATA[ import com.ActionRequiredVO; var ActionRequireds: Array; function initDg(){ dg.addItem(new ActionRequiredVO()); } ]] /mx:Script mx:VBox width=98% verticalGap=0 mx:HBox width=100% height=63 mx:Text text=Action Required: width=110 textAlign=right/ mx:DataGrid id=dg editable=true rowCount=2 width=85% dataProvider={ActionRequireds} mx:columns mx:Array mx:DataGridColumn columnName=actionRequired headerText=Action Required width={dg.width*0.7} cellRenderer=PhoneTypeRenderer/ mx:DataGridColumn columnName=assignedTo headerText=Assigned To width={dg.width*0.15}/ mx:DataGridColumn columnName=dueDate headerText=Due Date width={dg.width*0.15}/ /mx:Array /mx:columns /mx:DataGrid mx:VBox mx:Button label=+ click=dg.addItem(new ActionRequiredVO()) cornerRadius=0 borderThickness=0 width=20 height=20 toolTip=Add new item/ mx:Button label=- click=dg.removeItemAt (dg.selectedIndex) cornerRadius=0 borderThickness=0 width=20 height=20/ /mx:VBox /mx:HBox /mx:VBox /mx:Application 2.ActionRequiredVO.as class com.ActionRequiredVO { public var dueDate : String; public var assignedTo : String; public var actionRequired :String; static var registered=Object.registerClass (com.ActionRequiredVO, com.ActionRequiredVO); function ActionRequiredVO(actionRequired:String){ this.actionRequired = actionRequired; } } 3.ActionRequiredVO.java package com; public class ActionRequiredVO { private String actionRequired = null; private String assignedTo = null; private String dueDate = null; /** * @return */ public String getActionRequired() { return actionRequired; } /** * @return */ public String getAssignedTo() { return assignedTo; } /** * @return */ public String getDueDate() { return dueDate; } /** * @param string */ public void setActionRequired(String string) { actionRequired = string; } /** * @param string */ public void setAssignedTo(String string) { assignedTo = string; } /** * @param string */ public void setDueDate(String string) { dueDate = string; } } I am glad to get your help!thanks -- 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/ * 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] Re: how to add cellRender CheckBox to Tree?
This article is helpful for me, the article referred CheckRowRenderer.as but how to get all checked Node's label? thanks! --- In flexcoders@yahoogroups.com, Tom Jeffery [EMAIL PROTECTED] wrote: I just started looking at doing something similar. I believe you're going to want to extend TreeRow. There's an example online here: http://www.macromedia.com/support/documentation/en/flex/1/cellrenderer s/cellrenderers13.html The example is not perfect, and I've been really struggling to implement the behaviors you described. Simply getting the checkbox to display properly with the disclosure button and icons has already sidelined me. Regardless of the _x coordinate I set for the checkbox, it seems to want to render itself right on top of the disclosure button which has been very frustratng. I'd love to hear from anyone who's tackled this already. Thanks! Tom Jeffery --- In flexcoders@yahoogroups.com, loveewind [EMAIL PROTECTED] wrote: 1.as referred in Developing Flex Applications document display custom cell content for each of Tree's rows, This customized cell can contain a prebuilt component, such as a CheckBox control, or any user interface component that you create. and I want to add CheckBox behind each Node and branch, also if check the checkBox, the checkBox can be listened, for example, if the node's checkBox is checked, this node's all branch's checkBox will be checked. who has this experience? I am glad to get your help! thanks! -- 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/ * 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] how to add cellRender CheckBox to Tree?
1.as referred in Developing Flex Applications document display custom cell content for each of Tree's rows, This customized cell can contain a prebuilt component, such as a CheckBox control, or any user interface component that you create. and I want to add CheckBox behind each Node and branch, also if check the checkBox, the checkBox can be listened, for example, if the node's checkBox is checked, this node's all branch's checkBox will be checked. who has this experience? I am glad to get your help! thanks! -- 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/ * 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] how to generate the bullet in DataGridColumn?
generate the bullet in first DataGridColumn when user inputing words, also the DataGridColumn is editable,how to set the dataGridColumn's htmlText? use the cellRender? 1.this is my flex page: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; initialize=initDg() mx:Script ![CDATA[ import com.ActionRequiredVO; var ActionRequireds: ActionRequiredVO; function initDg(){ dg.addItem(new ActionRequiredVO('*')); } ]] /mx:Script mx:VBox width=98% verticalGap=0 mx:HBox width=100% height=63 mx:Text text=Action Required: width=110 textAlign=right/ mx:DataGrid id=dg editable=true rowCount=2 width=85% dataProvider={ActionRequireds} mx:columns mx:Array mx:DataGridColumn columnName=actionRequired headerText=Action Required width={dg.width*0.7}/ mx:DataGridColumn columnName=assignedTo headerText=Assigned To width={dg.width*0.15}/ mx:DataGridColumn columnName=deuDate headerText=Deu Date width={dg.width*0.15}/ /mx:Array /mx:columns /mx:DataGrid mx:VBox mx:Button label=+ click=dg.addItem(new ActionRequiredVO('*')) cornerRadius=0 borderThickness=0 width=20 height=20 toolTip=Add new item/ mx:Button label=- click=dg.removeItemAt (dg.selectedIndex) cornerRadius=0 borderThickness=0 width=20 height=20/ /mx:VBox /mx:HBox /mx:VBox /mx:Application 2.action script class com.ActionRequiredVO { public var deuDate : String; public var assignedTo : String; public var actionRequired :String; function ActionRequiredVO(actionRequired:String){ this.actionRequired = actionRequired; } } thanks,I am glad to get your help 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] Re: why the textarea can not display the value?
great!thanks! --- In flexcoders@yahoogroups.com, Manish Jethani [EMAIL PROTECTED] wrote: On 6/1/05, loveewind [EMAIL PROTECTED] wrote: Function: User inputs the word in textarea,enter the key Enter, the head of next line need display the character *, Do it in the 'change' event handler: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:Script ![CDATA[ function addBullet(event){ var s:String = meetingObjective.text; if (s.slice(s.length - 1) == \r) { meetingObjective.text += *; doLater(this, setCaret); } } function setCaret():Void { Selection.setSelection(meetingObjective.text.length, meetingObjective.text.length); } ]] /mx:Script mx:HBox width=98% mx:Text text=input: width=110 textAlign=right / mx:TextArea id=meetingObjective height=70 width=100% text=* borderStyle=inset maxChars=500 change=addBullet(event)/ /mx:HBox /mx:Application You have to also set the caret at the last position after entering the extra '*' character, and it has to be done in the next frame because the TextArea's internal TextField does not seem to be updated before then. 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] how to use the setInterval() in flex actionscript ?
the code run normally in swf, ActionScript: function checkOut() { TextToCheck = spellCheck_txt.text; url_string = javascript:SpellCheck();; getURL(url_string, ); checkOut_interval = setInterval(function () { if (spellResult != undefined) { spellCheck_txt.text = spellResult; clearInterval(checkOut_interval); } // end if }, 100); } and how to use setInterval() in flex actionscript as referred in flex actionscript reference: setInterval(functionName:Function, interval:Number [, param1:Object, param2, ..., paramN]) : Number setInterval(objectName:Object, methodName:Function, interval:Number [, param1:Object, param2, ..., paramN]) : Number Parameters functionName A function name or a reference to an anonymous function. interval The time in milliseconds between calls to the functionName or methodName parameter. param1, param2, ..., paramN Optional parameters passed to the functionName or methodName parameter. objectName An object containing the method methodName. You must include this parameter when using setInterval() in an mx:Script block in Flex applications. 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] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] who have the experience of print preview in flex page
hi: I know flex page can be printed, but don't know how to use the printjob actionscript to print preview page, who have such experience? 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] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: why can not pass arguments to flex in portal js p page
Matt: yes,the two page's println content are same, also I put the trace() in function initLocale(){ trace('log'); language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } it have not execute, and I think the portal jsp parse engine does not support the flex, .portal.jsp %@ page session=false contentType=text/html import=java.util.*, multilanguage.*% %@ taglib uri=/WEB-INF/tld/portlet.tld prefix=portletAPI % %@ taglib uri=FlexTagLib prefix=mm % portletAPI:init/ table border=0 cellspacing=0 cellpadding=0 height=100% width=100% tr height=500 td mm:mxml % String s =request.getHeader(Accept-Language); System.out.println(locale:+s); String l = s.substring(0,2); String c = s.substring(3,5); % mx:Application pageTitle=Resource bundles sample application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:view=com.benorama.flex.samples.payment.view.* xmlns:globalization=com.benorama.flex.globalization.* initialize=initLocale() mx:Script ![CDATA[ var language:String; var country:String; function initLocale(){ language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]] /mx:Script view:PaymentView / globalization:ResourceBundleDelegate id=resourceBundleDelegate / /mx:Application /mm:mxml /td /tr /table --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: I can't see the problem in portal.jsp. Did you put a trace statement in your initLocale() method to make sure it's executing? The only difference I saw between the two jsps was the portal stuff and the table, I don't think that would make a difference but who knows. I assume the println is writing the expected value? _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of loveewind Sent: Tuesday, May 10, 2005 1:52 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] why can not pass arguments to flex in portal jsp page if I run this locale.jsp mx.controls.Alert.show(language); can show the language value 1.locale.jsp %@ taglib uri=FlexTagLib prefix=mm % mm:mxml % String s =request.getHeader(Accept-Language); System.out.println(locale:+s); String l = s.substring(0,2); String c = s.substring(3,5); % mx:Application pageTitle=Resource bundles sample application xmlns:mx=http://www.macromedia.com/2003/mxml http://www.macromedia.com/2003/mxml xmlns:view=com.benorama.flex.samples.payment.view.* xmlns:globalization=com.benorama.flex.globalization.* initialize=initLocale() mx:Script ![CDATA[ var language:String; var country:String; function initLocale(){ language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]] /mx:Script view:PaymentView / globalization:ResourceBundleDelegate id=resourceBundleDelegate / /mx:Application /mm:mxml 2.portal.jsp %@ page session=false contentType=text/html import=java.util.*, multilanguage.*% %@ taglib uri=/WEB-INF/tld/portlet.tld prefix=portletAPI % %@ taglib uri=FlexTagLib prefix=mm % portletAPI:init/ table border=0 cellspacing=0 cellpadding=0 height=100% width=100% tr height=500 td mm:mxml % String s =request.getHeader(Accept-Language); System.out.println(locale:+s); String l = s.substring(0,2); String c = s.substring(3,5); % mx:Application pageTitle=Resource bundles sample application xmlns:mx=http://www.macromedia.com/2003/mxml http://www.macromedia.com/2003/mxml xmlns:view=com.benorama.flex.samples.payment.view.* xmlns:globalization=com.benorama.flex.globalization.* initialize=initLocale() mx:Script ![CDATA[ var language:String; var country:String; function initLocale(){ language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]] /mx:Script view:PaymentView / globalization:ResourceBundleDelegate id=resourceBundleDelegate / /mx:Application /mm:mxml /td /tr /table if I run this locale.jsp it have not pop alert, not execute the code: mx.controls.Alert.show(language) who hase these experience,can tell me the reason, thanks _ Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ http://groups.yahoo.com/group/flexcoders/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED
[flexcoders] Re: why can not get the value?
I have try it,but fail,it still can't executerequest.getHeader (Accept-Language); thank you all the same, --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I don't know about the error, but I do know that this won't work: employeeSrv.send(); s = employeeSrv.result.locale.country; Data Service calls are asynchronous and the result does not exist yet when you are trying to reference it. You MUST use a resultHandler called by the result event. mx:HTTPService id=employeeSrv ... result=onResult(event).../ private function onResult(oEvent:Object):Void { sLocale = oEvent.result.locale.country; } Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of loveewind Sent: Sunday, May 08, 2005 5:06 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] why can not get the value? the purpose of my code is to get the client locale with httpservice 1.locale.jsp locale % String s = request.getHeader(Accept-Language); System.out.print(locale:+s); % language%=s.substring(0,2)%/language country%=s.substring(3,5)%/country /locale if I visit the locale.jsp,it can display the the client locale 2.test.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.macromedia.com/2003/mxml; mx:HTTPService id=employeeSrv url=locale.jsp /mx:HTTPService mx:Script ![CDATA[ var s:String; function initApp(){ employeeSrv.send(); s = employeeSrv.result.locale.country; } ]] /mx:Script mx:Label text={s}/mx:Label mx:Button label=test click=initApp();/mx:Button /mx:Application if I visit the test.mxml, it show a error in my server : 17:05:12,822 INFO [STDOUT] locale:null 17:05:12,822 WARN [jbossweb] WARNING: Exception for /multi/locale.jsp java.lang.NullPointerException at org.apache.jsp.locale_jsp._jspService(locale_jsp.java:48) at org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service (HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper .java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:2 95) at org.apache.jasper.servlet.JspServlet.service (JspServlet.java:241) at javax.servlet.http.HttpServlet.service (HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle (ServletHolder.java:360 ) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch (WebApplicati onHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle (ServletHandler.java:5 58) at org.mortbay.http.HttpContext.handle (HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle (WebApplication Context.java:507) at org.mortbay.http.HttpContext.handle (HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service (HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext (HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle (HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection (SocketListener.java: 201) at org.mortbay.util.ThreadedServer.handle (ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run (ThreadPool.java:455) 17:05:12,822 WARN [jbossweb] WARNING: Error 500 while serving error page for 50 0 17:05:12,853 ERROR [STDERR] 05/08 17:05:12 ERROR %%500%% Internal+Server+Error it likes can not execute request.getHeader(Accept-Language); who can tell me the reason? thank you! Yahoo! Groups Links 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] why can not pass arguments to flex in portal jsp page
if I run this locale.jsp mx.controls.Alert.show(language); can show the language value 1.locale.jsp %@ taglib uri=FlexTagLib prefix=mm % mm:mxml % String s =request.getHeader(Accept-Language); System.out.println(locale:+s); String l = s.substring(0,2); String c = s.substring(3,5); % mx:Application pageTitle=Resource bundles sample application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:view=com.benorama.flex.samples.payment.view.* xmlns:globalization=com.benorama.flex.globalization.* initialize=initLocale() mx:Script ![CDATA[ var language:String; var country:String; function initLocale(){ language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]] /mx:Script view:PaymentView / globalization:ResourceBundleDelegate id=resourceBundleDelegate / /mx:Application /mm:mxml 2.portal.jsp %@ page session=false contentType=text/html import=java.util.*, multilanguage.*% %@ taglib uri=/WEB-INF/tld/portlet.tld prefix=portletAPI % %@ taglib uri=FlexTagLib prefix=mm % portletAPI:init/ table border=0 cellspacing=0 cellpadding=0 height=100% width=100% tr height=500 td mm:mxml % String s =request.getHeader(Accept-Language); System.out.println(locale:+s); String l = s.substring(0,2); String c = s.substring(3,5); % mx:Application pageTitle=Resource bundles sample application xmlns:mx=http://www.macromedia.com/2003/mxml; xmlns:view=com.benorama.flex.samples.payment.view.* xmlns:globalization=com.benorama.flex.globalization.* initialize=initLocale() mx:Script ![CDATA[ var language:String; var country:String; function initLocale(){ language = %=l%; country = %=c%; mx.controls.Alert.show(language); resourceBundleDelegate.setLocale(language,country); } ]] /mx:Script view:PaymentView / globalization:ResourceBundleDelegate id=resourceBundleDelegate / /mx:Application /mm:mxml /td /tr /table if I run this locale.jsp it have not pop alert, not execute the code: mx.controls.Alert.show(language) who hase these experience,can tell me the reason, 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] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] flex how to invoke the servlet in server?
hi: flex can invoke the Java class, is flex support to invoke the servlet ? how to invoke? 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] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: how to add multi-language feature in flex page?
great ,thank you --- In flexcoders@yahoogroups.com, Abdul Qabiz [EMAIL PROTECTED] wrote: Hi, You can use ResourceBundle written by Benoit Hediards (http://groups.yahoo.com/group/flexcoders/message/8730) Also look at some of the possible ways, which Manish has put together on his blog (http://www.mannu.info/blog/2005/04/resource-bundles-in- flex.html) -abdul -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 27, 2005 10:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to add multi-language feature in flex page? who has such experiences? is like using in struts frame? thanks! Yahoo! Groups Links 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] how to add multi-language feature in flex page?
who has such experiences? is like using in struts frame? 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] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: how to display the HashMap data in flex mx: Data Grid?
ok .thanks you .I will try it what is you mailbiox? Matt --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: You'll need to write a labelFunction Maybe something like this: function mapCdms(item) : String { Return item.accessMap.cdms; } ... mx:DataGridColumn labelFunction=mapCdms ... / Matt _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] Sent: Sunday, April 17, 2005 6:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: how to display the HashMap data in flex mx:Data Grid? matt,Manish Jethani thank you the detail what to do is below: 1.the Java method: public ArrayList findAllUsers(){ ArrayList list = new ArrayList(); try{ PreparedStatement pstmt = getDB ().getConnection().prepareStatement(QUERY_ALL); ResultSet rs = pstmt.executeQuery(); HashMap map = new HashMap(); while(rs.next()){ UserVO user = new UserVO(); map.put(new String(crm),new Integer(rs.getInt(crm))); map.put(new String(cdms),new Integer (rs.getInt(cdms))); map.put(new String(farnet),new Integer (rs.getInt(farnet))); map.put(new String(par),new Integer (rs.getInt(par))); map.put(new String(onyx),new Integer (rs.getInt(onyx))); map.put(new String(promo),new Integer (rs.getInt(promo))); user.setNetworkId(rs.getString(network_id)); user.setFirstName(rs.getString(firstname)); user.setLastName(rs.getString(lastname)); user.setLoggedOn(rs.getString(loggedOn)); user.setActive(rs.getString(active)); user.setAccessMap(map); list.add(user); } } catch(Exception e){ } finally{ db.close(); } return list; } 2.the related flex page: the object userList is return from the above method and I want to display the Object mx:DataGrid id=dgContact change=selectContact (dgContact.selectedIndex) dataProvider={userList} width=100% height=100% toolTip=Contact List mx:columns mx:Array mx:DataGridColumn columnName=networkId headerText=Network ID marginLeft=4 width=50/ mx:DataGridColumn columnName=firstName headerText=First Name marginLeft=4 width=60/ mx:DataGridColumn columnName=lastName headerText=Last Name marginLeft=4 width=60/ mx:DataGridColumn columnName=active headerText=Active marginLeft=5 width=50/ mx:DataGridColumn columnName=loggedOn headerText=Status marginLeft=5 width=50/ mx:DataGridColumn columnName=?? headerText=crm marginLeft=5 width=70/ /mx:Array /mx:columns /mx:DataGrid how to write the ??? and the related actionscript after got the userList and make the attribute hashmap to Array? is it ? --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: I'm not sure what you're trying to do. If you have the accessMap you can index into it using names (accessMap['foo']). Are you trying to make the hashmap the dataProvider of the DataGrid? That's not going to work, you need a linear list for that to happen (which you could create pretty easily by iterating over the hash map and simply filling an array with each time). Matt _ From: loveewind [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to display the HashMap data in flex mx:DataGrid? my java object below: public class UserVO { private HashMap accessMap = null; private String active= null; private String firstName = null; private String lastName = null; private String loggedOn = null; private String networkId = null; /** * @return */ public HashMap getAccessMap() { return accessMap; } .. } my actionscript object below: class
[flexcoders] Re: how to display the HashMap data in flex mx:Data Grid?
matt,Manish Jethani thank you the detail what to do is below: 1.the Java method: public ArrayList findAllUsers(){ ArrayList list = new ArrayList(); try{ PreparedStatement pstmt = getDB ().getConnection().prepareStatement(QUERY_ALL); ResultSet rs = pstmt.executeQuery(); HashMap map = new HashMap(); while(rs.next()){ UserVO user = new UserVO(); map.put(new String(crm),new Integer(rs.getInt(crm))); map.put(new String(cdms),new Integer (rs.getInt(cdms))); map.put(new String(farnet),new Integer (rs.getInt(farnet))); map.put(new String(par),new Integer (rs.getInt(par))); map.put(new String(onyx),new Integer (rs.getInt(onyx))); map.put(new String(promo),new Integer (rs.getInt(promo))); user.setNetworkId(rs.getString(network_id)); user.setFirstName(rs.getString(firstname)); user.setLastName(rs.getString(lastname)); user.setLoggedOn(rs.getString(loggedOn)); user.setActive(rs.getString(active)); user.setAccessMap(map); list.add(user); } } catch(Exception e){ } finally{ db.close(); } return list; } 2.the related flex page: the object userList is return from the above method and I want to display the Object mx:DataGrid id=dgContact change=selectContact (dgContact.selectedIndex) dataProvider={userList} width=100% height=100% toolTip=Contact List mx:columns mx:Array mx:DataGridColumn columnName=networkId headerText=Network ID marginLeft=4 width=50/ mx:DataGridColumn columnName=firstName headerText=First Name marginLeft=4 width=60/ mx:DataGridColumn columnName=lastName headerText=Last Name marginLeft=4 width=60/ mx:DataGridColumn columnName=active headerText=Active marginLeft=5 width=50/ mx:DataGridColumn columnName=loggedOn headerText=Status marginLeft=5 width=50/ mx:DataGridColumn columnName=?? headerText=crm marginLeft=5 width=70/ /mx:Array /mx:columns /mx:DataGrid how to write the ??? and the related actionscript after got the userList and make the attribute hashmap to Array? is it ? --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: I'm not sure what you're trying to do. If you have the accessMap you can index into it using names (accessMap['foo']). Are you trying to make the hashmap the dataProvider of the DataGrid? That's not going to work, you need a linear list for that to happen (which you could create pretty easily by iterating over the hash map and simply filling an array with each time). Matt _ From: loveewind [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] how to display the HashMap data in flex mx:DataGrid? my java object below: public class UserVO { private HashMap accessMap = null; private String active= null; private String firstName = null; private String lastName = null; private String loggedOn = null; private String networkId = null; /** * @return */ public HashMap getAccessMap() { return accessMap; } .. } my actionscript object below: class com.zdus.crm.user.UserVO{ var firstName:String; var lastName:String; var networkId:String; var loggedOn:String; var active:String; var accessMap:Object; static var registered=Object.registerClass (com.zdus.crm.user.UserVO,com.zdus.crm.user.UserVO); } I have got the hashmap on flex age from remoteobject certainly i know treat the hashmap as a index array,but i can not do it thank you! wait for your help online _ Yahoo! Groups
[flexcoders] how to display the HashMap data in flex mx:DataGrid?
my java object below: public class UserVO { private HashMap accessMap = null; private String active= null; private String firstName = null; private String lastName = null; private String loggedOn = null; private String networkId = null; /** * @return */ public HashMap getAccessMap() { return accessMap; } .. } my actionscript object below: class com.zdus.crm.user.UserVO{ var firstName:String; var lastName:String; var networkId:String; var loggedOn:String; var active:String; var accessMap:Object; static var registered=Object.registerClass (com.zdus.crm.user.UserVO,com.zdus.crm.user.UserVO); } I have got the hashmap on flex age from remoteobject certainly i know treat the hashmap as a index array,but i can not do it thank you! wait for your help online 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] how to solve this problem about using HashMap in actionscript
return a Java object from my back_end system below: public class UserVO { private HashMap accessMap = null; private String active= null; public HashMap getAccessMap() { return accessMap; } /** * @param map */ public void setAccessMap(HashMap map) { accessMap = map; } ... } the accessMap stored string object key and Integer obejct value and I want to display the data on flex page, how to use the actionscript to get the value ? thanks,waiting for your help 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/