Datepicker is not showing in Internet explorer 8 - struts2

I have used used struts-2 for my apllication and for creating datepicker i have used the "struts-jquery-tags"...it works fine in other browser but in Internet explorer, it is not showing at all..My code goes here
<%# taglib prefix="sj" uri="/struts-jquery-tags"%>
<sj:head/>
<sj:datepicker name="dueDate" id="dueDate" displayFormat="mm/dd/yy" label="Due Date" changeMonth="true" changeYear="true" title="Due Date" showButtonPanel="true" maxlength="10" readonly="true" buttonImage="/BPELServiceInvoke/resources/images/calendar_add.png" buttonImageOnly="true" duration="fast" />

This is strictly related to browser compatiblity issues for that plugin.
Best way would be to post here : https://code.google.com/p/struts2-jquery/wiki/DatePickerTag
Meanwhile, just try downgrading the version of plugin you're using. I'm sure the older-versions will be having support for IE8.
Also, look at the change-log for jquery version being used and it's support for IE8 - https://code.google.com/p/struts2-jquery/wiki/Changelog

Related

Display dialog from backing bean in primefaces mobile

I am doing mobile conversion of our website using PF mobile. In that I am trying to open views in a dialog using Primefaces mobile. It works just fine in desktop browser but not in mobile version. The page keeps waiting to load but nothing happens. Is it not implemented in PF mobile or is something wrong with my code?
Following is the view - webapp/m/dlg/sampledlg.xhtml
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"xmlns:h="http://java.sun.com/jsf/html"xmlns:f="http://java.sun.com/jsf/core"xmlns:p="http://primefaces.org/ui"xmlns:pm="http://primefaces.org/mobile"><f:view renderKitId="PRIMEFACES_MOBILE" /><h:head></h:head><h:body><pm:page id="main"><pm:header title="Main Page">/pm:header><pm:content><p:link outcome="pm:second" value="Go" /></pm:content></pm:page><pm:page id="second" lazy="true"><pm:header title="Second Page"></pm:header><pm:content>Sample content</pm:content></pm:page></h:body></html>
Following is the code from the backing bean.
RequestContext.getCurrentInstance().openDialog("dlg/sampledlg");
return;
Also basic dialog like the following that displays only a message doesnt work either in mobile pages. It works in desktop though.
RequestContext.getCurrentInstance().showMessageInDialog("This is sample text");
face-config.xml has the following:
<navigation-handler>
org.primefaces.application.DialogNavigationHandler
</navigation-handler>
<view-handler>org.primefaces.application.DialogViewHandler</view-handler>
<navigation-handler>org.primefaces.mobile.application.MobileNavigationHandler</navigation-handler>
I can absolutely add more information if needed. Any help here is much appreciated. Thank you in advance.
Here is my platform information:
- Tomee 7.0.0 M3
- Primefaces 6.0
- Jsf 2.2.12
- Jdk 1.7
- Jee 7
Working solution:
bean:
...
RequestContext.getCurrentInstance().execute("PF('dlgDelete').show();");
xhtml:
...
<p:dialog header="confirmation" widgetVar="dlgDelete" >
<p:outputLabel value="Are you...?"/>
<p:commandButton value="yes" action="#{appBean.deleteMethod()}" update="tblParts" oncomplete="PF('dlgDelete').hide();" icon="ui-icon-check" iconPos="right" styleClass="ui-btn-inline"/>
<p:commandButton value="no" onclick="PF('dlgDelete').hide();" icon="ui-icon-forbidden" iconPos="right" styleClass="ui-btn-inline"/>
</p:dialog>

KryzhanovskyCssMinifier doesn't work with MsieJsEngine but does with V8JsEngine

I am using the latest BundleTransformer for ASP.NET.
I have an extremely simple bundle file with one LESS file:
var cssBundle = new CustomStyleBundle("~/Content/css/bundle").Include(
"~/Content/css/test.less");
bundles.Add(cssBundle);
The LESS file I've made as simple as possible to prove it is actually correctly interpreting as LESS.
.something
{
ol, ul
{
list-style: none;
}
}
When I try to use V8JsEngine it works as expected (relevant web.config shown):
<css defaultMinifier="KryzhanovskyCssMinifier" usePreMinifiedFiles="false">
<minifiers>
<add name="KryzhanovskyCssMinifier" type="BundleTransformer.Csso.Minifiers.KryzhanovskyCssMinifier, BundleTransformer.Csso" />
</minifiers>
</css>
<csso>
<css disableRestructuring="false" />
<jsEngine name="V8JsEngine" />
</csso>
This gives me the correct CSS:
.something ol,.something ul{list-style:none}
However when I switch to MsieJSEngine
<csso>
<css disableRestructuring="false" />
<jsEngine name="MsieJsEngine" />
</csso>
I get the following bizarrely incorrect CSS - with UL completely stripped out.
.something ol{list-style:none}
I just can't quite fathom how this is even possible. It has been interpreted correctly as LESS, but completely stripped out the UL from the list. Incidentally if I make it just a pure css file without the .something class I get the same incorrect result.
Fortunately it seems to work fine with V8JsEngine so I can keep on, but I'm posting this here hopefully to help others and because I'm very curious if there's something I did wrong.
File versions:
BundleTransformer.Core - 1.9.3.0
BundleTransformer.Csso - 1.9.1.0
BundleTransformer.Less - 1.9.1.0
BundleTransformer.MicrosoftAjax - 1.9.1.0
For BundleTransformer.Csso need the full support of ECMAScript 5, that is implemented only in ChakraJsRt mode of the MSIE JavaScript Engine for .NET. Quote from the documentation:
JsRT version of Chakra JavaScript engine (supports ECMAScript 5). Requires Internet Explorer 11 or higher on the machine.
Incidentally, in description of the BundleTransformer.Csso NuGet-package has the following requirement:
For correct working of this module is recommended to install the following NuGet packages: JavaScriptEngineSwitcher.V8 or JavaScriptEngineSwitcher.Msie (only in the ChakraJsRt mode).

