Re: WOFileUpload with UTF-8 forms

2007-01-17 Thread Helmut Schottmüller
I seems that there is one more pitfall. When I tested my WOFileUpload  
script on another computer, it had some strange behaviour. The data  
and filePath bindings have not been stored after form submissions.  
The data binding was filled with an empty NSData object instead of  
null when nothing was selected...

I got this working correctly when I added

- WOUseLegacyMultipartParser true

as launch parameter.

Regards,

Helmut

Am 16.01.2007 um 10:38 schrieb Helmut Schottmüller:


Hi Matt,

you can find a solution in an older posting of Chuck Hill (http:// 
www.wodeveloper.com/omniLists/webobjects-dev/2003/September/ 
msg00455.html).

In short:

1. overwrite takeValuesFromRequest in your multipart form component:

	public void takeValuesFromRequest(WORequest aRequest, WOContext  
aContext)

{
		aRequest.setDefaultFormValueEncoding 
( _NSUtilities.UTF8StringEncoding );

super.takeValuesFromRequest(aRequest, aContext);
}

2. overwrite the createRequest method in Application

public WORequest createRequest(String aMethod, String aURL,
String anHTTPVersion, NSDictionary someHeaders, NSData 
aContent,
NSDictionary someInfo)
{
		WORequest newRequest = super.createRequest(aMethod, aURL,  
anHTTPVersion,

someHeaders, aContent, someInfo);
		newRequest.setDefaultFormValueEncoding 
(_NSUtilities.UTF8StringEncoding);

return newRequest;
}

he also used the following overwrite in Application:

public WOResponse dispatchRequest(WORequest request)
{
WOResponse response = super.dispatchRequest(request);

String contentType = response.headerForKey(content-type);
		if ((contentType == null) || (contentType.toLowerCase().indexOf 
(text/html)  -1))

{

response.setContentEncoding(_NSUtilities.UTF8StringEncoding);
			response.setHeader(text/html; charset=UTF-8; encoding=UTF-8,  
content-type);

}
return response;
}

This should do it. It works fine in my projects.
For more detailed information, please refer to Chucks original post.





smime.p7s
Description: S/MIME cryptographic signature
 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Perform Parent Action from within a WORepetition in the subcomponent

2007-01-17 Thread Seabix GmbH - Th. Kramis
Is it possible to do the following? How?

ParentComponent - Parent.wo
ChildComponent - Child.wo

There is a WORepetiotion in Child.woa with a bunch of String values. So the
WORepetition is bound to the NSArray listValues and to the String value.

No i wan't to give the value of each iteration up to the parent where an
action (public String modifyChildValue()) is performed and the return value
will show up next to the original value in the WORepetition (in Child.wo).
The Result would be something like this:

Value1   - Value1ModifiedByParent
Value2  - Value2ModifiedByParent
Value3 - Value3ModifiedByParent


Can anyone help me on this?

Thanks.


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


WebServices Material on Wiki

2007-01-17 Thread Andrew Lindesay

Hello;

I am phasing out some WebServices / AXIS material from my framework,  
but would like to make sure the content is not lost so I have written  
up a few notes on the wiki.  Here is a brief summary in case this is  
of use to anybody...


1) Controlling WSDL Service Location

This covers how to modify the out-bound WSDL from a WOA, and in  
particular for servlet deployment.


2) Controlling Enterprise Object Serialisation

This covers how to control how much of the EO graph ends up getting  
serialised on responses from invocations.


3) Integration with WebServicesCore on MacOS-X

Covers off two resolved issues with MacOS-X WebServicesCore  
interoperability.


4) Working With Temporary GlobalIDs

My failed attempt to serialise/deserialise temporary GID's in  
WebServices.  This may be a good starting point for anybody else  
wanting to do this stuff and may also provide a good starting point  
for anybody wanting to write a custom serialiser/deserialiser.


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


OPENBASE and Deadlocks

2007-01-17 Thread Andrew Lindesay

Hello;

I'm not sure if I mentioned this before, but one of my projects was  
having deadlock problems with high-volume writes out of a WOA into  
OPENBASE.  I developed a subclassed adaptor for this -- so if anybody  
is interested in this, I put something in the wiki about it...


	http://en.wikibooks.org/wiki/Programming:WebObjects/ 
Database_Compatibility_and_Comparisons/OpenBase#Deadlocks


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


Re: OPENBASE and Deadlocks

2007-01-17 Thread Scott Keith

Hi Andrew,

I think I understand now.  So I think you are saying that OpenBase is  
detecting a deadlock and aborting a transaction, right? The solution  
you have posted on this page will work fine.  You could also resave  
the transaction.


I've made a small edit to the wiki to make it more clear that we are  
talking about the problem of aborting transactions to avoid deadlocks  
rather than a deadlocked server.  Please let me know if I have  
misunderstood.  Thanks.


Best regards,

Scott Keith
OpenBase




On Jan 17, 2007, at 11:31 PM, Andrew Lindesay wrote:


Hello;

I'm not sure if I mentioned this before, but one of my projects was  
having deadlock problems with high-volume writes out of a WOA into  
OPENBASE.  I developed a subclassed adaptor for this -- so if  
anybody is interested in this, I put something in the wiki about it...


	http://en.wikibooks.org/wiki/Programming:WebObjects/ 
Database_Compatibility_and_Comparisons/OpenBase#Deadlocks


cheers.

___
Andrew Lindesay
www.lindesay.co.nz





___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com


RE: OPENBASE and Deadlocks - follow-up

2007-01-17 Thread Andrew Lindesay

Hello again;

I'm not sure if I mentioned this before, but one of my projects was  
having deadlock problems with high-volume writes out of a WOA into  
OPENBASE.  I developed a subclassed adaptor for this -- so if  
anybody is interested in this, I put something in the wiki about it...


I just want to follow up this post by adding that the behavior  
exhibited by the OPENBASE product is 100% correct -- this is not an  
issue with the database server.  This is a database client-end  
solution that integrates with WebObjects applications for  
specifically solving this issue in the development of WebObjects  
applications.


cheers.

___
Andrew Lindesay
www.lindesay.co.nz



___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com