Hi,
I have a component with two WebDateInputFields. When selecting either date I want to update the whole component. If I do: e registerId. endDateInput := WebDateInputField new aspect: #tst for: observee. endDateInput onChangePostAndUpdate: e. it works once and then doesn't react on clicking on the calendars any more. If I do: endDateInput onChangePostAndUpdate: e id. I get a debugger. If I move the e registerID and onChangePostAndUpdate: e id. just before the end of the method like in ...V2.st I don't get the debugger. Firebug shows, that after the first date selection e retains its ID but the ajax.updater tries to update a different ID now. What's my problem here? Thanks, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida ![]() ![]() ![]() |
Hi Herbert,
I would start inspecting this problem by extending the existing calendar demo in Aida (WebDemoApp>>viewCalendar). Then we'll have sthe ame base to inspect it together. Best regards Janko Herbert König pravi: > Hi, > > I have a component with two WebDateInputFields. When selecting either > date I want to update the whole component. If I do: > > e registerId. > endDateInput := WebDateInputField new aspect: #tst for: observee. > endDateInput onChangePostAndUpdate: e. > > it works once and then doesn't react on clicking on the calendars any > more. > > If I do: > > endDateInput onChangePostAndUpdate: e id. > > I get a debugger. > > If I move the e registerID and onChangePostAndUpdate: e id. just > before the end of the method like in ...V2.st I don't get the > debugger. > > Firebug shows, that after the first date selection e retains its ID > but the ajax.updater tries to update a different ID now. > > What's my problem here? > > Thanks, > > Herbert mailto:[hidden email] > > > ------------------------------------------------------------------------ > > _______________________________________________ > Aida mailing list > [hidden email] > http://lists.aidaweb.si/mailman/listinfo/aida -- Janko Mivšek Svetovalec za informatiko Eranova d.o.o. Ljubljana, Slovenija www.eranova.si tel: 01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565 _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Hi Janko,
JM> I would start inspecting this problem by extending the existing calendar JM> demo in Aida (WebDemoApp>>viewCalendar). Then we'll have sthe ame base JM> to inspect it together. ok let me do it in steps and write it down while I do it. .... an hour with lots of head scratching .... Well no, this gave me a headache as I couldn't reproduce it until I noticed I had to change the month in the calendar by a click on the <. So finally the steps: 1- Make the calendar into a component: viewCalendarComponent | e | e := WebElement new. e addDateInputFieldAspect: #date for: self observee. e addBreak. ^e and use it: viewCalendar | e | e := WebElement new. e addTextH1: #en->'Date input with Javascript Calendar example'. e addBreak. e add: self viewCalendarComponent . self pageFrameWith: e title: 'Calendar example' Everything keeps working. 2- stick the WebDateInputField into a local variable so we can send it messages later on. viewCalendarComponent | e startDate | e := WebElement new. startDate := WebDateInputField new aspect: #date for: self observee. e add: startDate. e addBreak; newRow. ^e All ok. 3- Now make the calendar update the component. viewCalendarComponent | e startDate | e := WebElement new. startDate := WebDateInputField new aspect: #date for: self observee. e add: startDate. e addBreak; newRow. e registerId. startDate onChangePostAndUpdate: e id. ^e In this case everything seems fine unless you change the month by using < or >. Then case the calendar just doesn't vanish and you have to refresh the page. BTW it first worked when sending ..andUpdate e instead of ..andUpdate e id. Now I can't reproduce that. Cheers, Herbert mailto:[hidden email] _______________________________________________ Aida mailing list [hidden email] http://lists.aidaweb.si/mailman/listinfo/aida |
Free forum by Nabble | Edit this page |