You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Zied Hamdi <ja...@gmail.com> on 2007/12/13 09:55:28 UTC

[Tomahawk] [tobago] Schedule throws a js exception on entry selection

Hi All,

I have entred this problem earlier when I was in time evalution phasis.
Today I'm concretely in dev mode and I don't have any solution (I was
thinking ti was because of the context : tobago layouting etc.., so I
simplified to the basis): here's my page it's the same one as in the
tomahawk examples 1:


<html>

<body>

<f:view

      xmlns="http://www.w3.org/1999/xhtml"

      xmlns:t="http://myfaces.apache.org/tomahawk"

      xmlns:tc="http://myfaces.apache.org/tobago/component"

      xmlns:tx="http://myfaces.apache.org/tobago/extension"

      xmlns:h="http://java.sun.com/jsf/html"

      xmlns:f="http://java.sun.com/jsf/core">

      <h:form>

            <!--  The schedule itself -->

            <div style="position: absolute; left: 220px; top: 5px; right:
5px;"><t:schedule

                  value="#{contractCtrl.scheduleModel.model}"

                  id="schedule1"

                  rendered="true"

                  visibleEndHour="18"

                  visibleStartHour="8"

                  workingEndHour="17"

                  workingStartHour="9"

                  readonly="false"

                  theme="evolution"

                  tooltip="true" /></div>

      </h:form>

</f:view>

</body>

</html>


It doesn't use anything more than facelets. What I receive is
Erreur : document.forms[formId] has no properties
Fichier source :
http://localhost:8080/IntoServicesWeb/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11975349/schedule.HtmlSchedule/javascript/schedule.js
Ligne : 33

I have the tomahawk example app myfaces-example-simple-1.1.7-SNAPSHOT.war
running on the same server without problems, so I think the only difference
is the WEB-INF/lib directory: here's my app contents:
02/10/2006  20:03            63ÿ966 avalon-framework-4.1.3.jar
03/09/2007  17:05            48ÿ742 common-annotations.jar
20/09/2006  17:30           188ÿ671 commons-beanutils-1.7.0.jar
04/09/2007  14:21           188ÿ671 commons-beanutils.jar
15/11/2006  10:16            46ÿ725 commons-codec-1.3.jar
20/09/2006  17:30           559ÿ366 commons-collections-3.1.jar
04/09/2007  14:21           559ÿ366 commons-collections.jar
20/09/2006  17:30           139ÿ966 commons-digester-1.7.jar
04/09/2007  14:21           139ÿ966 commons-digester.jar
31/12/2006  17:01           112ÿ341 commons-el-1.0.jar
25/01/2007  18:36            31ÿ909 commons-fileupload-1.1.1.jar
20/09/2006  17:35            61ÿ562 commons-io-1.1.jar
20/09/2006  17:30           207ÿ723 commons-lang-2.1.jar
20/09/2006  18:35            52ÿ915 commons-logging-1.1.jar
16/06/2007  23:10            72ÿ009 el-impl-1.0.jar
13/12/2007  09:49                 0 info.txt
18/12/2006  22:05           298ÿ368 jsf-facelets.jar
03/09/2007  17:05            30ÿ483 jsf-tlds.jar
13/03/2007  17:03           367ÿ444 log4j-1.2.14.jar
02/10/2006  20:03            72ÿ150 logkit-1.0.1.jar
16/06/2007  23:10             6ÿ882 maven-repository-importer-1.1.jar
19/10/2007  06:30           577ÿ125 tobago-core-1.0.12.jar
07/10/2007  01:25            62ÿ217 tobago-facelets-1.0.12-SNAPSHOT.jar
07/10/2007  01:25            10ÿ728 tobago-fileupload-1.0.12-SNAPSHOT.jar
19/10/2007  06:59            12ÿ540 tobago-theme-charlotteville-1.0.12.jar
19/10/2007  06:56            35ÿ458 tobago-theme-richmond-1.0.12.jar
19/10/2007  06:45           254ÿ130 tobago-theme-scarborough-1.0.12.jar
19/10/2007  06:51            60ÿ566 tobago-theme-speyside-1.0.12.jar
19/10/2007  06:39            84ÿ940 tobago-theme-standard-1.0.12.jar
06/11/2007  13:44         2ÿ962ÿ674 tomahawk-1.1.7-SNAPSHOT.jar
02/10/2007  14:23             9ÿ376 tomahawk-facelets-1.1.6.jar

I don't have anything special in my conf files.

Please if anyone has noticed an analogous problem, any hints will be greatly
appreciated.

Thanks,
Zied

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Volker Weber <v....@inexso.de>.
Hi,

try replace this function with

function fireEntrySelected(formId, scheduleId, entryId) {
        var form = document.forms[formId];
        if (form.tagName != "FORM") {
            form = document.forms[formId + "::form"];
        }
	form[scheduleId].value = entryId;
	form.submit();
	return true;
}

this MAY work.


Regards,
    Volker


