RE: Date formats

2006-09-14 Thread Skriloff, Nicholas
Try something like this for your dates


package edu.darden.common.tapestry;

import edu.darden.common.codetables.ivalue.ViewingRolesData;
import edu.darden.common.config.ApplicationProperties;
import edu.darden.common.tapestry.link.DardenCallback;
import edu.darden.common.tapestry.link.PreviousPage;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.callback.ICallback;

import java.io.Serializable;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Iterator;
import java.util.LinkedList;

public class Visit implements Serializable, DardenCallback, PreviousPage
{
private boolean debug = false;
Log LOG = LogFactory.getLog(Visit.class);

private ICallback callback = null;

private static final SimpleDateFormat DATE_FORMAT = new
SimpleDateFormat(dd MMM );
private static final SimpleDateFormat MONTH_YEAR_FORMAT = new
SimpleDateFormat(MMM );
private static final SimpleDateFormat DAY_OF_THE_WEEK_DATE_FORMAT =
new SimpleDateFormat(,  d, );
private static final SimpleDateFormat TRADITIONAL_DATE_FORMAT = new
SimpleDateFormat( d, );
private static final SimpleDateFormat SHORT_DATE_FORMAT = new
SimpleDateFormat(M/dd/yy);
private static final SimpleDateFormat SHORT_FOUR_YEAR_DATE_FORMAT =
new SimpleDateFormat(M/dd/);
private static final SimpleDateFormat SHORT_MONTH_YEAR_FORMAT = new
SimpleDateFormat(M/yy);
private static final SimpleDateFormat TIME_FORMAT = new
SimpleDateFormat(h:mm a);
private static final SimpleDateFormat MILITARY_TIME_FORMAT = new
SimpleDateFormat(H:mm);
private static final SimpleDateFormat DATETIME_FORMAT = new
SimpleDateFormat(dd MMM  hh:mm a);
private static final SimpleDateFormat TRADITIONAL_DATETIME_FORMAT =
new SimpleDateFormat( d,  h:mm a);
private static final SimpleDateFormat LONG_DATETIME_FORMAT = new
SimpleDateFormat(,  d,  h:mm a);
private static final SimpleDateFormat LONG_TIMEDATE_FORMAT = new
SimpleDateFormat(h:mm a ,  d, );
private static final SimpleDateFormat SHORT_DATETIME_FORMAT = new
SimpleDateFormat(MM/dd/yy h:mm a);
private static final SimpleDateFormat DEADLINE_DATETIME_FORMAT = new
SimpleDateFormat(,  d,  @ h:mm a);

private SimpleDateFormat timeRangeFormat;
private String timeRangeFormatString;

private int selectedSubmenuIndex;
private int selectedMenuIndex;
private String[] lastTwoURLS = new String[2];
//bread crumbs is the trail of pages visited
private LinkedList breadCrumbs;
private static final int MAX_BREADCRUMBS = 3;//TODO use more if we
implement bread crumbs links

//Viewing Roles info.
private ViewingRolesData[] viewingRoles = null;
private boolean userHasReadRules = true;
// needed only for Career
private boolean userNeedsToUpdateJobSeekingQuestion = false;

/**
 * Ensure that the user data has been loaded for
 * @param cycle
 */
public void ensureUserLoaded(IRequestCycle cycle){
//empty, but can be overloaded by subclasses
}


public String getUsername(IRequestCycle cycle) {
return CommonLoginUtils.getUserName(cycle);
}

public void toggleDebug() {
debug = !debug;
}

public boolean isDebug() {
return debug;
}

public Format getDateFormat(){
return DATE_FORMAT;
}

public Format getMonthYearFormat(){
return MONTH_YEAR_FORMAT;
}

public Format getDayOfTheWeekDateFormat(){
return DAY_OF_THE_WEEK_DATE_FORMAT;
}

public Format getTraditionalDateFormat(){
return TRADITIONAL_DATE_FORMAT;
}

public Format getShortFourYearDateFormat(){
return SHORT_FOUR_YEAR_DATE_FORMAT;
}

public Format getShortDateFormat(){
return SHORT_DATE_FORMAT;
}

public Format getShortMonthYearFormat(){
return SHORT_MONTH_YEAR_FORMAT;
}

public Format getTimeFormat(){
return TIME_FORMAT;
}

public Format getMilitaryTimeFormat(){
return MILITARY_TIME_FORMAT;
}

public Format getDatetimeFormat() {
return DATETIME_FORMAT;
}

public Format getTraditionalDatetimeFormat() {
return TRADITIONAL_DATETIME_FORMAT;
}

public Format getLongDatetimeFormat() {
return LONG_DATETIME_FORMAT;
}

public Format getLongTimedateFormat() {
return LONG_TIMEDATE_FORMAT;
}

public Format getShortDatetimeFormat(){
return SHORT_DATETIME_FORMAT;
}

public Format getDeadlineDatetimeFormat() {
return DEADLINE_DATETIME_FORMAT;
}

public int getSelectedMenuIndex() {
return selectedMenuIndex;
}

public int getSelectedSubmenuIndex() {
return selectedSubmenuIndex;

RE: Mixed up sessions

2006-08-21 Thread Skriloff, Nicholas
I suggest you go to http://www.agileskills2.org/EWDT/
and download the tapestry 3.0 or 4.0 free chapters and read on 
Instance variables may breach security

-Original Message-
From: Tim Sawyer [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 21, 2006 5:39 AM
To: Tapestry users
Subject: Mixed up sessions

Hi,

We've just written our first tapestry app, which is running on tomcat
5.0.  
We're getting strange problems with it deployed at our customer, where
it 
looks like users are getting each others sessions.  We don't seem to get
this 
in-house, but I'm getting someone to test multi-user now.  

My first thought was that someone had used instance variables in the
tapestry 
pages, but I can't find any evidence of that.

Does anyone have any idea what this could be?

Thanks,

Tim.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Where can I find info on speeding up a pure tapestry 3.0 application?

2006-07-20 Thread Skriloff, Nicholas


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Training session in Sweden

2006-05-22 Thread Skriloff, Nicholas
Niklas,

I have been developing in Tapestry for 2 years at the University of
Virginia and have been a professional teacher in the past. I would
consider putting a two day REMOTE class together for you that would use
Kent Tong's book at http://www.agileskills2.org/EWDT/chapters1-4.pdf
The two day class would be customized to your needs and cost $200/day
per person: $400/class. We would use a phone and
https://www.gotomeeting.com .  

Sincerely 
Nick Skriloff

Enclosed: resume. 

-Original Message-
From: Niklas Ekman [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 22, 2006 7:17 AM
To: tapestry-user@jakarta.apache.org
Subject: OT: Training session in Sweden

Hello,
 
I'm wondering there are any Tapestry trainers for hire in Sweden? 
 
Best regards,
 
Niklas Ekman



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]