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="13"><input 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=3&page=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="3"><input 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=27956&view=rev> was fixing the enctype problem, this was removed in Revision *28123* <http://svn.apache.org/viewcvs.cgi?rev=28123&view=rev> to handle more generally attributes. I builded with last revision ( Revision *122957* <http://svn.apache.org/viewcvs.cgi?rev=122957&view=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="3"><input 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








Reply via email to