2007/12/13, Zied Hamdi <ja...@gmail.com>:
> Hi Volker,
>
> I don't know if you have tested my page, in case not, this is the definition
> of the js method that fails on entry selection:
>
> function fireEntrySelected(formId, scheduleId, entryId) {
>  document.forms[formId][scheduleId].value = entryId;
>  document.forms[formId].submit();
>  return true;
> }
> Regrads,
>
>
> 2007/12/13, Zied Hamdi <ja...@gmail.com>:
> >
> >
> > Hi Volker,
> >
> > Thank you for your fast reply. I'm sorry the preceding mail was against
> another source code (as in my app).
> >
> > But what I noticed is that, because tc:page creates a form alone, the form
> id is always "pageId::form"
> >
> > The tomahawk schedule seams to search for a form with the same name as
> pageId when no explicit form is specified:
> >
> >
> >
> > < tc:page
> >
> >       xmlns= " http://www.w3.org/1999/xhtml"
> >
> >       xmlns:t= " http://myfaces.apache.org/tomahawk"
> >
> >       xmlns:tc= "
> http://myfaces.apache.org/tobago/component"
> >
> >       xmlns:tx= "
> http://myfaces.apache.org/tobago/extension"
> >
> >       xmlns:h= " http://java.sun.com/jsf/html"
> >
> >       xmlns:f= " http://java.sun.com/jsf/core"
> >
> >       id = "root">
> >
> >       <!--  The schedule itself -->
> >
> >       < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" ><t:schedule
> >
> >             value ="#{contractCtrl.scheduleModel.model}"
> >
> >             id ="schedule1"
> >
> >             rendered ="true"
> >
> >             visibleEndHour ="18"
> >
> >             visibleStartHour ="8"
> >
> >             workingEndHour ="17"
> >
> >             workingStartHour ="9"
> >
> >             readonly ="false"
> >
> >             theme ="evolution"
> >
> >             tooltip = "true" /></div >
> >
> > </ tc:page>
> >
> >
> >
> > Outputs this snippet:
> >
> >
> >
> >       < form
> >
> >             name ="root::form"
> >
> >             action ="/IntoServicesWeb/test/schedule.jsf"
> >
> >             id ="root::form"
> >
> >             method ="post"
> >
> >             accept-charset ="utf-8" >< input
> >
> >             type ="hidden"
> >
> >             name ="root::form-action"
> >
> >             id ="root::form-action"
> >
> >             value ="" >
> >
> >       < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" ><input
> >
> >             type ="hidden"
> >
> >             name ="root:schedule1" >< input
> >
> >             type ="hidden"
> >
> >             name ="root:schedule1_last_clicked_date" ><
> input
> >
> >             type = "hidden"
> >
> >             name= "root:schedule1_last_clicked_y" >
> >
> >       <div
> >
> >             class= "schedule-compact-evolution"
> >
> >             style= "border-style: none; overflow: hidden;" >
> >
> >       < table
> >
> >             class ="month"
> >
> >             style ="position: relative; left: 0px; top: 0px; width: 100%;"
> >
> >             cellpadding ="0"
> >
> >             cellspacing ="1"
> >
> >             border ="0"
> >
> >             width ="100%" >
> >
> >             < tbody>
> >
> >                   < tr>
> >
> >                         < td
> >
> >                              rowspan ="2"
> >
> >                              class ="inactive-day workday"
> >
> >                              style ="height: 121px; width: 16.666666%;" >
> >
> >                         < table
> >
> >                              class ="day"
> >
> >                              style ="height: 121px; width: 100%;"
> >
> >                              cellpadding ="0"
> >
> >                              cellspacing ="0" >
> >
> >                              < tr>
> >
> >                                    < td
> >
> >                                          class ="header"
> >
> >                                          style ="height:
> 18px; width: 100%; overflow: hidden"
> >
> >                                          id
> ="root:schedule1_header_20071126" > 26 nov. 2007 </td >
> >
> >                              </ tr>
> >
> >                              < tr>
> >
> >                                    < td
> >
> >                                          class ="content"
> >
> >                                          style ="height:
> 103px; width: 100%;" >
> >
> >                                    < div
> >
> >                                          class
> ="contentview"
> >
> >                                          style ="width:
> 100%; height: 100%; overflow: auto; vertical-align: top;" >
> >
> >                                    < div
> >
> >                                          style ="width:
> 100%; height: 100%; vertical-align: top;"
> >
> >                                          id
> ="root:schedule1_body_20071126" >
> >
> >                                    < table style ="width:
> 100%;" >
> >
> >                                          < tr>
> >
> >                                                < td
> >
> >
> style ="width: 100%;"
> >
> >
> onmouseover ="return makeTrue(domTT_activate(this, event, 'caption',
> 'Menage', 'content', '&lt;i&gt;Alice du four (Pour Hedia)&lt;/i&gt;',
> 'trail', true));" >< a
> >
> >                                                      href
> ="#"
> >
> >
> onmouseup ="fireEntrySelected('root' , 'root:schedule1', '688133');" >
> 3:28PM-4:28PM: Menage </ a></ td >
> >
> >
> >
> >
> > So even when I want to enfore rules by specifying my own form with my own
> id, the tobago libs use a tobago js function to retreive it, but other libs
> are lost:
> >
> > I was trying this page:
> >
> >
> > < tc:page
> >
> >       xmlns= " http://www.w3.org/1999/xhtml"
> >
> >       xmlns:t= " http://myfaces.apache.org/tomahawk"
> >
> >       xmlns:tc= "
> http://myfaces.apache.org/tobago/component"
> >
> >       xmlns:tx= "
> http://myfaces.apache.org/tobago/extension"
> >
> >       xmlns:h= " http://java.sun.com/jsf/html"
> >
> >       xmlns:f= " http://java.sun.com/jsf/core"
> >
> >       id ="root" >
> >
> >       < tc:form id = "testS" >
> >
> >             <!--  The schedule itself -->
> >
> >             < div style ="position: absolute; left: 220px; top: 5px;
> right: 5px;" >
> >
> >                 < t:schedule
> >
> >                   value
> ="#{contractCtrl.scheduleModel.model}"
> >
> >                   id ="schedule1"
> >
> >                   rendered ="true"
> >
> >                   visibleEndHour ="18"
> >
> >                   visibleStartHour ="8"
> >
> >                   workingEndHour ="17"
> >
> >                   workingStartHour ="9"
> >
> >                   readonly ="false"
> >
> >                   theme ="evolution"
> >
> >                   tooltip ="true" /></ div >
> >
> >       </ tc:form>
> >
> > </ tc:page>
> >
> >
> >
> > I can't get why we get this html output:
> >
> > < form
> >
> >       name ="root::form"
> >
> >       action ="/IntoServicesWeb/test/schedule.jsf"
> >
> >       id ="root::form"
> >
> >       method ="post"
> >
> >       accept-charset ="utf-8" >< input
> >
> >       type ="hidden"
> >
> >       name ="root::form-action"
> >
> >       id ="root::form-action"
> >
> >       value ="" >
> >
> > < div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> ><input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1" >< input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1_last_clicked_date" ><
> input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1_last_clicked_y" >
> >
> > < div
> >
> >       class ="schedule-compact-evolution"
> >
> >       style ="border-style: none; overflow: hidden;" >
> >
> > < table
> >
> >       class ="month"
> >
> >       style ="position: relative; left: 0px; top: 0px; width: 100%;"
> >
> >       cellpadding ="0"
> >
> >       cellspacing ="1"
> >
> >       border ="0"
> >
> >       width ="100%" >
> >
> >       < tbody>
> >
> >             < tr>
> >
> >                   < td
> >
> >                         rowspan ="2"
> >
> >                         class ="inactive-day workday"
> >
> >     ...
> >
> > [Message tronqué]
>
>
>
> --
> Zied Hamdi
>  zatreex.sourceforge.net


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Zied Hamdi <ja...@gmail.com>.
Hi Volker,

I don't know if you have tested my page, in case not, this is the definition
of the js method that fails on entry selection:


function fireEntrySelected(formId, scheduleId, entryId) {
	document.forms[formId][scheduleId].value = entryId;
	document.forms[formId].submit();
	return true;
}

Regrads,


