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 <[EMAIL PROTECTED]>:
> 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 <[EMAIL PROTECTED]>:
> >
> >
> > 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', '<i>Alice du four (Pour Hedia)</i>',
> '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