Controller not getting loaded with custom tile - sapui5

I have made a custom tile with sap ui5 using generic tiles.Now i'm using it as my custom tile in fiori launchpad.So,when the application loads , it loads the xml view for the tile but gives 404 error for the tile's controller.
The view instantiation resulted in js errorError: failed to load
'tile2/viewTile/controller/View1.controller.js' from https://sapui5.hana.ondemand.com/1.64.0/resources/tile2/viewTile/controller/View1.controller.js: 404
Though the xml view is getting loaded also the namespace and everything else is getting configured automatically
Name:
viewtile.view.View1
Prefix:
viewtile
Path:
/sap/fiori/viewtile/
Getting this
Actual result should be

Please check your configuration and paths.
The error message says:
“… failed to load … from https://sapui5.hana.ondemand.com/1.64.0/resources/tile2/viewTile/controller/View1.controller.js: 404”
You won’t find your own developed View1.controller.js on https://sapui5.hana.ondemand.com/1.64.0 .
A similar problem was discussed here: https://answers.sap.com/questions/98633/fiori-launchpad-custom-tile-controllerjs-path-issu.html
The answer was to remove the application name from the view and controller files when deploying to the Fiori Launchpad.

Related

Ionic UI Router issue: 2nd level state views not loading

I can't wrap my head around this issue I've been experiencing, or perhaps I'm missing some crucial point here. I jotted down this sample app on ionic playground, it is of course a simplified version of my app.
Basically I have a tabbed layout with two views which share a common datasource of items (in my app it's a sqlite db table); the first view displays items in a certain state whereas the other tab display the remaining items (in my example I've used the TODO list metaphor).
Each tab has a child state which I refer to as 2nd-level state (assuming level 0 is the abstract tab state. These two 2nd-level states are defined separately but share a common controller and template.
I cannot for the life of me understand why these two states aren't being navigated to when I click on a list item from either of the two lists (1st-level state views).
NOTE: In the ionic playground no error is thrown in the console, but I can't quite tell what is going on in terms of state URLs. But when I test my actual app (where the problem is the same) in a browser I can see the URL changing to #/tab/tasks/xxxx or #/tab/completed/xxxx but template is not loading. Upon googling I came across several SO questions:
Ui-router URL changes, nested view not loading
In Angular ui-router nested state url changes,but template is not loading
UI-Router: URL changes, but view is not loaded
Angular Router - Url changes but view does not load
URL changes but view does not hcange
Angular UI-Router : URL changed but view isn't loaded
but the answers provided therein haven't worked for me (tried, as per the last one I listed, to add the # sign after the view name in the child states, but to no avail).
Kinda stuck, would really appreciate some input! Cheers.
Managed to get it working following this answer; I had previously tried simply appending the # character after the view name in nested states but it turns out the trick was to append #tab, where tab is the name of the top-level abstract state. I updated my fiddle on ionic playground. Cheers to you all.

How to make Author mode component annotations visible in CQ5/AEM5.6.1?

In AEM 5.6.1, if I add annotation to the component it works just fine while I'm editing the page but disappears after page is reloaded.
There is no difference if it is custom or out-of-the-box component, if page was activated or not, annotation is just not loading.
CRXDE Lite shows that cq:annotations node has been successfully created
Is there any configuration switch which should be turned on in order to load annotations?
After debugging CQ/ExtJS scripts it turned out that PageInfo provider is not returning .annotations property and condition on line #396 of /libs/cq/ui/widgets/source/widgets/wcm/EditBase.js was always false. Further debugging showed that our custom overlay of foundation/components/page lacked proper node type and it was the reason for omission of the annotations InfoProvider polling. Strange enough it didn't affect any other info provider (languages, msm, workflows, ...), just annotations.
More info: https://docs.adobe.com/docs/en/cq/5-6-1/developing/pageinfo.html
I saw similar - copying the cq:InfoProviders node from libs/foundation/components/page to the same node as my custom page node corrected it.

How do I create a new server side view with Treeline?

I'm building my first app with Treeline, and I'd like to create a new server side view. Using Sails, I'd normally add the route and associated view to config/routes.js, but when I link my Treeline project config/routes.js is overwritten by the routes defined in Treeline.
Any ideas? Thanks!
To serve a view in Treeline, you should change the response type- this will result in a separate response being used in the compiled code:
First click "respond", then "display view". After that, enter the name of the view and provide any locals you need access to (this is equivalent to res.view in Sails, or res.render in Express)

any way to delay code execution until page is opened

Hi we have a gwt app hosted on google app engine.
In one of the page bound to an entry point class (using root panel id) we call a rpc service to get some data.
The problem I am observing is that when even the home page is loaded that time the entry module class bound to another page gets instantiated and thus the service is called un-necessary.
any options to defer this behavior until the page is opened?
You can load the data for the page in the onLoad method instead of in the constructor so that the data isn't loaded till after the widget is attached to the DOM.
Moving the code under the clause like shown below fixed the issue
if(RootPanel.get("login") !=null){
//moved here
}

custom error page doesn't show

I am trying to get an ASP.Net MVC2 app to display a simple custom error rather than the yellow screen. I have already set up elmah to silently log the error in the background but while that happens I want to display a simple static error message based on the view in Shared/Error.aspx. Nothing fancy, just a plain vanilla "there was an error".
<customErrors mode="On" defaultRedirect="~/Error.aspx" />
I thought this was simply a matter of adding a customError tag to my config but I am still seeing the yellow page. Do I have to write a custom action handler for the Error.aspx view before I can use it? Could this be due to some interaction with elmah?
Thanks!
Duffy
Update: It seems that the problem is NInject getting in the way of handling a static error page. The yellow sceen error I am seeing is not for the original error message but the NInject Factory not finding a controller for error.aspx.
I still have no idea why failed to find my static error files. However, I finally got around the problem by defining an error controller and changing my web.config to this instead.
<customErrors mode="On" defaultRedirect="/Error/GenericError" />