2007/12/13, Zied Hamdi <ja...@gmail.com>:
>
> Hi Volker,
>
> Thank you for your fast reply. I'm sorry the preceding mail was against
> another source code (as in my app).
>
> But what I noticed is that, because tc:page creates a form alone, the form
> id is always "*pageId*::*form*"
>
> The tomahawk schedule seams to search for a form with the same name as *pageId
> *when no explicit form is specified:
>
>
> < tc:page
>
>       xmlns=" http://www.w3.org/1999/xhtml"
>
>       xmlns:t=" http://myfaces.apache.org/tomahawk"
>
>       xmlns:tc=" http://myfaces.apache.org/tobago/component"
>
>       xmlns:tx=" http://myfaces.apache.org/tobago/extension"
>
>       xmlns:h=" http://java.sun.com/jsf/html"
>
>       xmlns:f=" http://java.sun.com/jsf/core"
>
>       id= "root">
>
>       <!--  The schedule itself -->
>
>       < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" ><t:schedule
>
>             value ="#{contractCtrl.scheduleModel.model}"
>
>             id ="schedule1"
>
>             rendered ="true"
>
>             visibleEndHour ="18"
>
>             visibleStartHour ="8"
>
>             workingEndHour ="17"
>
>             workingStartHour ="9"
>
>             readonly ="false"
>
>             theme ="evolution"
>
>             tooltip= "true" /></div >
>
> </ tc:page>
>
>
>
> Outputs this snippet:
>
>
>
>       <form
>
>             name ="root::form"
>
>             action ="/IntoServicesWeb/test/schedule.jsf"
>
>             id ="root::form"
>
>             method ="post"
>
>             accept-charset ="utf-8" ><input
>
>             type ="hidden"
>
>             name ="root::form-action"
>
>             id ="root::form-action"
>
>             value ="" >
>
>       < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" ><input
>
>             type ="hidden"
>
>             name ="root:schedule1" ><input
>
>             type ="hidden"
>
>             name ="root:schedule1_last_clicked_date" ><input
>
>             type= "hidden"
>
>             name="root:schedule1_last_clicked_y" >
>
>       <div
>
>             class="schedule-compact-evolution"
>
>             style="border-style: none; overflow: hidden;" >
>
>       <table
>
>             class ="month"
>
>             style ="position: relative; left: 0px; top: 0px; width: 100%;"
>
>             cellpadding ="0"
>
>             cellspacing ="1"
>
>             border ="0"
>
>             width ="100%" >
>
>             < tbody>
>
>                   < tr>
>
>                         < td
>
>                              rowspan ="2"
>
>                              class ="inactive-day workday"
>
>                              style ="height: 121px; width: 16.666666%;" >
>
>                         < table
>
>                              class ="day"
>
>                              style ="height: 121px; width: 100%;"
>
>                              cellpadding ="0"
>
>                              cellspacing ="0" >
>
>                              < tr>
>
>                                    < td
>
>                                          class ="header"
>
>                                          style ="height: 18px; width:
> 100%; overflow: hidden"
>
>                                          id =
> "root:schedule1_header_20071126" >26 nov. 2007 </td >
>
>                              </ tr>
>
>                              < tr>
>
>                                    < td
>
>                                          class ="content"
>
>                                          style ="height: 103px; width:
> 100%;" >
>
>                                    < div
>
>                                          class ="contentview"
>
>                                          style ="width: 100%; height:
> 100%; overflow: auto; vertical-align: top;" >
>
>                                    < div
>
>                                          style ="width: 100%; height:
> 100%; vertical-align: top;"
>
>                                          id =
> "root:schedule1_body_20071126" >
>
>                                    < table style ="width: 100%;" >
>
>                                          < tr>
>
>                                                < td
>
>                                                      style ="width: 100%;"
>
>                                                      onmouseover ="return
> makeTrue(domTT_activate(this, event, 'caption', 'Menage', 'content',
> '&lt;i&gt;Alice du four (Pour Hedia)&lt;/i&gt;', 'trail', true));" >< a
>
>                                                      href ="#"
>
>                                                      onmouseup =
> "fireEntrySelected('root', 'root:schedule1', '688133');" > 3:28PM-4:28PM:
> Menage</ a></ td>
>
>
>
>
> So even when I want to enfore rules by specifying my own form with my own
> id, the tobago libs use a tobago js function to retreive it, but other libs
> are lost:
>
> I was trying this page:
>
> < tc:page
>
>       xmlns= " http://www.w3.org/1999/xhtml"
>
>       xmlns:t= " http://myfaces.apache.org/tomahawk"
>
>       xmlns:tc= " http://myfaces.apache.org/tobago/component"
>
>       xmlns:tx= " http://myfaces.apache.org/tobago/extension"
>
>       xmlns:h= " http://java.sun.com/jsf/html"
>
>       xmlns:f= " http://java.sun.com/jsf/core"
>
>       id ="root" >
>
>       < tc:form id = "testS" >
>
>             <!--  The schedule itself -->
>
>             < div style ="position: absolute; left: 220px; top: 5px;
> right: 5px;" >
>
>                 < t:schedule
>
>                   value ="#{contractCtrl.scheduleModel.model}"
>
>                   id ="schedule1"
>
>                   rendered ="true"
>
>                   visibleEndHour ="18"
>
>                   visibleStartHour ="8"
>
>                   workingEndHour ="17"
>
>                   workingStartHour ="9"
>
>                   readonly ="false"
>
>                   theme ="evolution"
>
>                   tooltip ="true" /></ div >
>
>       </ tc:form>
>
> </ tc:page>
>
>
>
> I can't get why we get this html output:
>
> < form
>
>       name ="root::form"
>
>       action ="/IntoServicesWeb/test/schedule.jsf"
>
>       id ="root::form"
>
>       method ="post"
>
>       accept-charset ="utf-8" >< input
>
>       type ="hidden"
>
>       name ="root::form-action"
>
>       id ="root::form-action"
>
>       value ="" >
>
> < div style ="position: absolute; left: 220px; top: 5px; right: 5px;" ><
> input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1" >< input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1_last_clicked_date" >< input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1_last_clicked_y" >
>
> < div
>
>       class ="schedule-compact-evolution"
>
>       style ="border-style: none; overflow: hidden;" >
>
> < table
>
>       class ="month"
>
>       style ="position: relative; left: 0px; top: 0px; width: 100%;"
>
>       cellpadding ="0"
>
>       cellspacing ="1"
>
>       border ="0"
>
>       width ="100%" >
>
>       < tbody>
>
>             < tr>
>
>                   < td
>
>                         rowspan ="2"
>
>                         class ="inactive-day workday"
>
>
> ...
>
> [Message tronqué]




-- 
Zied Hamdi
zatreex.sourceforge.net

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Zied Hamdi <ja...@gmail.com>.
That's exactly what I didn't want to hear :-). Thanks for the patch, I'll
give it a try and tell you if it works.

Regards,
Zied



