Xfa model scripting
hello,
I'm trying to do some scripting via the xfa model
this works ok, but not for a table via a web service response
I've found several thread's about e.g. rootXml but I can't get it to work
I would like to display the values of the first item in the table in a messagebox (just as test)
my script is like this
try
var string = rootXml.ZGetAirportInfoResponse.AirportInfoTab.item[1].Airportcode.value;
xfa.host.messageBox(string,"code",1);
catch(err)
xfa.host.messageBox(err,"error",1);
I'v put this in the PostExecute event and I can see a popup with an empty error
any suggestions ?
regards
it seems that you should use () instead of [] !
Similar Messages
-
XFA Model Event Firing Problem
Hello XFA gurus,
I have an XDP that refernces a PDF and has some pre-filled fields. Problem here is I have a function that needs to be executed on page load, but after the form data is merged. Because of the interactive XFA model, the events like "docReady", "form:ready" and "layout:ready" all fire twice, once before there is any data in the fields and once after.
How would I accomplish the execution of this function only after the data has been merged? I can't simply check to see if the fields have data in them, as different fields may contain data each time and others will be blank so there is no single field I can check to see if it has been populated.Hi Alex,
I tried creating a small sample to reproduce your problem, but couldn't run into the problems you encounter. You can find it attached to the post - it would be great if you could take a look at it and let us know what is it that you're doing differently.
In the mean time, could you provide some more details to better help us investigate this? Here's what would help:
the namespace your application is using (the sample I attached uses 1.5.3, but I tested with 2.0 too without a problem)
the version of the Flex SDK and AIR SDK you're using to compile your application
the OS you're seeing this problem on (I tested on Windows XP SP3)
any other info that's specific for your application (image source, when are the event listeners attached, etc.)
Hope this helps,
Mihai -
SQL Developer Data Modeler scripting
Hi,
I'm looking for a new modeling software for my company. SQL Developer Data Modeler (SDDM) has many features that fit my requirements. But there are some things that I'm not sure can be done. I work mostly with Oracle databases but still need to support some legacy and non-sql databases. Please look at problems below and tell me if and how those things can be achieved. Any suggestions for alternative solutions are welcome too.
1) I need to be able process Database Model from command line without human intervention and starting any GUI applications, for example generate DDL script form the model. Does SDDM have any interface for that?
2) I want to be able to export Database Model into a file in a custom (legacy) format.
3) SDDM stores database description in xml files. Is xml format defined anywhere? Are xsd schema files availabe?
4) Is there a SDK available that would allow reading SDDM Database Model into a custom application for further processing?
5) Is there any Java library available that parses Oracle-11-compatible SQL and PL/SQL?
Thank you in advance
Tomasz GrygoHi Kevin,
thanks for sharing your thoughts. There will be much more advanced find/search facilities in next version of Data Modeler and scripts also will be covered.
Philip -
Script Warning while previewing Form Guide
Hi,
Another problem that I am facing is the sript warning when I do not check the "Exclude scripting" option. The error message says : "Warning: Unsupported XFA method/property 'validate' ". and the code associated with the error is: ctrl.validate.nullTest = "disabled"; . This code is in a script object in the XDP and works fine without the form guie. ctrl refers to the name of the field calling the function. I receive 4 error messages and all are related to this. Can you please explan the cause?
Regards,
NakulThe guides only support a subset of the XFA model. Typically if you are trying to change the look and feel of something that woudl not be allowed in a guide (that wodul be part of the the Flex layer). If you are trying to manipulate the data or field inetractions then that is what can be done with XFA scripting. Clearing changing a line height is a visual change and woudl not be allowed.
Hope that helps
Paul -
Conflict between Client object model and Item Updated Event Receiver in sharepoint 2010
Hello All,
As per my requirement I have a two custom list.
Agent Details
Port Name
Agent Details contains Agent code, Port Name, email, address and phone of Agent. Its possible that one Agent Code is connected with multiple Port Name.
Basically what I am doing is I am getting port name connected with Agent code, using jquery and bind those values with check box(using javascript created dynamically) and bind all with Div tag.
Now when my custom edit form of Agent list open up it shows me different port name binding with checkbox group.
when user select the check box and click confirm button my clicent object model script will run and add this selected value into Port Name list.
After confirm one more button named Save will enable asking user to edit the email, phone or address value and when I click on save my Item updated event fires which update the values of the selected port name(These port name I am getting from port
name list) to Agent Details custom list.
Now when I am trying to update the values my event receiver fires or some times it got stuck(not firing). So could you please help me the possible alternative for this requirements.
Can we user the Ecma Script(Client object model to preserve the value of selectec port) and Item updated event receiver on the same time?
Is anything am doing wrong then please guide me.Hi,
As I understand, when you updated values in the agent details list the Item updated event receiver got stuck sometimes.
The item update event receiver will fire after the item has been saved, and the client object model script or the Ecma Script runs before the item is saved, so there is no conflict between the client object model script and item update event receiver.
You could find out the reason about the item update event receiver gets stuck by debugging the event receiver.
When you want to debug your event receivers, you have to attach to OWSTIMER.EXE and wait till they are executed. You can control this behavior using the Synchronization attribute. Also, if you’re looking for an easy way to debug an event receiver without
having to manually attach a debugger to your code, you can use the System.Diagnostics.Debugger.Launch() method.
The articles below are about how to debug in the event receiver in SharePoint 2010.
http://sharepoint-kings.blogspot.jp/2013/02/debugging-event-receivers-in-sharepoint.html
http://chakkaradeep.com/index.php/event-receivers-in-sharepoint-2010/
http://sharesaint.com/?p=77
Best regards,
Sara Fan
TechNet Community Support
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
Problem talking from a PDF-embedded 3D model to a Web page
I am having serious problems in my attempts to talk from a PDF-embedded 3D model to a JavaScript function in an outer HTML page. Im am using the latest acroreader on Windows for display.
The HTML page has a properly set up messageHandler on the with the PDF, as per Adobe documentation. Also, the document is disclosed.
Within the 3D model script, I am trying to use the
host.hostContainer.postMessage()
function to report to the outside world on item distances and angles that were selected and logged in a mouseEvent handler. I have verified that "host" really refers to the PDF document, and that hostContainer and postMessage exist.
Nevertheless, when I call the postMessage() function, I am seeing weird error messages on the Acrobat JavaScript console, nothing arrives in the HTML page functions, and ultimately the browser and acroreader both die independent deaths.
My suspicion is that this is somehow related to having different JS interpreters for the model and the document. I found documentation on how to access the model interpreter from the document, but not the other way around.
Can anybody give me some hints on the right approach to channel data from an event handler in a 3D model embedded in a PDF to an HTML page JavaScript function?Dear Seabor,
dissect
http://www.pdf3d.co.uk/pdf/HyperlinkExample.pdf
with your favorite tool (pdftk and vim work for me)
and see how document-level and model-level JavaScript
interact to achieve the results.
Sincerely, Michail -
Adf valueChangeListener autosubmit=true, execute code after update model
Hello.
I'm working with the valueChangeListener and autosubmit="true". I'll try to explain my situation
with an example.
jsp:
<af:form>
<af:panelForm>
<af:inputText
id="value1"
label="Value1"
value="#{index.myObject.value1}"
autoSubmit="true"
valueChangeListener="#{index.changeListener1}"/>
<af:inputText
id="value2"
label="Value2"
value="#{index.myObject.value2}"/>
</af:panelForm>
</af:form>
backing:
public class Index {
private MyObject myObject;
public Index() {
myObject = new MyObject();
public void changeListener1(ValueChangeEvent valueChangeEvent){
doSomethingWithMyObject(myObject);
// ... get/set of myObject
MyObject:
public class MyObject {
private String value1;
private String value2;
public MyObject() {}
//getters/setters...
}In the line doSomethingWithMyObject(myObject) i need myObject with the actual values in the user form.
in the example above, the first time the page is rendered and shows the inputs
if the user captures something in the 1st input and then hits the tab to go to the other input
the valueChangeEvent is fired, and the code in "index.changeListener1" executed, but at this moment
the model (myObject) hasn't been updated with the data that the user entered (Validation Phase).
So i need a way to execute my code called from the "valueChangeEvent" but after the model has been updated
Some notes about my problem:
- The doSomethingWithMyObject(myObject) could update data in myObject
- About binding="#{x.y}":
I know i can use the binding attribute in the tag <af:inputText binding="#{x.y}"> and then in the code of
the changelistener the binded component always have the most recent value from the user,
but i cant' use that, the method needs a MyObject instance.
- I don't think create a new instance of MyObject and populate it every time the event fires is a good way
- doSomethingWithMyObject" is a black box, so i don't know what is going to do with myObject
- In my problem there are more than 2 inputs there will be N components M listeners.
What I'm trying:
PhaseListener:
I have been implementing a solution with a PhaseListener like
public void afterPhase(PhaseEvent phaseEvent) {
// just after UPDATE_MODEL_VALUES phase
FacesContext f = FacesContext.getCurrentInstance();
Index i = (Index) f.getApplication().createValueBinding("#{index}").getValue(f);
// at this point the model is updated
doSomethingWithMyObject(i.getMyObject);
public PhaseId getPhaseId() {
return PhaseId.UPDATE_MODEL_VALUES;
this works but i don't know if this is the answer according to this post (unanswered at this time):
http://forums.oracle.com/forums/thread.jspa?threadID=611643
says something about that PhaseListener is not thread safe and blocks the application with more
than 1 user.
A wrapper:
using the controls binded to the backing
public class Index {
private MyObject myObject;
private CoreInputText inputValue1;
private CoreInputText inputValue2;
//listener
//getters/setters
} make a wraper like
public class MyObjectW {
private Index index; // wrap the backing index
public MyObjectW(Index index) {
this.index = index;
public String getValue1(){
return (String) index.getInputValue1().getValue();
public String getValue2(){
return (String) index.getInputValue2().getValue();
public void setValue1(Object v){
index.getInputValue1().setValue(v);
public void setValue2(Object v){
index.getInputValue2().setValue(v);
}and then call in the index backing:
doSomethingWithMyObject( new MyObjectW(this)); so it will access to the most actual values from user at the valueChangeEvent
But i really would like some way to execute my code called from the "valueChangeEvent" but after the model has been updated
so i dont need to wrap or implement PhaseListener
what do you think, what do you suggest, have any solution or a way to do what I'm trying?
thank you for your help...
Message was edited by:
akanewstedHello Frank, thanks for the response.
When you say
"If you need an updated object in this listener then you can update it from the value change listener as well"
you mean i can update the object by myself with the value from getNewValue()? or is there another way
to call to update the models at this time ?
I know i have the methods "getOldValue()" and "getNewValue()" in the "ValueChangeEvent" but what if i need
the actual value from the user in other control than the one that fires the event
example
Two inputs:
in the input1 the user enters some data
in the input2 when some data is entered it fires valueChangeListener (autosubmit=true)
in that case what if i need the value the user just entered in the input1 in the valueChangeListener of
the input2.
In general the app I'm working must do:
dynamically generate the controls in the form (inputs, selects etc)
Attach the control values to a model ( <af:inputText value=#{model.x}"/>
sometimes execute some script when a value change in a control (valueChangeListener)
those scripts uses the model (and needs to be an updated model)
script = " if (value2 = 'xyz') then value1='abc'; return true;";
if the model is not updated
the script will use old values and will be wrong
or if the script change some value in the model, when the update model phase occurs the value from
the script is lost.
that's why i need to work directly with the model and not the values in the ValueChangeEvent
Is there a way to use something like an action in the change of a control value?
that way the code will execute in the invoke application phase, can this be done ?
how i can execute code in the invoke application when a valueChangeEvent occurs ?
hope this help to explain more my situation.
Thank you for your help and time. -
Help me for writing the password script on solaris
hi,
help me for writing password scripts to change the user/root password.
in the script itself myself want to mention the new password.
now user want to login with the new password only.
model script:
echo $test:`perl -e '$x=crypt('$test123','test');
print $x'`::::::: >> /etc/shadow
test--->username
test123---->new password.
the above script is not working.
kindly help me for writing the script.
Regards,
rajaWell. For one thing, if you just append the new password to the /etc/shadow file there will be two entries for the user in that file (at least if the user already had a password). Which probably is a bad thing.
-
hi,
Processing Requirement
Process:
Whenever a Business Partner has been identified during an Interaction, an Alert should be raised in the Interaction Center for the CSR (Call Center Representative). The Alerts would be based on Attributes attached to the Business Partner Master on based on Business Partners past Transactions (for eg. The customer has transacted for more than INR 10,000 in the last 1 month)
Step 1: Create Alert Profile
Define a Z Alert profile.
Step 2: Program in Global Data
Enter the Program for Alert Message (eg. He is a frequent customer)
Step 3: Program in Functions and for Even which triggers the Alert
Enter the Program that an Alert should be raised in case the Business Partner is identified.
Step 4: Alert Rule
In the Rule Tab enter the Program that is the following Attribute is found in the Business Partner Master then an Alert should be raised:
Top Management
Stakeholders
Legal
Chargeback
Sticky
Test ID
Mail Order ID
Output Requirements:
CSRs should get an Alert when the Business Partner is identified
Steps followed by me :
1. TC -> CRMC_CIC_AM_PROFILE
a > created a profile ztest
b> clicked on search_target_found
contents in following tabs:
Rule tab: sap_scripting_message("HI :"SEARCH_TARGET_FOUND.P1[0].PARTNER1);
Function tab:
function z_display(l_cg1,l_cg2,l_cg3,l_cg4,l_cg5)
return '<call id="CCM" method="zcic">
<param id="l_cg1">'+ l_cg1 +'</param>
<param id="l_cg2">'+ l_cg2 +'</param>
<param id="l_cg3">'+ l_cg3 +'</param>
<param id="l_cg4">'+ l_cg4 +'</param>
<param id="l_cg5">'+ l_cg5 +'</param></call>';
Global data tab:
var global_str = "Are you a Registered Indiatimes User:";
2. TC -> SE24
a> created a zclass (zcl_alert_modeler)
b> copied the methods of a class cl_ccm_abstr_cmpwsp
c> In method if_ccm_workspace~create
METHOD if_ccm_workspace~create .
Runs the method create of superclass
CALL METHOD if_ccm_workspace~create
EXPORTING
proc_cl_id = proc_cl_id
proc_instance = proc_instance
abox_admin = abox_admin
workspace_display = workspace_display
workspace_manager = workspace_manager.
Adds a class in list of events of CIC, to event
*SEARCH_TARGET_FOUND
CALL METHOD IF_CRM_CIC_CMPWSP_EVENT_GATE~add_listener
EXPORTING
event = 'SEARCH_TARGET_FOUND'
listener = me.
ENDMETHOD. "IF_CCM_WORKSPACE~CREATE
d> In method IF_CCM_CMPWSP_CIC_EV_HANDLER~HANDLE_EVENT.
METHOD if_ccm_cmpwsp_cic_ev_handler~handle_event .
DATA: lv_t1 TYPE TABLE OF crmm_but_set0010. "Par. Alert
DATA: p_partner TYPE crmt_cic_bpident.
DATA: wa TYPE crmm_but_set0010.
Check if BF was found
CHECK event = 'SEARCH_TARGET_FOUND'.
Retrieve BP info
p_partner = p1.
CALL METHOD me->zcic
EXPORTING
business_partner = p_partner
IMPORTING
l_cg1 = wa-l_cg1
l_cg2 = wa-l_cg2
l_cg3 = wa-l_cg3
l_cg4 = wa-l_cg4
l_cg5 = wa-l_cg5
EXCEPTIONS
e_info_not_found = 1
OTHERS = 2.
IF sy-subrc NE 0.
wa_info-bpkind = '____'.
wa_info-bpkind_t = '__________'.
wa_info-industry = '____'.
wa_info-industry_t = '____________'.
wa_info-regiogroup = '____'.
wa_info-regiogroup_t = '____________________'.
APPEND wa_info TO lv_t1.
ENDIF.
Configure CIC event. The event 'BP_GENERAL_DATA' will be executed
by Alert Modeler, executing the correspondent script JavaScript
The table T1 has the 2 fileds to be showed in
Alert Modeler: the status ID abd its description.
CALL FUNCTION 'CIC_EVENT_RAISE'
EXPORTING
event = 'BP_GENERAL_DATA'
TABLES
t1 = lv_t1
EXCEPTIONS
event_currently_active = 1
event_handler_failed = 2
OTHERS = 3.
ENDMETHOD. "IF_CCM_CMPWSP_CIC_EV_HANDLER~HANDLE_EVENT
e> created my own method ( zcic )
METHOD zcic.
*DATA p_partner TYPE but000-partner.
DATA partner TYPE but000-partner.
DATA : BEGIN OF wa,
l_cg1 TYPE crmm_but_set0010-customer_group1,
l_cg2 TYPE crmm_but_set0010-customer_group2,
l_cg3 TYPE crmm_but_set0010-customer_group3,
l_cg4 TYPE crmm_but_set0010-customer_group4,
l_cg5 TYPE crmm_but_set0010-customer_group5,
END OF wa.
DATA : wa_but000_partner_guid TYPE but000-partner_guid,
BEGIN OF wa_crmm_but_lnk0011,
set_guid TYPE crmm_but_lnk0011-set_guid,
END OF wa_crmm_but_lnk0011.
SELECT SINGLE partner_guid
INTO wa_but000_partner_guid
FROM but000
WHERE partner = p_partner .
IF sy-subrc = 0.
SELECT SINGLE set_guid
INTO wa_crmm_but_lnk0011-set_guid
FROM crmm_but_lnk0011
WHERE partner_guid = wa_but000_partner_guid.
SELECT SINGLE customer_group1 customer_group2 customer_group3
customer_group4 customer_group5
INTO (wa-l_cg1, wa-l_cg2, wa-l_cg3,wa-l_cg4, wa-l_cg5)
FROM crmm_but_set0010
WHERE set_guid = wa_crmm_but_lnk0011-set_guid.
ENDIF.
MESSAGE 'hi' TYPE 'S'.
WRITE : wa-l_cg1,wa-l_cg2,wa-l_cg3,wa-l_cg4,wa-l_cg5.
ENDMETHOD.
f> TC : spro
SAP Reference IMG
CRM
Interaction Center WinClient
Customer-Specific System Modifications for IC
Define Customer-Specific Meta Model
Created a new meta model : ZTEST
Copied the content of default meta model in my metamodel ZTEST
And entered the Z class name .
<crbcomp>cl_crm_cic_crb_ia_scripting</crbcomp>
<crbcomp>cl_crm_cic_crb_am_test</crbcomp>
<crbcomp>cl_crm_cic_crb_wsm</crbcomp>
<crbcomp>cl_crm_cic_crb_1o_maintain</crbcomp>
<crbcomp>cl_crm_cic_crb_ib_nav</crbcomp>
<crbcomp>cl_crm_cic_crb_locator</crbcomp>
<crbcomp>zcl_alert_modeler</crbcomp>
g> TC : cic0
Giving partner and clicking confirm search data
ERROR :
Alert modeler script error: CL_JAVA_SCRIPT, RCODE :(600)Hi.....
More questions regarding alert modeler for CRM 5.0
Is there any way to make the messages "pop" more - i.e. change colour, or flash? Have had a request from a department who comments alerts do not stand out enough and would like some way of bringing them to the agents attention.
Cheers
Cara -
Hello,
I have xdp forms dedicated for WF in the Livecycle Workflow server.
The user has only a dynamic PDF format.
In my forms, I have some scripts that use the Acrobat objects scripts:
-XMLData.parse
-XMLData.applyXpath
Since they are not XFA objects scripts, I cannot play them at the server.
Is it possible to execute them at client-side only based on the Acrobat Reader?
Or another solution that does not use the Reader Extensions?
Thanks in advance for your feedbacks.
Best Regards,
tinaHi all,
Thank you for your first answers.
I uploaded my forms in the Workflows with which they are supposed to work with.
What is strange, is that the scripts with XMLData.parse and XMLData.applyXpath do not work in the workflow context.
neither client-side or server-side.
I mean when I test my forms standalone via the Form Designer PDF preview (with Acrobat Pro and Acrobat Reader),
the execution of the scripts works.
But when I access the form via the Form Manager to start a workfow:
the scripts are not done.
Is it normal that these 2 functions, do not work in Workflow context but work in a form standalone?
Thank you for your help,
Best Regards
Tina -
No values in added dropdownlisy dynamic table
Hello Guru's.
I am working with livecycler 7.1 on a NW2004S. I have the following problem,any help is appreciated. I have a dynamic table with a dropdownbox binded to an R/3 table from transaction SFP. When I start the form the first entrie with the initial created dropdown box is correct filled with all the data. But when I extend the row with the addinstancemanager, there are suddenly no values anymore.
The extra functionality in 7.1 is that you don't have to populate the values by scripting in JAVA, but now I am lost how to deal with this problem, is this a bug?
Thanks
Harrie
Message was edited by:
Harrie Prinsen
Hi All,
I managed to solve the problem by my self.
I code the binding in JAVA because the "extra functionality" does not work.
Here is my coding, I noticed that it is important to understand the Interactive Forms XFA model. You can find it at the adobe site and it is refered in a blog of Juergen Hauser.
var oItems = xfa.resolveNode("xfa.record.TABMATNR1");
var nItemsLength = oItems.nodes.length;
app.alert(nItemsLength);
for (var nItemCount = 0; nItemCount < nItemsLength; nItemCount++) {
Vervolgkeuzelijst2.addItem(oItems.nodes.item(nItemCount).DATA.MATNR.value);
The main piece in the coding is that you create an object reference to a node in the form via :
xfa.resolveNode. TABMATNR1 is a table and contains several rows. The underlying structure is data and three fields matnr maktx kwmeng.
Regards HarrieDear Harrie,
we are facing serious problems using Adobe IFS and SFP.
We have problems when saving rows that are dynamically added to the form.
Seems to be a problem with the xsd schema.
Furthermore, I cannot link an internal table to a dropdownlist, not even for 1 single item on the form.
I assume you have a lot of experience using IFS, maybe you have some information on this?
Thanks in advance,
Yoeri Coessens -
I am trying to create a form guide. I keep getting errors as follows: As an example, this is the script part: ReturnAddress.para.lineHeight = "12pt"; This is the error : Warning: Unsupported XFA mehod/property "para: Here's another one wih the same error: xfa.resolveNode("Recipeintaddress").para.lineHeight = "12pt";
The guides only support a subset of the XFA model. Typically if you are trying to change the look and feel of something that woudl not be allowed in a guide (that wodul be part of the the Flex layer). If you are trying to manipulate the data or field inetractions then that is what can be done with XFA scripting. Clearing changing a line height is a visual change and woudl not be allowed.
Hope that helps
Paul -
Very Urgent... to Restrict the entry of fields...
Im using Adobe Professional Live cycle designer 7.0 to design pdf form. Also, Im using an existing pdf (supplied by the customer), which is designed through teleform designer (with adobe 6.0) model for this design. In the existing one, the javascript methods are working fine for restricting keys, validation, etc. But these scripts are not working in designer as the designer is using XFA model.
Im trying to restrict the key inputs (like only numbers/characters should be entered). But I couldnt find the equivalent statements for some of the statements (which are used in the teleform pdf).
For eg.
event.rc = true. Allows keystroke to be added to entry. event.rc = false. Prevents keystroke being added to entry in the following function:
function TFTemplate_KeyStroke( mask )
if (event.willCommit) {
return;
var value = AFMergeChange( event );
if (!mask.test( value )) {
event.rc = false;
app.beep( 0 );
But I couldnt find the matching statements in Designer for event.willCommit, AFMergeChange(),event.rc, etc.
If I get, I can restrict the inputs.
Expecting any solutions from you...
Thanks in Advance...Hi Vam,
For this you need to take the help of an ABAPer . Ask him to modify the user exit and add the logic.
For user exit please go through the below link it will help you to resolve your issue.
http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm
Regards,
Krishna O
Edited by: Krishna O on Jun 3, 2010 12:29 PM -
Hello guys,
Based in one example of internet, I create one test
aplication in Flex to test the relationship of more than one
component, where:
==========================================================
mainComp.mxml
==========================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
width="400" height="400" initialize="newItem('teste1');">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
private var __designItem:DesignItem;
public function newItem(newitem:String):void {
__designItem = DesignItemFactory.getItem(newitem)
for each (var item in __designItem.__items) {
Alert.show(item);
]]>
</mx:Script>
<mx:Button label="Button" click="newItem('teste2');"/>
</mx:Application>
==========================================================
==========================================================
DesignItemFactory.as
==========================================================
package {
public class DesignItemFactory {
import DesignItem;
static public function
getItem(i_item_name:String):DesignItem {
var newDesignItem:DesignItem = new DesignItem();
DesignItemFactory.addItems(i_item_name,newDesignItem);
return newDesignItem;
static private function
addItems(i_item_name:String,i_design_item:DesignItem):void {
i_design_item.addNewItem(i_item_name);
==========================================================
==========================================================
DesignItem.mxml
==========================================================
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
public var __items:Array = new Array();
public function addNewItem(i_displayObject:String):void {
__items.push(i_displayObject);
]]>
</mx:Script>
</mx:Application>
==========================================================
The idea is starting from first file ("mainComp.mxml"),
insert data in array from third file ("DesignItem.mxml"), and store
in array (push)
public function addNewItem(i_displayObject:String):void {
__items.push(i_displayObject);
But, in array "for each", return only ONE element.
Please, someone can help me?
The principal idea is have one component (mxml) that store
data (like array, for example) and can be accessed from other
components.
Thanks a lot!
Kleber
PS.: Sorry my bad english...Kevin,
You have access to the entire XFAModel when customising a Guide in Flex and access the data using the same SOM expression you use in a LiveCycle PDF.
For example, if you LiveCycle form / data structure was like this:
Blah
You can access this by the following (Xfa.instance is a static property - i.e. you don't have to instantiate the object):
var currentXfa:Xfa = Xfa.instance;
var myFieldObject = currentXfa.resolveNode("rootForm.myFirstPage.myField");
if (myFieldObject.rawValue == "") {
myFieldObject.rawValue = "aNewValue";
In answer to the second part of the question, anything you update in the XFA model in Flex will update the underlying PDF form / data too and vice versa (a script executed in the PDF will update the XFA model in Flex and these changes will be reflected in the Flex app fields). This is achieved by the "Adobe LiveCycle Forms Bridge" (you can see the source if you drag and drop it onto the form from the Custom library palette).
Hope this helps,
John. -
Event.rc and Restriction of inputs from the User...
Im using Adobe Professional Live cycle designer 7.0 to design pdf form. Also, Im using an existing pdf (supplied by the customer), which is designed through teleform designer (with adobe 6.0) model for this design. In the existing one, the javascript methods are working fine for restricting keys, validation, etc. But these scripts are not working in designer as the designer is using XFA model.
Im trying to restrict the key inputs (like only numbers/characters should be entered). But I couldnt find the equivalent statements for some of the statements (which are used in the teleform pdf).
For eg.
event.rc = true. Allows keystroke to be added to entry. event.rc = false. Prevents keystroke being added to entry in the following function:
function TFTemplate_KeyStroke( mask )
if (event.willCommit) {
return;
var value = AFMergeChange( event );
if (!mask.test( value )) {
event.rc = false;
app.beep( 0 );
But I couldnt find the matching statements in Designer for event.willCommit, AFMergeChange(),event.rc, etc.
If I get, I can restrict the inputs.
Expecting any solutions from you...
Thanks in Advance...Hi,
Based on your description, I understand that you want to use application or some functional tools and then
monitor the user printer job. When be greater than a certain number, it will need to acquire additional information. As I know, it seems that there is no such function can meet your requirement. Sorry for it.
In addition, I find that you use a third-party software for this functionality before. Please check and confirm
if you can get a new version (or some updates, service package) that may help it to be supported in Windows Server 2012.
Hope this helps.
Best regards,
Justin Gu
Maybe you are looking for
-
I would like to see the same mails in all my apple devices. Can someone please tell me how? My calendar and contacts sync but my mailboxes dont...
-
Problem in BW System in Portal..Its urgent.. Please guide
Hello All, Scenario: Working in a load balancing landscape Requirement: Need to create a BW Report iView (which isnt working) Problem / Questions: 1. Created a BW System in portal but since its load balancing, please confirm if this is all right: - U
-
Axes Settings in Flash Bar charts
Hi, When I specify the Y-Axes settings for a Flash bar chart(application express 3.0), starting at 0(Y Min value), the bars appear with the correct height, the moment Y-Min is set to a non zero +ve value, the height of the bar gets skewed For eg: a b
-
Icon can only be changed by root
hi sorry for my poor english (i'm from france) Well, i have a problem i cannot solve : my Hard Disk has two partitions and and i cannot paste anything for the first one's icon. paste seems to work but nothing happens. All other icons can be changed.
-
Before and After Thumbnails/previews.
I've notice in some cases while importing my images into Aperture the look of each image changes. I can watch as Aperture goes down the line of thumbnails and each image seems to change the exposure or more likely an aspect of the nef decode. Often I