Has disabled been removed as component parameter to textfield ? 2011/11/27 Chris Poulsen <mailingl...@nesluop.dk>
> It sounds like you are using the "disabled" attribute instead of the > "readonly" attribute - but it is hard to tell without seeing the code. > > Some random google result on the difference between the two: > http://www.htmlcodetutorial.com/forms/_INPUT_DISABLED.html > > -- > Chris > > On Sun, Nov 27, 2011 at 2:54 PM, Gunnar Eketrapp > <gunnar.eketr...@gmail.com>wrote: > > > Hi! > > > > Now I also noticed that my contact form does not work with 5.3. > > > > It is a really simple page with a form containing an email textfield, a > > title textfield plus a message textarea. > > > > When a user is logged in I disable editing of the email textfield but > still > > uses the value when the mail is sent. > > > > With 5.3 I get no email value back ... > > > > Have I missed something completely with 5.3 and forms !? > > > > Thank in advance, > > Gunnar Eketrapp > > > > > > 2011/11/27 Gunnar Eketrapp <gunnar.eketr...@gmail.com> > > > > > Hi! > > > > > > This morning i decided to step up to 5.3. > > > > > > I noticed that 5.3 is stricter and some of my pages did not work due to > > > the fact that > > > there where event methods with no corresponding template component. So > I > > > had to > > > do some cleanup but that I like ! I was also one of the few that had > used > > > @PageDetached :-) > > > > > > Now I encountered another problem that at the first sight could not be > > > seen among the breaking > > > changes listing in http://tapestry.apache.org/release-notes-53.html > > > > > > A textfield that is using a none standard type raises an exception. > > > > > > Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: > > > Failure reading parameter 'translate' of component > > > economy/EditTransaction:date: java.lang.NullPointerException > > > at > > > > > > org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:259) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:372) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.corelib.base.AbstractTextField.getfieldvalue_translate(AbstractTextField.java) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.corelib.base.AbstractTextField.begin(AbstractTextField.java:159) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.corelib.base.AbstractTextField.beginRender(AbstractTextField.java) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:202) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:143) > > > ~[tapestry-core-5.3.jar:na] > > > ... 82 common frames omitted > > > Caused by: java.lang.NullPointerException: null > > > at > > > java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) > > > ~[na:1.6.0_22] > > > at > > > > > > org.apache.tapestry5.ioc.util.AbstractMessages.getFormatter(AbstractMessages.java:67) > > > ~[tapestry-ioc-5.3.jar:na] > > > at $Messages_531628bb891f.getFormatter(Unknown Source) ~[na:na] > > > at $Messages_531628bb899c.getFormatter(Unknown Source) ~[na:na] > > > at > > > > > > org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.findFormatter(FieldTranslatorSourceImpl.java:129) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createTranslator(FieldTranslatorSourceImpl.java:93) > > > ~[tapestry-core-5.3.jar:na] > > > at > > > > > > org.apache.tapestry5.internal.services.FieldTranslatorSourceImpl.createDefaultTranslator(FieldTranslatorSourceImpl.java:74) > > > ~[tapestry-core-5.3.jar:na] > > > > > > > > > To get my user types to function in textfield's I have added the > > following > > > in my module config class which worked in 5.2 > > > > > > public static void > > > contributeTranslatorSource(MappedConfiguration<Class<?>, Translator<?>> > > > configuration) { > > > configuration.add(EmailAddress.class, new EmailTranslator()); > > > configuration.add(Money.class, new MoneyTranslator()); > > > configuration.add(Percentage.class, new > PercentageTranslator()); > > > configuration.add(UTDate.class, new UTDateTranslator()); > > > } > > > > > > Thanks in advance!!! > > > Gunnar Eketrapp > > > (Note: Stockholm in november is as made for hacking ...) > > > > > > > > > > > -- > > [Hem: 08-715 59 57, Mobil: 070-991 86 42] > > Allévägen 2A, 132 42 Saltsjö-Boo > > > -- [Hem: 08-715 59 57, Mobil: 070-991 86 42] Allévägen 2A, 132 42 Saltsjö-Boo