2007/12/13, Volker Weber <v....@inexso.de>:
>
> Hi,
>
> i think the t:schedule could not be used inside tobago.
>
> it looks like the schedule component looks for the first parent UIForm
> and takes this id as the id for a html form tag to submit. This can't
> work in tobago, because there is only one html form tag surrounding
> all content.
> And nesting form tags is not allowed in html.
>
> We can't fix this in tobago, to make the schedule work in tobago there
> must added a workarround in the schedule's javascript to find the root
> form tag.
>
>
> Regards,
>    Volker
>
>
>
>
> 2007/12/13, Zied Hamdi <ja...@gmail.com>:
> > Hi Volker,
> >
> > Thank you for your fast reply. I'm sorry the preceding mail was against
> > another source code (as in my app).
> >
> > But what I noticed is that, because tc:page creates a form alone, the
> form
> > id is always "pageId::form"
> >
> > The tomahawk schedule seams to search for a form with the same name as
> > pageId when no explicit form is specified:
> >
> >
> >
> > < tc:page
> >
> >       xmlns=" http://www.w3.org/1999/xhtml"
> >
> >       xmlns:t=" http://myfaces.apache.org/tomahawk"
> >
> >       xmlns:tc="
> > http://myfaces.apache.org/tobago/component"
> >
> >       xmlns:tx="
> > http://myfaces.apache.org/tobago/extension"
> >
> >       xmlns:h=" http://java.sun.com/jsf/html"
> >
> >       xmlns:f=" http://java.sun.com/jsf/core"
> >
> >       id= "root">
> >
> >        <!--  The schedule itself -->
> >
> >        < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;"
> > ><t:schedule
> >
> >              value ="#{contractCtrl.scheduleModel.model}"
> >
> >              id ="schedule1"
> >
> >              rendered ="true"
> >
> >              visibleEndHour ="18"
> >
> >              visibleStartHour ="8"
> >
> >              workingEndHour ="17"
> >
> >              workingStartHour ="9"
> >
> >              readonly ="false"
> >
> >              theme ="evolution"
> >
> >              tooltip= "true" /></div >
> >
> > </ tc:page>
> >
> >
> >
> > Outputs this snippet:
> >
> >
> >
> >       <form
> >
> >              name ="root::form"
> >
> >              action ="/IntoServicesWeb/test/schedule.jsf"
> >
> >              id ="root::form"
> >
> >              method ="post"
> >
> >              accept-charset ="utf-8" ><input
> >
> >              type ="hidden"
> >
> >              name ="root::form-action"
> >
> >              id ="root::form-action"
> >
> >              value ="" >
> >
> >        < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;"
> > ><input
> >
> >              type ="hidden"
> >
> >              name ="root:schedule1" ><input
> >
> >              type ="hidden"
> >
> >              name ="root:schedule1_last_clicked_date"
> > ><input
> >
> >              type= "hidden"
> >
> >             name="root:schedule1_last_clicked_y" >
> >
> >       <div
> >
> >             class="schedule-compact-evolution"
> >
> >             style="border-style: none; overflow: hidden;" >
> >
> >       <table
> >
> >              class ="month"
> >
> >              style ="position: relative; left: 0px; top: 0px; width:
> 100%;"
> >
> >              cellpadding ="0"
> >
> >              cellspacing ="1"
> >
> >              border ="0"
> >
> >              width ="100%" >
> >
> >              < tbody>
> >
> >                    < tr>
> >
> >                          < td
> >
> >                               rowspan ="2"
> >
> >                               class ="inactive-day workday"
> >
> >                               style ="height: 121px; width: 16.666666%;"
> >
> >
> >                          < table
> >
> >                               class ="day"
> >
> >                               style ="height: 121px; width: 100%;"
> >
> >                               cellpadding ="0"
> >
> >                               cellspacing ="0" >
> >
> >                               < tr>
> >
> >                                     < td
> >
> >                                           class ="header"
> >
> >                                           style ="height:
> > 18px; width: 100%; overflow: hidden"
> >
> >                                           id
> > ="root:schedule1_header_20071126" >26 nov. 2007 </td >
> >
> >                               </ tr>
> >
> >                               < tr>
> >
> >                                     < td
> >
> >                                           class ="content"
> >
> >                                           style ="height:
> > 103px; width: 100%;" >
> >
> >                                     < div
> >
> >                                           class
> > ="contentview"
> >
> >                                           style ="width:
> > 100%; height: 100%; overflow: auto; vertical-align: top;" >
> >
> >                                     < div
> >
> >                                           style ="width:
> > 100%; height: 100%; vertical-align: top;"
> >
> >                                           id
> > ="root:schedule1_body_20071126" >
> >
> >                                     < table style ="width:
> > 100%;" >
> >
> >                                           < tr>
> >
> >                                                 < td
> >
> >                                                       style
> > ="width: 100%;"
> >
> >
> > onmouseover ="return makeTrue(domTT_activate(this, event, 'caption',
> > 'Menage', 'content', '&lt;i&gt;Alice du four (Pour Hedia)&lt;/i&gt;',
> > 'trail', true));" >< a
> >
> >                                                       href
> > ="#"
> >
> >
> > onmouseup ="fireEntrySelected('root', 'root:schedule1', '688133');" >
> > 3:28PM-4:28PM: Menage</ a></ td>
> >
> >
> >
> >
> > So even when I want to enfore rules by specifying my own form with my
> own
> > id, the tobago libs use a tobago js function to retreive it, but other
> libs
> > are lost:
> >
> > I was trying this page:
> >
> >
> > < tc:page
> >
> >       xmlns= " http://www.w3.org/1999/xhtml"
> >
> >       xmlns:t= " http://myfaces.apache.org/tomahawk"
> >
> >       xmlns:tc= "
> > http://myfaces.apache.org/tobago/component"
> >
> >       xmlns:tx= "
> > http://myfaces.apache.org/tobago/extension"
> >
> >       xmlns:h= " http://java.sun.com/jsf/html"
> >
> >       xmlns:f= " http://java.sun.com/jsf/core"
> >
> >       id ="root" >
> >
> >       < tc:form id = "testS" >
> >
> >             <!--  The schedule itself -->
> >
> >             < div style ="position: absolute; left: 220px; top: 5px;
> right:
> > 5px;" >
> >
> >                 < t:schedule
> >
> >                   value
> > ="#{contractCtrl.scheduleModel.model}"
> >
> >                   id ="schedule1"
> >
> >                   rendered ="true"
> >
> >                   visibleEndHour ="18"
> >
> >                   visibleStartHour ="8"
> >
> >                   workingEndHour ="17"
> >
> >                   workingStartHour ="9"
> >
> >                   readonly ="false"
> >
> >                   theme ="evolution"
> >
> >                   tooltip ="true" /></ div >
> >
> >       </ tc:form>
> >
> > </ tc:page>
> >
> >
> >
> > I can't get why we get this html output:
> >
> > < form
> >
> >       name ="root::form"
> >
> >       action ="/IntoServicesWeb/test/schedule.jsf"
> >
> >       id ="root::form"
> >
> >       method ="post"
> >
> >       accept-charset ="utf-8" >< input
> >
> >       type ="hidden"
> >
> >       name ="root::form-action"
> >
> >       id ="root::form-action"
> >
> >       value ="" >
> >
> > < div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> > ><input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1" >< input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1_last_clicked_date" ><
> > input
> >
> >       type ="hidden"
> >
> >       name ="root:testS:schedule1_last_clicked_y" >
> >
> > < div
> >
> >       class ="schedule-compact-evolution"
> >
> >       style ="border-style: none; overflow: hidden;" >
> >
> > < table
> >
> >       class ="month"
> >
> >       style ="position: relative; left: 0px; top: 0px; width: 100%;"
> >
> >       cellpadding ="0"
> >
> >       cellspacing ="1"
> >
> >       border ="0"
> >
> >       width ="100%" >
> >
> >       < tbody>
> >
> >             < tr>
> >
> >                   < td
> >
> >                         rowspan ="2"
> >
> >                         class ="inactive-day workday"
> >
> >     ...
> >
> > [Nachricht gekürzt]
>
>
> --
> inexso - information exchange solutions GmbH
> Bismarckstraße 13      | 26122 Oldenburg
> Tel.: +49 441 4082 356 |
> FAX:  +49 441 4082 355 | www.inexso.de
>



