Need help with javascript used to check the data in the mandatory radio button fields
required_fields
I get a syntax error (SyntaxError: missing: after the id property 17; at line 18). I am trying to run a script to verify data in all the fields required radio button before letting the user to submit the form (or save). Here is the code I use:
var AllRequiredFieldsSet = true;
for (var i = 0; I < this.numFields;i++)//loop through all form fields)
{
var fldName = this.getNthFieldName;
var currentFld = this.getField (fldName);
if(currentFld.type=="radio")
{
All the radios that are needed to see if the user filled their
if(currentFld.Value=="OFF")
AllRequiredFieldsSet = false; one of the option boxes has not been selected, this form cannot be sent
}
}
If (AllRequiredFieldsSet is false)
App.Alert ("all the required areas have not been met");
on the other
this.submitForm ({cURL"mailto:EMAILADDRESS@gmail.com", cSubmitAs: "PDF"});
Miss me not all media... Any ideas on what I'm missing?
Thank you! Judy
These two lines should fix things:
var fldName = this.getNthFieldName (i);
...
if(currentFld.type=="RadioButton")
Tags: Acrobat
Similar Questions
-
Check the conditional Radio button
Hello
I am building a form where I have elements that must be calculated and have the sum in a (TOTAL) field in the digital field.
What I'm looking for, it is as shown below. If the number that appears in the TOTAL field falls between 130 and 140, i want the first radio button to be activated automatically, and so on so forth for 5 boxes.
Can you please let me know how to achieve this?
Note: I am very new to Livecycle Designer.
Kind regards
I created a sample for you... Please see the attachment. The code to fill the option boxes is on the RadioButtonList object.
Paul
-
Need help with Javascript to get the value of standard report column
Hi all
Apex 3.1 version
I have a query SQL (editable report) region where I need to do validations using a process of OnDemand and javascript. For this posting, I need to use the serial number and id of this same report line item. The function is called when the serial number is changed. I can get the serial number easily because it is a text field, however, the item id is a standard report column (which actually a text field or hidden gives me a checksum error, long story). How can I get the value of the standard report column to set the value of an element of the Application to use in my process of application as well as the serial number? Here is my code below.
<script> function f_ValidateSerial(pThis) { // The row in the table var vRow = pThis.id.substr(pThis.id.indexOf('_')+1); //alert('Row is '+vRow); // Display the serial number //alert('The Serial Number is '+html_GetElement('f21_'+vRow).value); var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateSerial',0); get.add('F101_SERIAL_NUMBER',html_GetElement('f21_'+vRow).value); get.add('F101_INVENTORY_ITEM_ID',+html_GetElement(?????+vRow).value); // Here's where I need to get the item id to set application item!! gReturn = get.get(); if (gReturn) { alert(gReturn); } if(gReturn) { html_GetElement('f21_'+vRow).value = ''; } } </script>
Hello
Ok
Item ID is standard report column.
If you enter this Expression HTML column#ITEM_ID#
I guess that the substitution of column item Id is #ITEM_ID #.
Now, you have hidden input form that is not submitted.
Then in JavaScriptget.add('F101_INVENTORY_ITEM_ID',+html_GetElement('item_id_'+Number(vRow)).value);
Kind regards
Jari -
Need help with JavaScript button to save as an event.
Hello
I use Adobe Acrobat X Pro and am totally new to scripting of forms in Adobe (completely new to Adobe Acrobat as well!). There is a backup on a form button that opens the Save dialog box under using a trigger (the mouse upward) and action (execute a menu item - file > save under... > PDF...) and it works fine, however, I want to now use javascript to change the behavior of the button so that it uses a trigger (the mouse upward) and action (run a JavaScript script) , and I want that JavaScript to combine the text values in two form fields (a location drop down and a date text field) and use this string concateneated + ".pdf" as the file name when he opens the Save as dialog box. Make sense?
This is what I added to the button as a JavaScript so far I use a test at this time string ("NewFile.pdf") and add the string that is concatenated to the script after that I know that the script works as it should.
var NouveauNomFichier = "NewFile.pdf";
var pathArray = this.path.split("/"); "
pathArray.pop ();
pathArray.push (newFileName);
this.saveAs(pathArray.join("/")); "
Up to present two questions:
1. when I click the button nothing happens, no dialog Save as or whatever it is.
2 when I check the properties of the button depending on the Actions tab shows property to select Action "Performing a menu item", even if I chose previously 'run a JavaScript '.
Thanks for any help!
The saveAs method will not work if the code is placed in a key event. It would need to be in a JavaScript file to the folder level, inside a function of confidence, inside a block of app.beginPriv/app.endPriv. Each user must have the JavaScript file to the folder level. The button can then call the code in the file. It will be possible for users of the form?
-
Need help with custom script to rename the layers
Hello world.
I need help to write a custom script (because I suck at it) that will allow me to go through all the layers and sous-calques for a specific name ('X') and give it a new specific name ('Y').
I have had success using the script below, but it does not work on any text layers names where the text layer was previously particularly well-known in 'X' and now changed needs.
Any help is greatly appreciated.
* Note: this script was originally used to find any layer with 'Copy' in its name and remove with anything after (to correct the problem of duplication of layers by adding this text).
This is why the function is named removeCopy. It works for renaming layers also - just not a layer of text unfortunately.
#target illustrator function removeCopy() {} If (app.documents.length == 0) return; var app.activeDocument = docRef; recurseLayers (docRef.layers); } removeCopy(); function recurseLayers (objArray) {} for (var i = 0; i < objArray.length; i ++) {} ObjArr [i] .name = ObjArr [i].name.replace (/ \s*current name\s*\d*/, 'new name'); If (objArray [i] .layers) recurseLayers (. layers.length > 0 ObjArr [i]); } } I finally found something after searching forums for a week. My confusion was related to the way Illustrator treats real layers against text/path/object "layers." Instead of layers, I had to use the pageItems in the script. The code below works. Thanks to Gustavo for his answer in another thread and Carlos I thank you for this looking too good! You're great to be ready to help models do more advanced things with Illustrator.
var doc = app.activeDocument; var items = doc.pageItems; for (var g = 0; g) elements [g] .name = elements [g].name.replace ('Century Schoolbook text line', ' MonogramText: Century Schoolbook "); }; App.Redraw (); -
Need help with a query complex for the production database
Hello again,
I need your help once again, for a query how to show me how long each stage of production is by order.
See examples of data and what I expect.
Thank you all for your help.
We use Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
Here the example data tables:
And here's what I expect of my request:CREATE TABLE TABLE_2 ( "ORDER_NR" VARCHAR2 (12) , "PRIORITY" VARCHAR2 (2) , "WO_STEP" VARCHAR2 (1) , "STEP_DATE" DATE ); CREATE TABLE TABLE_1 ( "ORDER_NR" VARCHAR2 (12) PRIMARY KEY , "PRIORITY" VARCHAR2 (2) , "CREATE_DATE" DATE , "ACT_STEP" VARCHAR2 (2) , "STEP_DATE" DATE , "EMPLOYEE" VARCHAR2 (5) , "DESCRIPTION" VARCHAR2 (20) ); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION) VALUES ('1KKA1T205634', '12', TO_DATE('10-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS'), 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS'), 'W0010', 'CLEAN HOUSE'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, CREATE_DATE, ACT_STEP, STEP_DATE, EMPLOYEE, DESCRIPTION) VALUES ('1KKA1Z300612', '12', TO_DATE('08-FEB-13 14:00:00','DD-MON-RR HH24:MI:SS'), 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS'), 'K0052', 'REPAIR CAR'); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'A', TO_DATE('12-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'S', TO_DATE('21-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'R', TO_DATE('21-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1T205634', '12', 'U', TO_DATE('28-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'A', TO_DATE('12-FEB-13 13:52:42','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 09:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 11:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'K', TO_DATE('13-FEB-13 12:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', '5', TO_DATE('13-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'C', TO_DATE('14-FEB-13 08:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'B', TO_DATE('14-FEB-13 10:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'E', TO_DATE('18-FEB-13 13:00:00','DD-MON-RR HH24:MI:SS')); INSERT INTO TABLE_2 (ORDER_NR, PRIORITY, WO_STEP, STEP_DATE) VALUES ('1KKA1Z300612', '12', 'F', TO_DATE('20-FEB-13 16:00:00','DD-MON-RR HH24:MI:SS')); COMMIT;
And now the explanation for the result of the query:SYSDATE 28.Feb.13 14:00 ORDER_NR PRIORITYCREATE_DATE STATUS STATUS_DATE DESCRIPTION AGE_1 AGE_2 WAITNG STEP_A STEP_B STEP_C STEP_5 STEP_K STEP_E STEP_F STEP_S STEP_R 1KKA1T205634 12 10.Feb.13 10:00 U 28.Feb.13 12:00 CLEAN HOUSE 18,083 8,833 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666 0,042 7,125 1KKA1Z300612 12 08.Feb.13 14:00 F 20.Feb.13 16:00 REPAIR CAR 20,000 16,042 2,125 0,833 4,125 0,083 0,750 0,208 2,125 0,666
The AGE_1 is the difference in days between the "CREATE_DATE" and if EXSIST L'ETAPE 'U' then STEP_DATE or if the STEP 'U' is not found in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
The AGE_2 is the difference in days between the STEP "A" STEP_DATE and IF EXSIST L'ETAPE 'R' then STEP_DATE or if the STEP 'R' is not in TABLE_2 then it should show the difference in days between the "CREATE_DATE' and the 'SYSDATE.
The EXPECTATION is the difference in days between CREATE_DATE and STEP 'A' STEP_DATE
The following columns indicate the days, how long the ORDER_NR remains in these TIMES, if an ORDER_NR comes in the same STEP should be calculated together more than once.
If the ORDER_NR jump a step, it should show a zero in the specific field.
I hope that my explanation is good enough, my English skills are far from good.
Thank you for all your help.
Hosts Reinhard W.Solomon Yakobson says:
Just add the amounts:In fact, you could edit all CASES:
with t2 as ( select t.*, lead(step_date) over(partition by order_nr order by step_date) next_step_date from table_2 t ) select t1.*, nvl( max( case t2.wo_step when 'U' then t2.step_date end ), sysdate ) - t1.create_date age_1, nvl( max( case t2.wo_step when 'R' then t2.step_date end ), sysdate ) - t1.create_date age_2, sum( case when t2.wo_step in ('B','5') then t2.next_step_date - t2.step_date end ) step_b_5, sum( case t2.wo_step when 'C' then t2.next_step_date - t2.step_date end ) step_c, sum( case t2.wo_step when 'K' then t2.next_step_date - t2.step_date end ) step_k, sum( case t2.wo_step when 'E' then t2.next_step_date - t2.step_date end ) step_e, sum( case t2.wo_step when 'F' then t2.next_step_date - t2.step_date end ) step_f, sum( case t2.wo_step when 'S' then t2.next_step_date - t2.step_date end ) step_s, sum( case t2.wo_step when 'R' then t2.next_step_date - t2.step_date end ) step_r from table_1 t1, t2 where t2.order_nr = t1.order_nr group by t1.order_nr, t1.priority, t1.create_date, t1.act_step, t1.step_date, t1.employee, t1.description / ORDER_NR PR CREATE_DA AC STEP_DATE EMPLO DESCRIPTION AGE_1 AGE_2 STEP_B_5 STEP_C STEP_K STEP_E STEP_F STEP_S STEP_R ------------ -- --------- -- --------- ----- ----------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- 1KKA1T205634 12 10-FEB-13 U 28-FEB-13 W0010 CLEAN HOUSE 18.0833333 10.9583333 4.875 .083333333 .208333333 2.125 .666666667 .041666667 7.125 1KKA1Z300612 12 08-FEB-13 F 20-FEB-13 K0052 REPAIR CAR 44.252338 44.252338 4.875 .083333333 .208333333 2.125 SQL>
SY.
-
Need help with Javascript for Acrobat 9 Pro
Hello
I have created a PDF form in Adobe Acrobat 9 of Profession. Not having not much experience with Javascript, I found this forum very helpful and have many examples of script used to other issues, I had. I was hoping that someone could help me with the following script, I tried many variations, cannot operate.
var ratio = this.getField("ratio").value
concentration of var = this.getField("concentration").value
var result = this.getField("result").value
If (ratio.value > = 50.00)
{result.value = 'PASS' ;}
If (ratio.value".value > = 40.00)
{result.value = 'PASS' ;}
If ((concentration.value ==61) & & (ratio.value > = 49,25))
{result.value = 'PASS' ;}
If ((concentration.value ==61) & & (ratio.value > = 39.25))
{result.value = 'PASS' ;}
If ((concentration.value ==62) & & (ratio.value > = 48.50))
{result.value = 'PASS' ;}
If ((concentration.value ==62) & & (ratio.value > = 38.50))
{result.value = 'PASS' ;}
on the other
{result.value = "FAIL" ;}It's just a piece of code, concentration values run from 61 to 99 and the value of the ratio varies for each value of the concentration, there is a high ratio and a low ratio. The result of this field to complete the field of results with a SUCCESS or a FAILURE. This isn't working... any help is greatly appreciated!
If this script is attached to the Calculate of the "result" field event, if I understand correctly the logicm code should be something like:
// Get a reference to the ratio field var ratio = this.getField("ratio"); // Get a reference to the concentration field var concentration = this.getField("concentration"); // Default var res = "FAIL"; if (ratio.value >= 40.00) { res = 'PASS'; } if ((concentration.value == 61) && (ratio.value >= 39.25)) { res = 'PASS'; } if ((concentration.value == 62) && (ratio.value >= 38.50)) { res ='PASS'; } // Set this field's value event.value = res;
If the code is placed elsewhere, you must indicate the location.
-
Need help with choice variables remain in the new session
I have a set of approx. Flash to the top with several variables. Y at - it a simple action script that will allow the user to maintain their choice after the closure of the .swf and revive it?
Thanks in advance for your help.How do check you if these components have been checked or ticked. in fact, I probably don't want to know that.
you really recommended to use a listener to detect when your components have changed and then you can use the modified method to define your variables and update your sharedobject.
-
I build several forms for www.iswapusa.com and on the site, visitors are asked to upload images, I want to restrict the width in pixels max 400 pixels and size to maybe 1 MB to 3 MB of the file images if possible. If there is a code to do this, please let me know and where do I put it on business catalyst system. to work with forms I create or even if I have to give to each form. The forms are available from one of these pages offer commercial or Non-commercial offer.
I found the answer to my problem. It is not a java solution, but a simple code. You can create in your retail or list view depending on where you want the images appear of your form will be mailed. the answer was in a previous post, and the link is:
Dynamically generating thumbnail images
The code I used was:
-
Girls need help with a script to repeat the link to another folder in indesign
I REALLY hope you smart people can help me.
We had servers which means that all of our Indesign documents now have a broken link. To manually "re-edit the link to the file" causes Indesign down :-(. And it takes forever I am hoping to find a script that can connect all the links in the doc to a new file structure.
The name of the link (name of file) and the file structure remains the same; Just point to another server. The structure contains subfolders so the best way would be that the script can see subfolders as well, but otherwise I would gladly use a script that points of 6 subfolders at a time.
Problem - I KNOW NOT ALL SCRIPTS and I'm a graphic designer so I can't create scripts :-(. I have already had success Googling a script to unlink everything in the document, but I don't know how to run the script. DO NOT to create them.
ANY help in this forum? I have 6 designers waiting for me to fix this.
Is there a script where I could just change the path and then he could repeat?
We have iMac OSX Yosemite 10.10.4
PLEASE HELP... :-)
/ Dina
Try this... it is created by Vamitul
main() {} function
var doc = app.activeDocument;
myLinks var = doc.links.everyItem () .getElements ();
var linkObj = {};
Create the initial object
/ * {linkObject
[path] {missingNr,
arrayOfMissingLinks}
} */
for (var i = 0; i)< mylinks.length;="" i++)="">
If (myLinks [i] .status == LinkStatus.LINK_MISSING) {}
var myPath = File(myLinks[i].filePath).path.toString ();
If (linkObj [myPath] == undefined) {}
linkObj [myPath] = {}
missingNr: 1.
missingLinks: [myLinks [i]],.
newPath: "
}
} else {}
linkObj [myPath] .missingNr ++;
linkObj [myPath].missingLinks.push (myLinks [i] .getElements () [0]);
}
}
}
$.writeln (linkObj.toSource ());
var myDialog = new window ("dialog", "link Chaser:', undefined");
Panel1 = myDialog.add var ('panel', undefined, "double-click to select the new path '");
Panel1. Align = ["fill",""];
myList var = panel1.add ("listBox", undefined, "", {})
columnWidths: [160, 160, 130],
numberOfColumns: 3,.
showHeaders: true,
columnTitles: ['old road', 'New Path', 'Nr. missing links']
});
myList.size = [450, 200];
myList.align = ["fill",""];
for {(var missingPath in linkObj)
with (myList.add ("item", missingPath)) {}
Subitems [0] .text is linkObj [missingPath] .newPath;.
Paragraphs [1] .text is linkObj [missingPath] .missingNr;.
}
}
myList.onDoubleClick = function() {}
var myNewPath = (new folder (app.activeDocument.filePath) .selectDlg ("Select New Folder") |. toString() ' ");
myList.selection.subItems [0] .text = myNewPath;
linkObj [myList.selection.text] .newPath = myNewPath;
}
myDialog.add ('button', {undefined, "Ok",
name: 'ok '.
});
myDialog.add ("button", undefined, "Cancel", {})
name: "Cancel".
});
If (myDialog.show () == 1) {}
for (var i in linkObj) {}
If (linkObj [i] .newPath! = ") {}
var fixedNr = 0;
Var links = linkObj [i] .missingLinks
for (var j = 0; j)< links.length;="" j++)="">
var queue = newFile (linkObj [i] .newPath + "/" + links [j] .name);
If {(newFile.exists)
fixedNr ++;
Links [j] .relink (NewFile);
}
}
Alert ("in the folder: \n" + linkObj [i] .newPath + '\n' +)
'Fixed' fixedNr ' links of ' + linkObj [i] .missingNr + '\n ' +.
"Please check");
}
}
};
}
app.doScript ('main()', undefined, undefined, UndoModes.entireScript, "Chaser link");
-
Need help with this code to update the user interface example
I'm triying to understand the differences between the three methods to manage UI interactions.
I'm really confused with these three terms when triying them figure out in a real case.
Basically, I know that I should use invokeLater, invokeAndWat, or getEventLock() to avoid
This exception: java.lang.illegalStateException: engine access UI without holding the lock on the eventThe code below illustrates the function of the invokeAndWait method, but if I replace it with
invokeLater or getEventLock() the program will work exactly the same way.
Could you please change the code to show the differences between the three
methods of updating the user interface?/ public final class HelloWorldMainScreen extends form {}
private LabelField labelField;
public HelloWorldMainScreen() {}
labelField = new LabelField ("Hello World");
Add (labelField);
Thread MainScreenUpdaterThread = new MainScreenUpdaterThread (this);
thread. Start();
}{} public void appendLabelText (String text)
labelField.setText(labelField.getText()+"\n"+text);
}}
SerializableAttribute public class MainScreenUpdaterThread extends Thread {}
HelloWorldMainScreen screen;public MainScreenUpdaterThread (screen HelloWorldMainScreen) {}
this.mainScreen = screen;
}public void run() {}
for (int i = 0; i)< 10;="" i++)="">
try {}
Thread.Sleep (5000);
} catch (InterruptedException ex) {};
UiApplication.getUiApplication () .invokeAndWait (new Runnable() {}
public void run() {}
mainScreen.appendLabelText ("Update");
}
});}
}
}These three concepts are very confusing for a lot from people so all explanatory source code
describing their functions will be highly useful for everyone, I think.Thanks in advance!
With respect to the effect, there is no difference between methods. The difference is the way in which the result is achieved. So we can't change the code to show you the difference.
As we are unable to demonstrate the difference, you have to do with an explanation. To understand the explanation, you'll need to understand the thread of events, so if you have not already, please consider this:
http://supportforums.BlackBerry.com/T5/Java-development/what-is-the-event-thread/Ta-p/446865
If the three options are differentiated by the processing order:
(a) invokeLater executes the update on the thread of events. The transformation takes place at a later stage and the code which is in order after the invokeLater will actually run before the code within the invokeLater.
(b) invokeAndWait also manages the update on the thread of events, which means that all other events that await on the thread of events will be run before this code. But any code after the invokeAndWait will not be executed.
(c) the synchronized option, like invokeAndWait, runs the update of the UI before moving on to the following code. The difference is that the code to run on the event Thread is not executed before code in the synchronized block.
If this is meaningless, so that probably does not matter too much. in general, you should use invokeLater, except if you need to update the user interface occur in the order with your background processing. If so, use invokeAndWait. It has synced are very few occasions where you must use the block, and it should be very small updates to the user interface and you should understand the implications this could have on the wire events.
-
Need help with a self-join select the parent and child
Hi all
I have an OFFICE table that will hold the Oncology, district and division of the hierarchic is Oncology-district-> division >
I want to list Oncology, district and division with its parent of the value of the followingprovinc district division A NULL NULL A A.A NULL A A.A A.A.A
I need your help.-- Create table CREATE TABLE OFFICE ( SLNO VARCHAR2(20 BYTE), OFFICE_NAME VARCHAR2(20 BYTE), PARENT_SLNO VARCHAR2(20 BYTE), TYPE VARCHAR2(2 BYTE) ); ALTER TABLE OFFICE ADD ( CONSTRAINT OFFICE_PK PRIMARY KEY (SLNO) ); ALTER TABLE OFFICE ADD ( CONSTRAINT P_C_FK FOREIGN KEY (PARENT_SLNO) REFERENCES OFFICE (SLNO)); INSERT INTO OFFICE (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE) VALUES ('1', 'A', NULL, 'PR'); INSERT INTO OFFICE (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE) VALUES ('2', 'A.A','1', 'DT'); INSERT INTO OFFICE (SLNO, OFFICE_NAME, PARENT_SLNO, TYPE) VALUES ('3', 'A.A.A', '2', 'DV');
Thank you.
Published by: Dipabkar Banik (DB) on June 13, 2011 12:17 AM
Published by: Dipabkar Banik (DB) on June 13, 2011 12:18 AM
Published by: Dipabkar Banik (DB) on June 13, 2011 06:45
Published by: Dipabkar Banik (DB) on June 13, 2011 06:47Try this
SELECT CONNECT_BY_ROOT (office_name) provinc, DECODE (LEVEL, 2, office_name, PRIOR office_name) district, DECODE (LEVEL, 3, office_name) division FROM office CONNECT BY PRIOR slno = parent_slno START WITH parent_slno IS NULL
-
Need help with Javascript automated e-mail
I am trying to modify a form to add a button that takes the values of the fields that will be filled in by the user and then send an email using these fields
currently I have the following script:
var A = xfa.resolveNode("topmostSubform.Page1.Work_Order__").rawValue;
var B = xfa.resolveNode("topmostSubform.Page1.NOMENCLATURE").rawValue;
var PPC = xfa.resolveNode("topmostSubform.Page2.Email_Address_PPC").rawValue;
void var = 'work created order. "
var msgBody = "Order of work" + A + "\n for the" B + "program has been created"; "."
app.mailMsg ({}
bUI: false,
cTo: PPC,.
bassujetti: void.
CMSG: msgBody,
});Thanks for your help,
John
Hi John,.
Your script looks not too bad. Here is our generic script:
var vEmail = "[email protected]"; var vSubject = "A Subject for your email"; var vBody = "Put your body message here..."; event.target.app.mailMsg({ bUI: true, cTo: vEmail, cSubject: vSubject, cMsg: vBody });
Try putting "event.target." before the app.mailMsg. Also you need not of the xfa.resolveNode, if the items, pages, and the subofrms are appointed.
Hope that helps,
Niall
-
Need help with creating table that inserts the lines according to the amount of data
Hello
I try to create a table for supervisors to enter their subordinates of information and inserts lines for supervisors with several of his subordinates. This form is not be connected to a data source, the supervisors will be simply fill out the form and print. I want it sort of look like this:
Name Position # Ranking Hours I really appreciate any help. Thank you!
Hi Laura,
It's very strange. I downloaded a new version on the site and it works perfectly. The script is in the right place.
I can sugggest you right click on the download link and select "save a copy as" the alternative menu. This should save the form locally and from there, you should be able to open it in Acrobat.
If you are a Mac, make sure that the form opens in preview from Apple.
Also make sure that Javascript is enabled in Acrobat (in the preferences window).
Niall
-
Need help with Windows 8 Configuration of the updates to fail and return
I solved the problem by doing this...
I have disabled the start secure in the bios, reformat the computer through the partition to restore by using the 'Minimized Image' option, disabled the automatic updates, manually downloaded KB2871389 and KB2917499 and installed, then ran the troubleshooting of Windows Update, and it then allowed me to start the download from the Microsoft Store wihtout 8.1 get updated which were needed for Win8. As I type this 8.1 is the installation. I cross my fingers and hope it works. I have WAY too much time invested is this crazy situation. Microsoft is getting worse day by day.
Maybe you are looking for
-
Hi I was wondering if I could put a 466 ibook clamshell DVD player in an indigo ibook clam shell it'll work.
-
Hello I had a question quite simple reagrding an error message that appears when I try to run a program PWM. Basically, I am using a 6211 IO device NOR, and I used the DAQ assistant to configure a counter pulse output in channel Ctr0. I try assistan
-
I upgraded my F-Secure Security Suite... after that, I could not open Itunes store... Now, my Itunes does not at all open. Also my security in the Panel Center opens. Don't know what else is affected. I don't remember ever seeing this infostring i
-
I can't go online with or without wire. I've uninstalled and reinstalled IE 7 and 8. And firefox installed. Still can't. Message reads page cannot be displayed. When I fix it cannot renew ip address Help original title: I can't go online with or with
-
How can I track when a PC is locked and unlocked then?
Hi all How can I track what time (and how long) a PC (on a network) is locked and unlocked then (can't see anything in Event Viewer)? XP Pro. Thank you