Without Customization - valuePicker works fine
https://serveragi12.agi-imc.de/BootstrapTest.nsf
With Customization (modified bootstrap.min.css as resource in Theme) - valuePicker not working
https://serveragi12.agi-imc.de/BootstrapTestCustomized.nsf
Compare the button appearance for the two cases, background-color for btn-warning modified and taking effect.
MORE INFO:
The only difference is that in the customized case the backround-color of a button was modified in the bootstrap.min.css, and that bootstrap.min.css was then referenced as a resource in the theme.
It is strange that changing of a background-color can affect the functioning of a valuePicker.
THEME CODE (for BootstrapTestCustomized):
<theme extends="Bootstrap3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="platform:/plugin/com.ibm.designer.domino.stylekits/schema/stylekit.xsd">
<resource>
<content-type>text/css</content-type>
<href>/css/bootstrap.min.css</href>
<media>screen</media>
</resource>
</theme>
Related
The images do not show on page after publishing the web-application on IIS.
When I run the web-application from Visual Studio 2015, the pictures are appear correctly.the path of image is like
/media/1713/mypicture.png
But after publishing the web-application on IIS and run it, the pictures do not show.
But when I add manually the domain at first of above path, the image show correctly. same as
/domain-name/media/1713/mypicture.png.
I've used Umbraco 7.4.3, ASP.NET MVC, VS2015 and Windows 10.
EDIT: I UPGRADED IT TO UMBRACO 7.5.4 BUT STILL THERE IS THE PROBLEM.
:(
How can I solve this problem? Please help me.
umbracosettings.config:
<?xml version="1.0" encoding="utf-8" ?>
<settings>
<content>
<errors>
<error404>1</error404>
</errors>
<notifications>
<!-- the email that should be used as from mail when umbraco sends a notification -->
<email>your#email.here</email>
</notifications>
<!-- Show property descriptions in editing view "icon|text|none" -->
<PropertyContextHelpOption>text</PropertyContextHelpOption>
<!-- The html injected into a (x)html page if Umbraco is running in preview mode -->
<PreviewBadge>
<![CDATA[<a id="umbracoPreviewBadge" style="position: absolute; top: 0; right: 0; border: 0; width: 149px; height: 149px; background: url('{1}/preview/previewModeBadge.png') no-repeat;z-index: 9999999;" href="#" OnClick="javascript:window.top.location.href = '{0}/endPreview.aspx?redir={2}'"><span style="display:none;">In Preview Mode - click to end</span></a>]]></PreviewBadge>
<!-- Cache cycle of Media and Member data fetched from the umbraco.library methods -->
<!-- In seconds. 0 will disable cache -->
<UmbracoLibraryCacheDuration>1800</UmbracoLibraryCacheDuration>
<!-- How Umbraco should handle errors during macro execution. Can be one of the following values:
- inline - show an inline error within the macro but allow the page to continue rendering. Historial Umbraco behaviour.
- silent - Silently suppress the error and do not render the offending macro.
- throw - Throw an exception which can be caught by the global error handler defined in Application_OnError. If no such
error handler is defined then you'll see the Yellow Screen Of Death (YSOD) error page.
Note the error can also be handled by the umbraco.macro.Error event, where you can log/alarm with your own code and change the behaviour per event. -->
<MacroErrors>throw</MacroErrors>
<!-- These file types will not be allowed to be uploaded via the upload control for media and content -->
<disallowedUploadFiles>ashx,aspx,ascx,config,cshtml,vbhtml,asmx,air,axd,swf,xml,html,htm,svg,php,htaccess</disallowedUploadFiles>
<!-- Defines the default document type property used when adding properties in the back-office (if missing or empty, defaults to Textstring -->
<defaultDocumentTypeProperty>Textstring</defaultDocumentTypeProperty>
</content>
<security>
<!-- set to true to auto update login interval (and there by disabling the lock screen -->
<keepUserLoggedIn>false</keepUserLoggedIn>
<!-- change in 4.8: Disabled users are now showed dimmed and last in the tree. If you prefer not to display them set this to true -->
<hideDisabledUsersInBackoffice>false</hideDisabledUsersInBackoffice>
</security>
<requestHandler>
<!-- this will ensure that urls are unique when running with multiple root nodes -->
<useDomainPrefixes>false</useDomainPrefixes>
<!-- this will add a trailing slash (/) to urls when in directory url mode -->
<addTrailingSlash>true</addTrailingSlash>
</requestHandler>
<templates>
<!-- To switch the default rendering engine to MVC, change this value from WebForms to Mvc -->
<defaultRenderingEngine>Mvc</defaultRenderingEngine>
</templates>
<scheduledTasks>
<!-- add tasks that should be called with an interval (seconds) -->
<!-- <task log="true" alias="test60" interval="60" url="http://localhost/umbraco/test.aspx"/>-->
</scheduledTasks>
<!-- distributed calls must be enabled when using Umbraco in a load balanced environment -->
<distributedCall enable="false">
<!-- the id of the user who's making the calls -->
<!-- needed for security, umbraco will automatically look up correct login and passwords -->
<user>0</user>
<!--
When distributed call is enabled, you need to add all of the servers part taking in load balancing
to the server list below.
-->
<servers>
</servers>
</distributedCall>
<web.routing
trySkipIisCustomErrors="false"
internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false"
umbracoApplicationUrl="">
</web.routing>
</settings>
I've used img tag in my cshtml file like this:
<img style="display: block;" src="#Model.Model.MainPicture" alt="#Model.Model.FirstTitle">
Sometimes if you add images in project not in usual way to include, it will not update images in build/packages, which you are submitting to IIS. Make your image in solution explorer, right click the image in solution explorer and choose properties then select "Copy always" and build project. Then publish to IIS.
I want to set a favicon in XPages. I am using Domino 8.5.3 with the latest 8.5.x version of the extlib. As application theme oneuiv2.1 is used.
I tried setting the pageIcon attribute in the XPage without success. Adding a link attribute to the header using
<xp:this.resources>
<xp:headTag tagName="link" rendered="true" loaded="true">
<xp:this.attributes>
<xp:parameter name="rel" value="icon"></xp:parameter>
<xp:parameter name="href" value="favIcon.png">
</xp:parameter>
<xp:parameter name="type" value="image/png">
</xp:parameter>
</xp:this.attributes>
</xp:headTag>
</xp:this.resources>
did not change the favicon. I found in various blogs, that I have to add a control to the application theme, for example:
<control>
<property>
<name>pageIcon</name>
<value>favicon.ico</value>
</property>
</control>
However I use the provided oneUi theme and do not want to create a custom theme. Is there a way to either set the favicon directly or modify the theme without creating a complete new one?
I think you are missing the control name in your theme rule.
Here is the syntax of the theme rule that works for me. (Taken from Tim Tripcony's HowYaBean demo application referenced on NotesIn9 and downloadable from here). I use it a ton. It takes the icon from the NotesDatabase (remember the one from the old Notes workspace that has not yet been pried out of my cold dead fingers). It also works with image or file resources.
<control override="false">
<name>ViewRoot</name>
<property>
<name>pageIcon</name>
<value>/$icon</value>
</property>
<property>
<name>pageTitle</name>
<value>#{database.title}</value>
</property>
</control>
This works for me - icon shows in tab bar and shortcut created from application URL.
Image resource (PNG image) with name img_ApplicationIcon16. The name is generic for every application, but each NSF contains different image.
Every XPage has property pageIcon="/img_ApplicationIcon16"
It renders as <link rel="SHORTCUT ICON" href="/path/database.nsf/img_ApplicationIcon16">
In my case, I did not want to use theme, too.
Import the favicon.ico file as file resource instead of image resource
Add the following code to the selected theme:
<control>
<name>ViewRoot</name>
<property>
<name>pageIcon</name>
<value>/favicon.ico</value>
</property>
</control>
Set up the application to use the theme containing the reference for the favicon.
Create a new xpage for testing, or delete the browser cache.
This works for me properly. In the browser window you should see the folloving source:
<link rel="SHORTCUT ICON" href="/db.nsf/favicon.ico">
(db.nsf is your database.)
If still not work check the xpage: "All properties-styling-disableTheme" should not be enabled.
I have a requirement for an application in a Domino version 9.x deployment for a carousel like interface similar to what Netflix and others use to allow continuous scrolling. I got the jQuery jCarousel code working from here. But that lacks the pizzazz the user wants since the swiping feature is not available. I also used 100% computed HTML instead of being able to intersperse XPages controls within the carousel code.
So I found dojox/mobile/carousel (examples here) but all implementations, including the basic examples are not working well. The number of elements does not seem to be flexible and the positioning of them is much lower than I would think the should be. I fiddled with the CSS to see if I could fix things but have not found the right combination.
Here is the entire custom control I am using for this test (I captured the images from the demo and added them as image resources):
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core"
dojoParseOnLoad="true">
<xp:this.resources>
<xp:metaData
name="viewport"
content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
</xp:metaData>
<xp:metaData
name="apple-mobile-web-app-capable"
content="yes">
</xp:metaData>
<xp:styleSheet
href="/.ibmxspres/dojoroot/dojox/mobile/themes/iphone/iphone.css">
</xp:styleSheet>
<xp:dojoModule
name="dojox/mobile"></xp:dojoModule>
<xp:dojoModule
name="dojox/mobile/parser"></xp:dojoModule>
<xp:dojoModule
name="dojox/mobile/Carousel"></xp:dojoModule>
</xp:this.resources>
<xp:panel>Above it</xp:panel>
<div
id="carousel1"
data-dojo-type="dojox/mobile/Carousel"
data-dojo-props='height:"150px", navButton:false, numVisible:2, title:"Category"'>
<!-- View #1 -->
<div
data-dojo-type="dojox/mobile/SwapView">
<div
data-dojo-type="dojox/mobile/CarouselItem"
data-dojo-props='src:"dish1.jpg", value:"dish", headerText:"dish"'></div>
<div
data-dojo-type="dojox/mobile/CarouselItem"
data-dojo-props='src:"glass1.jpg", value:"glass", headerText:"glass"'></div>
</div>
<!-- View #2 -->
<div
data-dojo-type="dojox/mobile/SwapView">
<div
data-dojo-type="dojox/mobile/CarouselItem"
data-dojo-props='src:"stone1.jpg", value:"stone", headerText:"stone"'></div>
<div
data-dojo-type="dojox/mobile/CarouselItem"
data-dojo-props='src:"shell1.jpg", value:"shell", headerText:"shell"'></div>
</div>
</div>
<xp:panel>Below it</xp:panel>
</xp:view>
in the sample in the documentation it has this comment followed by the inclusion of a JavaScript file.
<!-- Need to load the theme files for Carousel and PageIndicator as well as the base theme file -->
<script type="text/javascript" src="dojox/mobile/deviceTheme.js"
data-dojo-config="mblThemeFiles: ['base','Carousel','PageIndicator']"></script>
Not having this step done may be my problem but I cannot see how to do that within the XPages environment.
The dojo carousel exists since 1.7 Notes 8.5.3 comes with 1.6 (i dont know the dojo version of Notes9), so you maby have to update your dojo or implement a newer dojo lib in your application.
I did a short experiment on it, i disabled the build in dojo adding xsp.client.script.libraries=none to my xsp.properties and importet the dojo 1.9 in my application under WEB-INF/dojo/... then add the dojo to my xPage as ClientSide script resource. As soon i finished this the programatic Example from the dojo homepage worked immediately with out bigger errors (forgot to change the image sources =) ..).
The problem when adding xsp.client.script.libraries=none to your xsp.properties is that you also disable the XSP. library and some other xPage features wich you have to rebuild using the newer dojo version.
I realy prefer using dojo over jquery but in this case If you dont want to update your dojo i recomend you to maby stay at the jquery Library for this or look for other solutions.
All my XPages apart from "DefaultLogin.xsp" have a resource of xpServerSide added to them, but wondered if there was a way to add this resource via the theme?
you can add resources to your theme like this:
<theme extends="whatever">
<resources>
<bundle src="prop.properties" var="strings"></bundle> <!-- propertie example -->
<dojoModule name="extlib.dijit.ExtLib"></dojoModule><!-- dojo module example -->
<script src="/whatever.js" clientSide="true"></script><!-- scriptlibray example -->
</resources>
....
...
</theme>
This will add your script, properties or dojoModule to all your XPages if this theme is selected.
You can also extend this by adding a rendered attribute to the <resource> tag. to load it only on special conditions. e.g.:
<resource rendered="#{javascript:context.getUserAgent().isFirefox()}">
<content-type>text/css</content-type>
<href>stylesFF.css</href>
</resource>
How can I add a custom portlet to the Portal section of the Control Panel, as shown in the following figure:
Here is how to do it:
In your portlet's liferay-portlet.xml (you can check the DTD of this xml for more information on other tags) include two tags in your <portlet> tag as shown:
<portlet>
<portlet-name>MyCustomPortlet</portlet-name>
<icon>/mycustom.png</icon>
<!--
These are the two entries which are required for the portlet
to appear in the control panel
-->
<!--
Set the control-panel-entry-category value to "my", "content",
"portal" or "server" to make this portlet available in the
Control Panel under that category.
-->
<control-panel-entry-category>portal</control-panel-entry-category>
<!--
Set the control-panel-entry-weight value to a double number
to control the position of the entry within its Control Panel
category. Higher values mean that the entry will appear lower
in the Control Panel menu.
-->
<control-panel-entry-weight>100</control-panel-entry-weight>
<instanceable>false</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>mycustomportlet-portlet</css-class-wrapper>
</portlet>
Also, if you don't want your portlet to appear in the Add Menu so that it is not put on other pages, then in your liferay-display.xml you can include:
<display>
<category name="category.hidden">
<!--
Adding your portlet to the hidden category would not display
the portlet in the ADD Menu on the top-left-hand corner
-->
<portlet id="MyCustomPortlet"></portlet>
</category>
</display>
Build and deploy your portlet and you are good to go.
Apart from the Answer by Prakash K, ajaxable and instanciable should be false.