-- 
Zied Hamdi
zatreex.sourceforge.net

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Volker Weber <v....@inexso.de>.
Hi,

i think the t:schedule could not be used inside tobago.

it looks like the schedule component looks for the first parent UIForm
and takes this id as the id for a html form tag to submit. This can't
work in tobago, because there is only one html form tag surrounding
all content.
And nesting form tags is not allowed in html.

We can't fix this in tobago, to make the schedule work in tobago there
must added a workarround in the schedule's javascript to find the root
form tag.


Regards,
    Volker




2007/12/13, Zied Hamdi <ja...@gmail.com>:
> Hi Volker,
>
> Thank you for your fast reply. I'm sorry the preceding mail was against
> another source code (as in my app).
>
> But what I noticed is that, because tc:page creates a form alone, the form
> id is always "pageId::form"
>
> The tomahawk schedule seams to search for a form with the same name as
> pageId when no explicit form is specified:
>
>
>
> < tc:page
>
>       xmlns=" http://www.w3.org/1999/xhtml"
>
>       xmlns:t=" http://myfaces.apache.org/tomahawk"
>
>       xmlns:tc="
> http://myfaces.apache.org/tobago/component"
>
>       xmlns:tx="
> http://myfaces.apache.org/tobago/extension"
>
>       xmlns:h=" http://java.sun.com/jsf/html"
>
>       xmlns:f=" http://java.sun.com/jsf/core"
>
>       id= "root">
>
>        <!--  The schedule itself -->
>
>        < div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> ><t:schedule
>
>              value ="#{contractCtrl.scheduleModel.model}"
>
>              id ="schedule1"
>
>              rendered ="true"
>
>              visibleEndHour ="18"
>
>              visibleStartHour ="8"
>
>              workingEndHour ="17"
>
>              workingStartHour ="9"
>
>              readonly ="false"
>
>              theme ="evolution"
>
>              tooltip= "true" /></div >
>
> </ tc:page>
>
>
>
> Outputs this snippet:
>
>
>
>       <form
>
>              name ="root::form"
>
>              action ="/IntoServicesWeb/test/schedule.jsf"
>
>              id ="root::form"
>
>              method ="post"
>
>              accept-charset ="utf-8" ><input
>
>              type ="hidden"
>
>              name ="root::form-action"
>
>              id ="root::form-action"
>
>              value ="" >
>
>        < div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> ><input
>
>              type ="hidden"
>
>              name ="root:schedule1" ><input
>
>              type ="hidden"
>
>              name ="root:schedule1_last_clicked_date"
> ><input
>
>              type= "hidden"
>
>             name="root:schedule1_last_clicked_y" >
>
>       <div
>
>             class="schedule-compact-evolution"
>
>             style="border-style: none; overflow: hidden;" >
>
>       <table
>
>              class ="month"
>
>              style ="position: relative; left: 0px; top: 0px; width: 100%;"
>
>              cellpadding ="0"
>
>              cellspacing ="1"
>
>              border ="0"
>
>              width ="100%" >
>
>              < tbody>
>
>                    < tr>
>
>                          < td
>
>                               rowspan ="2"
>
>                               class ="inactive-day workday"
>
>                               style ="height: 121px; width: 16.666666%;" >
>
>                          < table
>
>                               class ="day"
>
>                               style ="height: 121px; width: 100%;"
>
>                               cellpadding ="0"
>
>                               cellspacing ="0" >
>
>                               < tr>
>
>                                     < td
>
>                                           class ="header"
>
>                                           style ="height:
> 18px; width: 100%; overflow: hidden"
>
>                                           id
> ="root:schedule1_header_20071126" >26 nov. 2007 </td >
>
>                               </ tr>
>
>                               < tr>
>
>                                     < td
>
>                                           class ="content"
>
>                                           style ="height:
> 103px; width: 100%;" >
>
>                                     < div
>
>                                           class
> ="contentview"
>
>                                           style ="width:
> 100%; height: 100%; overflow: auto; vertical-align: top;" >
>
>                                     < div
>
>                                           style ="width:
> 100%; height: 100%; vertical-align: top;"
>
>                                           id
> ="root:schedule1_body_20071126" >
>
>                                     < table style ="width:
> 100%;" >
>
>                                           < tr>
>
>                                                 < td
>
>                                                       style
> ="width: 100%;"
>
>
> onmouseover ="return makeTrue(domTT_activate(this, event, 'caption',
> 'Menage', 'content', '&lt;i&gt;Alice du four (Pour Hedia)&lt;/i&gt;',
> 'trail', true));" >< a
>
>                                                       href
> ="#"
>
>
> onmouseup ="fireEntrySelected('root', 'root:schedule1', '688133');" >
> 3:28PM-4:28PM: Menage</ a></ td>
>
>
>
>
> So even when I want to enfore rules by specifying my own form with my own
> id, the tobago libs use a tobago js function to retreive it, but other libs
> are lost:
>
> I was trying this page:
>
>
> < tc:page
>
>       xmlns= " http://www.w3.org/1999/xhtml"
>
>       xmlns:t= " http://myfaces.apache.org/tomahawk"
>
>       xmlns:tc= "
> http://myfaces.apache.org/tobago/component"
>
>       xmlns:tx= "
> http://myfaces.apache.org/tobago/extension"
>
>       xmlns:h= " http://java.sun.com/jsf/html"
>
>       xmlns:f= " http://java.sun.com/jsf/core"
>
>       id ="root" >
>
>       < tc:form id = "testS" >
>
>             <!--  The schedule itself -->
>
>             < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" >
>
>                 < t:schedule
>
>                   value
> ="#{contractCtrl.scheduleModel.model}"
>
>                   id ="schedule1"
>
>                   rendered ="true"
>
>                   visibleEndHour ="18"
>
>                   visibleStartHour ="8"
>
>                   workingEndHour ="17"
>
>                   workingStartHour ="9"
>
>                   readonly ="false"
>
>                   theme ="evolution"
>
>                   tooltip ="true" /></ div >
>
>       </ tc:form>
>
> </ tc:page>
>
>
>
> I can't get why we get this html output:
>
> < form
>
>       name ="root::form"
>
>       action ="/IntoServicesWeb/test/schedule.jsf"
>
>       id ="root::form"
>
>       method ="post"
>
>       accept-charset ="utf-8" >< input
>
>       type ="hidden"
>
>       name ="root::form-action"
>
>       id ="root::form-action"
>
>       value ="" >
>
> < div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> ><input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1" >< input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1_last_clicked_date" ><
> input
>
>       type ="hidden"
>
>       name ="root:testS:schedule1_last_clicked_y" >
>
> < div
>
>       class ="schedule-compact-evolution"
>
>       style ="border-style: none; overflow: hidden;" >
>
> < table
>
>       class ="month"
>
>       style ="position: relative; left: 0px; top: 0px; width: 100%;"
>
>       cellpadding ="0"
>
>       cellspacing ="1"
>
>       border ="0"
>
>       width ="100%" >
>
>       < tbody>
>
>             < tr>
>
>                   < td
>
>                         rowspan ="2"
>
>                         class ="inactive-day workday"
>
>     ...
>
> [Nachricht gekürzt]


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Zied Hamdi <ja...@gmail.com>.
Hi Volker,

