Re: [Dev] [ES]Overriding a Global Page returns TypeError: Cannot read property "types" from undefined

2015-09-10 Thread Chanaka Jayasena
Issue seems to be with the navigation.hbs. To fix it add navigation.hbs to
partial to
/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/.


Start with an en empty file. You will be able to get rid of the error. Then
type {{dump .}} in the file to see the data coming there. Try to compare
the data with the original partial data in
"store/themes/store/partials/pagination.hbs"


thanks,
Chanaka

On Thu, Sep 10, 2015 at 11:15 AM, Rasika Perera  wrote:

> Hi all,
>
> I am trying to partially override a global page in ES v2. I followed this
> [1] doc. Here are the steps I followed;
>
> 1. Created "shell" of an app extension called "store-device" in
> "/repository/deployment/server/jaggeryapps/store/extensions/app"
> path.
>
> 2. Added a dependency to "store-common" and overridden app.server()
> callback method on app.js on
> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/app.js"
> path.
>
> app.dependencies = ['store-common'];
> app.server = function(ctx) {
> return {
> endpoints: {
> pages: [
> title:'Store | My Items',
> url:'my-items',
> path:'my_items.jag',
> secured:true,
> permission:'APP_MYITEMS'
> }]
> },
>
> 3. Added an overriding controller "my_items.jag" on "
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/pages/"
> path.
>
> 4. Added an overriding renderer "my_items.js" on
> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/renders/pages/"
> path.
>
> 5. Added an overriding partial "my_items.hbs" on "
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/"
> path.
>
> --
>
> When trying to access the my page on "
> https://localhost:9443/store/pages/my-items;; I am getting a "TypeError:
> Cannot read property "types" from undefined". Complete log can be found on
> [2].
>
> Complete "store-device" shell's folder structure is as follows;
>
>
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device
>  |
>  |---*app.js*
>  |---pages
>  |`---*my_items.jag*
>  `---themes
>   |---default
>   |`---renderers
>   |  `---pages
>   |`---*my_items.js*
>   `---store
> `---partials
>   `---*my_items.hbs*
>
> Any help to solve this problem will be greatly appreciated.
>
> Thank you
>
> Links
> [1] https://docs.wso2.com/display/ES200/Overriding+a+Global+Page
> ​[2] Error log; see the attachment: console_log.txt
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> M: +94 71 680 9060 E: rasi...@wso2.com
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chanaka Jayasena
Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
email: chan...@wso2.com; cell: +94 77 785 5565
blog: http://chanaka3d.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES]Overriding a Global Page returns TypeError: Cannot read property "types" from undefined

2015-09-10 Thread Rasika Perera
@Himasha,

I think it should be "store-common".

@Chanaka

Okay, will try to debug and isolate the error.

Thank you

On Thu, Sep 10, 2015 at 1:29 PM, Chanaka Jayasena  wrote:

> Issue seems to be with the navigation.hbs. To fix it add navigation.hbs to
> partial to
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/.
>
>
> Start with an en empty file. You will be able to get rid of the error.
> Then type {{dump .}} in the file to see the data coming there. Try to
> compare the data with the original partial data in
> "store/themes/store/partials/pagination.hbs"
>
>
> thanks,
> Chanaka
>
> On Thu, Sep 10, 2015 at 11:15 AM, Rasika Perera  wrote:
>
>> Hi all,
>>
>> I am trying to partially override a global page in ES v2. I followed this
>> [1] doc. Here are the steps I followed;
>>
>> 1. Created "shell" of an app extension called "store-device" in
>> "/repository/deployment/server/jaggeryapps/store/extensions/app"
>> path.
>>
>> 2. Added a dependency to "store-common" and overridden app.server()
>> callback method on app.js on
>> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/app.js"
>> path.
>>
>> app.dependencies = ['store-common'];
>> app.server = function(ctx) {
>> return {
>> endpoints: {
>> pages: [
>> title:'Store | My Items',
>> url:'my-items',
>> path:'my_items.jag',
>> secured:true,
>> permission:'APP_MYITEMS'
>> }]
>> },
>>
>> 3. Added an overriding controller "my_items.jag" on "
>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/pages/"
>> path.
>>
>> 4. Added an overriding renderer "my_items.js" on
>> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/renders/pages/"
>> path.
>>
>> 5. Added an overriding partial "my_items.hbs" on "
>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/"
>> path.
>>
>> --
>>
>> When trying to access the my page on "
>> https://localhost:9443/store/pages/my-items;; I am getting a "TypeError:
>> Cannot read property "types" from undefined". Complete log can be found on
>> [2].
>>
>> Complete "store-device" shell's folder structure is as follows;
>>
>>
>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device
>>  |
>>  |---*app.js*
>>  |---pages
>>  |`---*my_items.jag*
>>  `---themes
>>   |---default
>>   |`---renderers
>>   |  `---pages
>>   |`---*my_items.js*
>>   `---store
>> `---partials
>>   `---*my_items.hbs*
>>
>> Any help to solve this problem will be greatly appreciated.
>>
>> Thank you
>>
>> Links
>> [1] https://docs.wso2.com/display/ES200/Overriding+a+Global+Page
>> ​[2] Error log; see the attachment: console_log.txt
>>
>> --
>> With Regards,
>>
>> *Rasika Perera*
>> Software Engineer
>> M: +94 71 680 9060 E: rasi...@wso2.com
>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>
>> WSO2 Inc. www.wso2.com
>> lean.enterprise.middleware
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Chanaka Jayasena
> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
> email: chan...@wso2.com; cell: +94 77 785 5565
> blog: http://chanaka3d.blogspot.com
>



-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: rasi...@wso2.com
LinkedIn: http://lk.linkedin.com/in/rasika90

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES]Overriding a Global Page returns TypeError: Cannot read property "types" from undefined

2015-09-10 Thread Himasha Guruge
Hi Rasika,

Shouldn't it be 'store_common' instead of store-common?

Thanks,
Himasha

On Thu, Sep 10, 2015 at 11:15 AM, Rasika Perera  wrote:

> Hi all,
>
> I am trying to partially override a global page in ES v2. I followed this
> [1] doc. Here are the steps I followed;
>
> 1. Created "shell" of an app extension called "store-device" in
> "/repository/deployment/server/jaggeryapps/store/extensions/app"
> path.
>
> 2. Added a dependency to "store-common" and overridden app.server()
> callback method on app.js on
> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/app.js"
> path.
>
> app.dependencies = ['store-common'];
> app.server = function(ctx) {
> return {
> endpoints: {
> pages: [
> title:'Store | My Items',
> url:'my-items',
> path:'my_items.jag',
> secured:true,
> permission:'APP_MYITEMS'
> }]
> },
>
> 3. Added an overriding controller "my_items.jag" on "
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/pages/"
> path.
>
> 4. Added an overriding renderer "my_items.js" on
> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/renders/pages/"
> path.
>
> 5. Added an overriding partial "my_items.hbs" on "
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/"
> path.
>
> --
>
> When trying to access the my page on "
> https://localhost:9443/store/pages/my-items;; I am getting a "TypeError:
> Cannot read property "types" from undefined". Complete log can be found on
> [2].
>
> Complete "store-device" shell's folder structure is as follows;
>
>
> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device
>  |
>  |---*app.js*
>  |---pages
>  |`---*my_items.jag*
>  `---themes
>   |---default
>   |`---renderers
>   |  `---pages
>   |`---*my_items.js*
>   `---store
> `---partials
>   `---*my_items.hbs*
>
> Any help to solve this problem will be greatly appreciated.
>
> Thank you
>
> Links
> [1] https://docs.wso2.com/display/ES200/Overriding+a+Global+Page
> ​[2] Error log; see the attachment: console_log.txt
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> M: +94 71 680 9060 E: rasi...@wso2.com
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Himasha Guruge
*Software Engineer*
WS*O2* *Inc.*
Mobile: +94 777459299
himas...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [ES]Overriding a Global Page returns TypeError: Cannot read property "types" from undefined

2015-09-10 Thread Rasika Perera
Hi All,

Just found that issue is with the renderer "my_items.js". As chanaka
mentioned, it consumes a "naviagation.hbs". This handlebar needs
"navigationBar" page decorator which need to defined in "app.js".

Therefore, I copied page decorators defined in "store-common/app.js" into
my extension, "store-device/app.js".

Thank you


On Thu, Sep 10, 2015 at 2:28 PM, Rasika Perera  wrote:

> @Himasha,
>
> I think it should be "store-common".
>
> @Chanaka
>
> Okay, will try to debug and isolate the error.
>
> Thank you
>
> On Thu, Sep 10, 2015 at 1:29 PM, Chanaka Jayasena 
> wrote:
>
>> Issue seems to be with the navigation.hbs. To fix it add navigation.hbs
>> to partial to
>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/.
>>
>>
>> Start with an en empty file. You will be able to get rid of the error.
>> Then type {{dump .}} in the file to see the data coming there. Try to
>> compare the data with the original partial data in
>> "store/themes/store/partials/pagination.hbs"
>>
>>
>> thanks,
>> Chanaka
>>
>> On Thu, Sep 10, 2015 at 11:15 AM, Rasika Perera  wrote:
>>
>>> Hi all,
>>>
>>> I am trying to partially override a global page in ES v2. I followed
>>> this [1] doc. Here are the steps I followed;
>>>
>>> 1. Created "shell" of an app extension called "store-device" in
>>> "/repository/deployment/server/jaggeryapps/store/extensions/app"
>>> path.
>>>
>>> 2. Added a dependency to "store-common" and overridden app.server()
>>> callback method on app.js on
>>> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/app.js"
>>> path.
>>>
>>> app.dependencies = ['store-common'];
>>> app.server = function(ctx) {
>>> return {
>>> endpoints: {
>>> pages: [
>>> title:'Store | My Items',
>>> url:'my-items',
>>> path:'my_items.jag',
>>> secured:true,
>>> permission:'APP_MYITEMS'
>>> }]
>>> },
>>>
>>> 3. Added an overriding controller "my_items.jag" on "
>>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/pages/"
>>> path.
>>>
>>> 4. Added an overriding renderer "my_items.js" on
>>> "/repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/renders/pages/"
>>> path.
>>>
>>> 5. Added an overriding partial "my_items.hbs" on "
>>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device/themes/store/partials/"
>>> path.
>>>
>>> --
>>>
>>> When trying to access the my page on "
>>> https://localhost:9443/store/pages/my-items;; I am getting a "TypeError:
>>> Cannot read property "types" from undefined". Complete log can be found on
>>> [2].
>>>
>>> Complete "store-device" shell's folder structure is as follows;
>>>
>>>
>>> /repository/deployment/server/jaggeryapps/store/extensions/app/store-device
>>>  |
>>>  |---*app.js*
>>>  |---pages
>>>  |`---*my_items.jag*
>>>  `---themes
>>>   |---default
>>>   |`---renderers
>>>   |  `---pages
>>>   |`---*my_items.js*
>>>   `---store
>>> `---partials
>>>   `---*my_items.hbs*
>>>
>>> Any help to solve this problem will be greatly appreciated.
>>>
>>> Thank you
>>>
>>> Links
>>> [1] https://docs.wso2.com/display/ES200/Overriding+a+Global+Page
>>> ​[2] Error log; see the attachment: console_log.txt
>>>
>>> --
>>> With Regards,
>>>
>>> *Rasika Perera*
>>> Software Engineer
>>> M: +94 71 680 9060 E: rasi...@wso2.com
>>> LinkedIn: http://lk.linkedin.com/in/rasika90
>>>
>>> WSO2 Inc. www.wso2.com
>>> lean.enterprise.middleware
>>>
>>> ___
>>> Dev mailing list
>>> Dev@wso2.org
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Chanaka Jayasena
>> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
>> email: chan...@wso2.com; cell: +94 77 785 5565
>> blog: http://chanaka3d.blogspot.com
>>
>
>
>
> --
> With Regards,
>
> *Rasika Perera*
> Software Engineer
> M: +94 71 680 9060 E: rasi...@wso2.com
> LinkedIn: http://lk.linkedin.com/in/rasika90
>
> WSO2 Inc. www.wso2.com
> lean.enterprise.middleware
>



-- 
With Regards,

*Rasika Perera*
Software Engineer
M: +94 71 680 9060 E: rasi...@wso2.com
LinkedIn: http://lk.linkedin.com/in/rasika90

WSO2 Inc. www.wso2.com
lean.enterprise.middleware
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev