0

Calendar and CSS problem

asked 2009-12-29 09:53:04 +0800

kar gravatar image kar
66 2

Hi all,
i'm using the calendar component on zk version 3.6.3.

my code is based on the calendar documentation example ... and honestly i have the same problem with the example itself.

it works fine only if I use firefox but with iexplorer it doens't load the css ... as i result i cannot see buttons and other things.

i have found the same problem using a plain html component when i put a table with css inside ... it works fine only in firefox but not in iexplorer.

is there anything i can do to solve the problem.

many thanks in advance.

kar

delete flag offensive retag edit

11 Replies

Sort by » oldest newest

answered 2009-12-29 19:13:26 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Hi,kar
This is my test code

<zk>
Calendar:<calendar/>
<separator/>
Timebox: <timebox cols="14" format="a hh:mm:ss" onCreate="self.value = new Date()"/>
<separator/>
Datebox: <datebox cols="20" format="yyyy/MM/dd a hh:mm:ss"  onCreate="self.value = new Date()"/>
<separator/>
</zk>

it works well on FF and IE
Chould you post your sample code
and which version of ie are you used?

link publish delete flag offensive edit

answered 2009-12-30 10:07:56 +0800

kar gravatar image kar
66 2

Here is what i have done :

the GenericForwardComposer calls:

>>> Executions.createComponents("calendar.zul", centerDiv, sessionScope);

The calendar.zul ... is as follows:

<?page title="Calendario interventi" contentType="text/html;charset=UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="calendarWin"?>
<?component name="CreateDialog" macroURI="createEntry.zul"?>
<?component name="UpdateDialog" macroURI="updateEntry.zul"?>
<?component name="divtab" macro-uri="divtab.zul"?>
<?component name="divarrow" macro-uri="divarrow.zul"?>
<zk>
<style src="calendar.css"/>
<window id="calendarWin" border="none" apply="com.ingegnitech.sosweb.calendar.controllers.NewsController" height="100%" width="100%">
<CreateDialog id="creationDialog" />
<UpdateDialog id="updateDialog" />
<borderlayout>
<center title="Calendario interventi">
<calendars firstDayOfWeek="Monday" timeZone="California=PDT-8" model="@{calendarWin$composer.getCalendarModel}" mold="default" id="cal">
<toolbar sclass="calendar-toolbar">
<separator orient="vertical"/>
<div class="float-left">
<hbox>
<divarrow type="arrow-left" command='cal.previousPage();Events.postEvent("onCreate", label, null);'/>
<divarrow type="arrow-right" command='cal.nextPage();Events.postEvent("onCreate", label, null);'/>
<div>
<button mold="os" label="Interventi di oggi" onClick='cal.setCurrentDate(java.util.Calendar.getInstance(cal.getDefaultTimeZone()).getTime());Events.postEvent("onCreate", label, null);'/>
<label id="label">
<attribute name="onCreate">
Date b = cal.getBeginDate();
Date e = cal.getEndDate();
java.text.SimpleDateFormat sdfV = new java.text.SimpleDateFormat("dd/MM/yyyy", org.zkoss.util.Locales.getCurrent());
sdfV.setTimeZone(cal.getDefaultTimeZone());
self.setValue(sdfV.format(b) + " - " + sdfV.format(e));
</attribute>
</label>
<toolbarbutton label="Aggiorna" class="refresh" onClick='cal.invalidate();'/>
</div>
</hbox>
</div>
<div class="float-right">
<hbox>
<divtab command='cal.mold = "default";cal.days = 1;Events.postEvent("onCreate", label, null);FDOW.visible=false;' text="Giornata"/>
<divtab command='cal.mold = "default";cal.days = 7;Events.postEvent("onCreate", label, null);FDOW.visible=true;' text="Settimana"/>
<divtab command='cal.mold = "default";cal.days = 5;Events.postEvent("onCreate", label, null);FDOW.visible=false;' text="5 Giorni"/>
<divtab command='cal.mold = "month";Events.postEvent("onCreate", label, null);FDOW.visible=true;' text="Mese"/>
</hbox>
</div>
</toolbar>
</calendars>
</center>
<south title="Elenco pratiche" collapsible="true" open="false" splittable="true" flex="true">
<div>
<include src="dossier.zul" height="300px"/>
</div>
</south>
</borderlayout>
</window>