Thank you for your fast reply. I'm sorry the preceding mail was against
another source code (as in my app).

But what I noticed is that, because tc:page creates a form alone, the form
id is always "*pageId*::*form*"

The tomahawk schedule seams to search for a form with the same name as *pageId
*when no explicit form is specified:


<tc:page

      xmlns="http://www.w3.org/1999/xhtml"

      xmlns:t="http://myfaces.apache.org/tomahawk"

      xmlns:tc="http://myfaces.apache.org/tobago/component"

      xmlns:tx="http://myfaces.apache.org/tobago/extension"

      xmlns:h="http://java.sun.com/jsf/html"

      xmlns:f="http://java.sun.com/jsf/core"

      id="root">

      <!--  The schedule itself -->

      <div style="position: absolute; left: 220px; top: 5px; right: 5px;"><
t:schedule

            value="#{contractCtrl.scheduleModel.model}"

            id="schedule1"

            rendered="true"

            visibleEndHour="18"

            visibleStartHour="8"

            workingEndHour="17"

            workingStartHour="9"

            readonly="false"

            theme="evolution"

            tooltip="true" /></div>

</tc:page>



Outputs this snippet:



      <form

            name="root::form"

            action="/IntoServicesWeb/test/schedule.jsf"

            id="root::form"

            method="post"

            accept-charset="utf-8"><input

            type="hidden"

            name="root::form-action"

            id="root::form-action"

            value="">

      <div style="position: absolute; left: 220px; top: 5px; right: 5px;"><
input

            type="hidden"

            name="root:schedule1"><input

            type="hidden"

            name="root:schedule1_last_clicked_date"><input

            type="hidden"

            name="root:schedule1_last_clicked_y">

      <div

            class="schedule-compact-evolution"

            style="border-style: none; overflow: hidden;">

      <table

            class="month"

            style="position: relative; left: 0px; top: 0px; width: 100%;"

            cellpadding="0"

            cellspacing="1"

            border="0"

            width="100%">

            <tbody>

                  <tr>

                        <td

                             rowspan="2"

                             class="inactive-day workday"

                             style="height: 121px; width: 16.666666%;">

                        <table

                             class="day"

                             style="height: 121px; width: 100%;"

                             cellpadding="0"

                             cellspacing="0">

                             <tr>

                                   <td

                                         class="header"

                                         style="height: 18px; width: 100%;
overflow: hidden"

                                         id="root:schedule1_header_20071126"
>26 nov. 2007</td>

                             </tr>

                             <tr>

                                   <td

                                         class="content"

                                         style="height: 103px; width: 100%;"
>

                                   <div

                                         class="contentview"

                                         style="width: 100%; height: 100%;
overflow: auto; vertical-align: top;">

                                   <div

                                         style="width: 100%; height: 100%;
vertical-align: top;"

                                         id="root:schedule1_body_20071126">

                                   <table style="width: 100%;">

                                         <tr>

                                               <td

                                                     style="width: 100%;"

                                                     onmouseover="return
makeTrue(domTT_activate(this, event, 'caption', 'Menage', 'content',
'&lt;i&gt;Alice du four (Pour Hedia)&lt;/i&gt;', 'trail', true));"><a

                                                     href="#"

                                                     onmouseup=
"fireEntrySelected('root', 'root:schedule1', '688133');">3:28PM-4:28PM:
Menage</a></td>




So even when I want to enfore rules by specifying my own form with my own
id, the tobago libs use a tobago js function to retreive it, but other libs
are lost:

I was trying this page:

< tc:page

      xmlns=" http://www.w3.org/1999/xhtml"

      xmlns:t=" http://myfaces.apache.org/tomahawk"

      xmlns:tc=" http://myfaces.apache.org/tobago/component"

      xmlns:tx=" http://myfaces.apache.org/tobago/extension"

      xmlns:h=" http://java.sun.com/jsf/html"

      xmlns:f=" http://java.sun.com/jsf/core"

      id ="root" >

      < tc:form id ="testS" >

            <!--  The schedule itself -->

            < div style ="position: absolute; left: 220px; top: 5px; right:
5px;" >

                < t:schedule

                  value ="#{contractCtrl.scheduleModel.model}"

                  id ="schedule1"

                  rendered ="true"

                  visibleEndHour ="18"

                  visibleStartHour ="8"

                  workingEndHour ="17"

                  workingStartHour ="9"

                  readonly ="false"

                  theme ="evolution"

                  tooltip ="true" /></div >

      </ tc:form>

</ tc:page>



I can't get why we get this html output:

< form

      name ="root::form"

      action ="/IntoServicesWeb/test/schedule.jsf"

      id ="root::form"

      method ="post"

      accept-charset ="utf-8" ><input

      type ="hidden"

      name ="root::form-action"

      id ="root::form-action"

      value ="" >

< div style ="position: absolute; left: 220px; top: 5px; right: 5px;" ><
input

      type ="hidden"

      name ="root:testS:schedule1" ><input

      type ="hidden"

      name ="root:testS:schedule1_last_clicked_date" ><input

      type ="hidden"

      name ="root:testS:schedule1_last_clicked_y" >

< div

      class ="schedule-compact-evolution"

      style ="border-style: none; overflow: hidden;" >

< table

      class ="month"

      style ="position: relative; left: 0px; top: 0px; width: 100%;"

      cellpadding ="0"

      cellspacing ="1"

      border ="0"

      width ="100%" >

      < tbody>

            < tr>

                  < td

                        rowspan ="2"

                        class ="inactive-day workday"

                        style ="height: 121px; width: 16.666666%;" >

                  < table

                        class ="day"

                        style ="height: 121px; width: 100%;"

                        cellpadding ="0"

                        cellspacing ="0" >

                        < tr>

                             < td

                                   class ="header"

                                   style ="height: 18px; width: 100%;
