i am developing a portlet with spring mvc.
I am using display tag library to export data excel,csv,xml etc.
i am listining true values like above,
ad Soyad (column names)
Erdi Kaya
3.serkan gurbuz
my jsp file this,
<%# page buffer = "16kb" %>
<%# taglib prefix="portlet" uri="http://java.sun.com/portlet_2_0"%>
<%# taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%# taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%# page contentType="text/html" isELIgnored="false"%>
<%# taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%#taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%# taglib prefix="display" uri="http://displaytag.sf.net" %>
<%# taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<display:table name="userList" export="true" >
<display:column property="ad" title="ID" sortable="true" headerClass="sortable" />
<display:column property="soyad" sortable="true" headerClass="sortable" />
</display:table>
when i click excel,csv or xml i am getting error
Unable to reset response before returning exported data. You are not using an export filter. Be sure that no other jsp tags are used before display:table or refer to the displaytag documentation on how to configure the export filter (requires j2ee 1.3).
ı have not solved for 2 day tih error.i am using display 1.2 jar and other required jars.
You need to configure an export filter in your web.xml. It will help to convert the content into expected format.
Read the following link for detail understanding.
Export filter? What's that?
Related
This is the code behind for the report viewer. It does check the local logged on user to give those listed permission to view the report. I want to pass the "domainname\user" to the parameter of a report to return results only for the logged in user.
<%# Page Title="" Language="C#" MasterPageFile="~/Intranet.Master" AutoEventWireup="true" CodeBehind="2021BudgetVsActualViewer.aspx.cs" Inherits="Company.Departments.Accounting._2021BudgetVsActualReports._2021BudgetVsActualViewer" %>
<%# Register assembly="Telerik.ReportViewer.WebForms, Version=8.0.14.507, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<%
string ADusername;
ADusername = Request.ServerVariables["LOGON_USER"];
ADusername = ADusername.ToLower();
switch(ADusername)
{
case "domainname\\jdoe":
case " domainname \\administrator":
case " domainname \\bsmith":
%>
<telerik:ReportViewer ID="New" runat="server" Height="840px" Width="1556px">
<typereportsource typename="Company.Departments.Accounting._2021BudgetVsActualReports._2021NewBudgetVsActualReport, Company, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"></typereportsource>
</telerik:ReportViewer>
<br />
<%
break;
default:
Response.Write("You do not have permission to view these reports");
break;
}
%>
<br />
</asp:Content>
You can use the SYSTEM_USER TSQL function to return the name of the currently logged-in user.
I am using Backbone and Eco templates in my Rails application. My template has the following code:
<% #collection.each (model)-> %>
<% console.log model.get('name') %>
<p><%= model.get('name') %></p>
<p><%= model.get('description') %></p>
<% end %>
For some reason, the HTML is blank. The name and description are not displayed. However, the console.log method outputs the correct data. What am I doing wrong?
Well I figured out the missing character. Apparently, Eco templates require a colon after the arrow:
<% #collection.each (model)->: %>
Not sure why this is the case. It's never mentioned in the readme.
How could i include the custom css & JavaScript for particular module in DotnetNuke?
I understand that it is not like normal ASP.Net page.
If your module has a file named module.css in the root of the module folder, it will automatically get included on the page with the module.
For other CSS and for JavaScript, you should use the Client Resource Management framework to include the resources you want. Something like this:
<%# Register TagPrefix="dnn"
Namespace="DotNetNuke.Web.Client.ClientResourceManagement"
Assembly="DotNetNuke.Web.Client" %>
<dnn:DnnCssInclude runat="server"
FilePath="~/DesktopModules/MyModule/css/the-style.css" />
<dnn:DnnJsInclude runat="server"
FilePath="~/DesktopModules/MyModule/js/the-script.js"
ForceProvider="DnnFormBottomProvider" />
You can also use this:
<link rel="stylesheet" type="text/css" href="<%= ControlPath %>/module.css" />
To add external JavaScript to a custom module:
string externaJs= "externaJs";
Type cstype = System.Reflection.MethodBase.GetCurrentMethod().GetType();
string cstext = "<script src=\"" +
ResolveUrl("~/DesktopModules/ModuleName/js/JsName.js") +
"\" type=\"text/javascript\"></script>";
if (!Page.ClientScript.IsClientScriptBlockRegistered(externaJs))
Page.ClientScript.RegisterClientScriptBlock(cstype, externaJs, cstext, false);
I am using IE and firefox, this is the default statement that was created using a default asp.net tag.
This works perfectly fine with IE but with firefox, nothing is rendered.
<%# Page Title="" Language="C#" MasterPageFile="~/Core.Master" AutoEventWireup="true"
CodeBehind="photoalbum.aspx.cs" Inherits="mkuk.photoalbum" %>
<%# Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentLeft" runat="server">
<asp:Silverlight ID="Xaml1" runat="server" Source="~/Static/silverlight/PhotoAlbum.xap"
MinimumVersion="2.0.31005.0" Width="100%" Height="100%" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentRight" runat="server">
</asp:Content>
change Width="100%" Height="100%" to Width=600px Height= 800px. FF and IE7/IE8 cause problem with 100% values.
check this out -
Any chance you installed FireFox after installing the Silverlight plugin? Maybe you could uninstall Silverlight (plugin only) and reinstall. You could also try loading this page in FireFox on multiple machines to see if its really a FireFox issue (shouldn't be).
this should be simple...could someone provide me a simple code sample that has an aspx page hosting both a silverlight app (consisting of, say a button) and an iframe (pointing to, say stackoverflow.com). The silverlight app and iframe could be in separate div's, the same div, whatever.
Everything I've tried so far leaves me with a page that has no silverlight control rendered on it.
EDIT: At the request for what my xaml looks like (Plus I should point out that my controls render just fine if I comment out the iframe.)
<UserControl x:Class="SilverlightApplication1.Page"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid x:Name="LayoutRoot" Background="Pink">
<Button Content="Click Me!"/>
</Grid>
</UserControl>
Thats it. Just for good measure here is my aspx page...
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"/>
<div style="height:100%;">
<asp:Silverlight ID="Silverlight1" runat="server" Source="~/ClientBin/SilverlightApplication1.xap" MinimumVersion="2.0.30523" Width="400" Height="400" />
</div>
<iframe src ="http://www.google.com" width="400"/>
</form>
Hmm, sound a bit odd, a quick google gave me this top result which talks about using an Iframe and Silverlight on the same page, without problems.
Also a quick test with the following code:
<%# Page Language="C#" AutoEventWireup="true" %>
<%# Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height:100%;">
<head runat="server">
<title>Test Page</title>
</head>
<body style="height:100%;margin:0;">
<form id="form1" runat="server" style="height:100%;">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<div style="height:100%;">
<asp:Silverlight ID="Xaml1" runat="server" Source="~/ClientBin/Test.xap" MinimumVersion="2.0.30523" Width="400" Height="400" />
</div>
<iframe src ="http://www.google.com" width="400"></iframe>
</form>
</body>
</html>
Renders out both Silverlight and the Iframe quite happily.
What code were you using when trying and it didn't work?
What does your XAML look like?
It could be something along the lines of the size set on the usercontrol in XAML, doesn't match the size set on the plugin on the aspx page. In that case, your button might be there but just not in the viewable area... Try checking the size of things, make sure they match.
A quick test you could do is to change the background color of your root element in the XAML and see if anything happen on the page.
Also, does the silverlight work if you remove the Iframe but leave everything else as is?
Sorry if this a too simple suggestion but without knowing your experience level with XAML...
Funny enough, I just solved this issue by ensuring that I specify the iframe dimensions by pixel.