Popupcalendar in Websphere Application Server 9 Tomahawk20 - jsf-2

I'm new to stackoverflow so please excuse any error.
I'm getting a PopupCalendar issue in my application using Tomahawk2, JSF 2, WAS9.
I've defined the ExtensionFilter - /faces/myExtensionResource/* and at runtime it should load in source /faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader -> calendar.HtmlCalendarRenderer while it is pointing to javax.faces.resource
The HTML is missing this:
<link rel="stylesheet" href="/DERO_WEB/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/15238805/calendar.HtmlCalendarRenderer/WH/theme.css" type="text/css" />
<link rel="stylesheet" href="/DERO_WEB/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/15238805/calendar.HtmlCalendarRenderer/DB/theme.css" type="text/css" />
<script type="text/javascript" src="/DERO_WEB/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/15238805/prototype.PrototypeResourceLoader/prototype.js"></script>
<script type="text/javascript" src="/DERO_WEB/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/15238805/calendar.HtmlCalendarRenderer/date.js"></script>
<script type="text/javascript" src="/DERO_WEB/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/15238805/calendar.HtmlCalendarRenderer/popcalendar.js">
I have tried setting com.ibm.ws.webcontainer.invokeFiltersCompatibility=true in Web Container in WAS but that has not resolved the issue. I think this parameter setting is not required in WAS 9 but still I went ahead to see if it resolves anything.
Can anyone here help?

'h:head' instead of 'head' did the trick for me and the calendar functionality started working as normal.

Related

How to use open source version of Kendo UI in MVC application

I see Telerik provides open source version of Kendo UI at following URL
http://www.telerik.com/download/kendo-ui-core
I downloaded it but not able to make it work in ASP.NET MVC application.
I am not sure what i am missing. I make a call to CSS and JS files as mentioned in below link:
http://docs.telerik.com/kendo-ui/getting-started/using-kendo-with/aspnet-mvc/asp-net-mvc-4
Although I am missing one step Add reference to Kendo.Mvc.dll because Telerik don't provide installer in free version and I need JavaScript version of Kendo UI not with MVC selector.
Any idea here?
If you go to: http://dojo.telerik.com/
The default page contains everything you will need to get up and running and in what order:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled</title>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.mobile.all.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js"></script>
</head>
<body>
</body>
</html>
If it is still not working after you put this in your page then something else is going on.
Comment out the following line in _layout.cshtml page
##Scripts.Render("~/bundles/jquery")#
and add the below lines at the end of the head section :
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2014.2.903/js/kendo.all.min.js"></script>

Microsoft MVC4 ~ Expansion is inconsistent

In MVC, the ~ at the top of a server side directory reference should be converted to the root of the website.
I have the following lines at the top of my cshtml file:
<link rel="STYLESHEET" type="text/css" href="~/codebase/dhtmlxgrid.css">
<script src="~/codebase/dhtmlxcommon.js"></script>
<script src="~/codebase/dhtmlxgrid.js"></script>
<script src="~/codebase/dhtmlxgridcell.js"></script>
<script src ="~/IactexScripts/WorkOrderAdd.js"></script>
When the code is run, I get the following in my output sent to the browser:
<link rel="STYLESHEET" type="text/css" href="/codebase/dhtmlxgrid.css">
<script src="/codebase/dhtmlxcommon.js"></script>
<script src="/codebase/dhtmlxgrid.js"></script>
<script src="/codebase/dhtmlxgridcell.js"></script>
<script src ="~/IactexScripts/WorkOrderAdd.js"></script>
Notice that the ~ was properly translated to nothing, since this was running at the root, while on the last line, it was not translated, and as a result, the file was not found.
This is important since this page will not always run from the root of the website.
Any help would be appreciated.
tereško is right! The leading space was the cause of the failure. Thanks so much!

Object doesn't support this property or method - jqGrid 4.4.0

I'm using jqGrid 4.4.0 in an mvc2 application. The grid loads with the data fine. However, when I edit/add or delete records I get an 'Object doesn't support this property or method' error. This is how my setup looks like on the site.master page:
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.16/themes/redmond/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="../../Content/ui.jqgrid.css" />
<script src="<s:url value= http://ajax.microsoft.com/ajax/jquery/jquery-1.7.min.js" type="text/jscript"></script>
<script src="../../Scripts/grid.locale-en.js" type="text/javascript"></script>
<script src="../../Scripts/jquery.jqGrid.min.js" type="text/javascript"></script>
What am I missing?
okay, even i got this error many times...i worked it out with two solution...first try this one, if it doesn't work for you...then paste your exact code here, where u r getting that error.
you need to include this grid.inlinedit.js if you are doing inline edit and grid.formedit.js if you are doing form edit...let me know if this sloves your problem or not...if it doesn't i'll provide the second solution

