Re: Fragments, Validation and IE

2009-07-19 Thread Geoffrey Wiseman
On Sat, Jul 18, 2009 at 12:46 AM, Geoffrey Wiseman <
geoffrey.wise...@gmail.com> wrote (paraphrased):

> I'm experiencing an odd issue where a hidden form fragment is showing
> server-side validation errors (even though the fragment is hidden) but only
> in IE.


This turned out to be a bit of generated Javascript in a component that IE
disliked, but that all other browsers were happy with.

I got just far enough in Tapestry's internals to understand that while the
page was originally rendered, both IE and Firefox "stored actions" dealing
with the hidden fields in the form data, and by the time the request came
back to the server, the stored actions dealing with those fields were
apparently not present.  I'm guessing that some piece of Javascript code
interacts with the stored actions on the client-side, and because the
generated Javascript was causing an error in IE, that client-side Javascript
wasn't executing.  Perhaps someone with a better understanding of Tapestry
implementation and form fragments can confirm.

I should work on figuring out how to tell IE to hide less from me; I would
have solved this much faster if I'd known there was a Javascript issue.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/


RE: Changing ASO timeout

2009-07-19 Thread sodium

Thanks, much appreciated. That is just what i need


kristian.marinkovic wrote:
> 
> an ASO or SSO is stored in a HTTPSession. its timeout is
> configured via the servlet container.
> 
> g,
> kris 
> 
> 
> 
> 
> sodium  
> 19.07.2009 14:20
> Bitte antworten an
> "Tapestry users" 
> 
> 
> An
> users@tapestry.apache.org
> Kopie
> 
> Thema
> Changing ASO timeout
> 
> 
> 
> 
> 
> 
> 
> 
> Hi, I remember reading somewhere that the default timeout for ASO is 30 
> mins.
> Is there any particular way to extend the delay before timeout? A classic
> example of what i trying to do is an option for user (stored in ASO) to
> select the timeframe to be logged on, eg. 1 hour, 1 day or 1 year.
> -- 
> View this message in context: 
> http://www.nabble.com/Changing-ASO-timeout-tp24556499p24556499.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Changing-ASO-timeout-tp24556499p24557178.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



RE: Changing ASO timeout

2009-07-19 Thread Kristian Marinkovic
an ASO or SSO is stored in a HTTPSession. its timeout is
configured via the servlet container.

g,
kris 




sodium  
19.07.2009 14:20
Bitte antworten an
"Tapestry users" 


An
users@tapestry.apache.org
Kopie

Thema
Changing ASO timeout








Hi, I remember reading somewhere that the default timeout for ASO is 30 
mins.
Is there any particular way to extend the delay before timeout? A classic
example of what i trying to do is an option for user (stored in ASO) to
select the timeframe to be logged on, eg. 1 hour, 1 day or 1 year.
-- 
View this message in context: 
http://www.nabble.com/Changing-ASO-timeout-tp24556499p24556499.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org




Re: T5 : Dependant dropdown boxes

2009-07-19 Thread Pawan Kumar

Hi Stephane,

I hope this example will help.
This component can be used to populate city based on country and then
location based on city selected.
You need t5components/chenellkit components.

1. Add PKCCL component into component folder
package com.openfinance.OpenFinanceManager.components;

import java.util.ArrayList;
import java.util.List;

import org.apache.tapestry5.ComponentResources;
import org.apache.tapestry5.Field;
import org.apache.tapestry5.SelectModel;
import org.apache.tapestry5.StreamResponse;
import org.apache.tapestry5.ValidationTracker;
import org.apache.tapestry5.ValueEncoder;
import org.apache.tapestry5.annotations.Component;
import org.apache.tapestry5.annotations.Environmental;
import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary;
import org.apache.tapestry5.annotations.Mixins;
import org.apache.tapestry5.annotations.OnEvent;
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.corelib.components.Form;
import org.apache.tapestry5.corelib.components.Select;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.json.JSONArray;
import org.apache.tapestry5.json.JSONObject;
import org.apache.tapestry5.services.ComponentDefaultProvider;
import org.apache.tapestry5.util.TextStreamResponse;
import org.hibernate.Session;
import org.slf4j.Logger;

