Change from SelectList to Popup LOV, Onchange Javascript breaks. Apex 3.2.1
Hi,
I have a pretty standard piece of Javascript that populates two page items based upon the result of a select list.
I'd like to change the select list to a Pop-Up LOV, but this breaks the functionality.
I presume that I need to use a different var get function, however, have had no luck in trialing different solutions.
Can anyone help?
Details Below.
Regards-
Ronald.
Function Overview:
Select List P4_PRODUCT_ID selects two product parameters: area and item, and puts them into P4_AREA_ID and P4_ITEM_ID.
P4_AREA_ID and P4_ITEM_ID are pop up LOV's and happily accept the text input.
I wish to change P4_PRODUCT_ID to also be a pop up LOV, but when doing so, it breaks the dynamic functionality.
CODE:
Select List: P4_PRODUCT_ID
HTML Form Element Attributes: onchange="pull_multi_value(this.value)";P4 Page Header:
You'll see that I've tried several methods, none worked. Am I using the wrong one?
<script type="text/javascript">
<!--
function pull_multi_value(pValue){
// var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=Set_Multi_Items',0);
var get = new htmldb_Get(null,html_SelectValue('pFlowId'),'APPLICATION_PROCESS=Set_Multi_Items',0);
// var get = new htmldb_Get(null,html_GetElement('pFlowId').innerHTML,'APPLICATION_PROCESS=Set_Multi_Items',0);
// var get = new htmldb_Get(null,html_GetElement('pFlowId').innerHTML=$v(pFlowId),'APPLICATION_PROCESS=Set_Multi_Items',0);
if(pValue){
get.add('PRODUCT_ID',pValue)
}else{
get.add('PRODUCT_ID','null')
gReturn = get.get('XML');
if(gReturn){
var l_Count = gReturn.getElementsByTagName("item").length;
for(var i = 0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("item");
var l_ID = l_Opt_Xml.getAttribute('id');
var l_El = html_GetElement(l_ID);
if(l_Opt_Xml.firstChild){
var l_Value = l_Opt_Xml.firstChild.nodeValue;
}else{
var l_Value = '';
if(l_El){
if(l_El.tagName == 'INPUT'){
l_El.value = l_Value;
}else if(l_El.tagName == 'SPAN' &&
l_El.className == 'grabber'){
l_El.parentNode.innerHTML = l_Value;
l_El.parentNode.id = l_ID;
}else{
l_El.innerHTML = l_Value;
get = null;
//-->
</script> Application Process: Set_Multi_ItemsDECLARE
v_area VARCHAR2 (200);
v_item VARCHAR2 (200);
CURSOR cur_c
IS
SELECT AREA_ID, ITEM_ID
FROM PRODUCTS
WHERE PRODUCT_ID = TO_NUMBER (v ('PRODUCT_ID'));
BEGIN
FOR c IN cur_c
LOOP
v_area := c.AREA_ID;
v_item := c.ITEM_ID;
END LOOP;
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<body>');
HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
HTP.prn ('<item id="P4_AREA_ID">' || v_area || '</item>');
HTP.prn ('<item id="P4_ITEM_ID">' || v_item || '</item>');
HTP.prn ('</body>');
EXCEPTION
WHEN OTHERS
THEN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<body>');
HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
HTP.prn ('<item id="P4_AREA_ID">' || SQLERRM || '</item>');
HTP.prn ('</body>');
END;
Looking at all that code, I can suggest one way of debugging the issue(Its a bit hard to guess what went in this case,particularly when the problem could be at so many places).
1. Run your PLSQL as an anonymous block and check if the generated XML structure is what you expect.
2. Check Firebug Console (if you have it) if an ajax request is send when the item is changed.
3. Print out the return XML as a string on the screen so that you can make sure it what you wanted(use alert function or append to some page element)
4. Now try your XML parser JS section starting with the obtained XML as a static variable, trying printing out the parsed out values at different stages
5. Setting the page items shouldn't be much of a trouble if everything else worked fine.
Some Observations: If you are on Apex 4.0 wouldn't a Dynamic Action save you all this trouble (Two SetValue processes). Even otherwise you seem to be fetching two id's from the Ondemand process..Can't you just concatenate them with some separator and send that as the result stream(htp.p), handling them in JS would be simple using the split function. If the data is more complex you could return it as a JSON string and parse it with fewer lines of code.
Found a problem with the code :
get.add('PRODUCT_ID',pValue)Do you have a page item by that name(PRODUCT_ID) ? else change it to
get.add('P4_PRODUCT_ID',pValue)and change the following in ur PLSQL process code
PRODUCT_ID = TO_NUMBER (v ('PRODUCT_ID'));to
PRODUCT_ID = TO_NUMBER (v ('P4_PRODUCT_ID'));But as I said earlier, Debugging it step by step might be easier.
Similar Messages
-
I had a report in Apex 3.2 in XE 10g. The type of field was popup lov(editable)
i defined a trigger on change to load data from database and fill anothers fields.
to know in wich row change this field i have the nex javascript code
var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
in this release works fine and return 1 (0001) for the first rows, etc etc
in the new version 4.0.2.00.08 in XE 11g the same code return 0000, but if i put a trigger in a field(column)(editable too) of the same row returns 0001, Is this a bug? or in apex 4 change the ordinal of rows for popup lovs only?
thanks
The current version of apex is 4.0.2.00.08 XE 11g (the release included with the database ) and runs in Windows Vista and internet explorer 8
Edited by: DanielB on Jun 13, 2011 11:52 AM
Edited by: DanielB on Jun 13, 2011 11:57 AMwhen i put the mouse over the popup lov in release 3.2 , on the console bar i can see javascript:genList0_f01_0() for the first record and javascript:genList0_f01_1() for the second
in release 4 and 4.1 javascript:genList0_f01_$_row() for the first record and javascript:genList0_f01_1() for the second, i think this is my problem...... -
After changing from cs5.5 to cs6 my javascript pop-up not Working??
Hello, maybe someone could figure this one out.
I have a file that I have done on CS5.5 and everything works fine, just simple ActionScript 2 and a script: on (release) { getURL("javascript:openNewWindow('http://xxxxxxx.html','thewin','height=800,width=800,toolbar=no,scrollbars=no,top=560,left= 140')"); }
when I then open the SAME file in CS6 and publish it, everything else works BUT not this pop-up??
anyone? ideas?
- Norskulitest online or adjust your player security settings, http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager.html
-
Select lists empty or POPup LOV needed with redirect
Hi all,
I have a form where i need 6 select lists with redirect or 6 POPup LOV with redirects.
These select lists are separated in three groups
like this
group 1
departments select list with redirect
employees popup lov (query based on the value of department)
group2
Order select list with redirect
OrderItem popup lov but needs a redirect here for employees (query based on the value of countries)
employees popup lov (query based on the value of department)
group 3
some status select list with redirect
When I choose the first select list the popup LOV is populated with good values
when i select a value from the second select list the value in the first list disappears, including the value of the first popup lov. etc.
How is it possible to keep the values stored in the first selects list when selecting some value of the second list.
How is is possible to make a popup lov with redirect so that the values are in session
and can be used in another popup lov?
Is someone there who have experiences with this issue?
thanks in advance,
HugoHi Hugo,
I don't think that you need a redirect for that. Check out my AJAX cascading popup lov solution.
http://inside-apex.blogspot.com/2006/11/generic-solution-for-depending-select.html
Hope this helps
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com -
Change Popup LOV template to put more spacing between rows
I am trying to change the popup lov template to include a bit more spacing between the rows in the result set. So instead of seeing
Test 1
Test 2
I want to see
Test 1
Test 2
Looking at the html produced the rows are returned from a bit of javascript (using arrays and passback) and I can't figure out where to add anything that will change the spacing ie cellspacing doesn't do anything.
The line I am interested in is - replace ( for < and ) for >
document.writeln("(br /)(a href=\"javascript:passBack(v[1], v2[1]);\")Test(/a)");
If I could just add a br at the close a tag...
Does anyone have any ideas on this. I'm not keen to code a new popup lov, I was just wanting to tweak the existing.
many thanksHello,
" I know this style isn't directly related to the t5PopupBody as you have suggested but it doesn't seem to make a difference"Your syntax will apply the new style to every link on your pop-up window. As there is non-others then the results, in this case it will make no difference.
" I did something slightly different so I didn't have to worry about changing the css"That is OK, as long as you remember all the changes you are making to the original templates, because after upgrading – like in the near future to version 3 – some of the changes might disappear. That is why I prefer to use my own CSS file, on top of the original one.
Regards,
Arie. -
How to get the value from one Popup lov column to another popup lov column
Hi,
I am new to oracle apex development and having the below issue.
In my application, there is a tabular form with 15 columns ( c1.. c15).
I have to populate the value of column C5 based on the selected(from popup lov) value of column C3, tried to use onchange, but didn't help much.
Any help please.
Thanks and Regards,Oh boy, this is a fun one.
onchange should work theoretically (in this example, assume that f05 is the target column that should be set and "this" is the source item whose value is to be transferred to f05 on the same row (row 2)):
onchange=$s('f05_0002',$v(this));
BUT the catch is of course that needs to be different for every row (can't hardcode the '2'), so you need something to dynamically create the row number component.
I wrote this for an app I'm working on that uses master-detail forms heavily (I also wrote a lot more code to read the fmap array that is in v4 so that I can reference my cells via their column name and not the numeric position (so "f05 can be determined w/o hard coding), insulating against columns moving around, columns being made display-only etc. but I won't bore you with that here unless you really need to know).
function getRow(pObj)
{ //Pass in an object reference to a tabular form cell and get back an integer
//derived from the object ID.
var vRow=pObj.id.substr(pObj.id.indexOf("_")+1);
if (isNaN(vRow))
return (null);
return (parseInt(vRow,10));
function formatRow(pRow)
{ //Pass in an integer and it'll be returned as the tabular form cell ID suffix
//(e.g.: pass in 1 and get back string "_0001").
//Used in building ID references to tabular form cells.
if((isThingEmpty(pRow)) || (isNaN(pRow)))
return(null);
var vRow=pRow.toString();
while(vRow.length<4)
vRow="0"+vRow;
return("_"+vRow);
}Therefore:
onchange=$s('f05_'+formatRow(getRow(this)),$v(this));
So in essence, pass in "this" which will be a reference to the current item, largely to determine what row we're on. getRow will return 1, 2, 3, etc. formatRow will take that and return 0001, 0002, 0003, etc. Once that is done, it'll concatenate with the f05 and f04 to refer to the correct columns (determining f05, f04, etc. dynamically is another matter if you really need to but I didn't want to complicate this answer too much at once).
Note: above I also use a isThingEmpty() function that I wrote. It does nothing other than check the item for an empty string, if the item is null, etc. Just do your own evaluation of empty-string, no-value, etc. there.
It would indeed be nice though if Apex had a better way to delclaratively access the tabular form items though. Despite all the v4 enhancements, tabular forms were not entirely upgraded to the same full functionality of page items. -
Change Font in Popup LOV?
Hello All,
Apex 3.1
I need the font size for a value returned from a Popup LOV to be much smaller. How would I modify the popup LOV template in order to change the font of the values in the LOV, or if not the LOV itself, the font size of the return item?
Thanks!Hi
Go to Shared Components > Templates > Popup List of Values
There you will find the name of CSS which is being used with this LOV. You need to change the CSS to get the required fonts.
Zulqarnain
MaxApex Hosting
http://www.maxapex.com -
I have the following code for a popup lov
select a,b from
select '1' res, htf.escape_sc(su.sukey) a, htf.escape_sc(su.sukey) b
from udm_su su, udm_lde lde
where su.ldeid = lde.ldeid
and su.sukey in (select su_generic
from vrp_cfg_gensuconv)
and lde.ldekey = :F140_LDEKEY
union
select '2' res, htf.escape_sc(su.sukey) a, htf.escape_sc(su.sukey) b
from udm_su su, udm_lde lde
where su.ldeid = lde.ldeid
and su.sukey not in (select su_generic
from vrp_cfg_gensuconv)
and lde.ldekey = :F140_LDEKEY
order by res, a, bWhat I want to do is dispaly the result of the first select statement in red
and the second in blue
Cheers
GusGus C wrote:
Apex 3.2Don't have 3.2 around to experiment with. If the above doesn't work in 3.2 then I'm inclined to think that it isn't going to. Which is odd as the indications are that the restrictions were introuced in APEX 4.0:
<li>{thread:id=1338180}
<li>{thread:id=2126522}
Part of the problem is that LOVs rendered as select lists (which is most common) cannot contain HTML elements ( +{thread:id=898835}+ ), but the less common Pop-up LOV renderings can.
If this is a critical requirement, then 2 possibilities come to mind:
1. Fairly complex modification of the Pop-up Page/LOV templates to include JavaScript/AJAX that will execute for this list, figure out how many entries need to be each colour, and iterate over the options adding the require styles.
OR
2. Use a report on a pop-up page rather than an LOV.
Both look like more trouble than this is worth. -
Javascript error on List Manager (Popup LOV)
Hi all,
I have a problem with checkboxes and list managers (based on popup LOV).
I have a form containing several checkboxes and list managers; in a region of the form (the one before the last one) I have 10 checkboxes but just the first one work, the other ones give me this error when I tried to insert a record:
ORA-20001: Errore in DML: p_rowid=21, p_alt_rowid=ID, p_rowid2=, p_alt_rowid2=. ORA-20001: Valore numerico :1 non valido per la colonna EDUCATION (it's italian, the translation for the last part is "numerical value :1 not valid for the EDUCATION column).
Furthermoe, I have problems with list managers too: when I open the popup for some of them and choose the value from the popup window, I get a Javascript error: "Obejct doesn't support this property or method"; some (just some) of the list managers works.
The strange thing is that if I delete a list manager or a checkbox, another list manager or checkbox starts to work, as if it was a rule about the max total number of list manager/checkboxes.
I want to highlight that the total number of items in the form is less than 100.
Thanks a lot in advance for your help.
Cheers,
MatteoHi,
The issue is because Apex actually generates TWO items for each List Manager items and both of these count towards the maximum of 100 items per page. As an example - this is ONE list manager item from my test page:
<fieldset id="P222_LM1" class="listmanager">
<table cellspacing="0" cellpadding="0" border="0" summary="">
<tbody>
<tr>
<td>
<noscript>
JavaScript not supported
</noscript>
<script type="text/javascript">
<!--
function filter_escape(in_value) {
out_value = escape( in_value );
return out_value;
function genList0_p_v99_()
w = open("wwv_flow_utilities.gen_popup_list" +
"?p_filter=" +
"&p_name=" + escape('p_v99') +
"&p_element_index=" + escape('') +
"&p_form_index=" + escape('0') +
"&p_max_elements=" + escape('') +
"&p_escape_html=" + escape('') +
"&p_ok_to_query=" + escape('YES') +
"&p_flow_id=" + escape('33642') +
"&p_page_id=" + escape('222') +
"&p_session_id=" + escape('2926501920944144') +
"&p_eval_value=" + escape('') +
"&p_translation=" + escape('NO') +
"&p_item_id=" + escape('6753181500127769527') +
"&p_lov=" + filter_escape('6753181500127769527') +
"&p_lov_checksum=5D6157CA388C164818106815D15EFFC6",
"winLovList",
"Scrollbars=1,resizable=1,width=400,height=450");
if (w.opener == null)
w.opener = self;
w.focus();
//-->
</script>
<fieldset id="P222_LM1_ADD_fieldset" class="lov">
<table cellspacing="0" cellpadding="0" border="0" id="P222_LM1_ADD_holder" class="lov" summary="">
<tbody>
<tr>
<td class="lov">
<input type="text" id="P222_LM1_ADD" value="" maxlength="2000" size="27" name="p_v99"/>
</td>
<td>
<a href="javascript:genList0_p_v99_()">
<img width="13" height="13" alt="Popup Lov" src="/i/list_gray.gif"/>
</a>
</td>
</tr>
</tbody>
</table>
</fieldset>
</td>
<td>
<input type="button" onclick="appendToList(document.forms[0].p_v99.value.toUpperCase(), document.forms[0].p_v02);document.forms[0].p_v99.value=''" value="Add" name=""/>
<input type="button" onclick="deleteListElement(document.forms[0].p_v02)" value="Remove" name=""/>
</td>
</tr>
<tr>
<td colspan="2">
<select id="P222_LM1_LISTMGRDATA" width="225" multiple="multiple" size="10" prompt="" name="p_v02">
<option>8021
</option>
<option>8001
</option>
</select>
<script type="text/javascript">
<!--
gUtil.select.clean(document.forms[0].p_v02);
//-->
</script>
</td>
</tr>
</tbody>
</table>
</fieldset>Note that the popup item is p_v99 and the list item is p_v02.
Question to the Apex developers:
Given that the popup item does not really need to be submitted with the page, could this not use a different naming convention?
Andy -
Hi,
style="font-weight:bold" or class="fielddatabold" in the element's HTML Form Element Attributes work perfectly for the text field. I cannot get the same result for field with disp.value from popup LOV (display value,return key). I can change font family for example, but cannot bold. Any suggestions ?Thanks a lot for your answer. I got the same idea, but cannot see any place to manage returned values on this template. Description from pop-up key LOV seems to be turned "disabled", and will get the grey colour on the screen. However, if I will change to Select list, it looks fine.
-
Passing Request to a POPUP LOV from previous page
Hi All,
I'm stuck again :( and its urgent..
I have a popup LOV and i want to populate values in it based on REQUEST coming from first page.
If I click CREATE on first page POPUP LOV should display certain values and if I click UPDATE on first page, it should populate different set of values.
Also when I navigate further from this page and return back, the LOV's should have values based on previous request selected.
For this I have created an item P_REQ which stores value of request from first page i.e :P_REQ wil have values CREATE or UPDATE.
Now I'm able to pass this value to a select list. However a POPUP list is not able to fetch this P_REQ value.
MY query for LOV is as below
select d1 d ,r1 r
from
(select name d1 ,ID r1,'C' up_cr
FROM Client
'WHERE statusid in (1,3)
union
select name d1,ClientID r1,'U' up_cr
FROM Client_List)
where up_cr = decode(:P_REQ,'CREATE','C','U')
ORDER BY d1
Kindly help.. Its Urgent..Hi,
If you use that computation to set the value of P_REQ it is actually also saving it in the session. The value stored can then be retrieved by the popup LOVs query using :P_REQ so you don't need to pass the value at all as it is already available.
To see this, go to: [http://apex.oracle.com/pls/otn/f?p=33642:237] The list of employees has INSERT or UPDATE in the final column. This is used in the link on the EMPNO column as the "Request" setting. This link passes you to another page which uses the computation to set the value in P238_REQUEST (this is displayed on the screen). Then you have a link to "Open popup". All this does is open another page which has a region with a source of: Request value: &P238_REQUEST.
Andy -
JavaScript: changes from CS5.5 to CS6
Removed
Classes
FolioBindingDirectionOptions (enum)
FolioOrientationOptions (enum)
SmoothScrollingOptions (enum)
SpaceUnitType (enum)
VisibilityInPdf (enum)
Properties
Button.visibilityInPdf
DocumentPreference.masterTextFrame
DocumentPreset.masterTextFrame
EPubExportPreference.marginUnit
EPubExportPreference.spaceUnit
EPubExportPreference.format
EPubExportPreference.useTocStyle
EPubExportPreference.cssExportOption
EPubExportPreference.externalCSSPath
HTMLExportPreference.leftMargin
HTMLExportPreference.rightMargin
HTMLExportPreference.topMargin
HTMLExportPreference.bottomMargin
HTMLExportPreference.marginUnit
HTMLExportPreference.spaceUnit
HTMLExportPreference.externalCSSPath
HTMLExportPreference.linkToJavascript
HTMLExportPreference.javascriptURL
ObjectExportOption.customImageAlignment
ObjectExportOption.spaceUnit
PagesPanel.verticalView
StyleSheetExportOption.STYLE_NAME_ONLY
StyleSheetExportOption.EXTERNAL_CSS
Methods
Application.rasterizeDocumentPage()
Application.exportMiniFolio()
Application.exportFolioToPackage()
Application.exportFolioToDirectory()
Application.exportFolioToDirectoryPackage()
Application.getAllOverlays()
Application.createCustomMiniFolio()
Application.areFilePathsEquivalent()
Added
Classes
AutoSizingReferenceEnum (enum)
AutoSizingTypeEnum (enum)
CellStyleMapping
CellStyleMappings
CharStyleMapping
CharStyleMappings
CheckBox
CheckBoxes
ClearFormBehavior
ClearFormBehaviors
ComboBox
ComboBoxes
ContentPlacerObject
CustomLayoutTypeEnum (enum)
DimensionsConstraints (enum)
EpubVersion (enum)
FontLockingPreference
GuideTypeOptions (enum)
HtmlItem
HtmlItems
LayoutRuleOptions (enum)
LinkedPageItemOption
ListBox
ListBoxes
MapType (enum)
PNGColorSpaceEnum (enum)
PNGExportPreference
PNGExportRangeEnum (enum)
PNGQualityEnum (enum)
PageViewOptions (enum)
PaginationOption (enum)
ParaStyleMapping
ParaStyleMappings
PreviewPagesOptions (enum)
PrintFormBehavior
PrintFormBehaviors
RadioButton
RadioButtons
SignatureField
SignatureFields
SnapshotBlendingModes (enum)
StaticAlignmentOptions (enum)
SubmitFormBehavior
SubmitFormBehaviors
TableStyleMapping
TableStyleMappings
TextBox
TextBoxes
Properties
AlignDistributeBounds.KEY_OBJECT
Application.linkedPageItemOptions
Application.pngExportPreferences
Application.contentPlacer
Application.fontLockingPreferences
Application.paraStyleMappings
Application.charStyleMappings
Application.tableStyleMappings
Application.cellStyleMappings
Application.selectionKeyObject
Button.linkedPageItemOptions
Button.submitFormBehaviors
Button.clearFormBehaviors
Button.printFormBehaviors
Button.printableInPdf
Button.hiddenUntilTriggered
Button.horizontalLayoutConstraints
Button.verticalLayoutConstraints
Cell.checkBoxes
Cell.comboBoxes
Cell.listBoxes
Cell.radioButtons
Cell.textBoxes
Cell.signatureFields
ChangeGrepPreference.paragraphKashidaWidth
ChangeObjectPreference.autoSizingType
ChangeObjectPreference.autoSizingReferencePoint
ChangeObjectPreference.useMinimumHeightForAutoSizing
ChangeObjectPreference.minimumHeightForAutoSizing
ChangeObjectPreference.useMinimumWidthForAutoSizing
ChangeObjectPreference.minimumWidthForAutoSizing
ChangeObjectPreference.useNoLineBreaksForAutoSizing
ChangeTextPreference.paragraphKashidaWidth
Character.checkBoxes
Character.comboBoxes
Character.listBoxes
Character.radioButtons
Character.textBoxes
Character.signatureFields
Character.paragraphKashidaWidth
CoordinateSpaces.PAGE_COORDINATES
DiacriticPositionOptions.OPENTYPE_POSITION_FROM_BASELINE
Document.linkedPageItemOptions
Document.paraStyleMappings
Document.charStyleMappings
Document.tableStyleMappings
Document.cellStyleMappings
Document.checkBoxes
Document.comboBoxes
Document.listBoxes
Document.radioButtons
Document.textBoxes
Document.signatureFields
Document.selectionKeyObject
DocumentIntentOptions.DPS_INTENT
DocumentPreference.createPrimaryTextFrame
DocumentPreset.createPrimaryTextFrame
EPS.linkedPageItemOptions
EPS.horizontalLayoutConstraints
EPS.verticalLayoutConstraints
EPSText.linkedPageItemOptions
EPSText.horizontalLayoutConstraints
EPSText.verticalLayoutConstraints
EPubExportPreference.externalStyleSheets
EPubExportPreference.javascripts
EPubExportPreference.version
FindChangeTransliterateCharacterTypes.WESTERN_ARABIC_DIGITS
FindChangeTransliterateCharacterTypes.ARABIC_INDIC_DIGITS
FindChangeTransliterateCharacterTypes.FARSI_DIGITS
FindGrepPreference.paragraphKashidaWidth
FindObjectPreference.autoSizingType
FindObjectPreference.autoSizingReferencePoint
FindObjectPreference.useMinimumHeightForAutoSizing
FindObjectPreference.minimumHeightForAutoSizing
FindObjectPreference.useMinimumWidthForAutoSizing
FindObjectPreference.minimumWidthForAutoSizing
FindObjectPreference.useNoLineBreaksForAutoSizing
FindTextPreference.paragraphKashidaWidth
FormField.linkedPageItemOptions
FormField.horizontalLayoutConstraints
FormField.verticalLayoutConstraints
GeneralPreference.mainMonitorPpi
GeneralPreference.greekVectorGraphicsOnDrag
GeneralPreference.showConveyor
GeneralPreference.createLinksOnContentPlace
GeneralPreference.mapStylesOnContentPlace
GeneralPreference.useCustomMonitorResolution
GeneralPreference.customMonitorPpi
GeneralPreference.previewPages
Graphic.linkedPageItemOptions
Graphic.horizontalLayoutConstraints
Graphic.verticalLayoutConstraints
GraphicLine.linkedPageItemOptions
GraphicLine.htmlItems
GraphicLine.checkBoxes
GraphicLine.comboBoxes
GraphicLine.listBoxes
GraphicLine.radioButtons
GraphicLine.textBoxes
GraphicLine.signatureFields
GraphicLine.horizontalLayoutConstraints
GraphicLine.verticalLayoutConstraints
Group.linkedPageItemOptions
Group.checkBoxes
Group.comboBoxes
Group.listBoxes
Group.radioButtons
Group.textBoxes
Group.signatureFields
Group.horizontalLayoutConstraints
Group.verticalLayoutConstraints
Guide.guideType
Guide.guideZone
HTMLExportPreference.externalStyleSheets
HTMLExportPreference.javascripts
IMEPreference.useNativeDigits
Image.linkedPageItemOptions
Image.horizontalLayoutConstraints
Image.verticalLayoutConstraints
ImportedPage.linkedPageItemOptions
ImportedPage.horizontalLayoutConstraints
ImportedPage.verticalLayoutConstraints
InsertionPoint.checkBoxes
InsertionPoint.comboBoxes
InsertionPoint.listBoxes
InsertionPoint.radioButtons
InsertionPoint.textBoxes
InsertionPoint.signatureFields
InsertionPoint.paragraphKashidaWidth
InteractivePDFExportPreference.usePDFStructureForTabOrder
LanguageAndRegion.INDIC
Layer.checkBoxes
Layer.comboBoxes
Layer.listBoxes
Layer.radioButtons
Layer.textBoxes
Layer.signatureFields
LayoutWindow.selectionKeyObject
Line.checkBoxes
Line.comboBoxes
Line.listBoxes
Line.radioButtons
Line.textBoxes
Line.signatureFields
Line.paragraphKashidaWidth
LinkedStoryOption.applyStyleMappings
MasterSpread.checkBoxes
MasterSpread.comboBoxes
MasterSpread.listBoxes
MasterSpread.radioButtons
MasterSpread.textBoxes
MasterSpread.signatureFields
MasterSpread.primaryTextFrame
MediaItem.linkedPageItemOptions
MediaItem.horizontalLayoutConstraints
MediaItem.verticalLayoutConstraints
Movie.linkedPageItemOptions
Movie.horizontalLayoutConstraints
Movie.verticalLayoutConstraints
MultiStateObject.linkedPageItemOptions
MultiStateObject.horizontalLayoutConstraints
MultiStateObject.verticalLayoutConstraints
ObjectExportOption.customLayout
ObjectExportOption.customLayoutType
ObjectStyle.enableTextFrameAutoSizingOptions
Oval.linkedPageItemOptions
Oval.htmlItems
Oval.checkBoxes
Oval.comboBoxes
Oval.listBoxes
Oval.radioButtons
Oval.textBoxes
Oval.signatureFields
Oval.horizontalLayoutConstraints
Oval.verticalLayoutConstraints
PDF.linkedPageItemOptions
PDF.horizontalLayoutConstraints
PDF.verticalLayoutConstraints
PDFColorSpace.GRAY
PICT.linkedPageItemOptions
PICT.horizontalLayoutConstraints
PICT.verticalLayoutConstraints
Page.appliedAlternateLayout
Page.checkBoxes
Page.comboBoxes
Page.listBoxes
Page.radioButtons
Page.textBoxes
Page.signatureFields
Page.layoutRule
Page.snapshotBlendingMode
Page.optionalPage
PageItem.linkedPageItemOptions
PageItem.horizontalLayoutConstraints
PageItem.verticalLayoutConstraints
Paragraph.checkBoxes
Paragraph.comboBoxes
Paragraph.listBoxes
Paragraph.radioButtons
Paragraph.textBoxes
Paragraph.signatureFields
Paragraph.paragraphKashidaWidth
ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION
ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION
ParagraphJustificationOptions.NASKH_TATWEEL_JUSTIFICATION_FRAC
ParagraphJustificationOptions.NASKH_KASHIDA_JUSTIFICATION_FRAC
ParagraphStyle.paragraphKashidaWidth
PlaceGun.checkBoxes
PlaceGun.comboBoxes
PlaceGun.listBoxes
PlaceGun.radioButtons
PlaceGun.textBoxes
PlaceGun.signatureFields
Polygon.linkedPageItemOptions
Polygon.htmlItems
Polygon.checkBoxes
Polygon.comboBoxes
Polygon.listBoxes
Polygon.radioButtons
Polygon.textBoxes
Polygon.signatureFields
Polygon.horizontalLayoutConstraints
Polygon.verticalLayoutConstraints
Rectangle.linkedPageItemOptions
Rectangle.htmlItems
Rectangle.checkBoxes
Rectangle.comboBoxes
Rectangle.listBoxes
Rectangle.radioButtons
Rectangle.textBoxes
Rectangle.signatureFields
Rectangle.horizontalLayoutConstraints
Rectangle.verticalLayoutConstraints
Section.alternateLayoutLength
Section.alternateLayout
Section.pagination
Section.paginationMaster
SelectionOptions.SET_KEY
Snippet.checkBoxes
Snippet.comboBoxes
Snippet.listBoxes
Snippet.radioButtons
Snippet.textBoxes
Snippet.signatureFields
Sound.linkedPageItemOptions
Sound.horizontalLayoutConstraints
Sound.verticalLayoutConstraints
SplineItem.linkedPageItemOptions
SplineItem.htmlItems
SplineItem.checkBoxes
SplineItem.comboBoxes
SplineItem.listBoxes
SplineItem.radioButtons
SplineItem.textBoxes
SplineItem.signatureFields
SplineItem.horizontalLayoutConstraints
SplineItem.verticalLayoutConstraints
Spread.checkBoxes
Spread.comboBoxes
Spread.listBoxes
Spread.radioButtons
Spread.textBoxes
Spread.signatureFields
StateTypes.UP_ON
StateTypes.ROLLOVER_ON
StateTypes.DOWN_ON
StateTypes.UP_OFF
StateTypes.ROLLOVER_OFF
StateTypes.DOWN_OFF
StaticText.staticAlignment
Story.paraStyleMappings
Story.charStyleMappings
Story.tableStyleMappings
Story.cellStyleMappings
Story.checkBoxes
Story.comboBoxes
Story.listBoxes
Story.radioButtons
Story.textBoxes
Story.signatureFields
Story.paragraphKashidaWidth
StoryWindow.selectionKeyObject
StyleExportTagMap.splitDocument
Table.checkBoxes
Table.comboBoxes
Table.listBoxes
Table.radioButtons
Table.textBoxes
Table.signatureFields
TagTextExportCharacterSet.CENTRALEUROPEAN_ISO
TagTextExportCharacterSet.CYRILLIC_ISO
TagTextExportCharacterSet.GREEK_ISO
TagTextExportCharacterSet.WINDOWS_ARABIC
TagTextExportCharacterSet.WINDOWS_HEBREW
Text.checkBoxes
Text.comboBoxes
Text.listBoxes
Text.radioButtons
Text.textBoxes
Text.signatureFields
Text.paragraphKashidaWidth
TextColumn.checkBoxes
TextColumn.comboBoxes
TextColumn.listBoxes
TextColumn.radioButtons
TextColumn.textBoxes
TextColumn.signatureFields
TextColumn.paragraphKashidaWidth
TextDefault.paragraphKashidaWidth
TextFrame.objectExportOptions
TextFrame.linkedPageItemOptions
TextFrame.checkBoxes
TextFrame.comboBoxes
TextFrame.listBoxes
TextFrame.radioButtons
TextFrame.textBoxes
TextFrame.signatureFields
TextFrame.horizontalLayoutConstraints
TextFrame.verticalLayoutConstraints
TextFrameContents.PLACEHOLDER_TEXT_ARABIC
TextFrameContents.PLACEHOLDER_TEXT_HEBREW
TextFrameContents.PLACEHOLDER_TEXT_CYRILLIC
TextFrameContents.PLACEHOLDER_TEXT_GREEK
TextFramePreference.useFlexibleColumnWidth
TextFramePreference.textColumnMaxWidth
TextFramePreference.autoSizingType
TextFramePreference.autoSizingReferencePoint
TextFramePreference.useMinimumHeightForAutoSizing
TextFramePreference.minimumHeightForAutoSizing
TextFramePreference.useMinimumWidthForAutoSizing
TextFramePreference.minimumWidthForAutoSizing
TextFramePreference.useNoLineBreaksForAutoSizing
TextImportCharacterSet.MACINTOSH_GREEK_SHARED_CAPS
TextImportCharacterSet.MACINTOSH_ARABIC
TextImportCharacterSet.MACINTOSH_HEBREW
TextImportCharacterSet.WINDOWS_ARABIC
TextImportCharacterSet.WINDOWS_HEBREW
TextImportCharacterSet.ARABIC_ASMO
TextImportCharacterSet.ARABIC_ASMO_TRANSPARENT
TextPreference.quoteCharactersRotatedInVertical
TextStyleRange.checkBoxes
TextStyleRange.comboBoxes
TextStyleRange.listBoxes
TextStyleRange.radioButtons
TextStyleRange.textBoxes
TextStyleRange.signatureFields
TextStyleRange.paragraphKashidaWidth
WMF.linkedPageItemOptions
WMF.horizontalLayoutConstraints
WMF.verticalLayoutConstraints
Window.selectionKeyObject
Word.checkBoxes
Word.comboBoxes
Word.listBoxes
Word.radioButtons
Word.textBoxes
Word.signatureFields
Word.paragraphKashidaWidth
XmlStory.paraStyleMappings
XmlStory.charStyleMappings
XmlStory.tableStyleMappings
XmlStory.cellStyleMappings
XmlStory.checkBoxes
XmlStory.comboBoxes
XmlStory.listBoxes
XmlStory.radioButtons
XmlStory.textBoxes
XmlStory.signatureFields
XmlStory.paragraphKashidaWidth
Methods
Button.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
Document.createAlternateLayout(spreadItems,name,width,height,createTextStyles,linkTextStor ies,layoutRule)
Document.deleteAlternateLayout(name)
EPS.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
EPSText.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
FormField.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])
Graphic.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
GraphicLine.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptio ns])
Group.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
Guide.transformValuesOf(in)
Guide.resolve(location,in[,consideringRulerUnits])
Image.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
ImportedPage.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOpti ons])
Link.goToSource()
MasterSpread.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint] [,destinationLayer][,showingOptions])
MediaItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])
Movie.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
MultiStateObject.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showing Options])
Oval.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
PDF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
PICT.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
Page.snapshotCurrentLayout()
Page.deleteLayoutSnapshot()
Page.deleteAllLayoutSnapshots()
Page.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint][,destin ationLayer][,showingOptions])
PageItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions] )
Polygon.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
Rectangle.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])
Sound.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
SplineItem.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOption s])
Spread.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,placePoint][,dest inationLayer][,showingOptions])
TextFrame.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions ])
WMF.contentPlace(pageItems[,linkPageItems][,linkStories][,mapStyles][,showingOptions])
Changed methods
Application.dumpFromMemoryMark(Array of from)
Application.dumpBetweenMemoryMarks(Array of from,Array of to)
Button.extractLabel(key)
Document.align(alignDistributeItems,alignOption[,alignDistributeBounds][,reference])
Document.distribute(alignDistributeItems,distributeOption[,alignDistributeBounds][,useDist ributeMeasurement][,absoluteDistributeMeasurement][,reference])
EPS.extractLabel(key)
EPSText.extractLabel(key)
FormField.extractLabel(key)
Graphic.extractLabel(key)
GraphicLine.extractLabel(key)
Group.extractLabel(key)
Image.extractLabel(key)
ImportedPage.extractLabel(key)
MediaItem.extractLabel(key)
Movie.extractLabel(key)
MultiStateObject.extractLabel(key)
Oval.extractLabel(key)
PDF.extractLabel(key)
PICT.extractLabel(key)
PageItem.extractLabel(key)
Polygon.extractLabel(key)
Rectangle.extractLabel(key)
Sound.extractLabel(key)
SplineItem.extractLabel(key)
TextFrame.extractLabel(key)
WMF.extractLabel(key).. created using this XML input ..
<fileset>
<file name="omv$indesign-7.5$7.5.xml" />
<file name="omv$indesign-8.0$8.0.xml" />
</fileset>
.. and this XSLT ..
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:variable name="file1" select="document(/fileset/file[1]/@name, /)" />
<xsl:variable name="file2" select="document(/fileset/file[2]/@name, /)" />
<xsl:template match="/">
<html><head><title>InDesign changes from CS5.5 to CS6</title><LINK rel="stylesheet" type="text/css" href="styles003.css" /></head><body>
<h1>InDesign changes from CS5.5 to CS6</h1>
<h2>Removed</h2>
<h3>Classes</h3>
<xsl:apply-templates select="$file1/dictionary/package" mode="c_removed" />
<h3>Properties</h3>
<xsl:apply-templates select="$file1/dictionary/package" mode="p_removed" />
<h3>Methods</h3>
<xsl:apply-templates select="$file1/dictionary/package" mode="m_removed" />
<h2>Added</h2>
<h3>Classes</h3>
<xsl:apply-templates select="$file2/dictionary/package" mode="c_added" />
<h3>Properties</h3>
<xsl:apply-templates select="$file2/dictionary/package" mode="p_added" />
<h3>Methods</h3>
<xsl:apply-templates select="$file2/dictionary/package" mode="m_added" />
<h2>Changed methods</h2>
<xsl:apply-templates select="$file2/dictionary/package" mode="m_changed" />
</body></html></xsl:template>
<xsl:template match="package" mode="c_removed">
<xsl:for-each select="classdef">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="not($file2/dictionary/package/classdef[@name=$this])">
<p><xsl:value-of select="$this" /><xsl:if test="@enumeration"> (enum)</xsl:if></p>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="c_added">
<xsl:for-each select="classdef">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="not($file1/dictionary/package/classdef[@name=$this])">
<p><xsl:value-of select="$this" /><xsl:if test="@enumeration"> (enum)</xsl:if></p>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="p_removed">
<xsl:for-each select="classdef">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="$file2/dictionary/package/classdef[@name=$this]">
<xsl:for-each select="elements/property">
<xsl:variable name="prop" select="@name" />
<xsl:if test="not($file2/dictionary/package/classdef[@name=$this]/elements/property[@name=$prop])">
<p><xsl:value-of select="$this" />.<xsl:value-of select="$prop" /><xsl:if test="@enumeration"> (enum)</xsl:if></p>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="p_added">
<xsl:for-each select="classdef">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="$file1/dictionary/package/classdef[@name=$this]">
<xsl:for-each select="elements/property">
<xsl:variable name="prop" select="@name" />
<xsl:if test="not($file1/dictionary/package/classdef[@name=$this]/elements/property[@name=$prop])">
<p><xsl:value-of select="$this" />.<xsl:value-of select="$prop" /><xsl:if test="@enumeration"> (enum)</xsl:if></p>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="m_removed">
<xsl:for-each select="classdef[@dynamic]">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="$file2/dictionary/package/classdef[@name=$this]">
<xsl:for-each select="elements/method">
<xsl:variable name="meth" select="@name" />
<xsl:if test="not($file2/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth])">
<p><xsl:value-of select="$this" />.<xsl:value-of select="$meth" />()</p>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="m_added">
<xsl:for-each select="classdef[@dynamic]">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="$file1/dictionary/package/classdef[@name=$this]">
<xsl:for-each select="elements/method">
<xsl:variable name="meth" select="@name" />
<xsl:if test="not($file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth])">
<p><xsl:value-of select="$this" />.<xsl:value-of select="$meth" />(<xsl:for-each select="parameters/parameter">
<xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if>
</xsl:for-each>)</p>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="package" mode="m_changed">
<xsl:for-each select="classdef[@dynamic]">
<xsl:sort select="@name" />
<xsl:variable name="this" select="@name" />
<xsl:if test="$file1/dictionary/package/classdef[@name=$this]">
<xsl:for-each select="elements/method">
<xsl:variable name="meth" select="@name" />
<xsl:if test="$file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]">
<xsl:if test="$file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters != parameters">
<p><xsl:value-of select="$this" />.<xsl:value-of select="$meth" />(
<xsl:for-each select="$file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter">
<xsl:variable name="parm" select="@name" />
<xsl:if test="not($file2/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm])">
<stkout><xsl:value-of select="$parm" /></stkout><xsl:text> </xsl:text>
<xsl:if test="count(../parameter) > 1">,</xsl:if>
</xsl:if>
</xsl:for-each>
<xsl:for-each select="parameters/parameter">
<xsl:variable name="parm" select="@name" />
<xsl:choose>
<xsl:when test="not($file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm])">
<b><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if></b>
</xsl:when>
<xsl:when test="datatype/array and not($file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm]/datatype/array)">
<xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><i>Array of </i><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if>
</xsl:when>
<xsl:when test="@optional and not($file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm][@optional])">
<b><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><i>Array of </i><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if></b>
</xsl:when>
<xsl:when test="not(@optional) and $file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm][@optional]">
<stkout><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><i>Array of </i><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if></stkout>
</xsl:when>
<xsl:when test="datatype/type != $file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm]/datatype/type">
<xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><stkout><xsl:value-of select="$file1/dictionary/package/classdef[@name=$this]/elements/method[@name=$meth]/parameters/parameter[@name=$parm]/datatype/type" /></stkout><xsl:text> </xsl:text><b><xsl:value-of select="@name" /></b><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">[</xsl:if><xsl:if test="position() > 1">,</xsl:if><xsl:value-of select="@name" /><xsl:if test="@optional='true' or datatype/value or contains(shortdesc, 'Optional')">]</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>)</p>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet> -
APEX 4.0 - AJAX not working with Popup LOV field
Hello,
In the application I have built I have three fields which are 'feeded' by selects via a AJAX construction.
All three fields are based on three others, which are PopUp LOV fields. Up to version 3.2 I had no problems: the fields were 'refreshed' as expected when in the 'parent' field a specific value was entered or choosen by the Popup Lov selector.
But since the migration to APEX-4 (lin a test-system) all the three fields are not correctly refreshed anymore: two of them give the value 'undefined', the third, which is a select-list shows values, but at the moment I try to click on the select-list down arrow to pick a value, the list is emptied and stays that way.
More specific about the third field:
item 1 is a popup-lov defined item in which a user can type a value, but can also choose a value from a popup-lov. Item 2 is based on item-1: it does a select based on the value of item-1 and refreshes a select-list. Item-2 is defined as a select list.
I got it all working when making item-1 also a select list, but since the list can become very large, I made a Popup lov of it. Most users do know what code they have to enter and in case somebody is not sure, the lov can be used.
In this forum I came across a problem with AJAX callback, which was answered by Patrick Wolf, saying that in an htmldb_Get ( ... ,0) the last 0 should be replaced by $v('pFlowStepId'), but this did not fix my problem. I have the feeling that the problem is somewhre else, since on first hand, after entering a value in item-1 I see item-2 refreshed with the correct values, but the moment I try to select one item, the list is emptied.....
I hope I made it clear what my problem is and that somebody can help me, else APEX-3.2 was the latest version for this application....
Thanks in advance and best regards,
Jan.
Edited by: user13110728 on 9-aug-2010 8:44Hi Jan,
the problem is the
onBlur="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"on P21_GBREKNR. This is getting attached to the HTML input text field but as well the the anchor link which opens the popup. So when you leave the text field the cursor will be put onto the icon to open the Popup LOV. When you press tab another time or leave the anchor link by clicking somewhere the above JavaScript function is fired again. But the problem is that "this" this time points to the anchor and not the text item anymore, so it will return an invalid value when you access this.value in your f_P21_select_kostenposten function which results in an empty result of your on-demand call.
I still have to investigate why the above JavaScript code is now added to the anchor link as well. But as a workaround, just change your code to
onChange="javascript:f_P21_select_kostenposten(this,'P21_KOSTENPOST');"which is better anyway, because it's just firing when the value really got changed. And because the anchor link can't really be changed, the event will never fire when you leave the anchor. BTW you can use the Application Search feature to search for all your onBlur events. onChange is much better than onBlur because it doesn't fire that often unintended.
But if you want to use some of the new APEX 4.0 features, you could use the cascading LOV feature of APEX 4 and avoid all this JavaScript and on-demand code which you have written.
I have changed your application to take use of it.
1) I changed the LOV query for P21_KOSTENPOST from
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from kostenposten
where vervallen is null
and bedrijf = :P21_BEDRIJF
order by gbreknr, kostenpostto
select '('||replace(lpad(gbreknr, 3, chr(1)),chr(1),' ')||') '|| omschrijving d, kostenpost r
from kostenposten
where vervallen is null
and bedrijf = :P21_BEDRIJF
and (:P21_GBREKNR is null or gbreknr = :P21_GBREKNR)
order by gbreknr, kostenpostas it was in your on-demand process. The query will return all values if P21_GBREKNR is null but will restrict it if the field is filled out.
2) Set "Cascading LOV Parent Item(s)" to P21_BEDRIJF,P21_GBREKNR Because based on your LOV query I assume "Kostenpost" should be refreshed if one of the two fields gets changed.
3) Set "Optimize Refresh" to No because one of your parent items (P21_GBREKNR) can contain a null value.
4) Removed the onBlur/onChange from P21_GBREKNR
5) Removed the *%null%* from the "Null Return Value" attribute of P21_BEDRIJF, because that will cause a ORA-1722 if someone picks "-- kies: --"
That's it.
Have a look at dynamic actions and the "Set Value" action as well, because I think that could remove your other on-demand calls as well without having to write any JavaScript code.
I will still investigate what's going on with the anchor link in APEX 4.0
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins -
Example: Cascading Popup LOVs (Solution using Ajax)
If you need popup LOVs to depend on each other, here's a way to do it:
Put this in the header text of the page:
<script type="text/javascript">
function clearFormData(data) {
var items = new Array();
items.push(data);
for (var i = 0; i < items.length;i++) {
var item = items;
document.getElementById(item).value = '';
if (document.getElementById(item+'_HIDDENVALUE')) document.getElementById(item+'_HIDDENVALUE').value = '';
return true;
function setSessionData(data) {
var get = new htmldb_Get(null,document.getElementById('pFlowId').value,null);
var items = new Array();
items.push(data);
for (var i = 0;i < items.length;i++) {
var item = items[i];
var tempObjID = (document.getElementById(item+'_HIDDENVALUE')) ? item+'_HIDDENVALUE' : item;
get.add(item, document.getElementById(tempObjID).value);
get.get();
return true;
</script>
These are some helper functions (makes it easier to port to other pages, you could also put them in an external js file).
Now on the second (or whatever) popup LOV (one that needs the value of another), put following code into the field "Form Element Option Attributes":
[i]onclick="setSessionData('P1_FIRST_POPUP')"
Change "P1_FIRST_POPUP" into the id/name of the popup LOV that the second depends on.
Now to clear the second one (if there is already something in it) you can put this into the "Form Element Option Attributes" field of the first popup LOV:
onclick="clearFormData('P1_SECOND_POPUP')"
Change the "P1_SECOND_POPUP" into the id/name of the popup LOV that depends on the first one.
If you need more than one item to be set in the session use the javascript functions like this:
onclick="setSessionData(['P1_FIRST_POPUP','ANOTHER_ITEM';'AND_SO_ON'])"
onclick="clearFormData(['P1_SECOND_POPUP','ANOTHER_ITEM';'AND_SO_ON'])"
This is the best solution I figured out so far for cascading popups.
Demo: http://apex.oracle.com/pls/otn/f?p=36908:2
If you need cascading select boxes it's better to use this solution: http://apex.oracle.com/pls/otn/f?p=11933:37 .
Edit:
- works now regardless of being logged in or not, I just forgot to take ou the 0 in the htmldb_Get call (=> always
sent the session id "0", which didn't exist)
- added a link to the demonstrationexcellent tip for using ajax to update session state.
one small change to share:
function setSessionData() {
var get = new htmldb_Get(null,document.getElementById('pFlowId').value,null,null);
for (var i = 0; i < arguments.length; i++) {
var item = arguments\[i\];
var tempObjID = (document.getElementById(item+'_HIDDENVALUE')) ? item+'_HIDDENVALUE' : item;
get.add(item, document.getElementById(tempObjID).value);
get.get();
return true;
set 4th argument to htmldb_Get constructor to null.. causes the script to retrieve the value from the hidden form field, rather than being set explicitely.
just noticed this code is different from the demo, which does set a static value of 2. Tempted to hit cancel, but maybe this can avoid someone else a lot of head scratching.
also, was having issues with Array.push() during debugging to find the above issue.. and changed the way html form element id(s) are passed to the function; opted to use the implicit "arguments" array instead. Minor, but worth noting.
thanks again for the useful piece of code.
edit:
this wiki doesn't parse brackets well; added char escapes so they'll show.. will need to remove by hand. -
Popup lov in a report is not working if I have an order by caluse
I created a form manually using the document from the url:
http://otn.oracle.com/products/database/htmldb/howtos/tabular_form.html#MANUAL
I used the following query from that document.
select htmldb_item.hidden(1,empno) empno,
ename,
htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
wwv_flow_item.date_popup(6,null,hiredate) hiredate,
htmldb_item.text(7,sal,10) sal,
htmldb_item.text(8,comm,10) comm,
htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
from emp
This works fine.
But if I add an order by clause to the query the popup key for mgr column doesn't work.
select htmldb_item.hidden(1,empno) empno,
ename,
htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
htmldb_item.popupkey_from_query(4,mgr,'select ename, empno from emp',10) mgr,
wwv_flow_item.date_popup(6,null,hiredate) hiredate,
htmldb_item.text(7,sal,10) sal,
htmldb_item.text(8,comm,10) comm,
htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
from emp
order by ename
Is this a bug ?
Is there a work around ?
Thanks
Chandra.Chandra,
Please refrain from asking the exact same question twice. It doesn't help the quality of this forum. If you have to, "bump" an existing unanswered question up (wait a day or two, please) in case it fell through the cracks.
Now for the answer:
select htmldb_item.hidden(1,empno) empno,
ename,
htmldb_item.select_list_from_query(3,job,'select distinct job, job from emp') job,
htmldb_item.popupkey_from_query(4,mgr,'select ename d, empno r from emp',10) mgr,
wwv_flow_item.date_popup(6,null,hiredate) hiredate,
htmldb_item.text(7,sal,10) sal,
htmldb_item.text(8,comm,10) comm,
htmldb_item.select_list_from_query(9,deptno,'select dname, deptno from dept') deptno
from (select * from emp order by ename)
Use an inline view like in the example above to do the sorting first. If you sort a result set that includes Popup LOVS, then the Javascript used to populate the text fields doesn't work anymore.
Sergio
Maybe you are looking for
-
How do I find the program that is creating a debug file
Hi, I have a bunch of debug files in /usr/tmp directory on a Unix box. I am using Oracle Apps 11i. How do I find which program is causing this file? There content of the debug files does not have much information to point to any particular program. T
-
Adobe Acrobat XI Pro Context Menu is missing Windows 8
Hi there, I've just installed acrobat XI and I found that the context menu (convert to pdf, combine files...) is missing. Does anyone know how to put it back? Cheers!
-
How to get a blank insted of 00.00.0000 for Dates in Bex
Hi, For One of the DATE (Key Fig) fields in Report, iam getting an output as 00.00.0000, if there is no date available in the data. Could be pls suggest me as how we can get a blank insted of 00.00.0000. I have tried it as, Query Designer-> Propertie
-
Will iPhoto store raw photos shot from a Canon or Nikon camera? Thanks.
-
The music button on Settings/Store does not appear.
When I go to settings/store, I only have apps and the books buttons. There is no music button. This happens on my iPhone 3GS and iPad 1. I also have 2 mac with OSX Lion and I do not have the automatically dowonload music option on itunes. I cannot fi