</zk>

link publish delete flag offensive edit

answered 2009-12-30 19:32:56 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

This is my sample code
index.zul

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="new page title" border="normal" apply="ctrl.MyComposer">
		<div id="centerDiv" height="600px"/>
	</window>
</zk>

MyComposer.java
package ctrl;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.*;

public class MyComposer extends GenericForwardComposer {
	
	Div centerDiv;
	
	@Override
	public void doAfterCompose(Component comp) throws Exception {
		super.doAfterCompose(comp);
		 Executions.createComponents("calendar.zul", centerDiv, null);
	}

}


it works well

link publish delete flag offensive edit

answered 2009-12-31 05:56:01 +0800

kar gravatar image kar
66 2

ok i did tried with your example and it works fine for me …
but …
the point is …
I have my main component (let’s call it index with the clkassic border layout)

If I render immediately in the center div the calendar everything works fine … (this from the doAlferComposer …)

The point is that I fill the center div as response of a button pressed in the left area of the border layout … (qui correggimi se sbaglio)
The left div is included as external zul page in the left/easet border layout …

Could it be this part of the problem ????

thanks again
kar

link publish delete flag offensive edit

answered 2010-01-03 19:29:50 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

Could you post your sample zul

link publish delete flag offensive edit

answered 2010-01-19 02:41:32 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Hi kar,

I have na app like you, I have a bordelayout with menu in the west part and I <include> some content into the center part. I use ZK Calendar 1 RC (for ZK 3.6.3) and it works fine. Which CSS is not loaded, the calendar.css.dsp from zkcalendar.jar or your own css?

link publish delete flag offensive edit

answered 2010-02-08 06:48:48 +0800

alexricci gravatar image alexricci
51

Hi xmedeko,
I'm working on the same kar project...we use the same Calendar RC for ZK 3.6.3...the not loaded CSS is the calendar.css.

link publish delete flag offensive edit

answered 2010-02-08 08:48:07 +0800

xmedeko gravatar image xmedeko
1031 1 16
http://xmedeko.blogspot.c...

Hi alexricci,
that's strange, calendar.css.dsp is loaded even when I not use it. It is loaded always when I put calendar.jar into the WEB-INF/lib. The loading of ZK resouces from JARs is a little bit unusual. Check it by Firebug or a similar tool.


There must be a lang-addon.xml in the calendar.jar with a line

<stylesheet href="~./calendar/css/calendar.css.dsp" type="text/css"/>

Then, ZK tries to load any calendar/css/calendar.css.dsp by getResourceAsStream. That means, the if you have a file of the same name "calendar/css/calendar.css.dsp" in another JAR, strange things may happen. Do you have only one calendar.jar in your WEB-INF/lib?

link publish delete flag offensive edit

answered 2010-02-08 20:20:12 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

I use this sample

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
	<window title="new page title" border="normal" apply="ctrl.MyComposer">
		<borderlayout height="500px">
			<center >
				<div id="centerDiv" height="600px" />
			</center>
		</borderlayout>
	</window>
</zk>

MyComposer.java is the same with before

the calendar.css is loaded

you can check it in firebug
it is in div

link publish delete flag offensive edit

answered 2010-05-19 01:58:45 +0800

ravurisuman gravatar image ravurisuman
54

I am facing same problem with calendar 3.6. I am unable to see the buttons and arrows even in firefox. calendar.css.dsp I have does not contain the style class "calendar-toolbar", functionality is working, I am unable to see the arrows and buttons. code exactly looks like the way "Kar" is pasted in this conversation. You might have solved this problem, can you please help me? If you send your calendar.css that will be great help to me. In my calendar.css I could not see many classes, that could be the reason for not displaying the widgets

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-12-29 09:53:04 +0800

Seen: 1,730 times

Last updated: May 19 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More