Re-Using Java Business Layer in Flex

I am new to flex and particulalry looking at this to use as front end for existing Web based Java Application as front end. We have comprehensive business layer written using POJOs and DAOs and want to reuse it. I will be using remote objects to call servr side code and return domain objects (models/POJO). As per my understanding to use the strict typed data such as objects of business classes i have to create ActionScript class and bind it with corrosponding Java class. This looks lots of code duplicaiton to me.
Can you please guide me if my understanding are wrong or i'm missing something. Is there better way to acheive the above?
Thanks in advance.

HTTPService can call HTML pages, so maybe Tapestry would work?
Have you considered using JSON to format the object data?
These lins describe using JSON and Flex:
http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-using-json
http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mysql-databas e
http://www.switchonthecode.com/tutorials/flex-php-json-mysql-advanced-updating
If this post answers your question or helps, please mark it as such.

Similar Messages

  • I am trying to use java  file as Model layer and jsf as presentation layer

    I am trying to use java file as Model layer and jsf as presentation layer and need some help
    I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
    I create java file
    package oracle.model;
    import java.sql.;*
    import java.util.;*
    *public class TableBean {*
    Connection con ;
    Statement ps;
    ResultSet rs;
    private List perInfoAll = new ArrayList();
    *public List getperInfoAll() {*
    perInfoAll.add(0,new perInfo("name","username","blablabla"));
    return perInfoAll;
    *public class perInfo {*
    String uname;
    String firstName;
    String lastName;
    *public perInfo(String firstName,String lastName,String uname) {*
    this.uname = uname;
    this.firstName = firstName;
    this.lastName = lastName;
    *public String getUname() {*
    return uname;
    *public String getFirstName() {*
    return firstName;
    *public String getLastName() {*
    return lastName;
    right click on the file and choose 'create data control'
    then i wrote the jsf file:
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<f:view>*
    *<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
    var="item" bgcolor="#F1F1F1" border="10"
    cellpadding="5" cellspacing="3" rows="4" width="50%"
    dir="LTR" frame="hsides" rules="all"
    *>*
    *<f:facet name="header">*
    *<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
    *</f:facet>*
    *<h:column id="c2">*
    *<f:facet name="header">*
    *<h:outputText value="First Name" id="ot1"/>*
    *</f:facet>*
    *<h:outputText style="" value="#{item.firstName}"*
    id="ot2"/>
    *</h:column>*
    *<h:column id="c4">*
    *<f:facet name="header">*
    *<h:outputText value="Last Name" id="ot9"/>*
    *</f:facet>*
    *<h:outputText value="#{item.lastName}" id="ot8"/>*
    *</h:column>*
    *<h:column id="c3">*
    *<f:facet name="header">*
    *<h:outputText value="Username" id="ot7"/>*
    *</f:facet>*
    *<h:outputText value="#{item.uname}" id="ot4"/>*
    *</h:column>*
    *<f:facet name="footer">*
    *<h:outputText value="The End" id="ot3"/>*
    *</f:facet>*
    *</h:dataTable>*
    *</center>*
    *</af:document>*
    *</f:view>*
    but nothing is appear in my table
    I know that there is something wrong in calling the binding object
    I need help pls and where can i find some help to deal with another tag types
    thanks

    i dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
    and this code is generated
    *<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
    *"http://www.w3.org/TR/html4/loose.dtd">*
    *<%@ page contentType="text/html;charset=UTF-8"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
    *<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
    *<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
    *<f:view>*
    *<af:document id="d1">*
    *<af:messages id="m1"/>*
    *<af:form id="f1">*
    *<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
    *rows="#{bindings.perInfoAll1.rangeSize}"*
    *emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
    *fetchSize="#{bindings.perInfoAll1.rangeSize}"*
    *rowBandingInterval="0"*
    *selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
    *rowSelection="multiple" id="t1">*
    *<af:column sortProperty="uname" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.uname.label}"*
    *id="c1">*
    *<af:inputText value="#{row.bindings.uname.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.uname.label}"*
    *required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
    *id="it3">*
    *<f:validator binding="#{row.bindings.uname.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="firstName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
    *id="c2">*
    *<af:inputText value="#{row.bindings.firstName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.firstName.label}"*
    *required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
    *id="it2">*
    *<f:validator binding="#{row.bindings.firstName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *<af:column sortProperty="lastName" sortable="false"*
    *headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
    *id="c3">*
    *<af:inputText value="#{row.bindings.lastName.inputValue}"*
    *label="#{bindings.perInfoAll1.hints.lastName.label}"*
    *required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
    *columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
    *maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
    *shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
    *id="it1">*
    *<f:validator binding="#{row.bindings.lastName.validator}"/>*
    *</af:inputText>*
    *</af:column>*
    *</af:table>*
    *</af:form>*
    *</af:document>*
    *</f:view>*
    but when run it i see the following errors
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    *Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
    *Object EmpManager of type DataControl is not found.*
    *java.lang.NullPointerException*
    :(

  • Can't display a Tile Layer using JAVA API V2 (based on HTML5)

    Hi Experts,
    I am trying to display a tile layer using JAVA API V2 but i get the below error and nothing shows after that.
    MAPVIEWER-05501: Map tile layer not found. Check map tile layer name and/or data source name.
    Source: OM.layer.Tilelayer.getTileLayerConfig
    *[mvdemo.demo_map]*
    I tried with chrome and firefox browsers which supports HTML5 but same issue. Here is the html code i am using
    <html>
    <head>
    <title></title>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
    <script type='text/javascript' src='http://localhost:8282/mapviewer/jslib/v2/oraclemapsv2.js'></script>
    <style type= 'text/css '>body {cursor:default;}</style>
    <script language="JavaScript" type="text/javascript">
    function showMap()
    var baseURL = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon = -122.45;
    var mapCenterLat = 37.6706;
    var mapZoom = 4;
    var mpoint = new OM.geometry.Point(mapCenterLon,mapCenterLat,8307);
    var map = new OM.Map(
    document.getElementById('map'),
    mapviewerURL: baseURL
    var tileLayer = new OM.layer.TileLayer(
    "baseMap",
    dataSource:"mvdemo",
    tileLayer:"demo_map",
    tileServerURL:baseURL+"/mcserver"
    map.addLayer(tileLayer) ;
    navigationPanelBar=new OM.control.NavigationPanelBar();
    map.addMapDecoration(navigationPanelBar);
    map.setMapCenter(mpoint);
    map.setMapZoomLevel(mapZoom) ;
    map.init() ;
    </script>
    </head>
    </html>
    Note: inside the body on load i use DIV Id = Map (i skipped that one line of code because it stops rest of the line from displaying in the thread)
    However, I am successful in using the same tile Layer with JAVA API V1
    Please share your thoughts as what could be the fix
    Thanks
    Nag

    Nag,
    inside the body on load i use DIV Id = Map (i skipped that one line of code because it stops rest of the line from displaying in the thread)please surround your code with [ c o d e ] [ / c o d e ] (without the spaces).
    Secondly: this is probably more appropriate for the {forum:id=727} forum.
    Regards,
    Stefan

  • How to use Java objects in business rules 11g

    I have made one business rule with two XML facts and then follow one doc to create the java facts.But I am unable to use the facts.

    No Java Facts are created,but as I have mentioned XML input and output facts at the time of creation of business rules,so I am not able to use java fact in business rule.
    Edited by: 856272 on Jan 4, 2012 6:22 AM

  • Which business layer for ADF/JSF applications?

    We are considering developing j2ee applications using ADF Framework ad JDeveloper. We have choosen to use ADF framework using ADF Faces as a view layer, JSF Controler.
    Can someone give me a suggestion about which tecnology to use to build service layer?
    Since we are java developers, is it better to use Toplink POJOs or is there some advantages using ADF BC.
    Is there any tutorial or note thet can help us making this choice?
    Thank you very much
    Michele

    The ADF Developer's Guide for Forms/4GL Developers and the corresponding end-to-end tutorial for the SRDemo sample using ADF Business Components should be on OTN by the end of this week. If you are interested in a pre-release, please email me at [email protected]
    Thanks.
    The ADF Developer's Guide for advanced J2EE Developers and the end-to-end tutorial using EJB/Toplink are already on OTN. Using these side by side, hopefully it will help you get an idea of which one feels like a better fit for your team's background, experience, and preferences for ways of working.

  • Create a new dimension in business layer from Data source: text file on the web

    Hi,
    I have a text data source which is published every few hours that is accessible from a certain URL. I follow the instruction given in this http://scn.sap.com/docs/DOC-43144 - where it shows in great detail how to create the connection, data foundation as well as business layer to create a universe for this type of data.
    All is well - I can use this universe in my WEBI doc and display the data.
    However, in order for me to merge the data from this universe with another universe, I need to create  new dimension based on the data from the text file. The new dimension value is simply the first 4 characters of the Subject found in the text file. The "Subject" dimension is of variant type: varchar.
    Following the guide mentioned earlier, the connection is using SAP BO OpenConnectivity driver. And this driver limits severely the SQL statement that I can use to extract a substring of another string. Here's the screenshot of the SQl expression that I can use with this driver
    After hours of searching, I cannot find any other connection driver for a text file that's published on a certain URL. The BO OpenConnection driver is the best that I could find.
    So here are my problems
    1. one of my data source is a text file published on a web
    2. the only connection I can create does not allow me to create  new dimension in the universe to create an important column "subject ID"
    3. I can create the column in webi as a variable. But when I do so, I cannot merge it with existing dimension (webi not allowing to merge these 2 types). And without the merge, the flat file universe with my database universe can't be combined.
    I'm using WEBI Rich client version 4.1 SP3 Patch 1. Build 14.1.3.1300
    Is there any other idea that you can suggest without requiring to change the extracted data?
    Thanks.
    With warm regards

    Hi Bala,
    Were you able to find out a solution for the problem with uploading values for a variable from a text file on the web?  I am confronted with the same request from users.
    Thanks,
    BQ

  • BO 4.1 SP4 IDT - Not able to publish the Business layer onto the repository

    Hi All,
    We are facing issues while publishing the Universe onto the repository. Just to give a background of the issue, we are connecting to Oracle 9i database from BO 4.1 SP4 Information Design Tool. We have client tools installed on one VM server and BO enterprise server on the other VM . I have installed Oracle 11g client 32 bit on the client tools server and 64 bit on BO Enterprise server. I can create a session to the BO server from the IDT tool successfully I have even created a secured connection published on SAP BO server which means there are no port issues.
    I create the data foundation and business layer on IDT. I have created a test one with only two simple tables and do an integrity check and it works fine. When I publish the Universe, after I click the Finish button, it just freezes and doesnt get anything back for a long time. After that period, the finish button gets enabled again and if I check on the server, Universe is not published.
    Based on the KB 1586166 - How to enable tracing for BI4.x client applications  I created two BO_Trace.ini file in the following directories:
    C:\<user-dir>\.businessobjects\bimodeler_14\config
    D:\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\conf
    I was getting the trace files earlier as well but I just changed to see if something happens. I I have a hs_error_pid4198 file created on monday, but it seems to be a java environment error file. I am not sure if its related. The trace I see on the InformationDesignTool_ncs file is
    trc file: "InformationDesignTool_ncs.trc", trc level: 1, release: "720"
    M
    M [Thr 5788] Thu Aug 21 11:09:28 2014
    M [Thr 5788] NCS trace timer thread is successfully triggered
    M [Thr 5788] Trace dispatcher thread is successfully triggered
    M [Thr 5788] NCS data timer thread is successfully triggered
    M [Thr 5788] Data dispatcher thread is successfully triggered
    M [Thr 5788] NCS library version 2.3.9 (unicode) loaded
    M [Thr 5788] NCS_ProcInit API invoked
    M
    M [Thr 5052] Thu Aug 21 11:09:33 2014
    M [Thr 5052] ***LOG Q0I=> NiBufIConnect: connection pending after 500ms: connect (10035: WSAEWOULDBLOCK: Resource temporarily unavailable) [nibuf.cpp 4634]
    M [Thr 5052] *** ERROR => NiBufIConnect: non-buffered connect pending after 500ms (hdl 1;127.0.0.1:59818) [nibuf.cpp 4645]
    M [Thr 5052] *** ERROR => NI raw handle failed to be initilized at IDEL to CONNECTED, connection to agent destination failed to be established in agent 1 [ncsmtdatasen 137]
    M
    M [Thr 5740] Thu Aug 21 11:10:28 2014
    M [Thr 5740] *** ERROR => NI raw handle failed to be initilized at IDEL to CONNECTED, connection to agent destination failed to be established in agent 1 [ncsmtdatasen 137]
    M
    M [Thr 2428] Thu Aug 21 11:53:19 2014
    M [Thr 2428] NCS_ProcExit API started
    M
    M [Thr 2428] Thu Aug 21 11:53:20 2014
    M [Thr 2428] Timer threads are successfully finished
    M [Thr 2428] Data sending threads are successfully finished
    M
    M [Thr 2428] Thu Aug 21 11:53:21 2014
    M [Thr 2428] NCS_ProcExit API invoked
    Initially I was getting the following error on 18 Aug 14
    FILE_TYPE:DAAA96DE-B0FB-4c6e-AF7B-A445F5BF9BE2
    ENCODING:UTF-8
    RECORD_SEPARATOR:30
    COLUMN_SEPARATOR:124
    ESC_CHARACTER:27
    COLUMNS:Location|Guid|Time|Tzone|Trace|Log|Importance|Severity|Exception|DeviceName|ProcessID|ThreadID|ThreadName|ScopeTag|MajorTick|MinorTick|MajorDepth|MinorDepth|RootName|RootID|CallerName|CallerID|CalleeName|CalleeID|ActionID|DSRRootContextID|DSRTransaction|DSRConnection|DSRCounter|User|ArchitectComponent|DeveloperComponent|Administrator|Unit|CSNComponent|Text
    SEVERITY_MAP: |None| |Success|W|Warning|E|Error|A|Assertion
    HEADER_END
    |3E293DA41362474BA0789573468E97B20|2014 08 18 16:44:52.105|+1000|Error| |>>|E| |idt| 4168| 1|main | ||||||||||||||||||||||Cannot read TraceLog configuration file 'conf/tracelog.ini'.-
    |3E293DA41362474BA0789573468E97B21|2014 08 18 16:46:02.808|+1000|Error| |==|E| |idt| 4168| 40|Check integrity CIR 01401| ||||||||||||||||||||com.businessobjects.mds.services.parser.decoder.DataFoundationSQLDecoder||DataFoundationSQLDecoder.decodeExpression: encodedExpression is null-
    I am not seeing this error after I created the tracelog file .ini based on the KB mentioned. I have a trace file generated in the workspace folder but its 12MB size which I wont be able to post it here.
    Any suggestions to resolve this error would be of great help.
    Regards,
    Rohini.

    Hi
    Follow the below steps: Publish the Universe to the Repository.
    Select the business layer under project -> Right Click the Business Layer and select, publish repository from the menu. -> and next --> Choose the Repository Folder to store the Universe --> Publish Universe After clicking the “Finish” button
    Note : Ensure the Connection for the corresponding Data Foundation is a Secure Connection.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903a7fc7-19e8-2d10-fa95-b050de946b61?overridelayout=true
    http://www.youtube.com/watch?v=4lvrKex4ubc

  • Unable to create Business Layer on top of SAP BW OLAP Connection - BI 4.0

    Friends,
    Need an useful information, why can't we create a business layer on top of SAP BW OLAP connection which is built with BICS driver.
    Today when i tried to create a business layer in IDT tool of BI 4.0 it didnt allow me to do so. Is it a s/w bug or am i following a wrong approach. I do know, we can create a .unx universe through relational connection. But i dont want that, please provide your input.
    thanks,
    Tilak

    Hi,
    this question has been asked many times before, so a search will reveal your answer.
    as the warning told you when you tried the workflow in IDT - business layers aren't supported for Bics connections - i.e. you can't create a UNX ontop of Bex using BICS..
    unfrotunately, it was a strategic product decision that seemingly can't be reversed/influenced, despite the inherent problems this causes.
    There are lots of requests for this feature to be restored, on the Ideas Place here: https://cw.sdn.sap.com/cw/community/ideas/businessanalytics/sbosemanticlayer
    Please search and Vote for one.
    Regards,
    H

  • Creation of Business Layer

    I am trying to create a Business Layer using the wizard. I have selected the user whose tables i want to load. But the list of schema Objects for this user that is seen in the wizard is very few. Is it because the EUL owner user which i have used to login to Discoverer administrator does not have select access on these tables?

    Hi Russ,
    Well, at it's simplest when a database session is created by Discoverer Admin or User editions then the database session must have the privileges to do the task that you want to perform. So when you connect to Discoverer Admin to add some tables to the EUL the session must have select access on those tables. If you have not connected as the EUL owner then it doesn't matter what privileges that the EUL owner has been granted, it is the user you are connected with that matters.
    So in an Apps mode EUL I never grant any table access to the EUL owner. I think that opens up the Apps security unnecessarily. I always connect to Disco Admin as an Apps user (I usually create an Apps EUL Admin user for this purpose.) Then when you are connected as the Apps user your session is an APPS session so the session has access to all the APPS tables etc. and can therefore add tables to the EUL and grant privilege to other Apps users/responsibilities.
    Therefore the process I use is:
    1. Create your EUL_US Apps mode EUL
    2. Create a EUL admin Apps user, EULADMIN in Applications
    3. Connect as EUL_US and grant all EUL admin privileges to EULADMIN
    4. Connect as EULADMIN and do all your EUL administration.
    Hope that is clear,
    Rod West

  • Confused.. trying to stop a flash video using java

    Hi, I am trying to put a video on a webpage that uses java to
    hide it's visibility.
    This layer has a video, and when a person clicks on a link
    java hides the layer and it is supposed to stop the video from
    playing. I know how to hide the layer, but I am new to flash and I
    have not seen a way to use java to turn of the video.
    Any ideas? How I can use a simple java function to turn the
    video off?
    Many thanks for any ideas to solve this.
    Joe

    I'm pretty sure that you mean Javascript and not Java. Have a
    look at the ExternalInterface class. There are some examples in the
    online help that demonstrate calling a function in a Flash movie
    from Javascript in the HTML doc.

  • Java API for Adobe Flex(AIR and Browser)

    Hello Community,
    Sometime ago i started the project located at: : http://code.google.com/p/gwt4air/ , wich primary goal was to bring another approach on writing AIR application by providing a Java API for the AIR API. On top of that i added support for PDF and Excel generation using Java.
    I m glad to announce that  the project  will now add support for the Flex Framework
    I wrote a post about it on the main page.
    The Idea behind it is to give Java Developers a more simple way to write Flex Application by leaveraing a swing like API.
    I hope this project will be a good alternative to the MXML+ ActionScript approach and looking for people willing to join the project.
    Regards,
    Alain

    Good question, I'd like to know this myself. 4.5 has a huge number of changes since 4.0.

  • How to Pass Click Value to DB using Java

    How to Pass Click Value to DB using Java and display tat
    clicked value row data in flex
    i have created connection with Sql Server using java and drew
    pie chart from values fetched from XML file created by Java
    wat i need is when i click pie chart region (widget) i should
    display a alert by giving value of particular widget name and Value
    from Database and display in Flex Alert

    Use AddResource to add Javascript in your BackingBean Code and pass the value to your javascript code.
    JSCookMenu and other dynamic adding of javascript to a JSF-JSP page is done using AddResource....

  • How to use Java Embedding activity, getting error

    Below is a simple code where in I am just assigning input variable to output variable(of type long), using java embedding activity, and I am getting error in Java Embedding Activity step.
    <bpelx:exec name="Java_Embedding_1" language="java" version="1.4">
    <![CDATA[ 
    Element inputValue1 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input1");   
    String arg1=inputValue1.getNodeValue(); 
    setVariableData("outputVariable", "payload","/client:Pooja_BP1ProcessResponse/client:result", new Long(arg1));]]>
    </bpelx:exec>
    Runtime Error:
    <runtimeFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>java.lang.*NumberFormatException*</code>
    </part><part name="summary"><summary>null</summary>
    </part><part name="detail"><detail>[Ljava.lang.StackTraceElement;@1c50684</detail>
    </part></runtimeFault>
    Could anyone please point out the mistake?

    No, that's not working. Throwing below error.
    faultName: {{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure}
    messageType: {}
    parts: {{summary=<summary>XPath query string returns zero node.
    According to BPEL4WS spec 1.1 section 14.3, The assign activity &amp;lt;to&amp;gt; part query should not return zero node.
    Please check the BPEL source at line number "" and verify the &amp;lt;to&amp;gt; part xpath query.
    My output varaible is of type long and there i m creating a Long object using it's constructor which takes in a string, Long(String s)
    Actually, I m not just priniting the input, but i need to perform some calculations also on the inputs, like
    Element inputValue1 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input1");  
    Element inputValue2 = (Element)getVariableData("inputVariable", "payload","/client:Pooja_BP1ProcessRequest/client:input2");  
    long arg1=Long.parseLong(inputValue1.getNodeValue());  
    long arg2=Long.parseLong(inputValue2.getNodeValue());  
    long arg3 = arg1+arg2; 
    setVariableData("outputVariable", "payload","/client:Pooja_BP1ProcessResponse/client:result", new Long(arg3));                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Strange class error when using java

    I've been attempting to use java.awt.robot to simulate a key press when a button is clicked however I'm getting a couple of errors that I can't figure out but I'm not so good when it comes to scripts. When the button "LetterButton" is pressed it should simulate a keypress, ideally to the desktop/operating sytem but the errors I'm getting are:-
    1071: Syntax error: expected a definition keyword (such as function) after attribute public, not static.
    1084: Syntax error: expecting rightbrace before leftbrace.
    1131: Class must not be nested.
    Here's the code:-
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplicationxmlns:mx="
    http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
    import java.awt.Robot; 
    import java.awt.event.KeyEvent; 
    public class Main { 
    public static void main(String[] argv) throws Exception { 
    Robot robot =
    new Robot(); 
    robot.keyPress(KeyEvent.VK_A);
    robot.keyRelease(KeyEvent.VK_A);
    ]]>
    </mx:Script>
    <mx:VBox x="359" y="262" horizontalCenter="0" verticalCenter="0">
    <mx:Button id="LetterButton" label="Button" click=""/>
    <mx:TextInput id="txt"/>
    </mx:VBox></mx:WindowedApplication>

    Sounds tricky. I may ask them to look for an alternative way of doing it as Java really isn't my thing, I'm merely just a flex beginner at the moment.
    The reason I've been looking for this is that my app will be installed on a digital tv that also has a system connected to it using a Linux operating system so the user can switch between watching digital tv and the application seamlessly and at the moment a Linux professional who I'm working with has the Digital TV bound to the F12 key which is bound to a handheld remote control (being a tv there is no keyboard, just an 'air mouse' and the remote control).
    So my client and my Linux guy have asked me to come up with a way of getting the app to communicate with the desktop/operating system. I have seen flex apps in the past where a user can drag and drop videos on their desktop into an air application from which they will be played so I thought it would be possible to interact with the exteral OS/Desktop from within an AIR app by using just flex but it doesn't seem so easy through my research.
    Thanks for your help though.

  • In Struts is it possible to use java code  in jsp?

    in Struts Tag Program in jsp pages is it efficient to use java code? Please explain?

    No issues.. you can use java code... in jsp struts
    based framework..
    SJYou can use Java code as scriptlets in any JSP, but that doesn't mean there are no issues.
    I would say it's a bad idea for the following reasons:
    (1) Scriptlet code is difficult to read when mingled with HTML
    (2) You can't unit test scriptlet code
    (3) It increases the chance that business logic will leak into pages where it doesn't belong.
    Better to use a well-proven tag library like JSTL or the Struts taglibs and keep all scriptlets out of your JSPs.
    %

Maybe you are looking for

  • My MacBook Pro 10.6.8 stopped recognizing my camera USB

    My MacBook Pro 10.6.8 stopped recognizing my Sony Exmor R Cybershot USB cord when it had been recognizing it and I have no idea what I can do.

  • Namespace Prefix in the Root Element of the variable

    Hi Gurus, We need to call a webservice which requires a namespace prefix at the root elemnt of the xml payload. But as we know that the default behaviour of BPEL removes the prefix so the invoke activity is failing and so we are stuck. I found this t

  • Authenticating the FTP server

    Hi, Can u please send me how to authenticate the FTP server using username/password in Oracle 10g? I need to open the file and write contents after authenticating the FTP server.

  • L/R 2 - Snow Leopard - "Jams": Re-start req'd. - when using Adj. Brush

    When using the Adjustment Brush, in L/R2, quite often L/R jams up (spinning beach ball) & requires a re-start.  ALL editing previously done to that photo disappears and thus the photo needs to be re-edited from the beginning. (Annoying).  Also ALL ad

  • Activate standard badi - prompts for Object Key?

    In SE19 when trying to activate an SAP delivered implementation of a badi I'm prompted for an object key for the implementation class.    fyi  Running ECC6 on Basis 7 kb14. Go to SE19 Display badi FIAA_BW_DELTA_UPDATE Go to environment menu, choose a