$(function () { pageContext.i18n.modTalk = 'moderation talk'; pageContext.i18n.replyToComment = 'Reply'; pageContext.i18n.modTalkEmpty = 'moderation talk is empty'; pageContext.url.getModTalk = "/comments/%25ID%25/listModTalk.json"; pageContext.url.possibleCommentRecipients = "/comments/%ID%/possibleRecipients.json"; pageContext.url.commentEdit = '/comments/%25ID%25/edit.html'; pageContext.url.commentView = '/comments/%ID%/view.html'; pageContext.i18n.commentVisibility = { 'full': 'Viewable by all users', 'op': 'Viewable by the original poster', 'mod': 'Viewable by moderators', 'opAndMod': 'Viewable by moderators and the original poster', 'other': 'Advanced visibility', 'dialogTitle': 'Comment visibility', 'selectGroups': 'Visible to groups', 'selectOther': 'Other recipients', 'selectOriginalPoster': 'Original poster', 'selectModerators': 'Moderators', 'selectAssignees': 'Asked to answer users' }; pageContext.i18n.commentMenuLabels = { 'comment-edit': 'comments.menu.edit', 'comment-delete': 'comments.menu.delete', 'comment-convert': 'comments.menu.convert' };pageContext.i18n.answer= { bestAnswer: 'Best Answer', controlBar : { accept: 'Accept', unaccept: 'Unaccept', acceptCommand: 'Accept this answer as correct', cancelAcceptedCommand: 'Remove this answers accepted status' } }; window.croles = { u: false, op: false, m: false, og: false, as: false, ag: false, dc: false, doc: false, eo: false, ea: false }; tools.init({ q: { e: false, ew: false, eo: false, r: false, ro: false, d: false, dow: false, fv: false, c: false, co: false, p: false, tm: false , ms: false, mos: false }, n: { f: false, vf: false, vfo: false, vr: false, vro: false, c: false, co: false, vu: false, vd: false, w: false, wo: false, l: false }, c: { e: false, eo: false, d: false, dow: false, ta: false, tao: false, l: false }, a: { e: false, ew: false, eo: false, d: false, dow: false, a: false, aoq: false, ao: false, tc: false, tco: false, p: false, tm: false }, pc: croles }, { tc: true, nsc: true }); commandUtils.initializeLabels(); }); Skip to Content
0

Breadcrumbs Error show SAPUI5

Jul 05, 2017 at 05:16 PM

53

avatar image
Former Member

Hi all,

I want to show breadcrumbs but failed. "the error is Uncaught Error: failed to load 'sap/uxap/Breadcrumbs.js' from resources/sap/uxap/Breadcrumbs.js: 404 - Not Found"

and if I use breadcrumbs from m library (sap.m) still show error. the error is "Cannot read property 'id' of undefined at constructor.R.attachListener (ResizeHandler-dbg.js:106)"

how to solve this problem?

Thanks.

mycode form1.view.xml:

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
xmlns:sample="sap.uxap.sample.MPModelMapping" xmlns="sap.m" xmlns:t="sap.ui.table"
xmlns:l="sap.ui.layout" xmlns:tnt="sap.tnt" xmlns:ux="sap.uxap"
controllerName="csssapui5.form" xmlns:html="http://www.w3.org/1999/xhtml">
<!-- Header -->
<mvc:XMLView viewName="csssapui5.Header" id="headerView" />
<l:VerticalLayout
class="breadcrumbs breadcrumbs-items breadcrumbs-line-height" width="100%">
<l:content>
<Breadcrumbs >
<Link press="onPress" text="Products"/>
<Link press="onPress" text="Suppliers"/>
<Link press="onPress" text="Titanium"/>
<Link press="onPress" text="Ultra portable"/>
<Link press="onPress" text="12 inch"/>
<Link press="onPress" text="Super portable deluxe"/>
</Breadcrumbs>
</l:content>
</l:VerticalLayout>
<Panel id="panelModule" headerText="Header form">
<content>
<Label text="Ini form 1" />
</content>
</Panel>
<!-- Footer -->
<mvc:XMLView viewName="csssapui5.Footer" id="footerView" />
</mvc:View>

header:

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" xmlns:t="sap.ui.table" xmlns:l="sap.ui.layout" xmlns:tnt="sap.tnt"
controllerName="csssapui5.Header" xmlns:html="http://www.w3.org/1999/xhtml">
<tnt:ToolHeader id="idHeader">
<html:img src="icon/logo_taspen.png" />
<html:p>NEW APPLICATION CORE BUSINESS</html:p>
<ToolbarSpacer width="20px" />
<tnt:ToolHeaderUtilitySeparator />
<ToolbarSpacer>
<layoutData>
<OverflowToolbarLayoutData priority="NeverOverflow"
minWidth="20px" />
</layoutData>
</ToolbarSpacer>
<Text text="Selasa, 21/4/2017 / 11:07 AM" />
<Text text="Hello, Jhon Doe">
<layoutData>
<OverflowToolbarLayoutData priority="NeverOverflow" />
</layoutData>
</Text>
<Button icon="sap-icon://log" type="Reject" press="logoutPress"
class="button-logout button-logout-icon margin-logout">
<layoutData>
<OverflowToolbarLayoutData priority="NeverOverflow" />
</layoutData>
</Button>
</tnt:ToolHeader>
</mvc:View>

footer:

<mvc:View xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m" xmlns:t="sap.ui.table" xmlns:l="sap.ui.layout" xmlns:tnt="sap.tnt"
controllerName="csssapui5.Footer" xmlns:html="http://www.w3.org/1999/xhtml">
<Page id="idFooterPage" showHeader="false">
<footer id="footer">
<OverflowToolbar id="otbFooter">
<Button type="Transparent" text="Kebijakan dan Privasi"
press="kebdanprivPress" />
<Button type="Transparent" text="Bantuan" press="bantuanPress" />
<ToolbarSpacer />
<Label text="All Rights Reserved PT. Taspen Persero" />
<Label text="2018" />
</OverflowToolbar>
</footer>
</Page>
</mvc:View>
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ivan Mirisola
Dec 20, 2017 at 08:13 PM
0

Hi Bobby,

In order to use the Breadcrumbs tag, you need to specify it as well like this:

<Breadcrumbs> //here it is all lowercase, except the first letter

Your bootstrapping like this:

<script src="/resources/sap-ui-core.js"
  id="sap-ui-bootstrap"                
  data-sap-ui-libs="sap.ui.commons, sap.m"
  data-sap-ui-theme="sap_bluecrystal"
>
</script>

Don't use sap.uxap components unless your are developing an Object Page based application. In such cases a Breadcrumb is going to represent the navigation inside the Object Page.

Therefore, please remove any unneeded xmlns declarations from your xml views.

If you need to see an "sap.m" working sample, please take a look here.

If you still have problems, please post your controller here or share the project via github so we can take a look, debug, etc..

Regards,
Ivan

Share
10 |10000 characters needed characters left characters exceeded