Interactive Statement / Asset Placement
Hello guys!!!
I'm trying to build a Interactive Document solution demo based on this Solution Statement, and I have some questions
The 1st question is:
In the Flex Project there is a file package.xml where the line below indicates where the data is coming from, right?
<resources controller="data">
<resource contentType="text/xml" source="assets/test-assets/xml/AkiraTanaka.xml"/>
</resources>
Why is it necessary, if I have to pass the XML data in the LiveCycle process again?
2nd question:
In LC process (Interactive Statement), when we call the Asset Placement operation, it requires a template as input. When invoking the Solution Accelerator sample, it uses a template that is located in the LC Content. Where is it set up?
Thanks!
1 - You are right in that you don't need the data resource in the package file if you are going to populate data from a process. I usually leave it in the flex project however for testing purposes. Once I compile the template and bring it into LiveCycle I remove that resource reference.
One thing to keep in mind is the use of the id “data” for the XMLDataLoader is important. While you can name this object anything you want, the LiveCycle process components will specifically be looking for an object named “data”. If you want to fill in the statement using a LiveCycle process, you need to make sure you name it “data”.
2 - The solution template needs an additional step for installation. Its on page 21 if the Install Guide under section 4.2.1:
Log on to the Contentspace ES2 console using the default Administrator credentials:
http://[server_name]:[port_number]/contentspace
2. Click Company Home.
3. Expand More Actions and click Import.
4. Browse to [LiveCycleES2 root]/sa_resources/SA_SDK_9.5/InteractiveStatements/RetailBanking, and
select adobe-sa-is-financecorp-cs-assets.zip. Click OK.
5. Refresh the Company Home web page to view a new space, namely assets.
Similar Messages
-
Interactive Statements implementation
Hello!
I'm trying to follow along the instructions in the document IS - Demo Script Implementation. On page 12, row 7, it reads "click on the + sign next to FinanceCorpStatnt Test.".
However I do not have this project in Flash Builder. Besides the new projcect I created, the only other project is "example-financecorp-swf" and there's no DocumentMain.xml in it. The xml files present in this project are FinanceCorpClient.xml and FinanceCorpStatement.xml.
So I cannot move on - could someone please help me out here?
Thank you for any hints!
Marcos
ANYONE ???You may also want to look at the documentation for instructions on how to build and test an interactive statement template using the Asset Placement plug-in for Flash Builder.
http://help.adobe.com/en_US/LiveCycle/9.5/PersonalizationMgrTechGuide/WS9c02c67e3880fcf5-5 be7883512b7456f5a0-8000.html
Ginette -
Use Correspondence Management to manage interactive statement content
hi,
it is possible to use CMSA to manage interactive statement content? in particular, the change of content related to promotions or other marketing content. This is very important for companies that offer monthly promotions and other users easily and quickly they can replace the content associated with the offer.
deohi Gary,
I'll explain:
The company has an interactive template of the invoice. Template consists of:
1. where the main part displays customer data - permanent, unchanging.
2. part of my so-called. "content space" where your are dedicated to the customer promotions and advertising (variable content).
Everything we create in Flex Builder, but when we want to change the "content space"you have to create everything from scratch in the flex builder. So the question is: is it possible to change the contents of the "content space" without the use of flex builder? This means, for example, be able to replace the reference to advertising from ad1.jpg to ad2.jpg. It's just to replace the image, not the structure of the template. -
Using webServices and Interactive Statement
I'd like to know how can I get information about how to create an Interactive statement that use a webservice.
I can't find something useful on this topic on internet or the official documentation...
Any help?
Regards!Whether inside an Interactive Statement or not, the use of a webservice in Flex is the same:
Step 1. Find a webservice you want to use.
(Here is a public wsdl connection for testing/proof of concept: http://www.webservicex.net/WeatherForecast.asmx?WSDL )
Step 2. Use it, as shown in this example: http://www.cflex.net/showFileDetails.cfm?ObjectID=582
More info on how to use Flex webservices:
http://tv.adobe.com/watch/flex-in-a-week-day-2/retrieving-and-handling-data-using-webservi ce/
http://blogs.4point.com/brad.white/2008/12/4-ways-to-invoke-a-webservice-in-flex-with-mxml -and-actionscript.html
http://blog.flexexamples.com/2008/04/14/calling-a-simple-web-service-from-flex-using-the-w ebservice-class/
Hope it helps,
Oana -
Interactive Statement unable to access Web Service
I have a working Flash Builder project from which I generate a nav file which I use to generate an Interactive Statement using a process in Workbench.
The Interactive Statement works fine with all the Flash content and data merged from xml.
When I incorporate using a Web Service in the Flash Builder project code to populate a data grid, and regenerate the nav file to generate the interactive statement, the interactive statement gives the following security error when opened:
Security error accessing url
Destination: DefaultHTTP
It seemed that this issue is related to cross domain policy or something like that, BUT I do not get this error when:
1. I run the Flash Builder project directly from Flash Builder that fires up IE and my flash content works perfectly fine in the HTML wrapper, including the web service call that works fine. This works fine both from the bin-debug and the bin-release folders of my Flash Builder project.
2. I created an AIR application from scratch, and consumed the same webservice as used in the earlier Flash Builder project being used to generate nav file for Interactive Statement. The AIR application also works perfectly fine in invoking the web service and does not give any errors.
Question: Why is my Interactive Statement unable to access the web service and gives the error as mentioned above when the same web service is being accessed and consumed successfully by the same flash content in an html wrapper and in an AIR application. How to make my flash content embedded in the PDF container to access and consume the web service?Hi Muhammad,
Acrobat has different crossdomain restrictions. Try a crossdomain file that looks like to test the connection:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
Following there are a couple of good articles dealing with web services calls:
http://forums.adobe.com/message/3784114#3784114
http://tv.adobe.com/watch/flex-in-a-week-day-2/retrieving-and-handling-data-using-webservi ce/
http://blogs.4point.com/brad.white/2008/12/4-ways-to-invoke-a-webservice-in-flex-with-mxml -and-actionscript.html
http://blog.flexexamples.com/2008/04/14/calling-a-simple-web-service-from-flex-using-the-w ebservice-class/
Regards,
Oana -
Hello all!
I am just getting started with Air 2.7 and Flash Builder 4.5.1. I have a simple Actionscript Mobile Application(for iOS) which loads a few assets from an external swc and places them on the stage. Can someone explain why the assets all appear nudged about a quarter of the way down the screen? It looks like point 0 on the y axis starts lower than it should. I also noticed that the graphics are scaled to fit the screen width.
Is there something I need to be aware of when placing assets on the stage for a mobile app? I would greatly appreciate anyone who can point me in the right direction..
Thanks and have a great weekend!Did you set the stage align and scaleMode properties? These influence the location of the origin, sometimes in surprising ways.
I usually recommend scaleMode = StageScaleMode.NO_SCALE and align = StageAlign.TOP_LEFT (unless you want your graphics scaled to fit the screen, of course). -
Can anyone suggest a select case statement in place of my if statements?
I am having a little trouble switching my if statements to select case. Any help would be appreciated
Option Strict On
Option Explicit On
Public Class Form1
Private Player1 As String
Private Player2 As String
Private Player1Wins As Integer = 1
Private Player2Wins As Integer = 1
Private Tie As Integer = 1
' Close the program
Private Sub btnExit_Click(sender As Object, e As EventArgs) Handles btnExit.Click
Me.Close()
End Sub
' ask for players names
Private Sub frmMainForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Player1 = InputBox("Enter Player 1's Name: ")
lblPlayer1.Text = (Player1 + "'s Score:")
Player2 = InputBox("Enter Player 2's Name:")
lblPlayer2.Text = (Player2 + "'s Score:")
End Sub
Private Sub btnRoll_Click(sender As Object, e As EventArgs) Handles btnRoll.Click
' game of rolling dice
Dim randGen As New Random
Dim intNum1 As Integer
Dim intNum2 As Integer
Dim intNum3 As Integer
Dim intNum4 As Integer
Dim intTotal As Integer
Dim intTotal2 As Integer
' make random integer from 1 through 6
intNum1 = randGen.Next(1, 7)
intNum2 = randGen.Next(1, 7)
intNum3 = randGen.Next(1, 7)
intNum4 = randGen.Next(1, 7)
' display the right image in picDie1
Select Case intNum1
Case 1
picDie1.Image = picOneDot.Image
Case 2
picDie1.Image = picTwoDots.Image
Case 3
picDie1.Image = picThreeDots.Image
Case 4
picDie1.Image = picFourDots.Image
Case 5
picDie1.Image = picFiveDots.Image
Case 6
picDie1.Image = picSixDots.Image
End Select
' display the right image in picDie2
Select Case intNum2
Case 1
picDie2.Image = picOneDot.Image
Case 2
picDie2.Image = picTwoDots.Image
Case 3
picDie2.Image = picThreeDots.Image
Case 4
picDie2.Image = picFourDots.Image
Case 5
picDie2.Image = picFiveDots.Image
Case 6
picDie2.Image = picSixDots.Image
End Select
' display the right image in picDie3
Select Case intNum3
Case 1
picDie3.Image = picOneDot.Image
Case 2
picDie3.Image = picTwoDots.Image
Case 3
picDie3.Image = picThreeDots.Image
Case 4
picDie3.Image = picFourDots.Image
Case 5
picDie3.Image = picFiveDots.Image
Case 6
picDie3.Image = picSixDots.Image
End Select
' display the right image in picDie4
Select Case intNum4
Case 1
picDie4.Image = picOneDot.Image
Case 2
picDie4.Image = picTwoDots.Image
Case 3
picDie4.Image = picThreeDots.Image
Case 4
picDie4.Image = picFourDots.Image
Case 5
picDie4.Image = picFiveDots.Image
Case 6
picDie4.Image = picSixDots.Image
End Select
' calculate and display total number of dots
intTotal = intNum1 + intNum2
lblTotal.Text = intTotal.ToString()
intTotal2 = intNum3 + intNum4
lblTotal2.Text = intTotal2.ToString()
' display the winner
If intTotal > intTotal2 Then
MessageBox.Show("Player1 Wins")
End If
If intTotal2 > intTotal Then
MessageBox.Show("Player2Wins")
End If
If intTotal = intTotal2 Then
MessageBox.Show("Tie")
End If
' display summary information when checkbox is checked
If CheckBox1.Checked = True And
intTotal > intTotal2 Then
lblWins.Text = CStr(Player1Wins)
Player1Wins = Player1Wins + 1
lblScores.Visible = True
End If
If CheckBox1.Checked = True And
intTotal2 > intTotal Then
lblWins2.Text = CStr(Player2Wins)
Player2Wins = Player2Wins + 1
lblScores.Visible = True
End If
If CheckBox1.Checked = True And
intTotal = intTotal2 Then
lblTies.Text = CStr(Tie)
Tie = Tie + 1
lblScores.Visible = True
End If
End Sub
End ClassPut everything into lists. Here is elementary sample to get you started.
Private lofDotImage As New List(Of Image)
Private randGen As New Random
Private picDie() As PictureBox
Private Sub setup()
ReDim picDie(3)
picDie(0).Location = New Point()
picDie(0).Size = New Size()
picDie(1).Location = New Point()
picDie(1).Size = New Size()
picDie(2).Location = New Point()
picDie(2).Size = New Size()
picDie(3).Location = New Point()
picDie(3).Size = New Size()
For _delta As Integer = 0 To 3
picDie(_delta).Visible = True
Me.controls.add(picDie(_delta))
Next _delta
Dim _dice1 As Image = Nothing
Dim _dice2 As Image = Nothing
Dim _dice3 As Image = Nothing
Dim _dice4 As Image = Nothing
Dim _dice5 As Image = Nothing
Dim _dice6 As Image = Nothing
lofDotImage.Add(_dice1)
lofDotImage.Add(_dice2)
lofDotImage.Add(_dice3)
lofDotImage.Add(_dice4)
lofDotImage.Add(_dice5)
lofDotImage.Add(_dice6)
End Sub
Private Sub roll()
Dim _lofRolls As New List(Of Integer)
Dim intScorePlayer1 As Integer = 0
Dim intScorePlayer2 As Integer = 0
For _delta As Integer = 0 To 3
_lofRolls.Add(randGen.Next(1, 7))
If _delta < 2 Then
intScorePlayer1 += _lofRolls(_delta)
Else
intScorePlayer2 += _lofRolls(_delta)
End If
picDie(_delta).Image = lofDotImage(_lofRolls(_delta))
Next _delta
If intScorePlayer1 = intScorePlayer2 Then
MessageBox.Show("Tie")
ElseIf intScorePlayer1 > intScorePlayer2 Then
MessageBox.Show("Player1 Wins")
Else
MessageBox.Show("Player2 Wins")
End If
End Sub
Edit: Also to get better random, seed the random once and generate many times, the more seed is the less random.
Also another tip: When comparing it is easy to check = and <> compared to < or > in my experience, also for only one possible outcome use one main if block instead of many. -
Prepared Statement without place holders
Hi,
Is it possible that i have a PreparedStatement and it does not bind with anything?. If yes, how do I do it?. I tried doing it, but it gives invalid bindings error..
Thanks and Regards,
Sapan.Hi Sapan,
Rather than take a wild guess -- based on the [lack of] information you have provided -- I will offer a code sample that you can compare your code to, in the hope that it may help you. Otherwise, try posting some more details, like:
1. complete error message and stack trace you are getting
2. the section of your code that is causing the problem
3. java version you are using
4. platform you are using
5. database and JDBC driver you are using
The following code was tested on SUN [sparc] Solaris 7 with Oracle 8i (8.1.7.4) database, Oracle JDBC (thin) driver and J2SE SDK version 1.3.1_02
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
public class JdbcTest {
public static void main(String[] args) {
Connection dbConn = null;
ResultSet rs = null;
PreparedStatement stmt = null;
String url = "???";
String sql = "select * from DUAL";
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
dbConn = DriverManager.getConnection(url);
stmt = dbConn.prepareStatement(sql);
rs = stmt.executeQuery();
if (rs.next()) {
System.out.println(rs.getString(1));
else {
System.out.println("Not found");
catch (Exception x) {
System.err.println("Exception caught: " + x);
x.printStackTrace();
finally {
if (rs != null) {
try {
rs.close();
catch (Exception x) {
System.err.println("Failed to close result set.");
x.printStackTrace();
if (stmt != null) {
try {
stmt.close();
catch (Exception x) {
System.err.println("Failed to close statement.");
x.printStackTrace();
if (dbConn != null) {
try {
dbConn.close();
catch (Exception x) {
System.err.println("Failed to close DB connection.");
x.printStackTrace();
}Hope this helps you.
Good Luck,
Avi. -
Set the state of an interactive button
I would like to use interactiev buttons in my document, but set the state on each page so it seems like it is selected (similar to a web page). Is there a way to do this easily? I cannot seem to get it to stic when I export as a pdf. On screen it looks like the ocrrect state is active, but when I save as a pdf with interactivity selected, it goes away... Please help. I am attaching a pdf. I would like on the first page first button the state would be the "on click" state (reverse blue text on white), and then on page two the same
I guess you should create two separate buttons, one for normal state, another for clicked state. Place them stacked, normal state on the top. Then you place a Hide Button action to it. When user clicks it, it hides itself and clicked state button becomes visible....
(haven´t tried this, I just guess it could work....) -
I am new to Java and am trying to learn how to use and understand the nuances involved in using the Switch statment.
I am trying to write an application that will calculate grades for a student. I can use the If Then Else Control structure for this (which runs) but I would like to incorporate the Switch Statement in place of the multiple if then else structure. Here is the code that I have for the application:
import javax.swing.JOptionPane;
public class Switchgrades
public static void main(String args[])
String midone; String midtwo; String quiz; String homework;
String last;
double one; //first midterm
double two; //second midterm
double three;double four; double five; //final, quiz and homework scores
double average; //GPA
int a; int b; double c; double d; double f;int grade;
midone = JOptionPane.showInputDialog("Please enter the first midterm"); //first score to add
one = Double.parseDouble(midone);
midtwo = JOptionPane.showInputDialog("please enter second midterm"); //second midterm to add
two = Double.parseDouble(midtwo);
last = JOptionPane.showInputDialog("please enter final exam score");//final exam score to add
three = Double.parseDouble(last);
quiz = JOptionPane.showInputDialog("please enter quiz score");//quiz score to add
four = Double.parseDouble(quiz);
homework= JOptionPane.showInputDialog("please enter homework score");//homework score to add
five = Double.parseDouble(homework);
average = (one + two+ three + four + five)/5; //average of all five scores
switch (grade)
case a: //this is where I become confused and lost. I don't what I need to do to make it run.
{if(average >= 90)
b = Integer.parseInt(average);
JOptionPane.showMessageDialog(null,"The total of all your scores is " + b+"\nYour final grade is an A");}
/ I am just using one choice to make it run. When I can make it run, I plan on incorporating the other grades.
break;
<=====================================================================>
<=====================================================================>
//else --->this is part of the if that works in another program
// if(average >= 80 )
// JOptionPane.showMessageDialog(null,"The total of all your scores is " + average +"\nYour final grade is a B");
//else
//if(average >= 70 )
// JOptionPane.showMessageDialog(null,"The total of all your scores is " + average +"\nYour final grade is a C");
//else
//if(average >= 60 )
// JOptionPane.showMessageDialog(null,"The total of all your scores is " + average +"\nYour final grade is a D");
//else
//if(average <= 60 )
<=====================================================================>
<=====================================================================>
default:
JOptionPane.showMessageDialog(null,"Sorry, you received a grade of " + average + ". \nYou failed.");
System.exit(0);
As you can see, I already have all the if then else statements set up--between the <==>. The program runs with the If's but I can two error messages when I incorporate the Switch statement.
1) constant expression required.
I have case a and i guess it is not a constant. Again, I don't understand switch well enough to figure what I need to do to correct it.
2)"b = Integer.parseInt(average);" - cannot resolve the symbol--whatever that means. I have a "^" pointing at the period between Integer and parseInt.
Can anyone help explain what I have to do to make this program work using Switch.
I have not used Switch before and don't understand what I can use as opposed to what I must use for it to work.
Thanks for your help.I don't really know how you want your program going, but here is what I think.
1) From the start of the switch statement, where do you assign the value for "grade"? If you write the switch statement like below, you meant something like, if(grade == 'a'){...}, right!? Then, where did you get the "grade" from?
switch (grade)
case a:
You may want declare variable "grade" as char and place if sentence like this before the switch.
if(average >= 90)
grade = 'a';
else if(average >= 70)
grade = 'b';
switch (grade)
case a:
System.out.print("Your grade: A");
break;
case b:
System.out.print("Your grade: A");
break;
Is that What you want???
2)The method, Integer.parseInt(), takes String as parameter? Did you override this method? The variable "average" was declare as double, so why don't you just cast it to int?? -
Dynamic tuple expression in *REC statement
Hi there,
I think I know the answer to this already, but here goes...
I need to use a tuple expression in a *REC statement (in place of the old-fashioned GET) but I want it to be dynamic, so at least one of the tuple members changes at runtime.
To use the basic example from SAP Help, but amended slightly, let's say this is the standard expression:
*XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
*WHEN P_ACCT
*IS "CE0004010"
*REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[E123]), P_ACCT="CE0661000")
*ENDWHENBut what if the P_ENTITY member should be dynamic, depending on the ENTITY member the user selects in the DM package? What I WANT to do is something like this:
*XDIM_MEMBERSET P_ACCT = CE0004010,CE0652000
*WHEN P_ACCT
*IS "CE0004010"
*REC(EXPRESSION=%VALUE%/([P_ACCT].[CE0652000],[P_ACTIVITY].[LABPRD],[P_ENTITY].[%ENTITY_SET%]), P_ACCT="CE0661000")
*ENDWHEN
...but it doesn't work. Is this even possible? And if so, what am I doing wrong?
Thanks very much,
Jason
PS. I'm already using a lookup to pull out a tax% in the same script, so I can't use it for this as well...Some theory:
You have some scope at the script start (defined by user selection in DM prompt)
For each dimension you have variable %SOMEDIM_SET% containing initial script scope. If you change scope of some dimension using *XDIM_MEMBERSET SOMEDIM=MEM1,... you can always later restore original scope with *XDIM_MEMBERSET SOMEDIM=%SOMEDIM_SET%
WHEN/ENDWHEN will loop records with base members of the scope before WHEN. %VALUE% is a current record value.
You can use tuple references to other members in EXPRESSION=... Dimensions not defined in tuple will have the same base member as current record. In tuple you can also use parent members.
You can use LOOKUP as a replacement of FLD to get member from the property of the member in current record. LOOKUP can get data from current model or other model.
Vadim -
Chapter Problem with Multiple Timeline Assets
Using Premiere Pro 2.0 and DV assets exported from Premiere.
Normally I just create a single export out of Premiere and all works well. This time I decided to try a different workflow, taking advantage of Encore's ability to add multiple assets to the same timeline. This way, I figured, if any changes are needed, only one part will have to be reexported and retranscoded, instead of the whole thing.
So the first asset places in the timeline OK. The second asset generates a warning message, asking me if I want to "replace existing chapters with source marker in the asset".
Now first of all, there are no existing chapters in the section of timeline where the new asset is being added, so I don't know why it's asking if I want to replace them. But that's a minor annoyance. The real problem is that all the chapter markers in the second asset, whether I click Yes or Cancel in response to the warning, end up squished towards the beginning of the second asset. The first chapter marker is correct, and all chapter markers thereafter are redistributed 12 frames apart from there. I only noticed this when I expanded the timeline view.
I thought maybe I had exported from Premiere incorrectly, but if I remove the first asset and place the second asset in the timeline first, the chapters appear where they should. It seems that any asset after the first exhibits this squished marker syndrome, and I don't have a clue why, or how to fix it.
Anyone have any ideas here?OK, I just tried replacing the middle timeline clip here. Logistically, it works.
Here's what I did.
1. New project. Add 3 pre-transcoded elementary mpeg and ac3 streams to the timeline.
2. Check project.
3. Fix the reported error about gaps between clips. Unfortunately, I had to move the 3rd clip 12 frames away from the 2nd clip. This will introduce a 12-frame gap between clips. I did not try to build with the error uncorrected. NB: There was no gap error concerning the boundary between clips 1 and 2, so I expect the problem is clip specific.
4. Build a disc image. All of the audio was ac3, and with the different audio clip lengths (all less than 1/2 second difference), Encore re-transcoded the audio, and only the audio. My suggestion here is to use .wav files only.
5. Use File>Replace Asset to replace the middle clip audio and video streams with new, shorter ones.
6. Trim out the danger stripes in the timeline and butt the video and audio of the 3rd clip perfectly up against the end of the middle clip.
7. Check project. No gap error this time.
8. Build disc image.
I mounted each image in turn and played them in WinDVD. They played as expected. I cannot speak to how truly seamless the playback is because all of the clips I have for testing fade to black at the end. But WinDVD did not hesitate when going from clip to clip and there were no freeze frames that I could see.
So upgrading to CS3 will let you do what you want. It may be a perfect solution, and it may not, but it is certain to be better than what you get from En 1.5 going from timeline to timeline. -
I have been advised on this forum that a switch statement in place of the if else etc would be neater. Could someone tell me where the switch statement goes in the code below.
Thanks
Calculator class Calculator.java
class Calculator {
public void Calculator() {
public double workOut(String s1) {
int count = 0, i_s1_len = 0, i_dot=0, i_neg =0;
double d_calc=0,d_num = 0, d_snum=0 ;
String s2 = "", s3 = "", s_num="";
if (s1.length()==0){ //Check for an input eg contains at least one character
System.out.println("Sorry you must input a equation ending in an equals '=' sign");
return 0;
else {
i_s1_len = s1.length();
count = 0; //reset count to zero
//remove spaces s2 becomes the equation
for (count=0; count+1 <= i_s1_len;){
if (s1.charAt(count)==32){
count++;
else{
s2=s2+s1.charAt(count);
count++;
i_s1_len = s2.length();//
// check final character is an "=" sign
if (s2.endsWith("=")){
else{
System .out.println( "Sorry your equation must end with an = sign ");
return 0;
// Checking if characters in the equation are legal eg 1-9 or ()-+/*. or the = sign is only at the end.
count = 0; //reset
for (count=0; count+1 <= i_s1_len;){
if ((s2.charAt(count)>39)&(s2.charAt(count)<58)){
count++;
else if ((s2.charAt(count)==61) & (count != i_s1_len-1)) {
System.out.println("Operator'=' is in two places ");
return 0;
else{
count++;
// Selecting Calculation type +-*/ and calculation Type and conversion
for (count=0; count+1 <= i_s1_len;){
//Addition calculation 43 = +
if (s2.charAt(count)== 43){
s3="+";
// Subtraction Calculation 45 = -
else if (s2.charAt(count)== 45){
s3="-";
// check for minus minus
if (s2.charAt(count+1)== 45){
s3="+";
// multiplication Calculation 42 = *
else if (s2.charAt(count)== 42){
s3="*";
// Division Calculation 47 =/
else if (s2.charAt(count)== 47){
s3="/";
//Get String for conversion to number
else s_num=s_num+s2.charAt(count);{
count++;
// Transfer number to single varable
while ((s2.charAt(count)>47)&(s2.charAt(count)<58)||(s2.charAt(count)==46)){
s_num=s_num+s2.charAt(count);
count++;
//check for multiple decimal points
if (s2.charAt(count-1)==46){
i_dot++;
if (i_dot > 1){
System.out.println("One of your numbers contains two decimals points ");
return 0;
i_dot=0; //reset decimal counter
// Get opperator + - * /
if (s3 =="+"){
d_num = d_num + Double.parseDouble(s_num);
else if (s3 =="-"){
d_num = d_num - Double.parseDouble(s_num);
else if (s3 =="*"){
d_num = d_num * Double.parseDouble(s_num);
else if (s3 =="/"){
if (Double.parseDouble(s_num)==0){
System.out.println("You are trying to divide by Zero which is infinity");
return 0;
d_num = d_num / Double.parseDouble(s_num);
else{
d_num = Double.parseDouble(s_num);
s_num="";
if (s2.length()==count+1) {
return d_num;
return d_num;Instead of writing
if (x == 1)
// do this
else if (x == 2)
// do that
else
// do the otheryou can write
switch (x) {
case 1:
// do this
break;
case 2:
// do that
break;
default:
// do the other
break;
} -
HELP: How can I save page state on UIX page...
I have a fallowing situation:
1. I create UIX application with Wizard based on one ViewObject
2. When I get a page with ViewObject in table style I travers up and down through records and make some updates and create new records
3. But when I go back from update and create pages I always get initial browesing page.
My question is: how can I save state of browsing page when I return to it from update and create or any other page (save position look hide/show mode or anything else)?
I try to use StateManager class but I faild.
Can anybody help me or describe how can I do it on one example?
Thanks!Attila,
Sounds as though you want to remember the interactive state of your pages across requests.
That means you'll need to store the interactive state of your pages in something like the HttpSession that has a lifecycle spanning across multiple requests.
If you make your pages interactive using the HttpSession, then, when you navigate back from another page, they should still be in the state you left them.
The built-in data provider name for the HttpSession in uiXML is ctrl:httpSession. Use this to data bind the interactive attributes of your page, such as the disclosed attribute of HideShow.
In your event handlers, update the HttpSession to make your page interactive.
Be careful to use different keys to store information in the HttpSession for different pages. -
JDBC multipool in WL7: which statement is correct?
Hi,
When I try to figure out a method to set up database failover with weblogic cluster,
I encouter the following interesting and inconsistent statements from different places
of Weblogic documents.
1. In the WL7 administration console, once I click on the multipool node, I read
the following statement:
"..., MultiPools are supported for use in non-clustered servers and for local
(non-distributed) transactions only."
2. In the WL7 online document "Using Weblogic Clusters", the section "Introduction
to Weblogic Clustering" has the following statements:
"..., WebLogic Server allows you to cluster JDBC objects, including data sources,
connection pools and multipools, to improve the availability of cluster-hosted applications."
The paragraph "Load balancing for JDBC connections" of the section "Load balancing
in cluster" also mentions ..., Load balancing of JDBC connection requires the use
of a multipool configured for load balancing."
The paragraph "Failover and JDBC Connections" of the section "Failover and Replication
in a Cluster" mentions that "..., If you have replicated, synchronized database instances,
you can use a JDBC multipool to support database failover. In such an environment,
if a client cannot obtain a connection from one connection pool in the multipool
because the pool doesn't exist or because database connectivity from the pool is
down, WebLogic Server will attempt to obtain a connection from the next connection
pool in the list of pools."
My question is, can I use the JDBC multipool in Weblogic cluster environment for
the purpose of database failover? Or I can't?
Thanks.Has anyone gotten this to work?
I have set up a test as the following.
50,000 orders going into the database within a multipool set up. I run the test
and see that it works very well with the load-balancing algorithm.
I re-run the test and after about 2,000 orders being placed, I shut down one of
the database servers.
Nothing works after this. This is in a 2-instance cluster. I was a little leary
about not having a clusters tab in the multipool when I created it. I selected
the servers that particpate in the cluster but I wasn't sure about that.
I keep getting not able to create connection errors.
Anyone get this to work yet?
cb
"Xiang Rao" <[email protected]> wrote:
>
Hi Dave and Joe,
Thanks for clarification and helps. On the other hand, should the administration
console for Multipool also add "Cluster" tab in the target in the future?
Xiang
"Dave Cabelus" <[email protected]> wrote:
Hi,
Sorry for the confusion. The clustering book is correct. The statementin
the Administration
Console is incorrect. You can use MultiPools in a cluster as you woulduse
a connection
pool. The JDBC documents are currently being updated.
Best regards,
Dave
"Xiang Rao" <[email protected]> wrote:
Hi,
When I try to figure out a method to set up database failover with
weblogic
cluster,
I encouter the following interesting and inconsistent statements fromdifferent
places
of Weblogic documents.
1. In the WL7 administration console, once I click on the multipoolnode,
I read
the following statement:
"..., MultiPools are supported for use in non-clustered serversand
for
local
(non-distributed) transactions only."
2. In the WL7 online document "Using Weblogic Clusters", the section
"Introduction
to Weblogic Clustering" has the following statements:
"..., WebLogic Server allows you to cluster JDBC objects, includingdata
sources,
connection pools and multipools, to improve the availability of cluster-hosted
applications."
The paragraph "Load balancing for JDBC connections" of the section
"Load
balancing
in cluster" also mentions ..., Load balancing of JDBC connection requires
the use
of a multipool configured for load balancing."
The paragraph "Failover and JDBC Connections" of the section "Failoverand
Replication
in a Cluster" mentions that "..., If you have replicated, synchronizeddatabase
instances,
you can use a JDBC multipool to support database failover. In such
an environment,
if a client cannot obtain a connection from one connection pool inthe
multipool
because the pool doesn't exist or because database connectivity from
the
pool is
down, WebLogic Server will attempt to obtain a connection from thenext
connection
pool in the list of pools."
My question is, can I use the JDBC multipool in Weblogic cluster environment
for
the purpose of database failover? Or I can't?
Thanks.
Maybe you are looking for
-
HT201077 photo stream stopped streaming to my ipad
Pics taken with my iphone no longer streams to my ipad. No setting have changed.
-
How to sort photos alphabetically in iPhone 6 plus
HI there, When I sync with iPhone 6 Plus, all photos from iPhoto wasn't sorted by name alphabetically on the iPhone 6Plus 64Gb.
-
Flash 11.4 Update Problem
After upgrading to flash player 11.4, the player is not working when browser (IE9 or Firefox 14) not run in administrator mode. (For example, when one goes to adobe.com page to check the version of Flash, the box is blank, though when I installed, a
-
The CMS.exe is not working.
Hi all, The CMS.exe is not working. SIA is running and using port 6410. CMS is not running, even that is using port 6400. In the last log file of the CMS is see the following: (err.m_IDSError == IDS_ERR_CMSSYSTEMDB_NODATABASECONNECTIONSAVAILABLE : Er
-
Hi, I'm testing NSD. Installed appliance, configured and started exploring .... As I can see it is possible to import custom reports. I've read the documentation and it states : " the reporting capability of the system has been extended through the i