You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mansour <ma...@yahoo.com> on 2007/06/05 03:37:21 UTC
DateTimePicket takes the whole page
Hello every one:
I faced this problem and posted it, and never get any thing back. I have
a page that displays dateTimePicker. When the dateTimePicker pops up it
spans the whole page and is displayed in a newpage with header, footer
and navigation bar !
This issue appears sometimes then it disappears by itself. The last time
I had this, I was deceived that I solved it by clearing FirFoxe cache.
This was not the case!
I went to a different machine and used Internet Explorer and the same
problem.
I need some one to help me finding out what's wrong. Why the
dateTimePicker takes the whole page?
I am using tomcat 6.0.2.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: DateTimePicket takes the whole page
Posted by Mansour <ma...@yahoo.com>.
Jeromy Evans wrote:
> Mansour wrote:
>> Where can I find this folder
>> struts/dojo/src/widget/templates/DatePicker.html ?
>> In tomcat work ? In /tmp ?? I searched the wholefile system to check
>> where does it come from and couldn't find any thing. I understand it
>> come in the jar files, but before tomcat serves this contents they
>> have to go into a directory. Am I wrong ?
>>
> By default, anything under the /struts/ path is served directly from
> struts2-core-2.0.6.jar. It doesn't copy them it.
> The full path to the file is
> struts2-core-2.0.6.jar!/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html
>
> Copying the content of the static directory in the jar to your web
> server is an optimization.
>> I used the DOM inspector, and couldn't find anything. All I was able
>> to find is just what you have described. A DIV that contains table.
>> What Do I need to check in the DOM tree? I don't think it's the
>> style, simply because there's none. The dateTimePicker has a page in
>> the main page. I mean when it pops up it has the same page header and
>> footer and navigation bar. It shouldn't be a page by it's self !
>>
>>
> hmm...sitemesh appears to be decorating the popup DatePicker.html. I
> don't use sitemesh. It's plausable that dojo loads DatePicker.html via
> an asynchronous request and the response is getting decorated. Check
> your sitemesh settings.
Thank you Jeromy:
That did the trick, I just excluded the struts directory form sitemesh.
I added the excludes node, and cleared the cache:
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/pages/layout">
<decorator name="main" page="masterPage.jsp">
<pattern>/*</pattern>
</decorator>
<excludes>
<pattern>/struts/*</pattern>
</excludes>
</decorators>
The confusing part was it was working fine sometimes. I always had
sitemesh mapped teh way it was. But sometime it works fine, other times
it just messes up the whole page !!
Any way, it's working now.
>
> (Mansour sent me a screen capture. It's pretty funny really)
>> Here' the code for the page:
>>
>> <%@ taglib prefix="s" uri="/struts-tags"%>
>> <html>
>> <head>
>> <s:head theme="ajax" debug="true" />
>> </head>
>> <body>
>> <s:datetimepicker value="2006-10-31" name="test" />
>> </body>
>> </html>
>>
>>
>> And here' is the master Page (layout):
>> <%@ taglib prefix="s" uri="/struts-tags"%>
>> <%@taglib prefix="decorator"
>> uri="http://www.opensymphony.com/sitemesh/decorator"%>
>> <html>
>> <head>
>> <decorator:head></decorator:head>
>> <title><decorator:title /> </title>
>> <meta http-equiv="Cache-Control" content="no-store"/>
>> <meta http-equiv="Pragma" content="no-cache"/>
>> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
>> </head>
>>
>> <body style="margin: 0px; padding: 0px;">
>> <table width="100%" style="height: 100%;" cellpadding="10"
>> cellspacing="0" border="0">
>> <tr>
>> <td colspan="2" style="height: 100px;" bgcolor="#777d6a">
>> <h2><%@ include file="/pages/layout/header.jsp"%></h2>
>> </td>
>> </tr>
>> <tr>
>> <td width="20%" valign="top" bgcolor="#999f8e">
>> <%@ include file="/pages/layout/navigation.jsp"%></td>
>> <td width="80%" valign="top" bgcolor="#d2d8c7" colspan="1" >
>> <decorator:body />
>> </td>
>> <tr>
>> <td colspan="2" align="center" height="20" bgcolor="#777d6a">
>> <%@ include file="/pages/layout/footer.jsp"%>
>> </td>
>> </tr>
>> </table>
>> </body>
>> </html>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Jeromy Evans wrote:
>>> I can't even begin to image what you're describing.
>>> However, install the firefox web developer plugin [1] and have a
>>> look at the DOM to see what's really being created.
>>> The dojo datepicker uses an html template in
>>> struts/dojo/src/widget/templates/DatePicker.html and a css file at
>>> the sample location.
>>> The pop-up is just a table inside a div with a bunch of dojo event
>>> attachments (the content of DatePicker.html). The only way I can
>>> image it spanning the 'whole page' is if you've changed the default
>>> template or some of your own CSS conflicts with the styles used by
>>> the widget. The latter is easy to do.
>>>
>>> Use the web developer plugin to manipulate the CSS while the popup
>>> is displayed to see if that's the problem.
>>>
>>> [1] https://addons.mozilla.org/en-US/firefox/addon/60
>>>
>>> Mansour wrote:
>>>> Hello every one:
>>>> I faced this problem and posted it, and never get any thing back. I
>>>> have a page that displays dateTimePicker. When the dateTimePicker
>>>> pops up it spans the whole page and is displayed in a newpage with
>>>> header, footer and navigation bar !
>>>> This issue appears sometimes then it disappears by itself. The last
>>>> time I had this, I was deceived that I solved it by clearing
>>>> FirFoxe cache. This was not the case!
>>>> I went to a different machine and used Internet Explorer and the
>>>> same problem.
>>>>
>>>>
>>>> I need some one to help me finding out what's wrong. Why the
>>>> dateTimePicker takes the whole page?
>>>>
>>>> I am using tomcat 6.0.2.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: DateTimePicket takes the whole page
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
Mansour wrote:
> Where can I find this folder
> struts/dojo/src/widget/templates/DatePicker.html ?
> In tomcat work ? In /tmp ?? I searched the wholefile system to check
> where does it come from and couldn't find any thing. I understand it
> come in the jar files, but before tomcat serves this contents they
> have to go into a directory. Am I wrong ?
>
By default, anything under the /struts/ path is served directly from
struts2-core-2.0.6.jar. It doesn't copy them it.
The full path to the file is
struts2-core-2.0.6.jar!/org/apache/struts2/static/dojo/src/widget/templates/DatePicker.html
Copying the content of the static directory in the jar to your web
server is an optimization.
> I used the DOM inspector, and couldn't find anything. All I was able
> to find is just what you have described. A DIV that contains table.
> What Do I need to check in the DOM tree? I don't think it's the style,
> simply because there's none. The dateTimePicker has a page in the main
> page. I mean when it pops up it has the same page header and footer
> and navigation bar. It shouldn't be a page by it's self !
>
>
hmm...sitemesh appears to be decorating the popup DatePicker.html. I
don't use sitemesh. It's plausable that dojo loads DatePicker.html via
an asynchronous request and the response is getting decorated. Check
your sitemesh settings.
(Mansour sent me a screen capture. It's pretty funny really)
> Here' the code for the page:
>
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <html>
> <head>
> <s:head theme="ajax" debug="true" />
> </head>
> <body>
> <s:datetimepicker value="2006-10-31" name="test" />
> </body>
> </html>
>
>
> And here' is the master Page (layout):
> <%@ taglib prefix="s" uri="/struts-tags"%>
> <%@taglib prefix="decorator"
> uri="http://www.opensymphony.com/sitemesh/decorator"%>
> <html>
> <head>
> <decorator:head></decorator:head>
> <title><decorator:title /> </title>
> <meta http-equiv="Cache-Control" content="no-store"/>
> <meta http-equiv="Pragma" content="no-cache"/>
> <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
> </head>
>
> <body style="margin: 0px; padding: 0px;">
> <table width="100%" style="height: 100%;" cellpadding="10"
> cellspacing="0" border="0">
> <tr>
> <td colspan="2" style="height: 100px;" bgcolor="#777d6a">
> <h2><%@ include file="/pages/layout/header.jsp"%></h2>
> </td>
> </tr>
> <tr>
> <td width="20%" valign="top" bgcolor="#999f8e">
> <%@ include file="/pages/layout/navigation.jsp"%></td>
> <td width="80%" valign="top" bgcolor="#d2d8c7" colspan="1" >
> <decorator:body />
> </td>
> <tr>
> <td colspan="2" align="center" height="20" bgcolor="#777d6a">
> <%@ include file="/pages/layout/footer.jsp"%>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Jeromy Evans wrote:
>> I can't even begin to image what you're describing.
>> However, install the firefox web developer plugin [1] and have a look
>> at the DOM to see what's really being created.
>> The dojo datepicker uses an html template in
>> struts/dojo/src/widget/templates/DatePicker.html and a css file at
>> the sample location.
>> The pop-up is just a table inside a div with a bunch of dojo event
>> attachments (the content of DatePicker.html). The only way I can
>> image it spanning the 'whole page' is if you've changed the default
>> template or some of your own CSS conflicts with the styles used by
>> the widget. The latter is easy to do.
>>
>> Use the web developer plugin to manipulate the CSS while the popup is
>> displayed to see if that's the problem.
>>
>> [1] https://addons.mozilla.org/en-US/firefox/addon/60
>>
>> Mansour wrote:
>>> Hello every one:
>>> I faced this problem and posted it, and never get any thing back. I
>>> have a page that displays dateTimePicker. When the dateTimePicker
>>> pops up it spans the whole page and is displayed in a newpage with
>>> header, footer and navigation bar !
>>> This issue appears sometimes then it disappears by itself. The last
>>> time I had this, I was deceived that I solved it by clearing FirFoxe
>>> cache. This was not the case!
>>> I went to a different machine and used Internet Explorer and the
>>> same problem.
>>>
>>>
>>> I need some one to help me finding out what's wrong. Why the
>>> dateTimePicker takes the whole page?
>>>
>>> I am using tomcat 6.0.2.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: DateTimePicket takes the whole page
Posted by Mansour <ma...@yahoo.com>.
Where can I find this folder
struts/dojo/src/widget/templates/DatePicker.html ?
In tomcat work ? In /tmp ?? I searched the wholefile system to check
where does it come from and couldn't find any thing. I understand it
come in the jar files, but before tomcat serves this contents they have
to go into a directory. Am I wrong ?
I used the DOM inspector, and couldn't find anything. All I was able to
find is just what you have described. A DIV that contains table.
What Do I need to check in the DOM tree? I don't think it's the style,
simply because there's none. The dateTimePicker has a page in the main
page. I mean when it pops up it has the same page header and footer and
navigation bar. It shouldn't be a page by it's self !
Here' the code for the page:
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<s:head theme="ajax" debug="true" />
</head>
<body>
<s:datetimepicker value="2006-10-31" name="test" />
</body>
</html>
And here' is the master Page (layout):
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@taglib prefix="decorator"
uri="http://www.opensymphony.com/sitemesh/decorator"%>
<html>
<head>
<decorator:head></decorator:head>
<title><decorator:title /> </title>
<meta http-equiv="Cache-Control" content="no-store"/>
<meta http-equiv="Pragma" content="no-cache"/>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
</head>
<body style="margin: 0px; padding: 0px;">
<table width="100%" style="height: 100%;" cellpadding="10"
cellspacing="0" border="0">
<tr>
<td colspan="2" style="height: 100px;" bgcolor="#777d6a">
<h2><%@ include file="/pages/layout/header.jsp"%></h2>
</td>
</tr>
<tr>
<td width="20%" valign="top" bgcolor="#999f8e">
<%@ include file="/pages/layout/navigation.jsp"%></td>
<td width="80%" valign="top" bgcolor="#d2d8c7" colspan="1" >
<decorator:body />
</td>
<tr>
<td colspan="2" align="center" height="20" bgcolor="#777d6a">
<%@ include file="/pages/layout/footer.jsp"%>
</td>
</tr>
</table>
</body>
</html>
Jeromy Evans wrote:
> I can't even begin to image what you're describing.
> However, install the firefox web developer plugin [1] and have a look
> at the DOM to see what's really being created.
> The dojo datepicker uses an html template in
> struts/dojo/src/widget/templates/DatePicker.html and a css file at the
> sample location.
> The pop-up is just a table inside a div with a bunch of dojo event
> attachments (the content of DatePicker.html). The only way I can
> image it spanning the 'whole page' is if you've changed the default
> template or some of your own CSS conflicts with the styles used by the
> widget. The latter is easy to do.
>
> Use the web developer plugin to manipulate the CSS while the popup is
> displayed to see if that's the problem.
>
> [1] https://addons.mozilla.org/en-US/firefox/addon/60
>
> Mansour wrote:
>> Hello every one:
>> I faced this problem and posted it, and never get any thing back. I
>> have a page that displays dateTimePicker. When the dateTimePicker
>> pops up it spans the whole page and is displayed in a newpage with
>> header, footer and navigation bar !
>> This issue appears sometimes then it disappears by itself. The last
>> time I had this, I was deceived that I solved it by clearing FirFoxe
>> cache. This was not the case!
>> I went to a different machine and used Internet Explorer and the same
>> problem.
>>
>>
>> I need some one to help me finding out what's wrong. Why the
>> dateTimePicker takes the whole page?
>>
>> I am using tomcat 6.0.2.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: DateTimePicket takes the whole page
Posted by Jeromy Evans <je...@blueskyminds.com.au>.
I can't even begin to image what you're describing.
However, install the firefox web developer plugin [1] and have a look at
the DOM to see what's really being created.
The dojo datepicker uses an html template in
struts/dojo/src/widget/templates/DatePicker.html and a css file at the
sample location.
The pop-up is just a table inside a div with a bunch of dojo event
attachments (the content of DatePicker.html). The only way I can image
it spanning the 'whole page' is if you've changed the default template
or some of your own CSS conflicts with the styles used by the widget.
The latter is easy to do.
Use the web developer plugin to manipulate the CSS while the popup is
displayed to see if that's the problem.
[1] https://addons.mozilla.org/en-US/firefox/addon/60
Mansour wrote:
> Hello every one:
> I faced this problem and posted it, and never get any thing back. I
> have a page that displays dateTimePicker. When the dateTimePicker pops
> up it spans the whole page and is displayed in a newpage with header,
> footer and navigation bar !
> This issue appears sometimes then it disappears by itself. The last
> time I had this, I was deceived that I solved it by clearing FirFoxe
> cache. This was not the case!
> I went to a different machine and used Internet Explorer and the same
> problem.
>
>
> I need some one to help me finding out what's wrong. Why the
> dateTimePicker takes the whole page?
>
> I am using tomcat 6.0.2.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org