Hi Tero,
I'm afraid properties are strings (actually, XML fragments) because this is defined in the WebDav specifications, of which Slide is an implementation. Also the entire WebDav protocol provides only String exchange, and provides propfind methods based on strings. Anyway, you can put an Integer or a Long or any other type of data simply "casting" it to a string :


int a = 55;
resource.proppatchMethod(new PropertyName("http://mysite.com/namespace";, "myproperty"), Integer.toString(a)); // or even a + ""


Integer a = new Integer(55);
resource.proppatchMethod(new PropertyName("http://mysite.com/namespace";, "myproperty"), a.toString());
// The toString() call is even superfluous in this case, javac should do this automatically.


If you need to serialize an entire object inside a property (consider it should be a SMALL object) you can use common serialization encoding it in a textual way (say, Base64) or consider using XMLEncoder from the java.beans package ... with XMLEncoder and XMLDecoder as long as your object graph is composed of regular beans (empty constructor, getters and setters) they can be automagically transformed to XML text and back to objects, ready to be stored in a property.

Ciao,
Simone Gianni





At 15.53 24/05/2004, you wrote:
Looks like PropPatchMethod is not supporting setting
datatypes on the properties to be set, thus limiting
me to setting String type properties only.

Since my project absolutely requires support for other
data types on the client side, I'm in wee bit of trouble.

Before I go ahead and extend Slide (PropPatchMethod and
XMLPrinter from what I can gather) to support this, has
anyone done this already?

                                -TPP



**********************************************************************
CONFIDENTIALITY: This e-mail is confidential and/or legally privileged and is intended only for the use of the individual or entity named herein. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or the taking of any action in reliance on the contents of this e-mail is strictly prohibited. In this regard, if you have received this e-mail in error, please notify us by reply e-mail immediately and then delete this message from your system.


Thank you for your cooperation.

**********************************************************************


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



Reply via email to