Jump to content

Recommended Posts

  • 3 months later...
  • 3 months later...
  • 2 months later...
  • 2 weeks later...
Posted

When click in ExtEvents to open, appears message error:

 

[Window Title]
DbGrid1 - Delphi XE6 - Main [built]
[Content]
Resource EXTJS_EXT_FORM_TRIGGERFIELD not found
[OK]

 

How to fix??
 

Posted
Replace In 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
from 
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
to
 
  JSObjects.DefaultJSClassName:='Ext.form.field.Trigger';

 

 

 

  • Upvote 1
Posted

 

Replace In 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
from 
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
to
 
  JSObjects.DefaultJSClassName:='Ext.form.field.Trigger';

 

 

 

 

 

Works fine!!

Thank you Stas!

  • 6 months later...
Posted

Simple ext.form.triggerfield unigui wrapper

Hi Stas,
 
Thanks for sharing.
Grateful.
 

You might call this component to a form ? When you press the button , do a ShowModal a way , I tried but I failed to show how

 

I appreciate the support you can give me

 

 

code:

unit UniButtonEdit;
 
interface
uses SysUtils,Classes,uniGuiTypes, uniGUIClasses,UniEdit
, uniGUIForm , uniGUIAbstractClasses, uniGUIApplication ,
  uniGUIBaseClasses , controls
;
type
   TIconCls = (action, add, arrow_up, arrow_right, arrow_down, arrow_left, bookmarks, compose, delete, download, favorites, info, more, refresh, reply, search, settings, star, team, time, trash, user);
 
Type
  TUniButtonEdit = class(TUniEdit)
  private
    FOnButtonClick: TNotifyEvent;
    FIconCls: String;
    procedure SetIconCls(const Value: String);
    function GetTriggerCls: String;
    procedure ShowForma;
  protected
    procedure DOHandleEvent(EventName: string; Params: TUniStrings); override;
    procedure ConfigJSClasses(ALoading: Boolean); override;
    procedure LoadCompleted; override;
    procedure Click ; override;    // CRAMIREZ
  public
    constructor Create(AOwner:TComponent); override;
  published
 
     property OnButtonClick:TNotifyEvent read FOnButtonClick write FOnButtonClick;
      property IconCls:String read FIconCls write SetIconCls;
      property triggerCls:String read GetTriggerCls;
 
 
  End;
 
procedure Register;
 
implementation
   uses UniButtonForm ;    // CRAMIREZ
 
 
procedure Register;
begin
  RegisterComponents('uniGUI Custom', [TUniButtonEdit]);
end;
 
{ TUniButtonEdit }
 
function TUniButtonEdit.GetTriggerCls: String;
begin
 if FIconCls<>'' then
 Result:='x-form-'+FIconCls+'-trigger'
 else
 Result:='';
 
 
 
end;
 
 
procedure TUniButtonEdit.ConfigJSClasses(ALoading: Boolean);
begin
  inherited;
  JSObjects.DefaultJSClassName:='Ext.form.TriggerField';
 
 
end;
 
constructor TUniButtonEdit.Create(AOwner: TComponent);
begin
  inherited;
 FIconCls:='search';   //  <----- tipo de icono
 
end;
 
procedure TUniButtonEdit.Click;
begin
  inherited;
  ShowForma;     // CRAMIREZ
end;
 
 
procedure TUniButtonEdit.ShowForma;    // CRAMIREZ
VAR
  FUniButtonForm : TFUniButtonForm;
begin
   text:= 'YYYY';
   TFUniButtonForm.create(uniapplication);
  FUniButtonForm.SHOWMODAL(
   procedure(Sender: TComponent; Result: Integer)
   var
    i:Integer;
   begin
      // LOGIN OK
      if Result = mrOk then begin
      end ;
      if Result = mrcancel then begin
      end;
   end)
 
 
end;
 
procedure TUniButtonEdit.DOHandleEvent(EventName: string; Params: TUniStrings);
 
begin
 
if (EventName='buttonclick') then begin
 
 if Assigned(FOnButtonClick) then
   FOnButtonClick(Self);
 
end;
 
 inherited;
 
 
end;
 
procedure TUniButtonEdit.LoadCompleted;
begin
  inherited;
 
if WebMode then
begin
 if FIconCls<>'' then
 JSCode('triggerCls:"'+triggerCls+'"');
 JSCode('hideTrigger:false');
 JSAfterCreate(JSName+'.onTriggerClick=function(){ajaxRequest('+JSName+',"buttonclick",[]);};');
 
end;
end;
 
 
 
procedure TUniButtonEdit.SetIconCls(const Value: String);
begin
  FIconCls := Value;
end;
 
 
end.
 

 

  • 1 year later...
Posted

Hello,

I tried to make in Trail 1321.

type
  TUnimButtonEdit = class(TUnimEdit)
  private

when show "TUnimForm", I get "Ajax error" Ext.form.field is undefined. 

How to use for mobile this component?

Thank you.

  • 7 months later...
  • 4 weeks later...
  • 3 months later...
  • 5 months later...
Posted

Hi,

 

If I understand you correctly, you can use triggers config for this:

http://forums.unigui.com/index.php?/topic/7969-how-to-add-a-search-icon-in-tuniedit/&do=findComment&comment=54542

 

This dowonload link already contains the update for ExtJS6 using the JSConfigObject to create the triggers.

If any user already uses the TUniButtonEdit in their projects, they can upgrade to that version that will work on the UniGUI Beta 1.0.2+  and higher versions.

 

And it also contains the UniButtonEditv6 package for ExtJS6 and new versions of UniGUI.

 

https://mega.nz/#!LlV1XRSA!TVMUEYGOlV-7Dp7TxyNt68BtXfRW2Pt7SLTS-0JQAS0

  • 1 month later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...