You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2009/09/12 07:24:23 UTC

Re: in-place-editor Error

Hi Nicolas,

I wanted to look at this this morning but I got a problem (on XP/FF3.5) I already saw before : a dialog box opens asking to save
CreateExampleAjax as an application/x-json. IIRW, the 1st I saw this it was only when I was validating with the Enter key, but now
it's also with the create button. It's the same at https://demo904.ofbiz.org/example/control/authview/findExampleAjax
It works correctly in IE8 and Opera, but there the in-place editor seems to no longer work (no error message, it simply do nothing), 
or do I miss somehting ?

Jacques

From: "Nicolas" <ma...@librenberry.net>
> Hello,
>
> In few month later, I use the in-place-editor define on form ListExamplesAjax with success. ToDay, after reload OFBiz from trunk,
> impossible to load the editor.
>
> In form I have :
> <field name="exampleName" title="${uiLabelMap.CommonName}" id-name="exampleName">
>            <display>
>                <in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..."
> text-between-controls=" ">
>                    <simple-editor/>
>                    <field-map field-name="exampleId" from-field="exampleId"/>
>                    <field-map field-name="statusId"  from-field="statusId"/>
>                </in-place-editor>
>            </display>
>        </field>
>
> but when html form is loading my javascript analyser alert on :
>   Erreur : this.element is null
>   Fichier Source : https://novalis:8443/images/prototypejs/controls.js
>   Ligne : 527
>
> I trace to controls.js and found :
>
> Ajax.InPlaceEditor = Class.create({
>  initialize: function(element, url, options) {
>    this.url = url;
>    this.element = element = $(element);
>    this.prepareOptions();
>    this._controls = { };
>    this._paramValue = '';
>    arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
>    Object.extend(this.options, options || { });
>    if (!this.options.formId && this.element.id) {
>
>
> On Html code I have :
>
> <td>
> 10<script language="JavaScript" type="text/javascript">
> ajaxInPlaceEditDisplayField('exampleName_2', '/example/control/updateExample?statusId=EXST_IN_DESIGN&exampleId=10014', {paramName:
> 'exampleName', cancelControl: 'button', htmlResponse: false, savingText: 'Updating...', textBetweenControls: ' ',
> updateAfterRequestCall: true, rows: '1', cols: '40'});
> </script>
>
> Element is define : exampleName_2, but no html node are present with this id.
>
> Anyone know if there was a regression on the field.id-name attribute ? Or it's possible that forget a configuration but I don't
> look what.id-name
>
> Thx,
> Nicolas
>