Setting intital data in Workspace embedded Flex Application
I created 2 processes, one has an embedded Flex application in it. My first process has an output of type XML that is passed to the 2nd process using events. I have attached an Event Message Template to the Event so i can drill down into the data schema. I am able to receive and see the XML data in the receiving process. My Flex application is set to data type Form and has its own schema associated. What I am trying to do using the SetValue service is set some of the values in the Flex schema to the values of the XML data received from the first process.
My Flex application has an "initialDataHandler" function that receives a DataEvent event from LC Workspace. Using the SetValue service and drilling down into the schema doesn't seem to set the DataEvent event data of the Flex App.
Does anybody have any ideas on how to set the initial data of the Flex App so the data will be pre-populated when a user opens up the application?
Thanks,
Mike,
I double checked with engineering and this cannot be done. I though that creating a custom render service would work, but it wont since it has to return a document variable and we can only change the data of a swf when its in a Form variable. And there is no way to go from Form to document variable because one contains the content and the other one is only a pointer.
You can define default data on the variable settings under Default Data, but this data is essentially hard coded, which is not ideal.
Youre only option at this point is to populate from the formInitData event in the swf form which can call a database or a web service.
Engineering will make that Default Data a variable in a next release of the product which should get you across this problem but nothing to help us now.
Sorry for the confusion.
Jasmin
Similar Messages
-
Embedding Flex applications inside a portlet question
I'm trying to embed a Flex application within a Java portlet on my WLP 10.3.2 portal. I'm able to display the Flex app in the portlet but now I'm trying to access data. Does anyone know of any documents that cover how to access Flex data from a portlet and how to access portlet data from the embedded Flex application?
thanksWhen you mentioned you integrated Flex App inside a Portlet, are you using like iFrame tag or Browser Portlet where in iFrame tag you specify the Flex app url like that. If so, then you will not be able to share any data/information between this iFrame portlet and the actual other real portlets.
If these Flex app has something like JSR based Flex portlets, then you can integrate them in WLP more easily. Another option is to consume these Flex Portlets as remote portlets using WSRP on WLP Side and the producer will be Flex Portal App (with flex portlets).
See if this link helps: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&file=wsrp_1.html
Ravi Jegga -
How to access internal table data from webdynpro to Flex application.
Hi Connoisseur
The data transfer from Abap WebDeypro to flex island works well. I followed , there is an example from Thomas Jung (by the way as always Great Work) and Karthikeyan Venkatesan (Infosys) but this example covers simple type only.
There is no example with complex types like arrayCollection which handle the transfer of data from flex to WebDynpro.
i tried to do pass internal table value to flex-datagrid.but its not work.
i would like to know
1.how to access internal table data from webdynpro to Flex application.
2.how to pass the internal table to flex-datagrid.
2.how to pass dynamically in ADOBE flex.
3. how to do Flex is receiving the wd context data?
4. how can we update WD context with FLEX data.
Ple give me sample example and step by step procedure.
Regards
laxmikanthHi Laxmikanth,
Please refer this...
Flash island: update complex type from flex
Cheers..
kris. -
Set PC date and time in Flex builder 3
Hi,
Is there a way to set date and time of the PC in a desktop application developped with flex builder 3.
Regards,Flex Builder 3? I no longer remember if it supports Adobe AIR and what version. I would think newer versions of Adobe AIR can do it via NativeExtensions.
-
Passing correct image-file path in flashVar from jsp into embedded Flex application
I have an application that embeds an image viewer, written in
Adobe Flex within a jsp page running in a J2EE application on
Tomcat 5.5. The Flex code is a one-line modification of the
application displayed at (
http://www.adobe.com/devnet/flex/samples/fig_panzoom/).
The image viewer is founded and loaded in the output to the
screen, but I cannot get the Image Viewer to display the image
correctly, even though I succeed when either I run the .swf from
the command-line or from an HTML page.
My webapp is called FRSApp. The directory structure is, under
FRSApp:
myTest.html
jsp/catalog.jsp
pan_zoom_files/images/map.jpg
The JSP code is thus,
code:
<%@ taglib prefix="mm" uri="FlexTagLib" %>
<mm:mxml
source="../pan_zoom_files/FIG_PanZoom_for_jsp.mxml" >
<mm:flashvar name="myVar"
value="/FRSApp/pan_zoom_files/images/map.jpg"/>
</mm:mxml>
the code within PanZoom.mxml is,
private var _imageURL:String =
Application.application.parameters.myVar;
<ns1:ImageViewer
id="imageViewer"
imageURL="{ _imageURL }"
bitmapScaleFactorMax="5"
bitmapScaleFactorMin=".05"
width="100%" height="100%"
x="0" y="0"/>
I have tried other paths to the image file, including
images/map.jpg [required by command-line execution of .swf]
pan_zoom_files/images/map.jpg [required by HTML page
(myTest.html) that embeds the .swf file]
I have succeeded in loading image viewer embedded in the jsp
page when the image path is hard-coded in the mxml file, by means
of the following code:
<div id="swf-id" class="swfcontent"><embed
type="application/x-shockwave-flash"
src="../pan_zoom_files/FIG_PanZoom_for_jsp.swf" id="swf-id"
name="swf-id" bgcolor="#ffffff" quality="high" wmode="opaque"
height="480" width="772"></div>
<script type="text/javascript">
// <![CDATA[
var props = new Object();
props.swf = "../pan_zoom_files/FIG_PanZoom_for_jsp.swf";
props.id = "swf-id";
props.w = "772";
props.h = "480";
props.ver = "9";
props.wmode= "opaque";
var swfo = new SWFObject( props );
registerSWFObject( swfo, "swf-id" );
// ]]>
</script>
The error is either a "failed to load image" generated by the
Image Viewer code, or a Flex system error message, resembling a
null-pointer exception:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at FIG_PanZoom_for_jsp()
at _FIG_PanZoom_for_jsp_mx_managers_SystemManager/create()
at mx.managers::SystemManager/initializeTopLevelWindow()
at mx.managers::SystemManager/docFrameHandler()
Any ideas are greatly appreciated!!Solved the problem. I had made several mistakes. One of them
was to pass in the J2EE context path when what was needed was the
fully qualified image url:
http://localhost/FRSApp/pan_zoom_files/images/earth-map_small.jpg.
The second mistake was to assume the flashvar variable could be
picked up by initializing Action Script in the the mxml file,
designated by <mx:script> tags. No, the flash variable will
only be visible within the <mx:Application>
</mx:Application> tags. -
Calling LiveCycle Data Services from a Flex application within AIR
Hi there,
I was experimenting with AIR by migrating some of the Flex TestDrive sample applications and trying to run them as stand-alone apps. Following the examples I found on some blogs, I managed to run the applications that use WebService and HTTPService. However, RemoteObject components fail to detect the destinations associated with the remoting service. A simple remoting example from the TestDrive is "Sample 3: Accessing data using Java RPC" and it produces the following error when running it as an AIR app:
[RPC Fault faultString="No destination with id 'product' is registered with any service." faultCode="Server.Processing" faultDetail="null"]
I would be grateful for any suggestions.
Note: I hard-coded the endpoints of all the services in services-config.xml to point to my local JBoss server.Hi Bushra,
May I suggest that you pose your question on the Adobe AIR Forum? As there are people monitoring the AIR forum with that particular expertise, it would seem to be the more appropriate venue.
Thanks,
Kim -
Set default timezone to UTC in Flex?
Hello,
is there any way of setting the local timezone of my Flex application to UTC?
I am aware of all the UTC related functions in the Date class, so that's not what I am interested in.
Cheers!
TomOkay, forget it.
http://bugs.adobe.com/jira/browse/FP-175
See also
http://forums.adobe.com/message/247102#247102 -
Prepopulating Flex application
Hi,
I am using flex applications for designing forms for Licecycle ES.
I have a problem about prepopulation of forms.
For XDP forms, I could prepopulate forms using render pdfform service.
But for rendering Flex forms, I could only see Read resource content service which only gets the application from defined resource.
And as I know, it has no capability of merging template and form data as I did for XDP forms.
For example my current problem is when process creator opens a form to initiate a process, I want to prepopulate the form with some userss
İnformation like name, departmet etc..
Is there any method to propose to solve this problem?
Note : As my flex form is opened in workspace (which is also a flex application ), and in workspace application I could see the username (commonname), may be it is possible to get this variable of parent applications from my flex form. If it is defined public..
Anyone knows how can I reach this variable?
Thanks in advance
Regards
CihanThere is a way to do that. This is an extract from an email one of my colleague on the subject:
In your Flex form you will make use of the FormConnector (see Flex Language Reference under lc.core.FormConnector which is used to simplify communication between Flex app and Workspace ES) that exposes three events (formInitiallData, formSaveDataRequest, formSubmitDataRequest). This will let you run a function when the Flex form initializes in Workspace - -the goal of that function will be to make a call to retrieve the data required and merge it into the Flex form.
In order to retrieve the data required for pre-population a common need would be to retrieve data related to the logged in user making the start form request. This information is not known to your Flex Form but is known to the Workspace ES Flex application that is hosting the form. So what you will need to do here is gain access into the Workspace application to retrieve the current session. From that current session you can extract the id (sessionManager.authenticatedUser.oid) of the current user. This will be an argument to your function calling some external source for data to be pre-populated.
You can now make a call to the data source to retrieve the data you want. For example, call a LC process that is exposed as a Web Service taking as its input a users id (the oid you retrieved from the session) whose steps will make the call to the directory server and get the info you need (e.g. department, manager, employee id, etc.) to prepopulate and return it back to the Flex form.
I do not have a working sample of this but below is a portion of sample code that would be in the Flex form and reflects what was discussed above.
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:lc="http://www.adobe.com/2006/livecycle" creationComplete="connector.setReady()" width="100%" height="100%">
<lc:FormConnector id="connector"
formInitialData="initialData(event)"
formSaveDataRequest="returnFormData(event)"
formSubmitDataRequest="returnFormDataForSubmit(event)"/>
<mx:Script>
<![CDATA[
import lc.domain.SessionMap;
import lc.core.ISessionManager;
private function getUserId():string
var session:SessionMap = SessionMap(Application.application.session);
var sessionManager:ISessionManager = ISessionManager (session.getObject("lc.core.ISessionManager"));
return sessionManager.authenticatedUser.oid;
Private function prepop(userId:String):XML
\\add code to call Web Service and retrieve info to prepopulate (in our example à name, dept, mgr)
private function initialData(event:DataEvent):void
if (event.data != null && event.data != "")
xmldata = new XML(event.data);
else
var myUID:String = getUserId();
xmldata = prepop(myUID);
]]>
</mx:Script>
<mx:VBox horizontalCenter="0" verticalCenter="0" width="100%" height="100%">
<mx:Form id="theForm" backgroundColor="0xffffff" width="100%" height="100%">
<mx:FormHeading label="My form"/>
<mx:FormItem label="Name" required="true">
<mx:TextInput id="userName" text="{xmldata.name}" change="xmldata.name = userName.text; connector.setDirty()"/>
</mx:FormItem>
<mx:FormItem label="Name" required="true">
<mx:TextInput id="userDepartment" text="{xmldata.dept}" change="xmldata.dept = userDepartment.text; connector.setDirty()"/>
</mx:FormItem>
<mx:FormItem label="Name" required="true">
<mx:TextInput id="userManager" text="{xmldata.mgr}" change="xmldata.mgr = userManager.text; connector.setDirty()"/>
</mx:FormItem>
</mx:Form>
</mx:VBox>
</mx:Application>
I hope that helps.
Jasmin -
I'm designing a Flex application, and for the most part, I
want to allow users to drive the application with simple
keystrokes.
Obviously I need to content with a couple of UI issues:
1) I don't want to interfere with text field input and the
likes.
2) After the user commits (i.e. closes or exits text fields
or other objects that claim focus of text input) I'll need to set
focus (responder?) to the flex application itself .
Is this easy to accomplish?
Thanks JohnYou can set focus within the flash player to components
within the flash player.
You can set focus within the browser window to the Flash
player (if you need to).
Easy? That depends on how you want your app to behave and how
you implement that behaviour. A "suck it and see" approach might be
best to ascertain that one - learn by doing and similar
clichés have merit here.
If you have a more specific question about implementation
detail, post back and the board should fix you up with an
answer. -
Write data to SharePoint from embeded Flex swf
I am trying to integrate Flex 3 applications into SharePoint 2007 environment which would allow our users to read/write/delete data from SharePoint using an embeded Flex app inside SharePoint. While the article from matthew.meier on "Adding Event Driven Flex Components to Microsoft Sharepoint 2007" is great and another article by Serge van den Oever on "Use Flex to retrieve data from a SharePoint list" is fantastic, they neither touch the topics of writing or inserting data into SharePoint. My goal is to create a two-way communication between Flex and SharePoint to dynamically pull (read) data into Flex from SharePoint lists, etc via GUID or other method AND to also write or update SharePoint from a front-end Flex inside SharePoint.
I have been working on a solution which appears like it would work, but I am getting errors. The source code and examples are found on Code Project http://www.codeproject.com/KB/aspnet/FlexASPWebService.aspx?msg=3270246#xx3270246xx This Flex/ASP example uses a web service to communicate to a SQL database. Flex makes a web service call to the .asmx file via WSDL and the magic happens. I am running into a roadblock as I receive an error that the app cannot find the WSDL. I have tried to run the same WSDL URL in a browser and I get an server application error.
I also tried a solution found at http://shardulbartwal.wordpress.com/2008/03/20/import-web-servicewsdl-wizard-in-flex-30/ to load the WSDL file directly into Flex, but I ran into another roadblock. When I get to this step below Flex gives an error that it cannot find the WSDL file either…
Here is the WebService call from Flex…
The files from Code Project contain a directory structure as such:
TestWebService\Service.asmx
TestWebService\Web.config
TestWebService\App_Code
TestWebService\App_Code\Service.cs
TestWebService\App_Data
The Service.cs file is inside the App_Code directory and is referenced from the Service.asmx file with this code:
My Flex file calls the Service.asmx?WSDL which then calls the file Service.cs and then it breaks.
The Code for the Flex file is as follows…
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function init():void {
// Get Data from WebService and fill datagrid when you fist invoke the application
ws.GetEmployees();
private function GetEmployees(event:ResultEvent):void {
// Databind data from webservice to datagrid
datagrid.dataProvider = event.result;
private function SaveEmployee(event:ResultEvent):void {
// To Refresh DataGrid;
ws.GetEmployees();
Alert.show("Saved Successfully");
private function AddRecord(event:MouseEvent):void {
// Save a record using a WebService method
ws.SaveEmployee(txtEmpId.text, txtEmpName.text, txtEmpEmail.text); //
private function fault(event:FaultEvent):void {
// Oppps some error occured
Alert.show(event.toString());
]]>
</mx:Script>
<!-- WebService definition -->
<mx:WebService id="ws" wsdl="http://localhost/TestWebService/Service.asmx?WSDL" fault="fault(event)">
<mx:operation
name="GetEmployees"
resultFormat="object"
result="GetEmployees(event)"
/>
<mx:operation
name="SaveEmployee"
resultFormat="object"
result="SaveEmployee(event)"
/>
</mx:WebService>
<mx:Panel x="41.5" y="66" width="714.5" height="237" layout="absolute" title="ASP.NET WebService + Flex Demonstration">
<mx:HBox height="95%" width="95%" horizontalCenter="0" verticalCenter="0">
<mx:DataGrid id="datagrid" width="465" height="100%">
<mx:columns>
<mx:DataGridColumn headerText="Emp Id" dataField="EmpId"/>
<mx:DataGridColumn headerText="Emp Name" dataField="EmpName"/>
<mx:DataGridColumn headerText="Emp Email" dataField="EmpEmail"/>
</mx:columns>
</mx:DataGrid>
<mx:Form x="608" y="74" width="100%" height="100%" borderStyle="solid">
<mx:FormItem label="EmpId">
<mx:TextInput width="106" id="txtEmpId"/>
</mx:FormItem>
<mx:FormItem label="EmpName">
<mx:TextInput width="106" id="txtEmpName"/>
</mx:FormItem>
<mx:FormItem label="EmpEmail">
<mx:TextInput width="106" id="txtEmpEmail"/>
</mx:FormItem>
<mx:FormItem width="156" horizontalAlign="right">
<mx:Button label="Add" id="btnAdd" click="AddRecord(event)"/>
</mx:FormItem>
</mx:Form>
</mx:HBox>
</mx:Panel>
</mx:Application>
The Flex app error states it cannot locate the WSDL. Any ideas?
I don’t know what I am doing wrong… -
How to show double byte data in a Flex application
Hi
I am looking for a way to show UTF-8 formatted data in a Flex
application. I have a Java app in the backend that generates an xml
file. Some attributes in the file are encoded in UTF-8 (when data
is Japanese or Chinese...). My Flex app is showing box characters.
I have XSLT app that generates html based off this xml file. The
browser i showing the Japanese characters fine.
I am wondering what the trick is to get Flex app show this
data.
Thanks
VideoguyIt turned out to be my XP that didn't have the the right lang
sets installed. I have two PCs. On one everything showed up fine. I
was able to view arabic, chinese data from xml just fine. On the
other one, same swf didn't show them. There is MS knowledgebase
article on how to enable east asian languages etc. I didn't give it
a try. I am using other pc for my dev now. -
How to call setter Method of ActionScript class with in a Flex Application
Hi
I have Action class as shown :
public class MyClass
private var name:String
public function get name():String {
return _initialCount;
public function set name(name:String):void {
name = name;
Now please let me know how can i access this Action class under my Flex Application and call the setter Method of it to set the value for the name .
For example on entering some data in a TextInput and click of a submit Button , on to the Event Listener , i want to call the set name method of my ActionScript class .
Please share your ideas on this .Thanks Gordon for your resonse .
Say for example my Action class is like this :
public class MyClass
private var name:String
public function get name():String {
return name;
public function set name(name:String):void {
name = name;
This is inside the MXML
I know this way we can do it
public var myclass:MyClass = new MyClass();
myclass.name="Kiran";
Now my query is can we do in this way also ??
myclass.set name(SomeTextInput.text);
Please share your views on this , waiting for your replies .
Thanks in advance . -
Workspace no longer works when using flex application as Form
Hi,
I've got a problem in the Workspace with one of my process that use a flex application as form.
I used the tutorial "Creating Flex® Applications Enabled for LiveCycle® Workspace ES" to create the flex application and it works well in the workspace (displays ok and datas well passed to the process).
The task completes well because my process fires the next step with all the datas filled in the task.
But after the end of the task (when I click on the submit button of the form) the Workspace is no longer usable.
I can no longer access preferences, messages, starting process panel... when a click on an item in any Menu nothing occurs. Everything is blocked.
I must restart the Workspace to be able to use it again.
Can someone help me please?I think I have it solved, will check...
When modifying, the P3 in the go url was left out. what was P2 should be P3 and the correct P2 would have the table.column name. -
Embedding Fonts in a Flex application -- Legal issues?
I am currently building a Flex application for a Client. The Style guide they have provided shows Univers 55, Univers 65, and Univers 45 as the main fonts for the site and the app.
Page 1567 of Using Flex 4.5 states
Note:
Check your font licenses before embedding any font files in your applications. Fonts might have licensing restrictions that preclude them from being stored as vector information.
The fonts they are using in the AI file for the design document appear to be older version Adobe 1.0 TrueType fonts dated 30th June 1997.
I can not find the original license for these fonts, but such licenses may pre-date embedding technology, so are we allowed to embed them?
As an alternative could we safely use the OTF Univers LT Std family and are there any differences?
Message was edited by: lingoguruAs far as i see it, it's mainly just for convenience.
Embedding an image into application removes the need for you to store it elsewhere on the server, as it becomes part of the .swf file.
From personal experience it's very handy with small images, as it doesn't increase the size of the .swf file too much, and it means you don't have to keep track of them when distributing your release build.
you don't have to embed anything, you can simply reference it by location instead, but you'll experience a slight delay as it's loaded into the application on request.
The need for using this feature depends entirely on what you're trying to accomplish.
If you're making something like a large image gallery, it'll completely remove the need for wait for pictures to load when you're scrolling through them. However i wouldn't recommend it as you'll send your application size will go through the roof, and the waiting time for the whole application to load would be fairly extensive.
If you have an application with like 40 small ~3kb images using for navigation icons or something, you might as well, it's just convenient and won't impact the loading time by too much. -
Flex application embedded in a PDF performing a LC call
Hi,
I have a Flex application that is embedded in a PDF as a navigator which is supposed to invoke LiveCycle application deployed on a weblogic server using SOAP endpoint. The web service call seems to work fine if I run it from Flash Builder but once it’s inside a PDF, it would appear that the web service call is not reaching the application deployed on the Document Service server. The same application, however, does work if the server is deployed on JBoss.
I was wondering if anyone has suggestions on how I should go about troubleshooting.
Thanks, Lilliam.Hi,
Creating a new project it's
- File -> New -> Flex Project
- Application Type -> Desktop
Setting this will create the descriptor file and create the WindowedApplication as the root. This application will startup in a native os window.
Here is an example of creating a simple os child window;
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import spark.components.Window;
protected function button_clickHandler(event:MouseEvent):void
var window:Window = new Window();
window.title = "Hello Window";
window.width = 200;
window.height = 200;
window.open();
]]>
</fx:Script>
<s:Button label="Open Window"
click="button_clickHandler(event)"/>
</s:WindowedApplication>
The documentation will guide you the rest of the way.
Mike
Maybe you are looking for
-
That's about it. Whenever I try to launch the beta version I get the won't run on this architecture message.
-
Itunes doesn't sync music that was transferred from an external hard drive
I transferred a song from an external hard drive onto itunes on my laptop. The song plays through itunes on my laptop after I've disconnected the external hard drive, but it won't sync the song to my iPhone. I have a lot of music on that ext. HD and
-
Hi, I've created a filter on my reduced message type from MATMAS in BD64. I'm filtering based on Plant (WERKS). But it isn't working... It sends out all plants using my message type. Is there some step that I've missed out??? -Vartika
-
VAT on Base price+ Excise duty + Freight
Hi Im using TAXINN Procedure. I have got two scenarios for VAT. 1)some vendors charge VAT on Base price+ Excise duty & then add freight. which I have mapped. 2)In second scenario some vendors charge VAT on (Base price+ Excise duty + Freight). whi
-
How do I change the refresh settings? I want the page to stay in place when I refresh.
I work with a website for work that is in list form. I have to refresh quite frequently and every time I do it takes me right back to the to of the page. I need the page to stay in place so I continue working in the same area. Thank you.