• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OVERRIDE AjaxInPlaceEditor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OVERRIDE AjaxInPlaceEditor


  • Subject: Re: OVERRIDE AjaxInPlaceEditor
  • From: David LeBer <email@hidden>
  • Date: Thu, 09 Feb 2012 09:05:44 -0500

Raymond,

AjaxOptions do not work in isolation. They generate the options passed into the associated JS. Have you subclassed and modified it too?

Alternately have you tried using the constructor for AjaxOptions that accepts a separate binding and option name.

The source is pretty clear on how this all works, if you are going to start subclassing things, I suggest you review it before you start making changes.

D

--
David LeBer
Codeferous Software

On 2012-02-09, at 2:39 AM, Raymond NANEON wrote:

> Hi,
>
>
> I want to override the AjaxInPlaceEditor component, change the action 'cancel' to 'annuler' in French. So I create a new component that extends an AjaxInPlaceEditor but it does not work as I want. Maybe my override on the component is not correct.
>
> public class AjaxFieldEditor extends AjaxInPlaceEditor {
>
>     public AjaxFieldEditor(String name, NSDictionary associations,
>             WOElement children) {
>         super(name, associations, children);
>         // TODO Auto-generated constructor stub
>     }
>
>     public NSDictionary createAjaxOptions(WOComponent component) {
>         NSMutableArray ajaxOptionsArray = new NSMutableArray();
>         ajaxOptionsArray.addObject(new AjaxOption("annulerLink",
>                 AjaxOption.BOOLEAN));
>         ajaxOptionsArray.addObject(new AjaxOption("annulerText",
>                 AjaxOption.STRING));
>         ajaxOptionsArray.addObject(new AjaxOption("annulerControl",
>                 AjaxOption.STRING));
>         NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(
>                 ajaxOptionsArray, component, associations());
>         return options;
>     }
>
>     public void appendToResponse(WOResponse response, WOContext context) {
>         WOComponent component = context.component();
>         NSDictionary options = createAjaxOptions(component);
>         AjaxOptions.appendToResponse(options, response, context);
>     }
>
> }
>
> Thanks for your Help
>
> Ray
> Envoyé depuis iCloud
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Rép : Re: OVERRIDE AjaxInPlaceEditor
      • From: Raymond NANEON <email@hidden>
References: 
 >OVERRIDE AjaxInPlaceEditor (From: Raymond NANEON <email@hidden>)

  • Prev by Date: Re: isEntityEditable still showing space when false
  • Next by Date: Rép : Re: OVERRIDE AjaxInPlaceEditor
  • Previous by thread: OVERRIDE AjaxInPlaceEditor
  • Next by thread: Rép : Re: OVERRIDE AjaxInPlaceEditor
  • Index(es):
    • Date
    • Thread