Where to write connection code?
Hai,
In Flex,where we have to write the stratus connection code?
Is it outside the script or inside?
you can download some samples to see how to build a application to connect
to stratus.
use
<mx:Script >
<![CDATA[
// action script code here
]]>
</mx:Script>
to write your as3 code
or just
<mx:Script source="yourAScodeFile.as"/>
and write your code in yourAScodeFIle.as.
e.g.
//I don't use debug ver so I use Alert.show() instead of trace();
myapp.mxml
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
creationComplete="connect()">
<mx:Script source="myapp.as"/>
<mx:Button id="conn" label="connect" click="connect"/>
</mx:Application>
myapp.as
import flash.events.NetStatusEvent;
import flash.net.NetConnection;
import mx.controls.Alert;
private const StratusAddress:String = "rtmfp://stratus.adobe.com";
private const DeveloperKey:String = "yourDevelopKey";
private var nc:NetConnection;
private function connect():void
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS,netConnectionHandler);
nc.connect(StratusAddress + "/" + DeveloperKey);
private function netConnectionHandler(event:NetStatusEvent):void
Alert.show(event.info.code,"info code");
Alert.show(nc.nearID,"peer id");
Similar Messages
-
Where to write the code in TMG events
Hi All,
I want to use 05 TMG event.there is so many include programs are there.
In which include i have to write the code.
Please suggest me...
Regards,Raj.Hi Raj,
You can write it inside the Form include i.e LxxxF01., where xxx is the table name.
The other 3 includes are as follows :
1. LxxxI01
2. LxxxO01
3. LxxxTOP
where LxxxI01 and LxxxO01 are used for Process after input and Process before input events resp.
Hope it helps.
Edited by: Rakhi Nair on Oct 5, 2011 10:10 AM -
Where to write the code when the push button is clicked in the screen
I have designed a screen with a push button and a text box
If i click on the push button it should display a value 'hello' in the text box. How to doWhen you are using module pool programming,
handle the push button function code in the PAI module and make sure the text field is updated whenever that function code for push button gets executed.
And one more thing is that make sure you set the next screen to the same screen number because after executing the function code then again it has to go back to the PBO of that screen for displaying the text field.
For inital display, the text field is displayed blank and it is filled when that function code is executed.
Regards,
Balaji Reddy G
Note:Please reward if the answers are helpful -
Hi Experts,
I am new to Adobe forms. I have created a form and I dont know where to write the code for assigning values to the fields. I just want to send a internal table via interface and i want to retrive internal table values and I want to assign it individually to the fields in the adobe form. Can tell where to go for source code editor.
Thanks and regards,
Venkat.Hi Venkat,
There are two parts you need to do:
1) On the form design you need to specify a data binding for a form field. A data binding points to a node/several nodes of the data structure provided through the data view. So usually there is no scripting in the form for this purpose.
2) During runtime data has to be retrieved. This works different in different environments like FP or Web Dynpro and is usually ABAP code (Java for Web Dynpro Java).
You can find a lot of information if you go to the Interactive Forms section on SDN.
Regards,
Juergen -
Where to write Database access logic
I am new to Webdynpro. Could anyone please let me know where to write the code to access database. Is it right to write it in iview or component controller.
Hi Sudhir
Webdynpro works on MVC architecture .So there can be three approaches
1) Create Java Bean Model
Importing Complex JavaBean model into WebDynpro by creating relationships for the model classes
WebDynpro: Importing Java Classes as model
2)Can call create the database in the Controller and view
3) you can use a java file and copy the same in the wdproject>src->package--> java file and then access the java methods.
Thanx
Pankaj -
Where i shall write html code in jdeveloper
Hello,
please tell me where i can write html code in jdeveloper.
ThanksHi catalina,
Html tags should not be used directly inside ADF faces pages which may lead to some undesirable results instead you can use ADF Faces tags itself using which you can do what ever you wanted to do with html tags.
If you still need to use html tags, you can use ADF Faces html tags.
Tag doc: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/html/index.html
Sireesha -
I am a java beginner. i need to know which interface i can use to write java code
Hi ,
u can write java code in many places
notepad,
edit plus ,
eclipse ,
netbeans ,
NWDS (in j2ee perspective thisis for sap side )
all the thing u need to install jdk first ...
set your class path .
go to command promt -> type cmd
ur command prompt opens .
open note pad write some code
execute in command promt by typing javac abc.java
i fno errors type java abc
ur code will be executed and result displayed
regards ,
venkat p -
Generic database connection code
Hi,
I want to write a code from which I can get the connection for any database. For that i have a properties file in which connection details are declared.
----------------Proerpties file for oracle ---------------
driverClass=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin
user=admin
password=admin
server=oracleserver
port=1521
db=testdb
----------------Proerpties file for sql server ---------------
driverClass=com.microsoft.jdbc.sqlserver.SQLServerDriver
url=jdbc:microsoft:sqlserver
user=admin
password=admin
server=sqlserver
port=1433
db=testdb
----------------Java code ---------------
Properties info = // code to read the above properties file as properties
String driverClass = (String)info.remove("driverClass");
String url = (String)info.remove("url");
Connection connection;
try
//Get Driver
Class.forName(driverClass).newInstance();
//Get Connection
connection = DriverManager.getConnection(url, info);
return connection;
catch(....)
{}Now code does not work for both oracle and sqlserver. Whether the url needs to be modified? I know that if I delcare everything in url it would work, but I would not like to do that. Is it not possible to write a generic code which would work on any database? If yes how?
Can anyone help me?
ThanksThe thing is, that you have to handle oracle a little bit different in the
URL-Part:
String url;
String databasePort; // where your RDBMS is listening
String database; // the name of your database / instance
// ORACLE speciality
url = url + user + "/" + password + "@" + host + ":" + databasePort + ":" + database;
// EMPRESS speciality
url = url + "/SERVER=" + host + ";PORT=" + databasePort + ";DATABASE=" + database;
// Standard JDBC things (whatever standard means)
url = url + host + ":" + databasePort + "/" + database;
Next thing is, that you have to handle the getConnection different:
ORACLE: con = DriverManager.getConnection(url);
EMPRESS: con = DriverManager.getConnection(url,user,password);
Standard:
Properties p = new Properties();
p.put("user",user);
p.put("password",password);
con = DriverManager.getConnection(url,p);
Please be aware, that there are some products, not listening onto a port,
so you have to take this also into consideration. -
Hi,
I have a internal table T. when the t-zuonr is blank, the ALV look like:
t-zuonr document no data
200630303 AB 2007.08.31
200627855 AB 2007.06.30
200627887 AB 2007.06.30
MSFT047/07 93631164 RV 2007.10.19
MSFT061/07 93594484 RV 2007.10.09
MSFT061/07 93594485 RV 2007.10.09
MSFT061/07 93594486 RV 2007.10.09
MSFT061/07 93594487 RV 2007.10.09
MSFT061/07 93594488 RV 2007.10.09
MSFT061/07 93594489 RV 2007.10.09
MSFT061/07 93594490 RV 2007.10.09
*I need to not show the company which t-zuonr is space.
How can I write the code?*
The original source code is as following:
SORT t.
LOOP AT t.
AT NEW bukrs.
CLEAR anz_dl.
CLEAR htext-anzahl.
CLEAR htext-datei.
htext-text1 = ' records writen in file '.
CLEAR p_pfad.
CONCATENATE
i_pfad
'CU_CC'
t-bukrs
sy-datum+6(2)
sy-datum+4(2)
sy-datum(4)
sy-uzeit
'.txt'
INTO p_pfad.
CLEAR outtab.
REFRESH outtab.
REFRESH: gt_outalv. "INS MG020207
ENDAT.
IF t-shkzg = 'H'.
h_betrg = t-wrbtr * -1.
ELSE.
h_betrg = t-wrbtr.
h_dmbtr = t-dmbtr.
ENDIF.
s-filler1 = s-filler2 = s-filler3 = s-filler4 = s-filler5 = ';'.
s-filler6 = s-filler7 = s-filler8 = ';'.
s-filler9 = s-filler10 = s-filler11 = s-filler12 = s-filler13 = ';'.
s-filler14 = ';'.
s-belnr = t-belnr.
IF t-xblnr NE space. "WD041005a
s-xblnr = t-xblnr. "WD041005a
ELSE. "WD041005a
s-xblnr = t-belnr. "WD041005a
ENDIF. "WD041005a
WHILE s-xblnr(1) EQ '0'. "INS MG130606
SHIFT s-xblnr LEFT. "INS MG130606
ENDWHILE. "INS MG130606
*<<< CR01 CHANGE START BY LI_Y 2008/01/10
IF t-waers = 'JPY'.
h_dmbtr = h_dmbtr.
else.
h_dmbtr = h_dmbtr * 100.
endif.
*>>> CR01 CHANGE END BY LI_Y 2008/01/10
WRITE t-kunnr TO s-kunnr NO-ZERO.
s-lifn2 = s-kunnr.
shift s-lifn2 RIGHT.
s-lifn2(1) = 'R'.
S-KUNNR = T-KUNNR+5(5).
s-bldat+2(1) = '/'.
s-bldat+5(1) = '/'.
s-bldat0(2) = t-bldat4(2).
s-bldat3(2) = t-bldat6(2).
s-bldat6(4) = t-bldat0(4).
s-budat+2(1) = '/'.
s-budat+5(1) = '/'.
s-budat0(2) = t-budat4(2).
s-budat3(2) = t-budat6(2).
s-budat6(4) = t-budat0(4).
s-netdt+2(1) = '/'.
s-netdt+5(1) = '/'.
s-netdt0(2) = t-netdt4(2).
s-netdt3(2) = t-netdt6(2).
s-netdt6(4) = t-netdt0(4).
s-waers = t-waers.
s-dmbtr = t-dmbtr.
s-sgtxt = t-sgtxt.
CLEAR s-twaer.
SELECT SINGLE waers INTO s-twaer
FROM t001
WHERE bukrs = t-bukrs.
IF h_betrg < 0.
hs_betrg+0(1) = '-'.
ELSE.
hs_betrg+0(1) = ' '.
ENDIF.
WRITE h_betrg CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
NO-SIGN
LEFT-JUSTIFIED.
REPLACE ',' WITH '.' INTO hs_betrg.
WRITE hs_betrg TO s-betrg.
IF h_dmbtr < 0.
hs_betrg+0(1) = '-'.
ELSE.
hs_betrg+0(1) = ' '.
ENDIF.
WRITE h_dmbtr CURRENCY t-waers TO hs_betrg+1 NO-GROUPING
NO-SIGN
LEFT-JUSTIFIED.
REPLACE ',' WITH '.' INTO hs_betrg.
WRITE hs_betrg TO s-dmbtr.
s-compcode = t-bukrs. "fw070905
IF p_downl = 'X'.
MOVE s TO outtab-s.
APPEND outtab.
ADD 1 TO anz_dl.
ENDIF.
gs_outalv-belnr = s-belnr. "INS MG020207
*<<<< CR01 START CHANGE BY LI_Y 2007/12/24 " ADD as_outalv-zuonr
gs_outalv-zuonr = s-zuonr. "CR01
*>>>> CR01 EDD CHANGE BY LI_Y 2007/12/24 "ADD as_outalv-zuonr
gs_outalv-kunnr = s-kunnr. "INS MG020207
gs_outalv-bldat = s-bldat. "INS MG020207
gs_outalv-netdt = s-netdt. "INS MG020207
gs_outalv-betrg = s-betrg. "INS MG020207
gs_outalv-waers = s-waers. "INS MG020207
gs_outalv-compcode = s-compcode. "INS MG020207
gs_outalv-budat = s-budat. "INS MG020207
gs_outalv-sgtxt = s-sgtxt.
gs_outalv-kmmnt = s-kmmnt.
gs_outalv-vbeln = s-vbeln.
gs_outalv-xblnr = s-xblnr.
gs_outalv-lifn2 = s-lifn2.
gs_outalv-dmbtr = s-dmbtr.
gs_outalv-twaer = s-twaer.
APPEND gs_outalv TO gt_outalv. "INS MG020207
AT END OF bukrs.
WRITE anz_dl TO htext-anzahl.
WRITE p_pfad TO htext-datei.
CONDENSE htext.
*<<<< CR01 START CHANGE BY LI_Y 2007/12/24
WA_SORT-fieldname = 'BELNR'. " speicfy field name..
WA_SORT-UP = 'X'.
WA_SORT-SUBTOT = 'X'.
APPEND WA_SORT TO I_SORT.
Thank you!!Hi,
Do this. Declare another internal table of identical structure as table t say t1.
REFRESH t1.
APPEND LINES OF t TO t1.
DELETE t1 WHERE zuonr IS INITIAL.
and then use t1 to display the ALV.
Hope this helps.
Regards,
Aditya -
How can i write the code in xml publisher desktop
hi all
How and where can i write the code in xml publisher desktop ???
shall i know how to write xml code or what ??
in which part can i write the code if i have more than one query ?hi dear
Thanks for ur replay...
What i mean is : i used to work on reports builder,so :
1- i used to create more than query in some reports.
2- create formulas ,procedures....
NOW i want to create the same reports by using xml publisher desktop, so how can i do that...
when i use {color:#ff0000}report wizard{color}, i can not or i don`t know how to use more than one query, create formulas or procedures.
Please help me.
Thanks again. -
How can I write HTML code in this forums
Sorry but I didn't know where to post this thread.....
How can I write HTML code in this forums?Hello,
Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
In case of the <a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
Hope this helps,
Arie. -
Access 2013 Read/Write Connection on 365
Have web tables all set up on 365 account. Have set the connection management to Read/Write. But I can't figure out how to link to them from a desktop Access app.
From within the desktop app if I use the External Data tab - to link to them - attempting the Sharepoint Lists - - - the tables don't appear. Am pretty sure because the web tables on 365 are not Sharepoint Lists.
Have searched on this for awhile and am not finding instructions anywhere. ... One can get a Reporting desktop app set up with a single button but it is read only......sure wish it was this easy for read/write.....
Appreciate any help......It still possible to use a 2010 web application in 2013 that is using SharePoint tables, so some confusing here is legitimate.
In your case as you WELL note you using 2013, and thus as you WELL note it makes no sense to look for tables in SharePoint when clearly that is not where they reside.
To find the connection string in the web application just go file.
You see your application name, and below that
Data Connectivity
In that you see the server name, and the database name. You can use your 365 Account as the logon + password.
However, for a read/write? In the above area, click on "manage" beside the connections.
In the list of options for connections such as "From any location", and the "Enable Read-write" connections, there is an option called:
View Read-Write Connection Information
Click on the above option. This will result in a dialog box that gives you database name, and the user + password required to link to that database in read/write mode.
So you simply create a regular plane Jane desktop database. You then choose external data and then choose ODBC. This will let you create a link to SQL server. How this works much the same as it always has in Access (more then 16+ years). You
then type in the correct server + user information from above web application.
I do think you need to choose the new ODBC 11 (Native sql server driver) for this to work. So, don't choose SQL from the list of drivers, but choose the new native or ODBC 11 drivers when setting up the ODBC connection from Access.
Best regards,
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada -
Urgent: Where to write HFM API objects coding in consolidation?
Hi,
I want to write a code on HsvProcessFlow library object to make some customized changes. But wondering where should i write this code. Is rules editor is the place where i should write the code. Please help me on this.
Regards,
ArvindHi,
I want to write a code on HsvProcessFlow library object to make some customized changes. But wondering where should i write this code. Is rules editor is the place where i should write the code. Please help me on this.
Regards,
Arvind -
Where to write default search message
Hi guys
I am searching a long to find where to write default search message on site search module.
http://webmar.businesscatalyst.com/index
When user click on the GO button next to the search box site search module must show a default message like your search box is empty, you search box is blank etc,.. but where do i wirte the default message in bc.
Thanks
Andy<input id="field" type="text" onfocus="if(this.value == 'Search ...') { this.value = ''; }" onblur="if(this.value == '') { this.value = 'Search ...'; }" value="Search ..." name="CAT_Search">
Try this code where your search box is. you can see how that code works on my site at http://www.lawryk.com
Message was edited by: Brad Lawryk -
Where to write script in Empirix E-Tester
Hi, I am new to Empirix e-tester funtional testing tool,
Any one explain me where to write script in the e-teser like we write script in QTP's expertview and how to run the scripts.
Which is the scripting language we can use in e-tester.Setting up Conditional Routing is a two-step process involving the definition of the design logic and the configuration of the behavior data. These two setups are done in uDesigner and Unifier/uStage, respectively.
uDesigner setup requires the following:
Add a condition to your workflow in the uDesigner editor. Using this action creates a diamond that will be inserted into your workflow.
Connect your diamond with lines to three steps: the step from which you want to create conditional routing and two steps to which your conditional routing will go.
Definte the Condition Name and Record Status for the two steps to which your condition routing will go. This definition is considered the 'Condition Properties' and can allow you to do some other design-driven behavior such as auto-creating records or capturing information based on conditional data.
Define the Trigger Elements in the Step Properties for the two steps to which your conditions will go.
Unifier/uStage setup requires the following:
Open the Workflow Setup Settings for your BP
Define Trigger Element values [data] for each Trigger Element
This type of separation of design logic and data configuration between uDesigner and Unifier/uStage is an important philosophy that is consistent throughout Unifier. In essence, the 'logic' - whether Conditional Routing should occur and what data element(s) will drive it - is defined in uDesigner while the detailed execution - the data captured in those elements such as the $ value - in Unifier/uStage.
Hope that helps! Let me know if you need some further clarification.
-JV
Maybe you are looking for
-
Does anyone know how to set up 2 iphones on iCloud?
Does anyone know how to set up 2 iphones on iCloud using just one macbook pro whilst keeping contacts, iTunes etc separate? My wife and I both have a new iPhone 4s but want to keep everything seperate. Many Thanks
-
The battery on my iPod touch has been acting very weird and I don't know why. I just got this iPod two weeks ago for christmas. When the battery gets down to half a battery, weird things start to happen. The battery drops 15,20,25% in the matter of m
-
HOW toMove books from computer to i-tunes
What are we missing? We have downloaded a book from Simplyaudiobooks. It is in a file on the desktop. Opening i-tunes and selecting file->add file to library, then selecting the book file fails to move or put the book into i-tunes. Yes, the book wa
-
Best solution for data availability for end users --- reverse redirected folder and roaming profile
Roaming profiles and redirected folders do not seem to work for our environment. They often become troublesome and cause much help desk time and resources. Is there a way to have a roaming profile and redirected folder configuration however have the
-
Is boot camp 5 and OS X 10.9 compatible with Windows 8
I recently bought the new iMac 27" (Late 2013) with following spec: Intel I7 3.5 GHz 16 Gb RAM 3TB Fusion Drive GTX 780M GPU (4G) I have been trying to use boot camp 5 and install Windows 8 on it so I can run work programs on the new iMac. Re