<c:catch> does not work with <fmt:parseNumber> JSTL 1.2

I'm implementing a simple JSP page using JSTL 1.2 (Apache Taglibs). The page does the following:
<c:catch var="error">
<fmt:parseNumber var="parsedNum" value="${param.num}" />
</c:catch>
The HTML input element looks like this:
<input type="text" name="num" size="3"/>
I'm aware that the input "12a" is permitted due to the way the parsing mechanism works. Nevertheless, I would like to catch completely wrong input, e.g., "aaa". Unfortunately, the thrown exception is not managed by <c:catch>, resulting in Tomcat 7 showing the whole stack trace.
Any advice? Thanks.
Please post a testable page for us. For example, the following page works fine for me.
<%#taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%# taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:catch var="error">
<fmt:parseNumber var="parsedNum" value="aaa" />
</c:catch>
${parsedNum}
${error}

JSF 2.0 Warning about a component not surronded by an h:form tag [duplicate]

I am getting the following error on my Facelet page, which simply consists of an IceFaces form with two fields and two buttons:
The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form>
Here is the form:
<ice:form id="form1" partialSubmit="false">
<ice:panelLayout id="panelLayout3">
<ice:graphicImage id="graphicImage1" url="/resources/images/LoginImage.jpg" width="560" />
<ice:outputLabel for="j_username" id="outputLabel1" value="Username:"/>
<ice:outputLabel for="j_password" id="outputLabel2" value="Password:"/>
<ice:inputText binding="#{login.username}" id="j_username" required="true" />
<ice:inputSecret binding="#{login.password}" id="j_password" required="true" />
<ice:commandButton actionListener="#{login.login}" id="loginBtn" value="Login"/>
<ice:commandButton action="#{login.reset}" id="resetBtn" value="Reset"/>
<ice:outputText id="errorMessage" />
<ice:message errorClass="errorMessage" for="j_username" fatalClass="fatalMessage" id="messages1" infoClass="infoMessage" showSummary="false" warnClass="warnMessage"/>
</ice:panelLayout>
</ice:form>
How is this caused and how can I solve it?
This is not an error. This is a warning. The code looks fine, all input components are inside a form, it seems that it should run and work fine. If it indeed works fine, just ignore the warning. This warning is displayed only when the context parameter javax.faces.PROJECT_STAGE is set to Development anyway .
As to the false warning message itself, this check was introduced in Mojarra 2.1.1 as per issue 1663. However, as per issue 2147 it turns out to have some bugs and is been further improved in Mojarra 2.1.3. I'd imagine that the false warning is in your particular case caused by having an <ice:panelLayout> between the form and the input elements.
If you aren't on Mojarra 2.1.3 yet, you may want to consider upgrading to see if it removes the false warning message.

Why is DotNetNuke text editor control always showing HTML Code with iPad?

I have a DotNetNuke custom module where I am using an HTML editor to allow uses to enter some text to be saved to a database.
It is working fine for all browsers except IPad's safari where I get the HTML tags showing in the editor.
What can I do to make Ipad show text formatted (or even as plain text) rather than having these tags appear as they are very confusing to users.
The control is using:
<%# Register TagPrefix="dnn" TagName="TextEditor" Src="~/controls/TextEditor.ascx" %>
<div id="divTab2">
<dnn:TextEditor ID="txtNotes" runat="server" Width="900px" />
</div>
The web.config has this:
<htmlEditor defaultProvider="DotNetNuke.RadEditorProvider">
<providers>
<clear />
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 1:00:02 AM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<!--Upgraded by DotNetNuke.TelerikEditorProvider version 5.6.3 - Date: 8/3/2011 7:33:08 PM-->
<!--<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />-->
<add name="TelerikEditorProvider" type="DotNetNuke.HtmlEditor.TelerikEditorProvider.EditorProvider, DotNetNuke.HtmlEditor.TelerikEditorProvider" providerPath="~/Providers/HtmlEditorProviders/Telerik/" toolsFile="~/Providers/HtmlEditorProviders/Telerik/Config/ToolsDefault.xml" configFile="~/Providers/HtmlEditorProviders/Telerik/Config/ConfigDefault.xml" FilterHostExtensions="True" />
<add name="DotNetNuke.RadEditorProvider" type="DotNetNuke.Providers.RadEditorProvider.EditorProvider, DotNetNuke.RadEditorProvider" providerPath="~/DesktopModules/Admin/RadEditorProvider" />
</providers>
</htmlEditor>
example:
In iPad, I get
<div style="text-align: center;"><strong>Case History Notes - Martha </strong><br /></div><br /><strong>6/24/11</strong>: Referred by Jackie <br /><strong>6/26/11:</strong> Sch. Initial Interview for 6/30; 7:00AM Breakfast at Cafe.<br />
rather than the expected
Case History Notes - Martha 6/24/11: Referred by Jackie 6/26/11: Sch. Initial Interview for 6/30; 7:00AM Breakfast at Cafe.
Safari on the iThings doesn't support contentEditable, which is the feature used for most rech edit panels on the web.
Since I do not have an iPad, I am unable to troubleshoot this. I can confirm that the desktop version of Safari works fine though. Have you tried this on newer versions of DotNetNuke? The browser and telerik definitions are updated with every release. If you cannot upgrade for some reason, I would try upgrading just your telerik controls. For example, you can try the latest release of the DNN 5 RadEditor Provider by dnnWerk.

Resources