Not solved! Re: Problem with mixing HTTP and HTTPS

2006-06-18 Thread Josip Gracin

Hello again!

After trying out the suggestion to use security-constraint in web.xml 
(thanks Giampaolo!) I've figured out that it doesn't exactly solve my 
problem.  The problem is that I need to redirect to HTTPS for login and 
some other subset of pages, and then after login, redirect back to HTTP.
By using security-constrant I am able to redirect to HTTPS, but there 
doesn't seem to be a way to revert back to HTTP after the initial excursion.


I'm really getting pissed about this (and feeling more and more stupid 
after each new failed attempt).  Especially since the constraint to mix 
HTTP and HTTPS pages has been forced upon me with the explanation that 
everybody does it due to bad performance of HTTPS, which I'd give my 
right arm if we would ever see in this particular application. :-(


Any other suggestions?  Does anybody use a tapestry-based application in 
which some pages are behind HTTPS while others are HTTP?



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



Re: Tapestry Perm Memory Leak and ThreadLocal

2006-06-18 Thread Henri Dupre

This is very interesting... I don't have any threadlocal in my app but at
every redeployment the memory is increasing. I had a quick look at the
tapestry source code and there is a bunch of ThreadLocal.set(null). But it
seems that in your case, they are not affecting the perm memory?
Where are your tapestry jar files? Are they inside the war or in common?


On 6/13/06, Cliff Zhao [EMAIL PROTECTED] wrote:


I did some tests and the results are very promising.

I use one ThreadLocal variable in my Tapestry application. It took about
4.5MB for every re-deployment from Perm Memory and never went down. After
I
changed the ThreadLocal.set(null) to ThreadLocal.remove(), the Perm Memory
was stablized at 31MB. My theory is WORKING.

I used JBOSS 4.0.4.GA Patch 1 and JDK5.0 Update 7 on Windows XP.

I strongly suggest to use ThreadLocal.remove() instead of
ThreadLocal.set(null).


I think that people will be interested in the findings, so, I send it to
both lists.

Best Regards,
Cliff Zhao

On 6/11/06, Henri Dupre [EMAIL PROTECTED] wrote:

 On 6/11/06, Cliff Zhao [EMAIL PROTECTED] wrote:
 
  Any thoughts?


 In the tomcat faq, they say that this is a classloader issue and cannot
be
 solved.
 Not sure how the threadlocals affect that...

 Thanks,

 Henri.







--
Thanks,

Henri.


Re: 3 field date component

2006-06-18 Thread Henri Dupre

On 6/17/06, Phillip Rhodes [EMAIL PROTECTED] wrote:


I am writing a 3 field date component.  The component allows the user to
select the month/date/year from select boxes for their birth date.

Couple of questions:
1)  Has anyone already created such a component?

2)  Because I have 3 input fields bound to 3 properties in my component,
what would be the interface that gets called when all 3 property values
have been set.  After all the properties are set within the component, I
would like to construct a date object (from the 3 property values) and
set the component date bound parameter with my constructed date.



if you have a submit button in your component, you can set a listener there.
Then set a parameter date for your component. You listener can then retrieve
the 3 values with the properties and compute a date object and set it to
your date parameter...

Thanks,

Henri.


Re: Remove jsessionid from static resources?

2006-06-18 Thread DJ Gredler

Cool, thanks for the info. I'll probably be going the same route. Should our
site get banned, I'll alert the list ;-)

On 6/16/06, Jeff Lubetkin [EMAIL PROTECTED] wrote:


We've noticed no issues, and SEO experts that we've talked to support
this mechanism.  Of course, Google being Google there's no way to know
for sure what they do or don't like...

jeff