import com.openfinance.OpenFinanceManager.data.CityDAO;
import com.openfinance.OpenFinanceManager.data.CityDAOImpl;
import com.openfinance.OpenFinanceManager.data.CountryDAO;
import com.openfinance.OpenFinanceManager.data.CountryDAOImpl;
import com.openfinance.OpenFinanceManager.data.LocationDAO;
import com.openfinance.OpenFinanceManager.data.LocationDAOImpl;
import com.openfinance.OpenFinanceManager.entities.City;
import com.openfinance.OpenFinanceManager.entities.Country;
import com.openfinance.OpenFinanceManager.entities.Location;
import com.openfinance.OpenFinanceManager.helper.CityEncoder;
import com.openfinance.OpenFinanceManager.helper.CitySelectModel;
import com.openfinance.OpenFinanceManager.helper.CountryEncoder;
import com.openfinance.OpenFinanceManager.helper.CountrySelectModel;
import com.openfinance.OpenFinanceManager.helper.LocationEncoder;
import com.openfinance.OpenFinanceManager.helper.LocationSelectModel;
import com.openfinance.OpenFinanceManager.pages.Home;


public class PKCCL implements Field {
@Inject
private Logger logger;

@Inject
private Messages messages;

@Inject
private CountryDAO countryDAO;
@Inject
private CityDAO cityDAO;
@Inject
private LocationDAO locationDAO;

@Persist
private Country selectedCountry;
@Persist
private City selectedCity;
@Persist
private Location selectedLocation;

@Component(id="countries", parameters = {"value=selectedCountry",
"event=change",
"onCompleteCallback=literal:onChangeCountry"})
@Mixins({"t5components/OnEvent"})
private Select _countries;

@Component(id="cities", parameters = {"value=selectedCity", 
"event=change",
"onCompleteCallback=literal:onChangeCity"})
@Mixins({"t5components/OnEvent"})
private Select _citiesOfCountry;

@Parameter(defaultPrefix="literal")
private String label;

@Inject
private ComponentResources componentResources;
@Inject
private ComponentDefaultProvider componentDefaultProvider;

@Parameter
private boolean disabled;


@Environmental
private ValidationTracker tracker;

public PKCCL() {
}

public SelectModel getCountryModel() {
return new CountrySelectModel(countryDAO.findAllCountries());
}


public ValueEncoder getCountryEncoder() {
return new CountryEncoder(countryDAO);
}

public Country getSelectedCountry() {
return selectedCountry;
}

public void setSelectedCountry(Country selectedCountry) {
this.selectedCountry = selectedCountry;
}

public SelectModel getCityModel() {
if (selectedCountry == null || selectedCountry.getName() == "") 
{
List c = new ArrayList();
return new CitySelectModel(c);
}
else {
return new
CitySelectModel(cityDAO.findAllCities(selectedCountry.getId().longValue()));
}
}


public ValueEncoder getCityEncoder() {
return new CityEncoder(cityDAO);
}



 public City getSelectedCity() {
return selectedCity;
}

public void setSelectedCity(City selected

Changing ASO timeout

2009-07-19 Thread sodium

Hi, I remember reading somewhere that the default timeout for ASO is 30 mins.
Is there any particular way to extend the delay before timeout? A classic
example of what i trying to do is an option for user (stored in ASO) to
select the timeframe to be logged on, eg. 1 hour, 1 day or 1 year.
-- 
View this message in context: 
http://www.nabble.com/Changing-ASO-timeout-tp24556499p24556499.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: Is AjaxFormLoop example working for you?

2009-07-19 Thread Sven Homburg
Ok, i will try to describe it this way,
pictures say more than thousand words ;-)

http://www.chenillekit.org/screencast-.mpeg

with regards
Sven Homburg
Founder of the Chenille Kit Project
http://www.chenillekit.org





2009/7/18 Robert Zeigler :
> Managed to duplicate without screwing with cookies.
> Load the page. Wait for awhile (say, 5-10 minutes). Now click "add row".
> Which is already described here:
>
> https://issues.apache.org/jira/browse/TAP5-733
>
> On Jul 18, 2009, at 7/188:52 AM , Robert Zeigler wrote:
>
>> That's an interesting theory, but I'm not convinced, personally.
>> I've explicitly set FF3.5 to block cookies from jumpstart and cleared my
>> cookies from jumpstart.
>> And it still works for me (OS: Leopard). So I'm not so sure it's a cookie
>> issue.
>>
>> Robert
>>
>> On Jul 18, 2009, at 7/186:02 AM , Sergey Didenko wrote:
>>
>>> It works in IE8, Firefox 3.5, Opera 9.64. Windows XP, no proxy, Ukraine
>>>
>>> If I open the page, then delete session cookies, "add row" fails.
>>>
>>> May be some firewalls, antiviruses just cut session id cookie and that
>>> is the reason.
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org