[jira] Closed: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-05-06 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=all ] Nacho G. Mac Dowell closed JAXME-47: Applied patch on HEAD and v0_4. > When using default values initialization of vars doesn't work for a

[jira] Resolved: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-05-06 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=all ] Nacho G. Mac Dowell resolved JAXME-47: -- Resolution: Fixed Fix Version: current (nightly) Applied patch on HEAD and v0_4 20050417. > When using default values initialization

[jira] Updated: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-04-26 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=all ] Nacho G. Mac Dowell updated JAXME-47: - Attachment: defaultValues.patch Patch for default values handling. > When using default values initialization of vars doesn't work for a

Re: JAXME-47

2005-04-19 Thread Jochen Wiedmann
On 4/19/05, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Hi Jochen, I was having some trouble with the default-value thing. The > problem arises when default value handling fails (not parseable). > Currently a SAXException is thrown, the problem is that it uses the > following expression: > >

Re: JAXME-47

2005-04-19 Thread Nacho G. Mac Dowell
Hi Jochen, I was having some trouble with the default-value thing. The problem arises when default value handling fails (not parseable). Currently a SAXException is thrown, the problem is that it uses the following expression: throw new LocSAXException( "Failed to convert str

Re: JAXME-47

2005-04-12 Thread Jochen Wiedmann
On Apr 12, 2005 10:51 AM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Anyway I think I know now enough about the issue to tackle it: All > SimpleTypeSG should provide the correct getCastFromString and > getXMLField should use this. right? Exactly. -- Outside of a dog, a book is man's best

Re: JAXME-47

2005-04-12 Thread Nacho G. Mac Dowell
primitive into an object } jm.addLine(field, ".add(", value, ");"); I am, of course, simplifying a little bit. For example, because the Unmarshaller doesn't access the internal list. However, in general that's how things look. Ok. I understand. As for JAXME-

Re: JAXME-47

2005-04-12 Thread Jochen Wiedmann
cause the user may supply his own. > Sorry if I'm asking too many questions, it's just that I'd like to see > this feature done (plus help on this release ;-) ). I'm glad you're asking. :-) As for JAXME-47, I would think that it can be solved by implementing UnionT

Re: JAXME-47

2005-04-12 Thread Nacho G. Mac Dowell
Jochen Wiedmann wrote: On Apr 12, 2005 8:51 AM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: The issue here is how Enumerations handle this: they expect TypedValue to do the conversion. TypedValue was introduced recently and is not used by the enumerations. class EnumerationSG public

Re: JAXME-47

2005-04-11 Thread Jochen Wiedmann
On Apr 12, 2005 8:51 AM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > The issue here is how Enumerations handle this: they expect TypedValue > to do the conversion. TypedValue was introduced recently and is not used by the enumerations. Besides, TypedValue should be generally treated as an o

Re: JAXME-47

2005-04-11 Thread Nacho G. Mac Dowell
Jochen Wiedmann wrote: The only points I dislike with your solution is, that you'd defer the use of the DatatypeConverter to compile time. Whereever possible, the DatatypeConverter should be used at generation time. I do not know, if this is currently always the case. However, it is the case (for e

Re: JAXME-47

2005-04-11 Thread Jochen Wiedmann
Hi, Nacho, On Apr 11, 2005 2:22 PM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Now it is the point where you might not like this solution. It is that > all TypeSG would have to use AtomicTypeSG's getCastFromString. That is > IntegerSG, ShortSG, ... I have no problem, if you generalize the

Re: JAXME-47

2005-04-11 Thread Nacho G. Mac Dowell
Hi Jochen, after playing around with default values for a while, I have a couple of suggestions. The JAXB spec. says that data type conversions should be made through the static methods of DatatypeConverter. The method getCastFromString in AtomicTypeSGImpl is actually creating an instance of Da

Re: JAXME-47

2005-04-11 Thread Jochen Wiedmann
On Apr 11, 2005 1:18 PM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Jochen Wiedmann wrote: > Yes, but If I didn't get it wrong the return type of > > SimpleTypeSG.getCastFromString(String) > > is TypedValue. The question is how to pass it to the JS framework in > JAXBType.getXMLField(...)

Re: JAXME-47

2005-04-11 Thread Nacho G. Mac Dowell
Jochen Wiedmann wrote: No, it is use of SimpleTypeSG.getCastFromString(String) In the case of the union type, you'd have to use that method for any type in the union. The default value is invalid, if all throw an exception. Yes, but If I didn't get it wrong the return type of SimpleTypeSG.get

Re: JAXME-47

2005-04-11 Thread Jochen Wiedmann
On Apr 11, 2005 12:53 PM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Would this be TypedValueImpl? I've noticed this may do exactly whay I am > trying, the thing is I don't know how to pass it to JS. :-[ No, it is use of SimpleTypeSG.getCastFromString(String) In the case of the union

Re: JAXME-47

2005-04-11 Thread Nacho G. Mac Dowell
Jochen Wiedmann wrote: in that particular case, I'd beg you not to commit, but to attach your patch to the issue. See http://issues.apache.org/jira/browse/JAXME-47#action_57622 for the reason why: I believe that most of what you have done is already in place at a different point of the

Re: JAXME-47

2005-04-11 Thread Jochen Wiedmann
Hi, Nacho, On Apr 11, 2005 11:04 AM, Nacho G. Mac Dowell <[EMAIL PROTECTED]> wrote: > Hi Jochen, I was about to commit the changes for #JAXME-47 and I had a > couple of questions: in that particular case, I'd beg you not to commit, but to attach your patch to th

JAXME-47

2005-04-11 Thread Nacho G. Mac Dowell
Hi Jochen, I was about to commit the changes for #JAXME-47 and I had a couple of questions: 1. I created a DataTypeConverterUtil with some methods for retreiving the correct default value for a type. The thing is that the "natural" place for this would be jaxbapi, but since this

[jira] Commented: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-01-18 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=comments#action_57715 ] Nacho G. Mac Dowell commented on JAXME-47: -- I noticed that the example I used for describing this bug still doesn't compile properly because of the hexBinary

[jira] Commented: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-01-18 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=comments#action_57714 ] Nacho G. Mac Dowell commented on JAXME-47: -- If we make use of DataTypeConverter then we could easily provide a utility class that would gives us a String

[jira] Commented: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-01-14 Thread Jochen Wiedmann (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=comments#action_57622 ] Jochen Wiedmann commented on JAXME-47: -- This is how a union converts a string at runtime: For any possible type, in the order specified by the schema, it attempts to

[jira] Created: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-01-14 Thread Nacho G. Mac Dowell (JIRA)
When using default values initialization of vars doesn't work for all types --- Key: JAXME-47 URL: http://issues.apache.org/jira/browse/JAXME-47 Project: JaxMe Type: Bug Components: JaxMe

[jira] Commented: (JAXME-47) When using default values initialization of vars doesn't work for all types

2005-01-14 Thread Nacho G. Mac Dowell (JIRA)
[ http://issues.apache.org/jira/browse/JAXME-47?page=comments#action_57621 ] Nacho G. Mac Dowell commented on JAXME-47: -- This error can be solved adding a few more cases to getXMLField when it is a simpleType (I forgot to add this in the bug