Question to submit the value of the box in a tableview
Hello everyone, I have a tableview and a checkbox in one of the columns. However, I have problems in retrieving the value for the checkbox control in my action method. Any help to solve this is highly appreciated...My FXML:
<BorderPane id="adminTab" xmlns:fx="http://javafx.com/fxml" fx:controller="controllers.TabInboxController">
......................................
......................................
<Tab fx:id="billReferralTab" closable="false">
<text>Bill Referrals</text>
<content>
<BorderPane fx:id="billReferralsPanel">
<center>
<TableView fx:id="billReferralsDataTable"/>
</center>
<bottom>
<VBox spacing="15">
<children>
<Separator orientation="horizontal"/>
<Button text="Accept the Bills" onAction="#addBillReferrals" defaultButton="true"/>
</children>
</VBox>
</bottom>
</BorderPane>
</content>
</Tab>
......................................
......................................
<BorderPane/>
My controller: I need to retrieve the last State (enabled or disabled) of my check boxes in the table column. However it always returns false...//All imports
public class TabInboxController implements Initializable {
@FXML
private TableView<BillReferralDataModel> billReferralsDataTable;
@FXML
private BorderPane billReferralsPanel;
@FXML
protected void addBillReferrals(ActionEvent event) {
try {
UserBean userBean = CAClient.getInstance().retrieveUserBeanFromCache();
String userId = userBean.getLoginId();
ServiceLocator serviceLocator = ServiceLocator.getInstance();
BillReferralsDataSLBeanRemote billReferralsRemote = serviceLocator.retrieveBillReferralsEJB();
ObservableList<BillReferralDataModel> billReferralsList = billReferralsDataTable.getItems();
for (BillReferralDataModel billReferralDataModel : billReferralsList) {
// ALWAYS displays false irrespective of my checkbox status on the screen...
System.out.println("isAddToHome?::"+billReferralDataModel.getAddToHome());
System.out.println("isPending?::"+billReferralDataModel.getPending());
}
} catch (NamingException ex) {
Logger.getLogger(TabInboxController.class.getName()).log(Level.SEVERE, ex.getExplanation(), ex);
}
}
@Override
public void initialize(URL url, ResourceBundle rb) {
UserBean userBean = CAClient.getInstance().retrieveUserBeanFromCache();
Integer committeeId = userBean.getCommitteeId();
ObservableList<BillReferralDataModel> billReferralsList = retrieveBillReferrals(committeeId);
billReferralsDataTable.setItems(billReferralsList);
billReferralsDataTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
CheckboxTableCellFactory checkBoxFactory = new CheckboxTableCellFactory(Pos.CENTER, billReferralsDataTable);
billReferralsDataTable.setTableMenuButtonVisible(true);
TableColumn billIdCol = new TableColumn("Bill Id");
billIdCol.setCellValueFactory(new PropertyValueFactory<BillReferralDataModel, String>("billId"));
billIdCol.setCellFactory(alignmentFactory);
TableColumn addReferralCol = new TableColumn("Add");
addReferralCol.setCellValueFactory(new PropertyValueFactory<BillReferralDataModel, Boolean>("addToHome"));
addReferralCol.setCellFactory(checkBoxFactory);
addReferralCol.setEditable(true);
addReferralCol.setOnEditStart(new EventHandler<CellEditEvent<BillReferralDataModel, Boolean>>() {
// The control never goes in here when I click on my checkboxes
@Override
public void handle(CellEditEvent<BillReferralDataModel, Boolean> t) {
((BillReferralDataModel) t.getTableView().getItems().get(
t.getTablePosition().getRow())).setAddToHome(t.getNewValue());
}
});
addReferralCol.setOnEditCommit(new EventHandler<CellEditEvent<BillReferralDataModel, Boolean>>() {
// The control never goes in here when I click on my checkboxes
@Override
public void handle(CellEditEvent<BillReferralDataModel, Boolean> t) {
BillReferralDataModel dataObject = (BillReferralDataModel) t.getTableView().getItems().get(t.getTablePosition().getRow());
}
});
TableColumn pendingCol = new TableColumn("Pending");
pendingCol.setCellValueFactory(new PropertyValueFactory<BillReferralDataModel, Boolean>("pending"));
pendingCol.setCellFactory(checkBoxFactory);
pendingCol.setEditable(true);
billReferralsDataTable.setEditable(true);
billReferralsDataTable.getColumns().setAll(billIdCol, addReferralCol, pendingCol);
}
private ObservableList<BillReferralDataModel> retrieveBillReferrals(Integer committeeId) {
ObservableList<BillReferralDataModel> billReferralsDataList = null;
try {
ServiceLocator serviceLocator = ServiceLocator.getInstance();
... ... ... ... ... ... ... ... ... ... ...
RETRIEVE DATA FROM THE DATABASE
... ... ... ... ... ... ... ... ... ... ...
billReferralsDataList = FXCollections.observableArrayList(billReferralsList);
Logger.getLogger(TabInboxController.class.getName()).log(Level.INFO, "Bill Referrals Data List Size::{0}", billReferralsDataList.size());
} catch (NamingException ex) {
Logger.getLogger(TabInboxController.class.getName()).log(Level.SEVERE, "Failed to get EJB connection");
Logger.getLogger(TabInboxController.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
}
return billReferralsDataList;
}
}
Plant cells to generate checkboxes:public class CheckboxTableCellFactory implements Callback<TableColumn, TableCell> {
Pos position;
Object object;
public CheckboxTableCellFactory(Pos thisPosition, Object thisObject) {
this.position = thisPosition;
this.object = thisObject;
}
@Override
public TableCell call(TableColumn arg0) {
final CheckBox checkBox = new CheckBox();
checkBox.setUserData(object);
TableCell tableCell = new TableCell() {
@Override
public void updateItem(Object item, boolean empty) {
super.updateItem(item, empty);
if (item != null) {
boolean selected = ((Boolean) item).booleanValue();
checkBox.setSelected(selected);
} else {
checkBox.setVisible(false);
}
}
};
tableCell.setAlignment(position);
tableCell.setGraphic(checkBox);
return tableCell;
}
}
My grain of data model:package model;
import java.io.Serializable;
import java.util.ArrayList;
import javafx.beans.property.*;
public class BillReferralDataModel implements Serializable {
private StringProperty billId = new SimpleStringProperty(this, "billId", "");
private BooleanProperty pending = new SimpleBooleanProperty(this, "pending");
private BooleanProperty addToHome = new SimpleBooleanProperty(this, "addToHome");
public String getBillId() {
return billId.get();
}
public void setBillId(String billId) {
this.billId.set(billId);
}
public final StringProperty billIdProperty() {
return billId;
}
public boolean getPending() {
return pending.get();
}
public void setPending(boolean pending) {
this.pending.set(pending);
}
public final BooleanProperty pendingProperty() {
return pending;
}
public boolean getAddToHome() {
return addToHome.get();
}
public void setAddToHome(boolean addToHome) {
this.addToHome.set(addToHome);
}
public final BooleanProperty addToHomeProperty() {
return addToHome;
}
}
I'm sure that I'm missing out on a minor addition. Any hint on solving this would be appreciated.Thank you.
Hello Florent.
I have not read all your codes but from the title of your question. I think that you are not been able to get the status of the Update checkbox. To obtain the present value of checkbox, you must update 'OBJECTS' tableview to plant cells check box. For the State of the elements of this update...
SIMPLE ALGORIGTHM
-CLICK EVENT IS PAST IN THE CELL (BOX)
-FUNCTION CELL_FACTORY TRIGGERS
-YOU WILL GET THE INDEX OF THE LINE
-UPDATE THE TABLE VIEW "ITEMS" WITH AND UPDATE THE SPECIFIC INDEX
-THE CHANGES WILL HAPPEN THIS WAY
Thank you
Narayan
Tags: Java
Similar Questions
-
How to set the value of the box check the plug-in in session state using a DA
I want to click on the box (plug version) and set (Y or N) in session state without submitting the page. Is it possible to do it in a dynamic action? or a code in the ? The HTML Form element attributes
I tried the code proposed to
using AJAX, but can't make it work.
I also tried the following code, but doesn't seem to work for checkboxes.
<script language="JavaScript" type="text/javascript"> function f_setItem (pItem) { //alert('running fsetItem'); var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',&APP_PAGE_ID.); get.add(pItem,$x(pItem).value) gReturn = get.get(); get = null; } </script>
More modern solutions using a DA?
Should I use an event 'onCheck' or 'onchange '?
Thanks in advance
PaulP
APEX V4.2.3
DB EA 11.2
APEX listener V2.0.5.287.04.27
13 blue-gray theme
IE9.0.8112
FF26.0
Paul, in fact, you can use a dynamic Action.
Say your question change event, say P1_CHECKBOX.
So here's the clincher.
Action: execute the PL/SQL Code
PL/SQL code:
Start
null;
end;
Page to submit items: P1_CHECKBOX
That's all.
Read the help on the elements of Page to submit
«Specify a list separated by commas of the elements of the page that will be submitted to the server and therefore available for use in your 'code PL/SQL'.»
Kofi
-
A question with the option "check all the boxes."
Is it possible to use advanced actions to create a custom where question the following may occur:
- users can "see all that apply" to a matter of choice mulitple (3 responses)
- have a comment box if all selected users boxes - which is the right answer
- Another boc feedback if users selected only 1 or 2 boxes.
I played around with the widget CheckBoxesEnhancded however, the answers to my questions are long and the formatting looks terrible.
Would propose the widget checkboxes, but apparently you don't like it.
Another way is to use images of a checkbox control and cover it with a box of click that can trigger a tip action. You will need to show the check mark by this advanced action, assign a value to a variable that is associated with it and the adapted text of legend. This will be a conditional action, since you have to check each time if 1, 2 or marked all of the boxes were correct. Or if you want a submit button, which seems logical, because it allows the user to decide when to enter his answer? In this case the actions triggered by the boxes to click on checkboxes can be standard stock, showing the check mark, assign the value to the corresponding variable, disabling, or hide the click box and rewind the playback head (Assign rdcmndGotoFrame with rdinfoCurrentFrame) so that it will not continue on the timeline. If you want to allow the user to disable the checkbox, it should be a conditional action because in this case, you will hide the check mark yet once if she was already there (variable value) and do not need to disable the click box. The point of suspension of the Submit button should be later than ellipsis boxes to click. The Send button will trigger an advanced condtional verifies that the text caption should be made visible.
Lilybiri
-
Question about the boxes and enters the information
I am runing a form which takes the boxes of a query. They have the same name, but different values.
On the action page, for each check box selected, a new record must be created in the db.
IM' sure this has to do with counting and defining a number of loop, but for some reason, I paint a white.
The query is the basis...
< cfquery = "whatever" datasource = dbname name # >
insert into ach_world_done
(id, scoutid, den, world)
Values
(' #url.id #',' #url.scoutid #',' #url.den #',' #form.world # ')
< / cfquery >
As it is written now, it conmas the check boxes on the previous page, so if there are two boxes checked, it makes info1, info2 and this puts in the db. I need to break it up.
any help would be greatly appreciated.
Sharon
www.smdscouts.com
On the page of the form, type a unique name to each checkbox:
(X #dateformat(doh.datereceived,'mm/dd/yy') #.
On the action page, count the number of checkboxes. Remember that ColdFusion submit check boxes unchecked.
-
On my Mac Book Pro to always stop get question "continue application"? with the boxes option to cancel or continue the request.
Selection of abandonment does not prevent the following message appears when closing next down.
Activity monitor shows all the applications that you have
installed, running in the background? Something can be...
If you open the force quit, are there topics other than the Finder
and maybe a browser?
You repaired the disk from disk utility permissions lately?
We could also see other boot options on the use in
Recovery of OS X to use the "OS X Utilities" in there. Be careful.
Is there more than one user account on your computer? If you
Start in another user account and have auto login for
the fact that it is one that rises at the start, a piece
similar issues or is it just works fine on shut down?
The question may take some trial and error troubleshooting. This
may include some basic startup keyboard shortcuts for
the computer to start in Safe Mode, to do more test, etc.
If you have access to an official Apple store, you can be
able to set up an engineering appointment & have someone closer.
Good luck anyway...
-
How do the box values ring to have figures after the decimal point
How do the box values ring to have figures after the decimal point
Thanks in advance
Control properties editor:
Change the representation in the floating point data Type tab type, DBL will do.
Then go to the Page of display Format and increment 'Numbers' to something greater than 1
That toggles the column of values on the tab change the items to % .6f, or 6 digits of precision. Uncheck sequential following, values and you're there.
If you think that's too restrictive, go back the display Format, then select if rating and you can type anything (but, the editor has a hissing fit, so you must load chains and property [] with a property node values programmatically)
I've been struggling to get OR improve this editor of properties of the years!
-
Anyone know if the same firmware is installed in sw1 and sw2 on a C60 out of the box?
SECOND QUESTION: what happens if none is the process to factory reset a C Series codec if for some reason, unable to use the serial port?
Thank you.
Hello
Only one of the memory banks must be populated with a version of the software out of the box.
The second question depends on which codec C series you mean. C20 can be hard reset (power button sequence) while C40, C60 and C90 cannot and must be done either through web series, touch, telnet or ssh where each of them except series requires a network connection.
/ Magnus
-
Add lines to insert a table based on the box and the values in the LOV
I have two options (1) the list of values (2) box (2 values) .the are required field.when I click on create lines button and then insert table/slot (fire) form of table, based on my selected lov values (for example 3 selected then 3 rows only) and the value of the checkbox.
If I select 3 values LOV and then check the box 1
SEQ / / desc box SL (1) 1 DESC 1 1 2 DESC 2 2 3 DESC 3 3 If I select 5 values LOV and then check the box 0
Header 1 / / desc box SL (0) 1 DESC 1 0 2 DESC 2 1 3.. 5 DESC 3... 5 2.. 5 my workspace: ram_r & d
username/password: aramani/apex
App: https://apex.oracle.com/pls/apex/f?p=72423:1:102019883635814:NO
Thank you
RAM
It has achieved the goal, thread:multi line table based on LOV
-
Calculate values based on the boxes are checked - for Dummies...
Hello and thank you all in advance for your help. I'm trying to calculate a value based on the boxes checked. Specifically, I would like to add a particular value $$ each CheckBox and if this box is checked, I want to add to the total rental value (see screenshot below):
As you can see in the screenshot that I have different areas that can be selected (first floor, court before, etc.), I want to assign a value to the checkbox of each region (and added value for others) and calculate a total in the "Balance of rental fees" less the deposit. I'm new with java and scripts but not know how to do it in an excel formula. I guess it's very different from what little I know of Java. Any help you can give me would be greatly appreciated.
Calculation options are in the text field. In this screen, you only need to set the value of exports to the amount this box represents.
-
Use the drop-down menu to set the value of check boxes
Hello everyone, I am using a drop-down list field in a form to also check or uncheck the different boxes, based on the value. I'm looking for something like the following:
f = this.getField (event.target.name) .value;
g = this.getField ("Checkbox1");
h = this.getField ("Checkbox2");
If (f is 'Value1')
{
g.Value = true;
h.Value = false;
}
on the other
{
g.Value = false;
h.Value = true;
}
and so on. It works the way I want. This is probably a simple syntax or a thing of terminology. Can someone advise? Thank you!
The value of the boxes is not true or false, but one channel (either 'Off' or the value of exports).
You can also set the like this, but:
this.getField("Checkbox1").checkThisBox (0, true); check one
this.getField("Checkbox2").checkThisBox (0, false); to clear a check box
Edit: fixed the code
-
the simple contact form widget does not allow the user to submit. the lunch box turns red. What should I do?
Hello
You have used a form of e-mail field to create 'Appetite' section. This is the reason for which form registers an error as its not able to recognize an e-mail here entry.
email form field is a required field for form of Muse. Please rename back to e-mail and also to create another field in form in the widget forum (go to the Option to form and enter a single-line text field) and it should work properly.
Concerning
Vivek
-
Apex. Submit - the value of the claim
By using a number of different versions of Apex - on this particular server is Apex v4.0.2
The JavaScript API documentation indicates apex.submit () the definition of the QUERY variable - which I suppose is the point value of standard application used in the Apex.
I'm currently debugging presentation on the side of the browser and apex.submit () to DISPLAY the value of the request (as a variable p_request). But the value is not accepted or implemented on the side server. With the help of : REQUEST or v('REQUEST) in the regions of the page does not display the value of the validated request. It has the value null. There is no explicit condition of branch on the page.
Which do not work, is that the elements of page values assigned are submitted and seen by the back-end. For example if P1_NAME is defined in apex.submit (), this value is visible by regions/process page after submission. Unlike the value of demand.
I'm doing something wrong? Is this a problem with an older version of the Apex?
BillyVerreynne wrote:
It works very well. All elements of page Apex that are assigned values, performed with the values and the process/regions/etc on the next page has the correct values.
The value of the REQUEST is disabled before the exposure treatment page unless it is set in a branch or a URL, this is why he has no value when they are referenced in the next page.
Set the attribute to query in a branch of post-submit to the target page of
&REQUEST.
to demand ongoing value available in the page to see the transformation. -
Count the boxes, color Format according to value
Searched for how to count the boxes in a PDF form. Found this link and have renamed my boxes so that they share the same initial letters. Added the script below in the section of a body of numbers custom calculation script. Nothing happens not even. What should I know to set up correctly? Also, I need to add a table more so it adds another section to the meter. These boxes begin with cbxSAP. Once the number of box is working, is there a way to tell if the sum is = or greater than 14 to the green color of the border/field and the default value would be red? Hope that makes sense, thank you.
// Custom calculate script (function () { // Get an array of the PO checkbox fields var fa = getField("cbxPO").getArray(); // Initialize counter var sum = 0; // Loop through the fields and update counter for (var i = 0; i < fa.length; i += 1) { sum += fa[i].value !== "Off" ? 1 : 0; } // Set this field's value to the sum event.value = sum; })();
You have get an error and it's why the JavaScript console opens and displays the lines of information.
The first line indicates there is an eorror.
The code is a custom calculation script.
The code cannot locate the Group of fields named "cbxPO". Verify that the field whose name "cbxPO. ' # ' exist. The ' # ' is the name or number of subfield.
The code actually works if there are no errors.
For hierarchical fields, there must be "." separates levels. You field names must be:
cbxPO.Dest
cbxPO.Tax
cbxPO.Pay
cbxPO.Status
cbxPO.Freight
And it is not important what was once the value of exports.
-
store values in the box please help
Hi experts
I have a report with check boxes and I want to store the value of the checkbox and pass in a package, but his market not someone can see why
onsubmit of the process
BECAUSE me in 1... apex_application.g_f01. COUNTING LOOP
MY_PKG. REQUEST (p_parameter_value = > apex_application.g_f01 (i))
then
dbms_output.put_line ('success');
end if;
END LOOP;
exception
while others then
dbms_output.put_line (' an error has occurred = > > ' | sqlcode |) ', error - message ' | SQLERRM | (< < =');
end;Midnight man
Midnight_Man wrote:
SELECT TRP.TLS_REQUEST_PARAMETER_VALUE ,apex_item.checkbox(1,TRP.TLS_REQUEST_PARAMETER_VALUE) Select , TRH.TLS_VERSION_NUMBER ,apex_item.checkbox(1,TRH.TLS_VERSION_NUMBER) Version from TABLE_A TRP, TABLE_B TRH where TABLE_A.COL1=TABLE_B.COL1
Use idx different numbers of the two boxes.
And use APEX_APPLICATION. G_F02 (i) for the second box in the code of your process. (2 being the idx to your second box)Now
APEX_APPLICATION. G_F01 (1) is the first box on the first line.
APEX_APPLICATION. G_F01 (2) is the second checkbox on the first line.
APEX_APPLICATION. G_F01 (3) is the first box in the second row.
APEX_APPLICATION. G_F01 (4) is the second box of the second row.
etc.
If all the checboxen is checked.If the second box on the first line is not checked, it becomes.
APEX_APPLICATION. G_F01 (1) is the first box on the first line.
APEX_APPLICATION. G_F01 (2) is the first box in the second row.
APEX_APPLICATION. G_F01 (3) is the second checkbox on the first line.
APEX_APPLICATION. G_F01 (4) is the first box on the third row.Also if your mixture code apex_item and regular columns check if there is no duplication in the use of idx numbers.
If the box is simple O/N boxes why not use the ' display as ' "simple checkbox.
And check with your browser tools developer idx number used by the box.Nicolette
Published by: Nicolette on 7 November 2012 13:05 added the example of the checkbox unchecked.
-
Collect the value of edittext box &; menu drop-down list to manipulate the project
I built a simple GUI with a dropdown Panel and three boxes of edittext. I know not how to retrieve the values of each object to pass to the ASP (layers of text, project items). I'm still confussed on how to the onClick, onChange, onDeactivate, etc. methods work with functions... If I want to for example, to take the values in the boxes edittext to change values to text in a model layer, how could - I collect these values and pass them? In the sample code below it passes the default values for areas of edittext straight for layers of text in the model as soon as the GUI is launched...
myGUI (this);
function myGUI (thisObj) {}
var myGUIPalette = myGUI_buildUI (thisObj);
function myGUI_buildUI (thisObj) {}
var myPanel = (thisObj instanceof Panel)? thisObj: new window ("palette", "user input panel', undefined, {resizable: true}");
{//Build GUI
res = "group {orientation:"column",-}".
titleGroup: group {orientation: 'row', \}
myStaticText: StaticText {text: 'Handset team word interludes'}, \
},\
textLineGroup: Panel {orientation: "column,"------}
teamList:DropDownList {properties: {items: ['SORT CODES', '-', "ARI", "ATL", "BALL"]}}, \
line01: EditText {}, \
line02: EditText {}, \
line03: EditText {}, \
},\
'ButtonGroup': group {orientation: 'row', \}
clearButton: button {text: 'Clear'}, \
renderButton: button {text: 'Making'}, \
},\
}";
}
myPanel.grp = myPanel.add (res);
Default values
var myPanel.grp.textLineGroup = textBox;
textBox.teamList.selection = 0;
textBox.line02.visible = false;
textBox.line03.visible = false;
var button = myPanel.grp.buttonGroup;
var textBoxSize = (200, 20);
var textBoxCharacters = 30;
textBox.line01.size = textBoxSize;
textBox.line01.characters = textBoxCharacters;
textBox.line02.characters = textBoxCharacters;
textBox.line03.characters = textBoxCharacters;
Text box settings
var defaultText01 = "enter the text of the line 01 ';
var defaultText02 = "enter the text of the line 02."
var defaultText03 = "enter line 03 Text."
var myPanel.grp.textLineGroup = textBox;
textBox.line01.text = defaultText01;
textBox.line02.text = defaultText02;
textBox.line03.text = defaultText03;
textBox.line01.onActivate = function() {setTextBox (textBox.line01, defaultText01)};
textBox.line02.onActivate = function() {setTextBox (textBox.line02, defaultText02)};
textBox.line03.onActivate = function() {setTextBox (textBox.line03, defaultText03)};
function setTextBox (activeTextBox, defaultText) {}
if(activeTextBox.Text == DefaultText) {}
activeTextBox.text = "";
}
activeTextBox.onDeactivate = function() {}
If (activeTextBox.text == "") {}
activeTextBox.text = defaultText;
}
ElseIf (activeTextBox == textBox.line01) {}
textBox.line02.visible = true;
}
ElseIf (activeTextBox == textBox.line02) {}
textBox.line03.visible = true;
}
};
}
var teamTri;
textBox.teamList.onChange = function() {teamTri = textBox.teamList.selection};
Settings button
button.clearButton.onClick = function() {}
textBox.line01.active = false;
textBox.line02.active = false;
textBox.line03.active = false;
textBox.line02.visible = false;
textBox.line03.visible = false;
textBox.teamList.selection = 0;
textBox.line01.text = defaultText01;
textBox.line02.text = defaultText02;
textBox.line03.text = defaultText03;
}
Manipulate the AE project
////////////////////////////////////
////////////////////////////////////
#include "/ GFXM1/Script_Workflows/commonFunctions.jsx".
var targetWidth; Horizontal limit for altered text layers
var modifiedLayers = new Array();
numItems = app.project.items.length; collect the number of project items
var teamLogosFolderMov = locateProjItems (FolderItem, "teamLogosMov"); Use CompItem to comps
var teamLogosFolderRaster = locateProjItems (FolderItem, "teamLogosRaster"); Use CompItem to comps
var teamLogosFolderVector = locateProjItems (FolderItem, "teamLogosVector"); Use CompItem to comps
If (textBox.line03.text! = ' ': textBox.line03.text! = defaultText03) {}
lineValue = textBox.line01.text + textBox.line02.text + "\r\n" + "\r\n", textBox.line03.text;
}
ElseIf (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03) {}
lineValue = textBox.line01.text + "\r\n" + textBox.line02.text;
}
else {lineValue = textBox.line01.text ;}
for (c = 1; c < = numItems; c ++) {}
model var = app.project.items [c];
If (comp instanceof CompItem) {}
for (i = 1; i < = comp.numLayers; i ++) {}
{Switch (COMP. Layer (i). Name)}
case 'textLines_GD ':
targetWidth = 1720;
setTextLayer_caseSensitive (comp.layer (i), lineValue);
projectName = lineValue;
If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) {}
modifiedLayers.push (comp.layer (i));
}
break;
case 'teamLogo_GD ':
var numFolderItems = teamLogosFolderMov.numItems; Get the number of items in the folder teamLogos
swapTeamLogo (numFolderItems, teamLogosFolderMov, teamTri, comp.layer (i));
break;
}
}
}
}
function swapTeamLogo (numFolderItems, teamLogosFolder, teamTri, layer) {}
for (b = 1; b < = numFolderItems; b ++) {/ / loop in the teamLogos folder}
If (teamLogosFolder.item (b) .name == teamTri) {/ / Check for game}
layer.replaceSource (teamLogosFolder.item (b), true); team swap in comp teamLogo logo
}
} //end check the teamLogos folder
}
////////////////////////////////////
////////////////////////////////////
Return myPanel;
}
If ((myGUIPalette! = null) & & (myGUIPalette instanceof window)) {}
myGUIPalette.center ();
myGUIPalette.show ();
}
}
Hello, if your range variables are in the scope of your function (which is the case here) you need not pass them as arguments to your function.
Then you can simply activate what wrote you in a function already and call on events, something like this:
doIt() function
{
var
targetWidth, numFolderItems, lineValue, ProjectName
modifiedLayers = new Array(),
numItems = app.project.items.length; collect the number of project items
teamLogosFolderMov = locateProjItems (FolderItem, "teamLogosMov"), //Use CompItem for comps
teamLogosFolderRaster = locateProjItems (FolderItem, "teamLogosRaster"), //Use CompItem for comps
teamLogosFolderVector = locateProjItems (FolderItem, "teamLogosVector"), //Use CompItem for comps
model,
I, c;
If (textBox.line03.text! = ' ': textBox.line03.text! = defaultText03) lineValue = textBox.line01.text + textBox.line02.text + "\r\n" + "\r\n", textBox.line03.text
ElseIf (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03) lineValue = textBox.line01.text + "\r\n" + textBox.line02.text
else lineValue = textBox.line01.text;
for (c = 1; c<= numitems;="" c++)="" if="" (="" (comp="app.project.item(c))" instanceof="">=>
{
for (i = 1; i<= comp.numlayers;="" i++)="">=>
{
case 'textLines_GD ':
targetWidth = 1720;
setTextLayer_caseSensitive (comp.layer (i), lineValue);
projectName = lineValue;
If (scaleTextLayer (COMP. Layer (i), comp.layer (i).sourceRectAtTime(1,_true).width, targetWidth)) modifiedLayers.push (comp.layer (i));
break;
case 'teamLogo_GD ':
numFolderItems = teamLogosFolderMov.numItems; Get the number of items in the folder teamLogos
swapTeamLogo (numFolderItems, teamLogosFolderMov, teamTri, comp.layer (i));
break;
default:;
};
};
};
myPanel.grp.buttonGroup.renderButton.onClick = needs;
If instead you want to write a function that is independent from the UI variables, IE not dependent on variables of string, then you must pass these values as arguments:
function must (text01 text02 text03, defaultText01, defaultText02, defaultText03)
{
same start
get lineValue of arguments
lineValue = text01; If (text02! = "" |) Text02! = defaultText02) {lineValue += "\r\n" + text02;} If (text03! = "" |) Text03! = defaultText03) lineValue += "\r\n" + text03 ;} ;
same end
};
myPanel.grp.buttonGroup.renderButton.onClick = function() {has (textBox.line01.text, textBox.line02.text, textBox.line03.text, defaultText01, defaultText02, defaultText03) ;};
Note: I changed my computer var = app.project.items [c]; (does not work) to comp = app.project.item (c); and if (textBox.line02.text! = ' ' | textBox.line02.text! = defaultText03) (risky) if (textBox.line02.text! = ' ': textBox.line02.text! = defaultText03).
Xavier.
Maybe you are looking for
-
Hello I would be very grateful if you could help with the following question. Due to some changes in the system preferences system became unresponsive. After the preferences system is launched immediately stop responding and following is displayed: I
-
Satellite 2100 CDT: Windows needs a long time to start
Satellite 2100 CDT. Little by little, the loading time increases by Windows. Now, it reaches about five minutes! I did install new programms, chesk for viruses. Could someone help?
-
Re: My Satellite L500-19Z does support DDR3 memory?
My Satellite L500-19Z does support DDR3 memory? In my view, it has 4 GB (2x2gb 200 pin 1.8 v DDR2 SoDimm PC2-6400) memory standard (800 MHz I think). I want to move to 8 GB and I saw the following offer: -. 8 GB (2x4gb) 1333 Mhz PC3-10600 memory Kit.
-
Servo on EtherCAT: parameter invalid when going from pre-op to SafeOp
Hello I'm trying to control a 3rd party via EtherCAT servo drive: Material: Master: NOR-cRIO 9024 Slave: Beckhoff AX5203 Software: LabVIEW 2013 SP1 (32-bit) OR-Industrial Communications for EtherCAT 2.7 Use of the test panel LabVIEW (see image below)
-
I used to download, Avira security. Any one can tell me whether or not it is worth paying for security? A friend also told me that my newly purchased Acer Aspire laptop will be integrated even adequate security on the Mc Fee subscription, (five days