Page 1 of 1

Panel Open and Close Events don't fire when part of a Template!

Posted: Sun May 18, 2014 11:21 pm
by bahar.wadia

I have a template that has a Panel. The problem is that when I create a Page using this template the Open and Close Events don't fire. As a matter of fact, the Panel does not even show up as a component in the Events section. Also, I cannot add a Panel to a Page created with a Template.

However, if I put some code in the Open and Close Events of the Panel in the Template that code executes, but that is useless.

What am I doing wrong? Please Help!


Panel Open and Close Events don't fire when part of a Template!

Posted: Mon May 19, 2014 12:33 am
by Yurii Orishchuk

Hi Bahar.

Unfortunately you can not to access inside the template untill you make "Break appart".

So if you need to make some changes to your template you can do following:

precode

1 Open page.

2 Click on screen component. http://prntscr.com/3ki8uh/direct

3 In properties side bar click on "Break apart page template". http://prntscr.com/3ki8is/direct

/code/pre

That's all.

After these steps your template components will be avaliable for editing.

Regards.


Panel Open and Close Events don't fire when part of a Template!

Posted: Mon May 19, 2014 2:00 am
by bahar.wadia

I already know that, but then the changes in the template won't propagate will they?

Seems like a bug or a serious limitation. Which one is it?


Panel Open and Close Events don't fire when part of a Template!

Posted: Mon May 19, 2014 2:54 am
by Yurii Orishchuk

Bahar.

If you need to implement common part of the template(with logic inside) you can to do it with editing template.

Follow these steps:

1 Open "templates" and click on your template to open editor. http://prntscr.com/3kj249/direct

2 Template editor will appear.

3 In this editor you can implement all common logic you need for all your pages.

But when you need custom specific logic for certain page - you should to use way described in prev message.

Regards.


Panel Open and Close Events don't fire when part of a Template!

Posted: Mon May 19, 2014 3:00 am
by bahar.wadia

It seems like you are missing my point.

I have common logic, more importantly common look and feel. That is why I am using templates. On some screens I need to use a Panel. If I could use the Panel component like any other component and place in the workspace I would not have an issue.

On the other hand, if the Panel events would fire like one would expect when the Panel is placed in the template, because that is the only way a Panel can be placed on a template, it would not be a problem would it?

So once again, is it a bug or a serious limitation. Which one?


Panel Open and Close Events don't fire when part of a Template!

Posted: Mon May 19, 2014 9:07 am
by Evgene Karachevtsev

Hello Bahar,

From appery.io builder you can create events for panel only in template that contains the panel.
But you can create your own event for every child pages youself manually:

code$(document).off("panelopen", '[id="pagePanel_panel_2"]').on( "panelopen", function( event, ui ) {console.log("open");} ); /code