Invenzzia »

Pages: [1]   Go Down
  Print  
Author Topic: OPTv2: Component template interaction  (Read 463 times)
Description: It would be nice to get some explanation on that
0 Members and 1 Guest are viewing this topic.
whumble
User

Offline Offline

Posts: 10


View Profile
« on: September 18, 2010, 20:50:14 »

At last I reached OPT components.
I've read the manual and the gallery tutorial, but...
Could you please give a short overview of
how a component works inside, what interface functions are called first
and why, what happens then.
For example, when processEvent function is called.
I'm browsing through the sources, but am afraid of losing something.
Brief would be great, thanks!
Logged
Zyx
Your programmer
Administrator
User
*****
Offline Offline

Posts: 291



View Profile WWW
« Reply #1 on: November 07, 2010, 08:24:55 »

The order is:

1. __construct() - in your script or in the template, depending on the deployment model.
2. setView() - when the view is deployed in the template.

Next calls are situation-dependent, and you are guarranteed that the first two methods have already been called:

1. display() is called for opt:display tag
2. processEvent() is called for opt:on-event / opt:onEvent tag
3. get() etc. are called for the special variable call $system.component.xyz
4. manageAttribtes() is called for opt:component-attributes attribute.

In OPT 2.1 components support data formats, so you will be able to develop your own component interface and install it in OPT as well.
Logged

PozDrX, Zyx
---Invenzzia group---
Pages: [1]   Go Up
  Print  
 
Jump to:  

Subject Started by Replies Views Last post
OPTv2: kod śledzenia Google Analytics poliman 3 533 Last post December 29, 2009, 19:48:00
by eXtreme
OPTv2: Widoczny prolog w trybie debug i blad wyswietlania strony bez niego. gorky_park 1 599 Last post October 30, 2009, 11:39:13
by Zyx
OPL for Zend Framework ersonic 1 274 Last post March 09, 2011, 21:27:24
by Zyx
OPTv2 : Naprzemienne kolorowanie rekordów El_Darro 7 1808 Last post May 26, 2008, 13:55:07
by megaweb
OPTv2: Znak   zamieniany na krzaczki. mrKrecik 12 4730 Last post November 19, 2010, 08:11:24
by Zyx