overflow: hidden"

                                   id =
"root:testS:schedule1_header_20071126" >26 nov. 2007 </td >

                        </ tr>

                        < tr>

                             < td

                                   class ="content"

                                   style ="height: 103px; width: 100%;" >

                             < div

                                   class ="contentview"

                                   style ="width: 100%; height: 100%;
overflow: auto; vertical-align: top;" >

                             < div

                                   style ="width: 100%; height: 100%;
vertical-align: top;"

                                   id ="root:testS:schedule1_body_20071126">

                             < table style ="width: 100%;" >

                                   < tr>

                                         < td

                                               style ="width: 100%;"

                                               onmouseover ="return
makeTrue(domTT_activate(this, event, 'caption', 'Menage', 'content',
'&lt;i&gt; Alice du four&lt;/i&gt;', 'trail', true));">< a

                                               href ="#"

                                               onmouseup =
"fireEntrySelected('root:testS', 'root:testS:schedule1', '360452');"
>6:49PM: Menage
</ a></ td>

                                   </tr >
...


I'm now trying to creae the inner form with id="form" to shortcut the
mecanism, but the schedule doesn't seam to find form['root::form'] anyway,
still debugging...

I think t:schedule searches for a f:form, if it doesn't find any, it uses
the f:view id, and seen tha tc:page creates a form behind the scene,
t:schedule doesn't detect it.

Regards,
Zied

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Volker Weber <v....@inexso.de>.
Hi Zied,

the form element with id="page::form" is rendered by the PageRenderer.
You have no tc:page in your source, so i can't see why this could happen.

What happens if you remove the <html><body> tags and replace the
h:form tag with a tc:page, and the div with a tc:panel?


Regards,
    Volker

2007/12/13, Zied Hamdi <ja...@gmail.com>:
> Hi Again,
>
> Examining the generated code further I have found this problem:
>
> the call is made from cells like this one:<tr><td style=
> "width: 100%;" onmouseover="return makeTrue(domTT_activate(this, event,
> 'caption', 'Menage', 'content', '&lt;i&gt;Alice du four&lt;/i&gt;', 'trail',
> true));"
> ><a href="#" onmouseup="fireEntrySelected('page', 'page:schedule',
> '360452');"
> ><div class="text" style="height: 100%; width: 100%;"
> >18:49: Menage</div></a></td></tr>
>
> whereas my form's name is
> <form name="page::form" action=
> "/IntoServicesWeb/contract/contract.jsf" id="page::form"
> method=
> "post" accept-charset="utf-8"
> >
> That's why the call document.forms[formId] with formId='page' returns null.
> Now that I know this, what do I have to do with it?
> Any ideas?
>
>
>
>
> 2007/12/13, Zied Hamdi <ja...@gmail.com>:
> >
> > Hi All,
> >
> > I have entred this problem earlier when I was in time evalution phasis.
> Today I'm concretely in dev mode and I don't have any solution (I was
> thinking ti was because of the context : tobago layouting etc.., so I
> simplified to the basis): here's my page it's the same one as in the
> tomahawk examples 1:
> >
> >
> > < html>
> >
> > < body>
> >
> > < f:view
> >
> >       xmlns= " http://www.w3.org/1999/xhtml"
> >
> >       xmlns:t= " http://myfaces.apache.org/tomahawk"
> >
> >       xmlns:tc= "
> http://myfaces.apache.org/tobago/component"
> >
> >       xmlns:tx= "
> http://myfaces.apache.org/tobago/extension"
> >
> >       xmlns:h= " http://java.sun.com/jsf/html"
> >
> >       xmlns:f= " http://java.sun.com/jsf/core">
> >
> >       < h:form >
> >
> >             <!--  The schedule itself -->
> >
> >             < div style ="position: absolute; left: 220px; top: 5px;
> right: 5px;" ><t:schedule
> >
> >                   value
> ="#{contractCtrl.scheduleModel.model}"
> >
> >                   id ="schedule1"
> >
> >                   rendered ="true"
> >
> >                   visibleEndHour ="18"
> >
> >                   visibleStartHour ="8"
> >
> >                   workingEndHour ="17"
> >
> >                   workingStartHour ="9"
> >
> >                   readonly ="false"
> >
> >                   theme ="evolution"
> >
> >                   tooltip ="true" /></ div >
> >
> >       </ h:form>
> >
> > </ f:view>
> >
> > </ body>
> >
> > </ html>
> >
> >
> > It doesn't use anything more than facelets. What I receive is
> > Erreur : document.forms[formId] has no properties
> > Fichier source :
> http://localhost:8080/IntoServicesWeb/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11975349/schedule.HtmlSchedule/javascript/schedule.js
> > Ligne : 33
> >
> > I have the tomahawk example app
> myfaces-example-simple-1.1.7-SNAPSHOT.war  running on the
> same server without problems, so I think the only difference is the
> WEB-INF/lib directory: here's my app contents:
> > 02/10/2006  20:03            63ÿ966 avalon-framework-4.1.3.jar
> > 03/09/2007  17:05            48ÿ742 common-annotations.jar
> > 20/09/2006  17:30           188ÿ671 commons-beanutils-1.7.0.jar
> > 04/09/2007  14:21           188ÿ671 commons-beanutils.jar
> > 15/11/2006  10:16            46ÿ725 commons-codec-1.3.jar
> > 20/09/2006  17:30           559ÿ366 commons-collections-3.1.jar
> > 04/09/2007  14:21           559ÿ366 commons-collections.jar
> > 20/09/2006  17:30           139ÿ966 commons-digester-1.7.jar
> > 04/09/2007  14:21           139ÿ966 commons-digester.jar
> > 31/12/2006  17:01           112ÿ341 commons-el-1.0.jar
> > 25/01/2007  18:36            31ÿ909 commons-fileupload-1.1.1.jar
> > 20/09/2006  17:35            61ÿ562 commons-io-1.1.jar
> > 20/09/2006  17:30           207ÿ723 commons-lang-2.1.jar
> > 20/09/2006  18:35            52ÿ915 commons-logging-1.1.jar
> > 16/06/2007  23:10            72ÿ009 el-impl-1.0.jar
> > 13/12/2007  09:49                 0 info.txt
> > 18/12/2006  22:05           298ÿ368 jsf-facelets.jar
> > 03/09/2007  17:05            30ÿ483 jsf-tlds.jar
> > 13/03/2007  17:03           367ÿ444 log4j-1.2.14.jar
> > 02/10/2006  20:03            72ÿ150 logkit-1.0.1.jar
> > 16/06/2007  23:10             6ÿ882
> maven-repository-importer-1.1.jar
> > 19/10/2007  06:30           577ÿ125 tobago-core-1.0.12.jar
> > 07/10/2007  01:25            62ÿ217
> tobago-facelets-1.0.12-SNAPSHOT.jar
> > 07/10/2007  01:25            10ÿ728
> tobago-fileupload-1.0.12-SNAPSHOT.jar
> > 19/10/2007  06:59            12ÿ540
> tobago-theme-charlotteville-1.0.12.jar
> > 19/10/2007  06:56            35ÿ458
> tobago-theme-richmond-1.0.12.jar
> > 19/10/2007  06:45           254ÿ130
> tobago-theme-scarborough-1.0.12.jar
> > 19/10/2007  06:51            60ÿ566
> tobago-theme-speyside-1.0.12.jar
> > 19/10/2007  06:39            84ÿ940
> tobago-theme-standard-1.0.12.jar
> > 06/11/2007  13:44         2ÿ962ÿ674 tomahawk-1.1.7-SNAPSHOT.jar
> > 02/10/2007  14:23             9ÿ376 tomahawk-facelets-1.1.6.jar
> >
> > I don't have anything special in my conf files.
> >
> > Please if anyone has noticed an analogous problem, any hints will be
> greatly appreciated.
> >
> > Thanks,
> > Zied
>
>
>
> --
> Zied Hamdi
> zatreex.sourceforge.net


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13      | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