-Original Message-
From: DJ Gredler [mailto:[EMAIL PROTECTED]
Sent: Friday, June 16, 2006 4:24 AM
To: Tapestry users
Subject: Re: Remove jsessionid from static resources?

Can you get banned from Google for this? I seem to remember they want to
be
served exactly the same content that a regular useragent would get.
Obviously this isn't the kind of stuff they're trying to avoid... Just
wondering.

On 6/15/06, Jeff Lubetkin [EMAIL PROTECTED] wrote:

 You can prevent JSESSIONID from being encoded onto URLs for bots.  At
 Zillow, we've done this with a ServletFilter that compares the
incoming
 user agent to a list of known bots, and if it matches replaces the
 HttpServletResponse with an HttpServletResponseWrapper that makes the
 encodeURL, encodeUrl, encodeRedirectURL, and encodeRedirectUrl methods
 into no-ops (simply returning their inputs).

 jeff


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




Re: 3 field date component

2006-06-18 Thread hv @ Fashion Content
I would make a new component that contains 3 input fields which bind to a 
single Date value, or I suppose a Calendar value might be better.

Phillip Rhodes [EMAIL PROTECTED] skrev i en meddelelse 
news:[EMAIL PROTECTED]
I am writing a 3 field date component.  The component allows the user to 
select the month/date/year from select boxes for their birth date.

 Couple of questions:
 1)  Has anyone already created such a component?

 2)  Because I have 3 input fields bound to 3 properties in my component, 
 what would be the interface that gets called when all 3 property values 
 have been set.  After all the properties are set within the component, I 
 would like to construct a date object (from the 3 property values) and set 
 the component date bound parameter with my constructed date.

 Thanks so much!


 -
 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]



Re: Setting selected values on Palette

2006-06-18 Thread Gunna Satria
Hi Rui,
  I try to simulate your problem, here is my working code.
Hope there's no miss perception here..
  here is my CustomModel,
   
  import org.apache.tapestry.form.IPropertySelectionModel;
  
public class CustomModel implements IPropertySelectionModel{
private String[] keys = {G,S,H,K};
private String[] values = {Gunna,Satria,Hijrah,Kusumah};
public CustomModel(){

}
/* (non-Javadoc)
 * @see org.apache.tapestry.form.IPropertySelectionModel#getOptionCount()
 */
public int getOptionCount() {
return keys.length;
}
  /* (non-Javadoc)
 * @see org.apache.tapestry.form.IPropertySelectionModel#getOption(int)
 */
public Object getOption(int arg0) {
return keys[arg0];
}
  /* (non-Javadoc)
 * @see org.apache.tapestry.form.IPropertySelectionModel#getLabel(int)
 */
public String getLabel(int arg0) {
return values[arg0];
}
  /* (non-Javadoc)
 * @see org.apache.tapestry.form.IPropertySelectionModel#getValue(int)
 */
public String getValue(int arg0) {
return keys[arg0];
}
  /* (non-Javadoc)
 * @see 
org.apache.tapestry.form.IPropertySelectionModel#translateValue(java.lang.String)
 */
public Object translateValue(String arg0) {
int index = 0;
for (int i = 0; i  keys.length; i++) {
if(arg0.equals(keys[i])){
index = i;
break;
}
}
return values[index];
}
  }
   
  here is my code in page class providing selected list and the model,
   
  public IPropertySelectionModel getModel(){
return new CustomModel();
}

public List getSelected(){
List list = new ArrayList();
list.add(S); //list content is amongs keys array defined in CustomModel
list.add(H);
return list;
}

  the problem is maybe in the content of your selected id list, it is really 
same as in the one you define in the model. In my simple case, selected list 
filled with G,S,H, or K not with Gunna, Satria etc.
   
  cheers,
   
  Gunna
  
Rui Pacheco [EMAIL PROTECTED] wrote:
  I think I'm having problems because I use a custom model for my
PropertySelection and Palette.

I am using a model that has both values and labels, the values being defined
not by the position of the label on the drop down but by an ID that I fetch
from the database.

The content of that model is a type I defined as an interface with getters
and setters for an int and a String,

Now, I tried setting the selected elements of my Palette with both a List of
the inner class that holds the values for my model and a List of models,
each with only one value. Neither worked.

Can anyone help me with this one?

Many thanks,
Rui

