Re: Enctype + CachingURI Coplet

2005-03-11 Thread Philippe Guillard
Hi,
I startedthis thread before without success, here i try to describe it 
better : i still can't use the upload widget in a cachingURI coplet of 
the portal. (I'm in 2.1.6Release)
When i submit the form i get back with the same form and loose my 
inputs.  I seems to me there is a problem handling other form attributes 
like cocoon-portal-event as soon as i introduce the enctype attribute.

Hope somebody can help. Below some details.
Regards,
Phil
In my CForm template :
__
ft:form-template action= method=POST enctype=multipart/form-data
 ft:continuation-id/
Before i made it work (was on a 2.1.5 cvs before 2.1.5rls)  :
_
form xmlns:coplet=http://apache.org/cocoon/portal/coplet/1.0; 
method=POST enctype=multipart/form-data onsubmit=forms_onsubmit(); 
 action=portal
input type=hidden name=cocoon-portal-event value=13input 
type=hidden name=cocoon-portal-action value=4
input name=forms_submit_id type=hidden
input value=8554468513292720183b3511558b4372455a4727 type=hidden 
name=continuation-id 

Now on rls2.1.6  (and maybe something i did wrong...)
___
form xmlns:coplet=http://apache.org/cocoon/portal/coplet/1.0; 
method=POST enctype=multipart/form-data onsubmit=forms_onsubmit(); 
 action=portal?cocoon-portal-event=3page=group.Profile
input name=forms_submit_id type=hidden
input value=1d811e2d7b1d01456276098053273c3f61413582 type=hidden 
name=continuation-id

If i remove enctype attribute i get the things look better to me:
_
form xmlns:coplet=http://apache.org/cocoon/portal/coplet/1.0; 
method=POST onsubmit=forms_onsubmit();  action=portal
input type=hidden name=cocoon-portal-event value=3input 
type=hidden name=page value=group.Profile
input name=forms_submit_id type=hidden
input value=8b851d7e3a153157001c7d295a8d534f38417322 type=hidden 
name=continuation-id



Philippe Guillard wrote:
It seems Revision *27956* 
http://svn.apache.org/viewcvs.cgi?rev=27956view=rev was fixing the 
enctype problem, this was removed in Revision *28123* 
http://svn.apache.org/viewcvs.cgi?rev=28123view=rev  to handle more 
generally attributes. I builded with last revision ( Revision *122957* 
http://svn.apache.org/viewcvs.cgi?rev=122957view=rev), adding :
final String encType = attributes.getValue(enctype);
  if ( encType != null ) {
  newAttributes.addCDATAAttribute(enctype, encType);
  }
Now i get the continuation but form.lookupWidget(upload).getValue() 
seems always null. At the same time i discovered the file uploaded is 
only available in the same pipeline.
Any advice welcomed !

Phil
Philippe Guillard wrote:
Hi,
I know that portal-html-eventlink doesn't delete enctype attribute 
anymore (http://issues.apache.org/bugzilla/show_bug.cgi?id=28095)
Anyway i can't make my upload form work anymore in a cachingURI 
coplet, cocoon2.1.6, (I updated HTMLEventLinkTransformer.java to last 
revision 122957 that i found.)

I get visually no continuation and the form is submitted again, 
loosing my input.
The point is, when i suppress the part 'enctype=multipart/form-data 
', i have continuation ok!!

My Template

ft:form-template action= method=POST enctype=multipart/form-data
ft:continuation-id/
(tried also  ft:form-template action=#{$continuation/id}.continue 
method=POST enctype=multipart/form-data with stemap equivalent)


Rendered html, that seems ok to me

form xmlns:coplet=http://apache.org/cocoon/portal/coplet/1.0; 
method=POST onsubmit=forms_onsubmit();  action=portal
input type=hidden name=cocoon-portal-event value=3input 
type=hidden name=page value=group.Photos
input name=forms_submit_id type=hidden
input value=471a230555871e150852245c031e67725c6e406c type=hidden 
name=continuation-id

Anybody any idea ??
Regards,
Phil






Re: Enctype + CachingURI Coplet

2005-02-23 Thread Philippe Guillard
It seems Revision *27956* 
http://svn.apache.org/viewcvs.cgi?rev=27956view=rev was fixing the 
enctype problem, this was removed in Revision *28123* 
http://svn.apache.org/viewcvs.cgi?rev=28123view=rev  to handle more 
generally attributes. I builded with last revision ( Revision *122957* 
http://svn.apache.org/viewcvs.cgi?rev=122957view=rev), adding :
final String encType = attributes.getValue(enctype);
  if ( encType != null ) {
  newAttributes.addCDATAAttribute(enctype, encType);
  }
Now i get the continuation but form.lookupWidget(upload).getValue() 
seems always null. At the same time i discovered the file uploaded is 
only available in the same pipeline.
Any advice welcomed !

Phil
Philippe Guillard wrote:
Hi,
I know that portal-html-eventlink doesn't delete enctype attribute 
anymore (http://issues.apache.org/bugzilla/show_bug.cgi?id=28095)
Anyway i can't make my upload form work anymore in a cachingURI 
coplet, cocoon2.1.6, (I updated HTMLEventLinkTransformer.java to last 
revision 122957 that i found.)

I get visually no continuation and the form is submitted again, 
loosing my input.
The point is, when i suppress the part 'enctype=multipart/form-data 
', i have continuation ok!!

My Template

ft:form-template action= method=POST enctype=multipart/form-data
ft:continuation-id/
(tried also  ft:form-template action=#{$continuation/id}.continue 
method=POST enctype=multipart/form-data with stemap equivalent)


Rendered html, that seems ok to me

form xmlns:coplet=http://apache.org/cocoon/portal/coplet/1.0; 
method=POST onsubmit=forms_onsubmit();  action=portal
input type=hidden name=cocoon-portal-event value=3input 
type=hidden name=page value=group.Photos
input name=forms_submit_id type=hidden
input value=471a230555871e150852245c031e67725c6e406c type=hidden 
name=continuation-id

Anybody any idea ??
Regards,
Phil