Problems with Jira gadget configuration screen

I keep running in to strange issues when writing gadgets for Jira. I get problems like the options being clipped out of view, reconfiguration not working and most annoyingly: projectOrFilterPicker not working.
Most of the weird issues I run in to I can work around which is what I've done however I need to allow the user to use that quick search box for selecting a project or a filter. However, as soon as I include one of these dialog boxes the gadget just loads endlessly and if I resize the screen (one of the workarounds I use for other things) I get an error 500.
A weird thing is that it works locally on the Atlassian SDK test Jira (V 4.4) but not on my workplaces full test server (V 2.1.3).
This is some of the code I'm using and I can post more if necessary:
var projectPicker = AJS.gadget.fields.projectOrFilterPicker(gadget, "projectId", args.projectOptions);
args.projectOptions are defined here:
args: function()
{
return [
{
key: "projectOptions",
ajaxOptions: "/rest/gadget/1.0/filtersAndProjects"
}
];
}()
Any insight/suggestions would be greatly appreciated. Thanks in advance.
Carl
I added the following code to the top of the gadget javascript:
<link type="text/css" rel="stylesheet" href="http://iedev255/s/531/4/1.0/_/download/batch/jira.webresources:autocomplete/jira.webresources:autocomplete.css" media="all">
<link type="text/css" rel="stylesheet" href="http://iedev255/s/531/4/4.1.2/_/download/batch/com.atlassian.jira.gadgets:common/com.atlassian.jira.gadgets:common.css" media="all">
<link type="text/css" rel="stylesheet" href="http://iedev255/s/531/4/4.1.2/_/download/resources/com.atlassian.jira.gadgets:common/global.css" media="all">
<script type="text/javascript" src="http://iedev255/s/531/4/2.1.3/_/download/batch/com.atlassian.auiplugin:ajs/com.atlassian.auiplugin:ajs.js" ></script>
<script type="text/javascript" src="http://iedev255/s/531/4/1.0/_/download/batch/jira.webresources:jira-global/jira.webresources:jira-global.js" ></script>
<script type="text/javascript" src="http://iedev255/s/531/4/1.0/_/download/batch/jira.webresources:autocomplete/jira.webresources:autocomplete.js" ></script>
<script type="text/javascript" src="http://iedev255/s/531/4/4.1.2/_/download/batch/com.atlassian.jira.gadgets:common/com.atlassian.jira.gadgets:common.js" ></script>
It solved a lot of my problems

DOJO not working under tomcat 5.x?

I have a JSP that uses DOJO Datepicker. It runs fine on my laptop where I have Netbeans6.9/tomcat 6.x installed. However, when I upload it to my hosting service, the DOJO Datepicker doesn't show while the rest of the page shows up fine!
My web app is developed using Java Struts2.
I compared the source code between the two environments (local & remote). And I noticed that has no effect on the remote page. Where on the local page it translates to some DOJO configuration.
Remote page:
<head>
<title>Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="MainLayout.css" rel="stylesheet" type="text/css">
</head>
Local Page:
<head>
<title>Contract Profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="MainLayout.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript">
// Dojo configuration
djConfig = {
isDebug: false,
bindEncoding: "UTF-8"
,baseRelativePath: "/sm/struts/dojo/"
,baseScriptUri: "/sm/struts/dojo/"
,parseWidgets : false
};
</script>
<script language="JavaScript" type="text/javascript"
src="/sm/struts/dojo/struts_dojo.js"></script>
<script language="JavaScript" type="text/javascript"
src="/sm/struts/ajax/dojoRequire.js"></script>
<link rel="stylesheet" href="/sm/struts/xhtml/styles.css" type="text/css"/>
<script language="JavaScript" src="/sm/struts/utils.js" type="text/javascript"> </script>
<script language="JavaScript" src="/sm/struts/xhtml/validation.js" type="text/javascript"></script>
<script language="JavaScript" src="/sm/struts/css_xhtml/validation.js" type="text/javascript"></script>
</head>
In addition, FireBug, gives me object dojo not defined message on loading the page remotely. These are clear signs that it's not behaving the same.
But the question is what do I do so it does?
Your help is much appreciated as I really getting disperate.
"dojo not defined" means dojo didn't load.
Go to the network tab in firebug and find the full path for dojo.js
http://mydomain.com/contextPath/static/dojo/dojo.js
Chances are this will be in red, meaning that firefox couldn't load the resource.
The problem is probably one of the following:
The dojo files are in a different path. The contextPaths might be different between your development and production environments and you have it hard coded for your development environment.
Your build script that builds the war file did not include the dojo javascript and it is missing entirely on the production environment.

Resources