On 6/15/06, Schulte Marcus wrote:

 I'll try:

 You have an implementation of IPropertySelectionModel, getOption(int)
 returns some Object from your domain model, say of class A.
 So the model parameter is boud to the IPropertySelectionModel.
 Then you bind the selected parameter to a collection of A (e.g.
 List).

 Now Palette determines whether an object a of class A should be shown on
 the
 selected side of things by testing for something like selected.contains(
 a
 ).

 Therefore, class A must override Object.equals() if you don't work with
 the
 very same instances of A in the IPropertySelectionModel and the
 selected-list.

 To be more specific about this I'd have to know about exactly how your
 selected-List and your IPropertySelectionModel are populated

 hth Marcus

  -Original Message-
  From: Rui Pacheco [mailto:[EMAIL PROTECTED]
  Sent: Thursday, June 15, 2006 1:13 AM
  To: Tapestry users
  Subject: Re: Setting selected values on Palette
 
  Hi Marcus
 
  Could you please explain what do you mean by that?
 
  On 6/14/06, Rui Pacheco wrote:
  
Just be sure that modelObj.equals( selectedObj ) returns
  true when
it
   should.
  
   What do you mean? The object that I pass to the selected parameter
   should be the same as the model? But the documentation mentions a
   List. Should I pass a List of models, then?
  
  
  
   On 6/14/06, Schulte Marcus wrote:
   
You can use any collection of Model-objects (the objects
  which are
returned by getOption(int) from your PropertySelectionModel).
   
Just be sure that modelObj.equals( selectedObj ) returns
  true when
it should.
Marcus
   
 -Original Message-
 From: Rui Pacheco [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 14, 2006 2:05 PM
 To: Tapestry users; Tapestry users
 Subject: Setting selected values on Palette

 My little project moves on. I started with a select
  from which I
 needed to retrieve multiple values, now things have
  changed (damn
 the spec, we don't need no stinkin' specs!) and I ended
  up using a
 Palette.

 Which brings us to my question: I have no problem setting the
 model and retrieving the selected values. But how can I set the

Re: 3 field date component

2006-06-18 Thread Jesse Kuhnert

I would create a client side widget that parses the input field values upon
form submission and turns them into one single input submission, but that's
me..

There are a couple examples of similar things in the current tap4 trunk
(downloadable using maven2 snapshot builds now as well).
http://tapestry.apache.org/tapestry4.1/


On 6/18/06, hv @ Fashion Content [EMAIL PROTECTED] wrote:


I would make a new component that contains 3 input fields which bind to a
single Date value, or I suppose a Calendar value might be better.

Phillip Rhodes [EMAIL PROTECTED] skrev i en meddelelse
news:[EMAIL PROTECTED]
I am writing a 3 field date component.  The component allows the user to
select the month/date/year from select boxes for their birth date.

 Couple of questions:
 1)  Has anyone already created such a component?

 2)  Because I have 3 input fields bound to 3 properties in my component,
 what would be the interface that gets called when all 3 property values
 have been set.  After all the properties are set within the component, I
 would like to construct a date object (from the 3 property values) and
set
 the component date bound parameter with my constructed date.

 Thanks so much!


 -
 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]





--
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.


Re: Any other Tapestry developers in Ottawa?

2006-06-18 Thread Geoff Longman

oops wrong list.

On 6/18/06, Geoff Longman [EMAIL PROTECTED] wrote:

I know a handful, and except in one case I was the person who
introduced all of them to the framework.  But I've never heard a peep
from any others.

Just wondering.

Geoff

--
The Spindle guy. http://spindle.sf.net
Blog:  http://jroller.com/page/glongman
Other interests:  http://www.squidoo.com/spaceelevator/




--
The Spindle guy. http://spindle.sf.net
Blog:  http://jroller.com/page/glongman
Other interests:  http://www.squidoo.com/spaceelevator/

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



Re: Tapestry Perm Memory Leak and ThreadLocal

2006-06-18 Thread Henri Dupre

On 6/18/06, Cliff Zhao [EMAIL PROTECTED] wrote:


Tapestry jar files are in my war files.



That is then surprising... Why would you be affected with your own
ThreadLocal but not the ones from Tapestry and Hivemind (none of them are
calling ThreadLocal.remove())?

Thanks,

Henri.


Re: 3 field date component

2006-06-18 Thread Henri Dupre

On 6/18/06, Jesse Kuhnert [EMAIL PROTECTED] wrote:


I would create a client side widget that parses the input field values
upon
form submission and turns them into one single input submission, but
that's
me..



Can that be done in 4.1 without a single line of javascript?
I'm very alergic to javascript :P

Thanks,

Henri.