Estoy intentando sobrescribir un método dentro de un widget jquery. El método se puede encontrar en la línea 122 en https://github.com/got5/tapestry5-jquery/blob/master/src/main/resources/org/got5/tapestry5/jquery/validation.jsMétodo de anulación dentro del widget jquery
Id gustaría alterar la salida html en la línea 141
He intentado añadir lo siguiente a la clase de mi costumbre js sin éxito. Si alguien puede explicar cómo hacer esto, id lo agradecería enormemente.
(function($) {
$.widget("ui.tapestryFieldEventManager", {
showValidationMessage : function(message) {
var field = this.element;
var form = field.closest('form');
this.options.validationError = true;
form.formEventManager("setValidationError", true);
field.addClass("t-error");
this.getLabel() && this.getLabel().addClass("t-error");
var icon = this.getIcon();
if (icon) icon.show();
alert("here");
var id = field.attr('id')+"\\:errorpopup";
if($("#"+id).size()==0) //if the errorpopup isn't on the page yet, we create it
field.after("<div id='"+field.attr('id')+":errorpopup' class='tjq-error-popup test'/>");
Tapestry.ErrorPopup.show($("#"+id),"<span>"+message+"</span>");
}
});
})(jQuery);
Podría ser yo, pero no creo que este enfoque exacto funcione con jQuery UI 1.9.x. – jokeyrhyme