Posted by Zied Hamdi <ja...@gmail.com>.
Hi Again,

Examining the generated code further I have found this problem:

the call is made from cells like this one:

<tr><td style="width: 100%;" onmouseover="return
makeTrue(domTT_activate(this, event, 'caption', 'Menage', 'content',
'&lt;i&gt;Alice du four&lt;/i&gt;', 'trail', true));"><a href="#"
onmouseup="fireEntrySelected('page', 'page:schedule', '360452');"><div
class="text" style="height: 100%; width: 100%;">18:49:
Menage</div></a></td></tr>

whereas my form's name is

<form name="page::form"
action="/IntoServicesWeb/contract/contract.jsf" id="page::form"
method="post" accept-charset="utf-8">

That's why the call document.forms[formId] with formId='page' returns null.

Now that I know this, what do I have to do with it?

Any ideas?






2007/12/13, Zied Hamdi <ja...@gmail.com>:
>
> Hi All,
>
> I have entred this problem earlier when I was in time evalution phasis.
> Today I'm concretely in dev mode and I don't have any solution (I was
> thinking ti was because of the context : tobago layouting etc.., so I
> simplified to the basis): here's my page it's the same one as in the
> tomahawk examples 1:
>
>
> < html>
>
> < body>
>
> < f:view
>
>       xmlns=" http://www.w3.org/1999/xhtml"
>
>       xmlns:t=" http://myfaces.apache.org/tomahawk"
>
>       xmlns:tc=" http://myfaces.apache.org/tobago/component"
>
>       xmlns:tx=" http://myfaces.apache.org/tobago/extension"
>
>       xmlns:h=" http://java.sun.com/jsf/html"
>
>       xmlns:f=" http://java.sun.com/jsf/core">
>
>       <h:form >
>
>             <!--  The schedule itself -->
>
>             < div style ="position: absolute; left: 220px; top: 5px;
> right: 5px;" ><t:schedule
>
>                   value ="#{contractCtrl.scheduleModel.model}"
>
>                   id ="schedule1"
>
>                   rendered ="true"
>
>                   visibleEndHour ="18"
>
>                   visibleStartHour ="8"
>
>                   workingEndHour ="17"
>
>                   workingStartHour ="9"
>
>                   readonly ="false"
>
>                   theme ="evolution"
>
>                   tooltip ="true" /></div >
>
>       </ h:form>
>
> </ f:view>
>
> </ body>
>
> </ html>
>
>
> It doesn't use anything more than facelets. What I receive is
> Erreur : document.forms[formId] has no properties
> Fichier source :
> http://localhost:8080/IntoServicesWeb/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11975349/schedule.HtmlSchedule/javascript/schedule.js
> Ligne : 33
>
> I have the tomahawk example app myfaces-example-simple-1.1.7-SNAPSHOT.war
> running on the same server without problems, so I think the only difference
> is the WEB-INF/lib directory: here's my app contents:
> 02/10/2006  20:03            63ÿ966 avalon-framework-4.1.3.jar
> 03/09/2007  17:05            48ÿ742 common-annotations.jar
> 20/09/2006  17:30           188ÿ671 commons-beanutils-1.7.0.jar
> 04/09/2007  14:21           188ÿ671 commons-beanutils.jar
> 15/11/2006  10:16            46ÿ725 commons-codec-1.3.jar
> 20/09/2006  17:30           559ÿ366 commons-collections-3.1.jar
> 04/09/2007  14:21           559ÿ366 commons-collections.jar
> 20/09/2006  17:30           139ÿ966 commons-digester-1.7.jar
> 04/09/2007  14:21           139ÿ966 commons-digester.jar
> 31/12/2006  17:01           112ÿ341 commons-el-1.0.jar
> 25/01/2007  18:36            31ÿ909 commons-fileupload-1.1.1.jar
> 20/09/2006  17:35            61ÿ562 commons-io-1.1.jar
> 20/09/2006  17:30           207ÿ723 commons-lang-2.1.jar
> 20/09/2006  18:35            52ÿ915 commons-logging-1.1.jar
> 16/06/2007  23:10            72ÿ009 el-impl-1.0.jar
> 13/12/2007  09:49                 0 info.txt
> 18/12/2006  22:05           298ÿ368 jsf-facelets.jar
> 03/09/2007  17:05            30ÿ483 jsf-tlds.jar
> 13/03/2007  17:03           367ÿ444 log4j-1.2.14.jar
> 02/10/2006  20:03            72ÿ150 logkit-1.0.1.jar
> 16/06/2007  23:10             6ÿ882 maven-repository-importer-1.1.jar
> 19/10/2007  06:30           577ÿ125 tobago-core-1.0.12.jar
> 07/10/2007  01:25            62ÿ217 tobago-facelets-1.0.12-SNAPSHOT.jar
> 07/10/2007  01:25            10ÿ728 tobago-fileupload-1.0.12-SNAPSHOT.jar
> 19/10/2007  06:59            12ÿ540 tobago-theme-charlotteville-1.0.12.jar
> 19/10/2007  06:56            35ÿ458 tobago-theme-richmond-1.0.12.jar
> 19/10/2007  06:45           254ÿ130 tobago-theme-scarborough-1.0.12.jar
> 19/10/2007  06:51            60ÿ566 tobago-theme-speyside-1.0.12.jar
> 19/10/2007  06:39            84ÿ940 tobago-theme-standard-1.0.12.jar
> 06/11/2007  13:44         2ÿ962ÿ674 tomahawk-1.1.7-SNAPSHOT.jar
> 02/10/2007  14:23             9ÿ376 tomahawk-facelets-1.1.6.jar
>
> I don't have anything special in my conf files.
>
> Please if anyone has noticed an analogous problem, any hints will be
> greatly appreciated.
>
> Thanks,
> Zied
>



-- 
Zied Hamdi
zatreex.sourceforge.net