Need help with Link passed from XML
This is to create a flash driven navigation menu. What I have
is a coldfusion page that serves a simple XML formatted page. There
are 3 XML components, linkLabel, linkURL and linkType. The label
just passes text, the type is just a number 0-9 that is used to
determine the style of the button. The linkURL that is passed from
coldfusion comes across encoded for XML, so what I end up with is
url's that replace "&" with ";amp;".
So my question is this, is there an easy way in the
actionscript to replace the ";amp;" with "&"? Other than that
little problem, the rest of the script runs just fine, I just can't
seem to find the syntax I'm looking for to replace items in a
string. I saw the code for replacesel() but this doesn't seem to do
it, unless i'm writing it wrong.
Just in case you want something similar in future:
string = string.split("&").join("&");
is an easy way to replace something in a string (here
'&' gets replaced with '&').
greets,
blemmo
Similar Messages
-
Need help with generating keys from xml
Hello,
I am just learning about JCE and am haveing some problems with implementing a basic program.
I have the following information:
<RSAKeyValue>
<Modulus>Base64EncodedString</Modulus>
<Exponent>Base64EncodedString</Exponent>
<P>Base64EncodedString</P>
<Q>Base64EncodedString</Q>
<DP>Base64EncodedString</DP>
<DQ>Base64EncodedString</DQ>
<InverseQ>Base64EncodedString</InverseQ>
<D>Base64EncodedString</D>
</RSAKeyValue>
From which I need to construct a public and private key. I am using RSA algorithm for the encrypting and decrypting. I am using the org.bouncycastle.jce.provider.BouncyCastleProvider provider. Any help would be greatly appreciated.
My questions are:
1) Is it possible to create the public and private key from this data?
2) How can I construct a public and private key from this data.
Thank you in advance.
Sunit.Thanks for your help...I am still having problems.
I am now creating the public and private keys. I am generating the public exp, modulus, private exp, and the encrypted text from another source.
so my questions are:
1) How do I verfiy that the private and public keys that I generate are valid?
2) How do I get the decrypted text back in a readable form?
3) the decrypted text should read "ADAM"
Here is a test I wrote:
_________________STARTCODE_____________________
import java.security.*;
import java.security.spec.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.math.BigInteger;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
public class CryptTester
protected Cipher encryptCipher = null;
protected Cipher decryptCipher = null;
private KeyFactory keyFactory = null;
protected PublicKey publicKey = null;
protected PrivateKey privateKey = null;
private RSAPublicKeySpec publicKeySpec = null;
private RSAPrivateKeySpec privateKeySpec = null;
public CryptTester()
/* Create Cipher for asymmetric encryption (
* e.g., RSA),
try
encryptCipher = Cipher.getInstance("RSA", "BC");
System.out.println("Successfully got encrypt Cipher" );
decryptCipher = Cipher.getInstance("RSA", "BC");
System.out.println("Successfully got decrypt Cipher" );
keyFactory = KeyFactory.getInstance("RSA" , "BC");
System.out.println("Successfully got keyFactory" );
}catch ( NoSuchAlgorithmException nsae)
System.out.println("Exception1: " + nsae.toString() );
catch ( NoSuchPaddingException nspe)
System.out.println("Exception2: " + nspe.toString() );
catch ( java.security.NoSuchProviderException nspe)
System.out.println("Exceptiont6: " + nspe.toString() );
/* Get the private and public keys specs
BigInteger publicMod = new BigInteger ("86e0ff4b9e95bc6dcbfd6673b33971d4f728218496adcad92021923a9be815ddb7ecf17c06f437634c62fa999a293da90d964172a21d8ce74bd33938994fbd93377f7d83ce93d523782639c75221a3c91b53927a081b2b089a61770c6d112d78d5da8a6abc452d39a276787892080d6cf17dd09537c1ec5551d89567345068ef", 16);
BigInteger publicExp = new BigInteger ("5");
BigInteger privateExp = new BigInteger ("50ed65fa2bf3710ead980a456b88dde62de4e0e9", 16);
publicKeySpec = new java.security.spec.RSAPublicKeySpec( publicMod, publicExp );
privateKeySpec = new java.security.spec.RSAPrivateKeySpec( publicMod, privateExp);
try
privateKey = keyFactory.generatePrivate(privateKeySpec);
publicKey = keyFactory.generatePublic(publicKeySpec);
}catch ( InvalidKeySpecException ivse)
System.out.println("Exception3: " + ivse.toString() );
try
* initialize it for encryption with
* recipient's public key
encryptCipher.init(Cipher.ENCRYPT_MODE, publicKey );
decryptCipher.init(Cipher.DECRYPT_MODE, privateKey );
}catch ( InvalidKeyException ivse)
System.out.println("Exception4: " + ivse.toString() );
public String getPublicKey()
//return new String(publicKey.getEncoded());
return publicKey.toString();
public String getPrivateKey()
// return new String(privateKey.getEncoded());
return privateKey.toString();
public String encryptIt(String toencrypt)
* Encrypt the message
try
byte [] result = null;
try
result = encryptCipher.doFinal(toencrypt.getBytes());
catch ( IllegalStateException ise )
System.out.println("Exception5: " + ise.toString() );
return new String(result);
}catch (Exception e)
e.printStackTrace();
return "did not work";
public String decryptIt(String todecrypt)
* decrypt the message
try
byte [] result = null;
try
result = decryptCipher.doFinal(todecrypt.getBytes());
catch ( IllegalStateException ise )
System.out.println("Exception6: " + ise.toString() );
return new String(result);
}catch (Exception e )
e.printStackTrace() ;
return "did not work";
public static void main(String[] args)
try
Security.addProvider(new BouncyCastleProvider());
CryptTester tester = new CryptTester();
String encrypted = "307203c3f5827266f5e11af2958271c4";
System.out.println("Decoding string " + encrypted + "returns : " + tester.decryptIt(encoded) );
} catch (Exception e)
e.printStackTrace();
_________________ENDPROGRAM_____________________ -
I need help with a download from Adobe
I need help with Adode photoshop elements that I bought from Adobe. The download take forever. I can't get signed in very easy. It take forever
Hi Kathy1963-1964,
Welcome to Adobe Forum,
You have photoshop elements 12, you can try downloading without the akamei downloader .
http://prodesigntools.com/photoshop-elements-12-direct-download-links-premiere.html
Please read the " very important instruction" prior to downoload.
I would request you to disable the firewall & the antivirus prior to download.
Let us know if it worked.
Regards,
Rajshree -
Need help in automating text from xml into illustrator
I have seen some examples of automation script for filling text from xml into illustrator, need some help in this matter.
Need script (currently working in mac OS)Firefox doesn't do email, it's a web browser.
If you are using Firefox to access your mail, you are using "web-mail". You need to seek support from your service provider or a forum for that service.
If your problem is with Mozilla Thunderbird, see this forum for support.
[http://www.mozillamessaging.com/en-US/support/] <br />
or this one <br />
[http://forums.mozillazine.org/viewforum.php?f=39] -
Need help with my HttpConnection From Midlet To Servlet...
NEED HELP ASAP PLEASE....
This class is supposed to download a file from the servlet...
the filename is given by the midlet... and the servlet will return the file in bytes...
everything is ok in emulator...
but in nokia n70... error occurs...
Http Version Mismatch shows up... when the pout.flush(); is called.. but when removed... java.io.IOException: -36 occurs...
also i have posted the same problem in nokia forums..
please check also...
http://discussion.forum.nokia.com/forum/showthread.php?t=105567
now here are my codes...
midlet side... without pout.flush();
public class DownloadFile {
private GmailMidlet midlet;
private HttpConnection hc;
private byte[] fileData;
private boolean downloaded;
private int lineNumber;
// private String url = "http://121.97.220.162:8084/ProxyServer/DownloadFileServlet";
private String url = "http://121.97.221.183:8084/ProxyServer/DownloadFileServlet";
// private String url = "http://121.97.221.183:8084/ProxyServer/Attachments/mark.ramos222/GmailId111d822a8bd6f6bb/01032007066.jpg";
/** Creates a new instance of DownloadFile */
public DownloadFile(GmailMidlet midlet, String fileName) throws OutOfMemoryError, IOException {
System.gc();
setHc(null);
OutputStream out = null;
DataInputStream is= null;
try{
setHc((HttpConnection)Connector.open(getUrl(), Connector.READ_WRITE));
} catch(ConnectionNotFoundException ex){
setHc(null);
} catch(IOException ioex){
ioex.printStackTrace();
midlet.alertScreen = new AlertScreen("Error C1", ioex.toString(),
null, AlertType.ERROR);
midlet.alertScreen.setTimeout(Alert.FOREVER);
midlet.display.setCurrent(midlet.alertScreen);
try {
if(getHc() != null){
getHc().setRequestMethod(HttpConnection.POST);
getHc().setRequestProperty("Accept","*/*");
getHc().setRequestProperty("Http-version","HTTP/1.1");
lineNumber = 1;
getHc().setRequestProperty("CONTENT-TYPE",
"text/plain");
lineNumber = 2;
getHc().setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.1");
lineNumber =3;
out = getHc().openOutputStream();
lineNumber = 4;
PrintStream pout = new PrintStream(out);
lineNumber = 5;
pout.println(fileName);
lineNumber = 6;
// pout.flush();
System.out.println("File Name: "+fileName);
lineNumber = 7;
is = getHc().openDataInputStream();
long len = getHc().getLength();
lineNumber = 8;
byte temp[] = new byte[(int)len];
lineNumber = 9;
System.out.println("len "+len);
is.readFully(temp,0,(int)len);
lineNumber = 10;
setFileData(temp);
lineNumber = 11;
is.close();
lineNumber = 12;
if(getFileData() != null)
setDownloaded(true);
else
setDownloaded(false);
System.out.println("Length : "+temp.length);
midlet.setAttachFile(getFileData());
lineNumber = 13;
pout.close();
lineNumber = 14;
out.close();
lineNumber = 15;
getHc().close();
} catch(Exception ex){
setDownloaded(false);
ex.printStackTrace();
midlet.alertScreen = new AlertScreen("Error C2+ line"+lineNumber,
ex.toString()+
" | ",
null, AlertType.ERROR);
midlet.alertScreen.setTimeout(Alert.FOREVER);
midlet.display.setCurrent(midlet.alertScreen);
public HttpConnection getHc() {
return hc;
public void setHc(HttpConnection hc) {
this.hc = hc;
public String getUrl() {
return url;
public void setUrl(String url) {
this.url = url;
public byte[] getFileData() {
return fileData;
public void setFileData(byte[] fileData) {
this.fileData = fileData;
public boolean isDownloaded() {
return downloaded;
public void setDownloaded(boolean downloaded) {
this.downloaded = downloaded;
}this is the midlet side with pout.flush();
showing Http Version Mismatch
public class DownloadFile {
private GmailMidlet midlet;
private HttpConnection hc;
private byte[] fileData;
private boolean downloaded;
private int lineNumber;
// private String url = "http://121.97.220.162:8084/ProxyServer/DownloadFileServlet";
private String url = "http://121.97.221.183:8084/ProxyServer/DownloadFileServlet";
// private String url = "http://121.97.221.183:8084/ProxyServer/Attachments/mark.ramos222/GmailId111d822a8bd6f6bb/01032007066.jpg";
/** Creates a new instance of DownloadFile */
public DownloadFile(GmailMidlet midlet, String fileName) throws OutOfMemoryError, IOException {
System.gc();
setHc(null);
OutputStream out = null;
DataInputStream is= null;
try{
setHc((HttpConnection)Connector.open(getUrl(), Connector.READ_WRITE));
} catch(ConnectionNotFoundException ex){
setHc(null);
} catch(IOException ioex){
ioex.printStackTrace();
midlet.alertScreen = new AlertScreen("Error C1", ioex.toString(),
null, AlertType.ERROR);
midlet.alertScreen.setTimeout(Alert.FOREVER);
midlet.display.setCurrent(midlet.alertScreen);
try {
if(getHc() != null){
getHc().setRequestMethod(HttpConnection.POST);
getHc().setRequestProperty("Accept","*/*");
getHc().setRequestProperty("Http-version","HTTP/1.1");
lineNumber = 1;
getHc().setRequestProperty("CONTENT-TYPE",
"text/plain");
lineNumber = 2;
getHc().setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.1");
lineNumber =3;
out = getHc().openOutputStream();
lineNumber = 4;
PrintStream pout = new PrintStream(out);
lineNumber = 5;
pout.println(fileName);
lineNumber = 6;
pout.flush();
System.out.println("File Name: "+fileName);
lineNumber = 7;
is = getHc().openDataInputStream();
long len = getHc().getLength();
lineNumber = 8;
byte temp[] = new byte[(int)len];
lineNumber = 9;
System.out.println("len "+len);
is.readFully(temp,0,(int)len);
lineNumber = 10;
setFileData(temp);
lineNumber = 11;
is.close();
lineNumber = 12;
if(getFileData() != null)
setDownloaded(true);
else
setDownloaded(false);
System.out.println("Length : "+temp.length);
midlet.setAttachFile(getFileData());
lineNumber = 13;
pout.close();
lineNumber = 14;
out.close();
lineNumber = 15;
getHc().close();
} catch(Exception ex){
setDownloaded(false);
ex.printStackTrace();
midlet.alertScreen = new AlertScreen("Error C2+ line"+lineNumber,
ex.toString()+
" | ",
null, AlertType.ERROR);
midlet.alertScreen.setTimeout(Alert.FOREVER);
midlet.display.setCurrent(midlet.alertScreen);
public HttpConnection getHc() {
return hc;
public void setHc(HttpConnection hc) {
this.hc = hc;
public String getUrl() {
return url;
public void setUrl(String url) {
this.url = url;
public byte[] getFileData() {
return fileData;
public void setFileData(byte[] fileData) {
this.fileData = fileData;
public boolean isDownloaded() {
return downloaded;
public void setDownloaded(boolean downloaded) {
this.downloaded = downloaded;
}here is the servlet side...
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
if(request.getMethod().equals("POST")){
BufferedReader dataIN = request.getReader();
String fileName = dataIN.readLine();
File file = new File(fileName);
String contentType = getServletContext().getMimeType(fileName);
response.setContentType(contentType);
System.out.println("Content Type: "+contentType);
System.out.println("File Name: "+fileName);
int size = (int)file.length()/1024;
if(file.length() > Integer.MAX_VALUE){
System.out.println("Very Large File!!!");
response.setContentLength(size*1024);
FileInputStream fis = new FileInputStream(fileName);
byte data[] = new byte[size*1024];
fis.read(data);
System.out.println("data lenght: "+data.length);
ServletOutputStream sos = response.getOutputStream();
sos.write(data);
// out.flush();
}else{
response.setContentType("text/plain");
PrintWriter out = response.getWriter();
BufferedReader dataIN = request.getReader();
String msg_uid = dataIN.readLine();
System.out.println("Msg_uid"+msg_uid);
JDBConnection dbconn = new JDBConnection();
String fileName = dbconn.getAttachment(msg_uid);
String[] fileNames = fileName.split(";");
int numFiles = fileNames.length;
out.println(numFiles);
for(int i = 0; i<numFiles; i++){
out.println(fileNames);
out.flush();
out.close();
Message was edited by:
Mark.Ramos2221) Have you looked up the symbian error -36 on new-lc?
2) Have you tried the example in the response on forum nokia?
3) Is the address "121.97.220.162:8084" accessible from the internet, on the device, on the specified port? -
Need help scrolling dynamic content from XML
I am trying to make a photo gallery and I have succeed in
importing the pictures from XML into Flash. There are still two
problems:
1. The content is loading into a movieclip and I tried to
place a scroll pane on the stage to adding scrolling capabilities.
I set the parameters to control the movieclip that holds the
thumbnails but it is not making a scroll bar. I can see the
pictures inside of the scroll pane but it will not scroll to show
the rest of the pictures.
2. I can not figure out how to space the thumbnails evenly. I
made a variable and multiplied the x position of each picture by it
but there are large differences between landscape and portrait
pictures.
Thanks for the helpYou need to switch from using loadMovie to using the
MovieClipLoader object. This object has a listener called
"onLoadInit" that allows you to get the size of your photo when it
comes in, but before it appears on stage, so that you can adjust
its placement. Check out the help docs for info on usage.
WL -
I need help with viewing files from the external hard drive on Mac
I own a 2010 mac pro 13' and using OS X 10.9.2(current version). The issue that I am in need of help is with my external hard drive.
I am a photographer so It's safe and convinent to store pictures in my external hard drive.
I have 1TB external hard drive and I've been using for about a year and never dropped it or didn't do any thing to harm the hardware.
Today as always I connected the ext-hard drive to my mac and click on the icon.
All of my pictures and files are gone accept one folder that has program.
So I pulled up the external hard drive's info it says the date is still there, but somehow i can not view them in the finder.
I really need help how to fix this issue!you have a notebook, there is a different forum.
redundancy for files AND backups, and even cloud services
so a reboot with shift key and verify? Recovery mode
but two or more drives.
a backup, a new data drive, a drive for recovery using Data Rescue III
A drive can fail and usually not if, only when
and is it bus powered or not -
I need help with a migration from Exchange 2010 to 2007
Hi All,
I need help migrating mailboxes from a separate forest / domain using exchange 2010 to our Exchange 2007 SP3 servers.. I am following this procedure:
1. On source server, create a mailbox user, test01.
2. On target server, run the following command to move the AD account:
Prepare-MoveRequest.Ps1 -Identity [email protected] -RemoteForestDomainController FQDN.source.com -RemoteForestCredential $Remote -LocalForestDomainController FQDN.target.com -LocalForestCredential $Local -UseLocalObject -Verbose"
3. Run the ADMT to migrate the password and SID history.
4. Run the following command to move the mailbox:
New-MoveRequest -Identity '[email protected]' -RemoteLegacy -RemoteTargetDatabase DB03 -RemoteGlobalCatalog 'GC01.humongousinsurance.com' -RemoteCredential $Cred -TargetDeliveryDomain 'mail.contoso.com'
(Changed all the details obviously)
It gets to 95% and shows this error
01/12/2014 12:47:24 [EX2K10] Fatal error UpdateMovedMailboxPermanentException has occurred.
Error details: An error occurred while updating a user object after the move operation. --> Active Directory operation failed on DC.DC.COM . This error is not retriable. Additional information: The parameter is incorrect.
Active directory response: 00000057: LdapErr: DSID-0C090A85, comment: Error in attribute conversion operation, data 0, vece --> The requested attribute does not exist.
at Microsoft.Exchange.MailboxReplicationService.LocalMailbox.Microsoft.Exchange.MailboxReplicationService.IMailbox.UpdateMovedMailbox(UpdateMovedMailboxOperation op, ADUser remoteRecipientData, String domainController, ReportEntry[]& entries,
Guid newDatabaseGuid, Guid newArchiveDatabaseGuid, String archiveDomain, ArchiveStatusFlags archiveStatus)
at Microsoft.Exchange.MailboxReplicationService.MailboxWrapper.<>c__DisplayClass3c.<Microsoft.Exchange.MailboxReplicationService.IMailbox.UpdateMovedMailbox>b__3b()
at Microsoft.Exchange.MailboxReplicationService.ExecutionContext.Execute(GenericCallDelegate operation)
at Microsoft.Exchange.MailboxReplicationService.MailboxWrapper.Microsoft.Exchange.MailboxReplicationService.IMailbox.UpdateMovedMailbox(UpdateMovedMailboxOperation op, ADUser remoteRecipientData, String domainController, ReportEntry[]& entries,
Guid newDatabaseGuid, Guid newArchiveDatabaseGuid, String archiveDomain, ArchiveStatusFlags archiveStatus)
at Microsoft.Exchange.MailboxReplicationService.RemoteMoveJob.UpdateMovedMailbox()
at Microsoft.Exchange.MailboxReplicationService.MoveBaseJob.UpdateAD(Object[] wiParams)
at Microsoft.Exchange.MailboxReplicationService.CommonUtils.CatchKnownExceptions(GenericCallDelegate del, FailureDelegate failureDelegate)
Error context: --------
Operation: IMailbox.UpdateMovedMailbox
OperationSide: Target
Primary (b5373e49-6a06-41f4-990e-27807c7a57f3)
01/12/2014 12:47:24 [EX2K10] Relinquishing job.
Any ideas what i can do about this?Hi,
From your description, I recommend you follow the steps below for troubleshooting:
Open the problematic user in AD and check the Email Address. Verify if you can open or edit the x400 address. If no, remove the x400 address and recreate it. If yes, ensure that the name is spelt correctly. After that, continue to move the mailbox and check
the result.
Hope this can be helpful to you.
Best regards,
Amy Wang
TechNet Community Support -
Need help with linked lists.
I have a school assignment to make a linked list with a linked list.
The first basic is to make a list of people, and link them together in a linked list. So far, so good.
The problem comes when I'm going to make linked lists in each of these objects that include the relationships between the people in it.
So If I have 10 peolpe in a list, person 1 might know person 3, 4 and 8. They will all know person 1 back of course. My problem is that it isn't just one group of friends, person 3 might not know person 4 and 8, but maybe he knows person 10. So all need "their own" list.
Therefor I can't see how I'm supposed to use linked lists for them, as I can't just link them togeter with e.g. "Person nextFriend;" The text says specifically to use linked lists. Well, I'm stuck.
Edited by: Skruf on Jan 27, 2009 3:22 PMSkruf wrote:
I know it doesn't matter what the objects represent, I just needed a way to explain.
But a linked list is basically just a redirect to the next in the list, right?No, a linked list is a particular implementation of a list.
Then I can't see how it's possible to make individual friend lists.No clue what problem you're having.
People with links
null - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - nullThat means nothing.
I can't see how that can be used to make independent links. Do they mean that I'm support to stort it in arrays or something then?
The person list, is (as you can see in my "illustration") only a "next" and "previous" person, so I can't use that way to link the friends together. nextFriend and lastFriend obviously doesn't work.
That's my problemLike I said: A Person object contains a linked list. In that linked list you put references to that Person's friends. -
Need Help with CommandLink Passing rowKeyStr to 2nd JSPX Page
I've been working about 8 hours on something that should be simple - I have a databable displaying rows of data with a simple command link on one of the columns that will send the user to a 2nd page with a single record form showing detailed information for the selected row.
The problems I'm having:
* When I press the commandlink I do not get the correct record on the 2nd page
* Also I'm receiving the following error: JBO-25020: View row of key oracle.jbo.Key[11 ] not found in SearchViewIterator
When I use the af:tableselectone (selection) button to select the row first and then click the commandlink, the 2nd page DOES display the correct row, however I still receive the 25020 error above.
Note I am using the same View Object and Iterator for both pages.
I have compared my code against the SRDemo application and cannot see any differences - I was hoping someone could review my steps to see if I'm missing something (using JSF and ADF BC 10.1.3):
Page 1 JSPX Code Snippet (commandLink / ActionListener):
<af:commandLink actionListener="#{bindings.setCurrentRowWithKey.execute}"
action="viewisp"
text="setCurrentRowWithKey"
disabled="#{!bindings.setCurrentRowWithKey.enabled}">
<af:setActionListener from="#{row.rowKeyStr}"
to="#{processScope.rowKeyStr}"/>
</af:commandLink>
Page 1 JSPX Page Definition File Snippet:
<action id="setCurrentRowWithKey" IterBinding="SearchViewIterator"
InstanceName="SearchDataControl.SearchView"
DataControl="SearchDataControl" RequiresUpdateModel="false"
Action="96">
<NamedData NDName="rowKey" NDValue="#{row.rowKeyStr}"
NDType="java.lang.String"/>
</action>
JSPX Page 2 (destination - single form) - Page Definition Snippet:
<executables>
<iterator id="SearchViewIterator" RangeSize="10" Binds="SearchView"
DataControl="SearchDataControl"/>
<invokeAction id="setCurrentRowWithKeyStr" Binds="setCurrentRowWithKey"
RefreshCondition="#{adfFacesContext.postback==false}"/>
</executables>
<action id="setCurrentRowWithKey" IterBinding="SearchViewIterator"
InstanceName="SearchDataControl.SearchView"
DataControl="SearchDataControl" RequiresUpdateModel="false"
Action="96">
<NamedData NDName="rowKey" NDValue="#{processScope.rowKeyStr}"
NDType="java.lang.String"/>
</action>
Finally - I did see some other posts related to the JBO-25020 error. The recommended Solution was to add the following code to the underlying ViewObjectImpl class:
protected void create()
{ setManageRowsByKey(true);
super.create(); }
This had no affect.
thanks for any help.....
ps what exactly is stored in the row.rowKeyStr? is it based on data columns in the row?Finally got this to work - thought I would post the solution that worked for me here in case anyone else runs into this:
Note: Page#1 = Search Form - ADF parameter form and ADF read-only table (uses CommandLink to pass record to page#2)
Page#2 = ADF read-only form - uses same VO and same iterator as page 1
1. As Frank in his reply above, I don't need to use an ActionListener, but only use the commandlink for navigation. I did need also to set the current row when the user clicks the command link as described in the JDev help (Adding Tables | Setting the Current Object Using a Command Component) - this was a step I was missing before.
2. NOW, here is where it gets Interesting - to avoid the issues of:
a. page#2 not displaying the correct record selected, or, inconsistently displaying the correct record; and/or,
b. receiving a "JBO-25020: View row of key oracle.jbo.Key[num] not found in xxIterator"
I had to EITHER:
A. Set the SyncMode for the DataControl in databindings.cpx = Batch (as described in http://www.oracle.com/technology/products/jdev/tips/muench/batchmode/index.html)
OR,
B. Keep the SyncMode for the DataControl as Immediate, BUT override the following method in ViewObjImpl as described in some previous forum threads related to JBO-25020 error:
protected void create()
{ setManageRowsByKey(true);
super.create(); }
This is what I found (after much trial & error) worked for me - I'm curious to see if others have come to the same conclusions.
thanks
Tom -
Need help with saving item from combobox to textfile
Hi all. right now my codes can only save one stock information in the textfile but when I tried to save another stock in the textfile , it overrides the pervious one.
So I was wondering which part of my codes should be changed??
DO the following
Create a fypgui class and put this bunch of codes inside
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Scanner;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
public class fypgui {
private ArrayList<Stock> stockList = new ArrayList<Stock>();
private String[] stockArray;
private JComboBox choice1;
private JTabbedPane tabbedPane = new JTabbedPane();
private JPanel displayPanel = new JPanel(new GridLayout(5, 1));
private JButton saveBtn = new JButton("Save");
private JPanel choicePanel = new JPanel();
String yahootext;
String symbol;
int index;
public fypgui() {
try {
//read from text file for stockname
File myFile = new File("D:/fyp/savedtext2.txt");
FileReader reader = new FileReader(myFile);
BufferedReader bufferedReader = new BufferedReader(reader);
String line = bufferedReader.readLine();
while (line != null) {
Stock stock = new Stock();
// use delimiter to get name and symbol
Scanner scan = new Scanner(line);
scan.useDelimiter(",");
String name = "";
String symbol = "";
while (scan.hasNext()) {
name += scan.next();
symbol += scan.next();
stock.setStockName(name);
stock.setSymbol(symbol);
stockList.add(stock);
line = bufferedReader.readLine();
//size of the array(stockarray) will be the same as the arraylist(stocklist)
stockArray = new String[stockList.size()];
for (int i = 0; i < stockList.size(); i++) {
stockArray[i] = stockList.get(i).getStockName();
//create new combobox
choice1 = new JComboBox(stockArray);
//For typing stock symbol manually
choice1.setEditable(true);
//set the combobox as blank
choice1.setSelectedIndex(-1);
} catch (IOException ex) {
ex.printStackTrace();
JFrame frame1 = new JFrame("Stock Ticker");
frame1.setBounds(200, 200, 300, 300);
JPanel panel1 = new JPanel();
panel1.add(choice1);
choice1.setBounds(20, 35, 260, 20);
JPanel panel2 = new JPanel();
JPanel panel5 = new JPanel();
panel5.add(saveBtn);
displayPanel.add(panel1);
displayPanel.add(panel5);
tabbedPane.addTab("Choice", displayPanel);
tabbedPane.addTab("Display", choicePanel);
JLabel label2 = new JLabel("Still in Progress!");
choicePanel.add(label2);
frame1.add(tabbedPane);
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame1.setVisible(true);
saveBtn.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
// initalize index as the postion of the stock in the combo box
index = choice1.getSelectedIndex();
/*if the postion of the combobox is not blank,
it will get the StockName and symbol according to the
position and download the stock*/
if(index != -1){
symbol = stockList.get(index).getSymbol();
save(symbol);
@SuppressWarnings("deprecation")
public void save(String symbol){
try {
String part1 = "http://download.finance.yahoo.com/d/quotes.csv?s=";
String part2 = symbol;
String part3 = "&f=sl1d1t1c1ohgv&e=.csv";
String urlToDownload = part1+part2+part3;
URL url = new URL(urlToDownload);
//read contents of a website
InputStream fromthewebsite = url.openStream(); // throws an IOException
//input the data from the website and read the data from the website
DataInputStream yahoodata = new DataInputStream(new BufferedInputStream(fromthewebsite));
// while there is some contents from the website to read then it will print out the data.
while ((yahootext = yahoodata.readLine()) != null) {
File newsavefile = new File("D:/fyp/savedtext.txt");
try {
FileWriter writetosavefile = new FileWriter(newsavefile);
writetosavefile.write(yahootext);
System.out.println(yahootext);
writetosavefile.close();
} catch (IOException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
public static void main(String[] args) {
// TODO code application logic here
new fypgui();
Create a Stock class a put this bunch of codes inside
public class Stock {
String stockName ="";
String symbol="";
double lastDone=0.0;
double change =0.0;
int volume=0;
public String getStockName() {
return stockName;
public void setStockName(String stockName) {
this.stockName = stockName;
public String getSymbol() {
return symbol;
public void setSymbol(String symbol) {
this.symbol = symbol;
public double getLastDone() {
return lastDone;
public void setLastDone(double lastDone) {
this.lastDone = lastDone;
public double getChange() {
return change;
public void setChange(double change) {
this.change = change;
public int getVolume() {
return volume;
public void setVolume(int volume) {
this.volume = volume;
Create a folder called fyp in D drive and create two txt file in it.
-savedtext.txt
-savedtext2.txt
in the saved savedtext2.txt add
A ,AXP
B ,B58.SI
C ,CLQ10.NYM
this is my whole application. if you guys can tell me what can I do to make sure that the stock info doesn't overrides . I will more than thankful.
Edited by: javarookie123 on Jul 9, 2010 9:49 PMjavarookie123 wrote:
Hi all. right now my codes can only save one stock information in the textfile but when I tried to save another stock in the textfile , it overrides.. 'over writes'
..the pervious one.
So I was wondering which part of my codes should be changed??Did not look at the code closely, but I am guessing the problem lies in the instantiation of the FileWriter. Try [this constructor|http://download.oracle.com/docs/cd/E17409_01/javase/6/docs/api/java/io/FileWriter.html#FileWriter(java.io.File,%20boolean)] (<- link). The documentation is a wonderful thing. ;-)
And generally on the subject of getting help:
- There is no need for two question marks. One '?' means a question, while 2 or more typically means a dweeb.
- Do your best to [write well|http://catb.org/esr/faqs/smart-questions.html#writewell] (<- link). Each sentence should start with an upper case letter. Not just the first one.
Also, when posting code, code snippets, XML/HTML or input/output, please use the code tags. The code tags protect the indentation and formatting of the sample. To use the code tags, select the sample and click the CODE button. -
Need help with linking buttons
Can anyone help me with this problem I have.
I have a gfx which I have created 6 shapes and converted them into simple buttons. I have urls sat inside an xml file. How can I get the buttons to use the urls set from within the xml file?
Also how can I change the current external photo that is being loaded to load the url from a setting in the same xml file.
I hope you arnt as confused as I am right now.
I have packaged up the flash file which includeds the xml aswell.
If anyone could help me out with this I would be very greatful.
Thanks All
http://www.onlineaddicts.co.uk/menu.rarRemove the code from all btns, as below paste it on main timeline
Also no need to load xml twice as dome in image container...
give an instance name to the outer container of btns - menumv
use following method to openURL, use same for all the btns..
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLLoader;
import flash.net.URLRequest;
var myXML:XML;
var myLoader:URLLoader = new URLLoader();
myLoader.load(new URLRequest("links.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);
function processXML(e:Event):void
myXML = new XML(e.target.data);
trace(myXML);
menumv.carbtn.addEventListener(MouseEvent.CLICK, openURL);
function openURL(e:MouseEvent):void
navigateToURL(new URLRequest(myXML.car.url));
http://www.darshanrane.com -
Need help with links and fill color
Hi all, I just recently discovered liveCycle and am very impressed with it! I have been trying to make myself a homework calendar for a while now, and I have it done mostly, but there are a few more things I'd like to add that I don't know how to do.
I have some HTML and Java experience, but very little XML or JavaScript experience. I have a feeling that what I am trying to do is relatively simple, but I just can't figure it out! I have spent hours pouring over Google and the help files, and I feel like I have gotten close, but no joy yet.
I have attached my calendar so far (truncated to fit 5MB max attachment size). I'd like it to do two more things:
1. Have the background color of the table cells change from white to green when the check box is checked.
(Alternately, I'd really like to get rid of the check boxes all thogether and just have the background of the table cells turn green with a keyboard shortcut, like "ctrl + D" for 'done'. But if that isn't possible, then the color change with the check box is fine.)
2. I'd like the button called 'WORD DOC' in the upper right of the form to open a word document on my local computer. Where I just push that button and a work doc opens right up in Word in another window.
I was able to get .PDF documents to open up with those other two buttons there ('Big Java' and 'Beginning Java II') by adding the script
app.openDoc("Big Java.pdf");
and
app.openDoc("Beginning Java II.pdf");
to each of the buttons respectively, but those PDFs need to be in the same folder as the calendar for that to work. I tried just altering that script by replacing the name of the PDF file with the name of a Word doc file like this:
app.openDoc("test.docx");
but the button doesn’t work at all, it just does nothing.
So that’s what I am trying to do. I have spent hours messing around with anything I could think of to get this to work, but unfortunately I just don’t know the language well enough to get it to work.
I would really appreciate any advice on this at all. Thank you very much for your consideration.Hi,
Thanks very much for your response! I was able to use the code to make the box turn green by adding that script to the 'click' event of textbox and changing the language from FormCalc to JavaScript. So what happened was that when I clicked in the textbox, the color turned green.
I couln't firgure out how to add it to the checkbox though. When I tried, it didn't do anything. The problem now is that when I click in the textbox to add my homework, it turns green. I need it to turn green once I finish my homework.
This would work great if the texbox turned green when I SHIFT clicked the box. Is there anything I could add to that scipt to do that? -
I need help with this tutorial from the Adobe website
I'm almost done with my flash game which I created with flash pro cc. And i have been looking for tutorials to integrate my game to the Facebook and this is the only one I found. http://www.adobe.com/devnet/games/articles/getting-started-with-facebooksdk-actionscript3. html
Am I on the right track?? The editor uses Flash Builder but I'm using Flash Pro cc.
--- On Step 2: "Set up a development server for the Flash app",
Sub-step #2. "To simplify the development process, configure Flash Builder to compile into your htdocs/fbdemo folder and run (or debug) the app on your server (see Figure 2)."
1) But I can't find "ActionScript Build Path"(which is highlighted on the Figure 2 screenshot) or anything like that in Flash pro. Same for the "Output folder URL".
Can I actually do the same things with Flash Pro cc?? Also #3 is "Verify that your app runs from your server." How do you run your app from your server??
---- On Step 4: "Initialize the Facebook JS SDK",
2) so if I setup a server on a localhost just like the tutorial, I don't need to change the following? This is on line #6.
channelUrl : 'www.YOUR_DOMAIN.COM/channel.html'
can i just leave it like that ?
3) So if I complete the tutorial, can facebook users play my game? or do i have more things to do?
4) is there any other tutorial for Flash Pro CC to Facebook integration???
Thank you so much for your help and time.this is an excerpt from http://www.amazon.com/Flash-Game-Development-Social-Mobile/dp/1435460200/ref=sr_1_1?ie=UTF 8&qid=1388031189&sr=8-1&keywords=gladstien
The simplest way to hook into Facebook is to add their Plugins to add a Like button, Send button, Login button etc to your game. If you only want to add a Like button to a page on your website, you can use the following iframe tag anywhere (between the body tags) in your html document where you want the Facebook Like button to appear:
<iframe src="http://www.facebook.com/plugins/like.php?href=yoursite.com/subdirectory/page.html" scrolling="no" frameborder="0" style="border:none; width:500px; height:25px"></iframe>
Where the href attribute is equal to the absolute URL to your html file. For example:
<iframe src="http://www.facebook.com/plugins/like.php?href=kglad.com/Files/fb/" scrolling="no" frameborder="0" style="border:none; width:500px; height:25px"></iframe>
points to index.html in kglad/com/Files/fb.
However, to get the most out of Facebook you will need to use JavaScript or the Facebook ActionScript API and register your game on the Facebook Developer App page. Before you can register your game with Facebook, you will need to be registered with Facebook and you will need to Login.
Once you are logged-in, you can go to https://developers.facebook.com/apps and click Create New App to register your game with Facebook. (See Fig11-01.)
***Insert Fig11-01.tif***
[Facebook's Create New App form.]
Enter your App Name (the name of your game) and click continue. Complete the Security Check (see Fig11-02) and click Submit. You should see the App Dashboard where you enter details about your game. (See Fig11-03.)
***Insert Fig11-02.tif***
[Security Check form.]
***Insert Fig11-03.tif***
[App Dashboard with Basic Settings selected.]
If you mouse over a question mark, you will see an explanation of what is required to complete this form. Enter a Namespace, from the Category selection pick Games, and then select a sub-category.
Your game can integrate with Facebook several ways and they are listed above the Save Changes button. You can select more than one but for now only select Website with Facebook Login and App on Facebook, enter the fully qualified URL to your game and click Save Changes. (See Fig11-04.)
***Insert Fig11-04.tif***
[Facebook integration menu expanded.]
You can return to https://developers.facebook.com/apps any time and edit your entries. Your game(s) will be listed on the left and you can use the Edit App button to make changes and the Create New App button to add another game.
Click on the App Center link on the left. (See Fig11-05a and Fig11-05b.) Fill in everything that is not optional and upload all the required images. Again, if you mouse over the question marks you will see requirement details including exact image sizes for the icons, banners and screenshots.
***Insert Fig11-05a.tif***
[Top half of the App Center form.]
***Insert Fig11-05b.tif***
[Bottom half of the App Center form.]
When you are finished click Save Changes and Submit App Detail Page. You should then see Additional Notes and Terms. (See Fig11-06.)
***Insert Fig11-06.tif***
[Additional Notes and Terms.]
Tick the checkboxes and click Review Submission. If everything looks acceptable, click Submit. You should then see something like Fig11-07.
***Insert Fig11-07.tif***
[After agreeing with Facebook's terms, you should be directed back to App Center and see this modal window.]
You are now ready to integrate your game with Facebook's API. Because there is a Facebook ActionScript API that communicates with Facebook's API, you need not work directly with the Facebook API.
But before I cover Adobe's Facebook ActionScript API, I am going to cover how you can use the Facebook JavaScript API directly. There no reason to actually do that while the Facebook ActionScript API still works but by the time you read this, the Facebook ActionScript API may no longer work.
In addition, this section shows the basics needed to use any JavaScript API so it applies to any social network that has a JavaScript API including the next "hot" social network that will arise in the future. -
Need help with master detail from different datasets
I have xml data from three different datasets that I want to use in a master detail region.
So initially, a list of model codes is displayed. When the user clicks on a specific model, the model inputs appear in the detail region. One of these inputs is a list of map units. I also want a real name description of the map unit to be displayed. It's working for one map code, but not for all of them.
My question is: "How do I get the description to disply for each of the map codes?"
Here is my code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="/SpryAssets/xpath.js" type="text/javascript"></script>
<script src="/SpryAssets/SpryData.js" type="text/javascript"></script>
<link href="/SpryAssets/SprySpotlightColumn.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var DSpresence = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres");
var DSancillary = new Spry.Data.XMLDataSet("/SpeciesReview/ModelingAncillarywname.xml", "dataroot/Sheet1", {sortOnLoad: "CommonName", sortOrderOnLoad: "ascending"});
var DSpresence2 = new Spry.Data.XMLDataSet("/SpeciesReview/Copy of tblSppMapUnitPres.xml", "dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres[strSpeciesModelCode='DSancillary::strSpec iesModelCode']");
var dsMUDescription = new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc");
var dsMUDescription2= new Spry.Data.XMLDataSet("/SpeciesReview/tblMapUnitDesc.xml", "dataroot/tblMapUnitDesc[intLSGapMapCode='{DSpresence2::intLSGapMapCode}']");
</script>
</head>
<body>
<div style="width: 100%">
<div id="Species_DIV" spry:region="DSancillary DSpresence dsMUDescription" width="50%" style="float:left">
<table id="DSancillary">
<tr>
<th>Species Code</th>
</tr>
<tr spry:repeat="DSancillary" "DSpresence" "dsMUDescription" spry:setrow="DSancillary" >
<td>{strSpeciesModelCode}</td>
</tr>
</table>
</div>
<div id="Species_Detail_DIV" spry:detailregion="DSancillary DSpresence dsMUDescription" style="float:right; margin-top:20px; width: 40%">
<table id="Species_Detail_Table" >
<tr width="100%">
<th style="font-family:Verdana, Geneva, sans-serif; font-size:14px; background-color:#CCCCCC; font-weight:bold">Modeling variables used for {strSpeciesModelCode}</th>
</tr>
<tr>
<td spry:if="'{memModelNotes}' != ''">Hand Model Notes: {DSancillary::memModelNotes}</td></tr>
<tr>
<td spry:if="'{DSancillary::ysnHydroFW}' == 1">HydroFW: {DSancillary::ysnHydroFW}<br />Buffer from flowing water: {DSancillary::intFromBuffFW}<br />
Buffer into flowing water: {DSancillary::intIntoBuffFW}
</td></tr>
<tr>
<td spry:if="'{DSancillary::ysnHydroOW}' == 1"> Buffer from open water: {DSancillary::intFromBuffFW}<br />Buffer into open water: {DSancillary::intIntoBuffOW}</td></tr>
<tr><td><br /></td></tr>
<tr><th>Mapcode:</th></tr>
<tr spry:repeat="DSpresence">
<td spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}</td><td spry:if= "'{DSpresence::intLSGapMapCode}'=='{dsMUDescription::intLSGapMapCode}'">{dsMUDescription: :strLSGapName}</td>
</tr>
<tr><td><ul>
<li spry:repeat="DSpresence" spry:if="'{DSpresence::ysnPres}' == '1'">{DSpresence::intLSGapMapCode}{dsMUDescription::intLSGapMapCode}</li>
</ul></td></tr>
</table>
</div>
</div>
</body>The best way to do this is to use xPath filtering. This http://labs.adobe.com/technologies/spry/samples/data_region/FilterXPath_with_params.html example will give you the general idea.
The example uses a URL variable but there is no need for that if you use a procedure similar to
function newXPath(cat){
DSpresence.setXPath("dataroot/Copy_x0020_of_x0020_tblSppMapUnitPres[strSpeciesModelCode=' {DSpresence::strSpeciesModelCode}']");
DSpresence.loadData();
The function can be triggered with an onclick event placed on {strSpeciesModelCode}
Gramps
Maybe you are looking for
-
Error while invoke ADF BC Service component
I have an ADF Service component, which I'm trying to call from BPEL. A process can be sucessfuly build and deployed, but at run time I'm getting error: Could not determine WSDL port. A error stack trace from server is below: 2008-12-04 21:02:33.003 W
-
I have Itunes on my PC with close to 1000 songs. The songs were also on my Ipod. I connected my Ipad2 and blew away all of my music. Can the music be retrieved and if so how can i do it? tks
-
Can't here my center speaker on my Inspire 5.1 p5800
I got inspire 5.1 p5800 speakers and my sound card is an sound blaster audigy platinum. When i do test my center speaker works out find, but when i play music of any audio file type, video of any file type, dvd in 5. mode and games in 5.1 mode I can'
-
OK...I am on this site, I clicked on a picture and then right clicked on it...after reading my options when a box came up...I clicked " block images " from the site...I really didn't mean to block the images...How can I unblock the images...I even bl
-
Small changes to a web gallery slows iPhoto down to a crawl
I am using iPhoto 7.1.1, the latest update at this time. I have a large number of web galleries published through iPhoto to .Mac. The latest is about 150 photos from Christmas. I originally published without changing the photo titles. I have been cor