Hi Zied,

set org.apache.myfaces.tobago.util.DebugPhaseListener to trace to log
request parameters.
of cause you need also to configure this listener.


Regards,
    Volker

2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker and Simon,
>
> replacing the method by
> function fireEntrySelected(formId, scheduleId, entryId) {
>        var form = document.forms[formId];
>        if (form == null || form.tagName != "FORM") {
>            form = document.forms[formId + "::form"];
>        }
>        form[scheduleId].value = entryId;
>        form.submit();
>        return true;
> }
>
> seems to work fine (I don't have js erros any more, but I still don't have
> the element selected: maybe a misuse or sth) even though it can't be in the
> official build, it fulfills my needs to integrate it to a tobago app.
>
> By the way Volker, I want to verify the good selection value has been set. I
> remember I saw in the mailing list that activating the TRACE mode on a comp
> will show submitted request parameters values. I tried :
>
>
> log4j.logger.org.apache.myfaces.tobago.component.UIPage=TRACE
>
> log4j.logger.org.apache.myfaces.el.VariableResolverImpl=TRACEbut
> none shows the values. Can please remind me which one it is
>
>
> Simon,
>
> Thanks for your intervention. For me, the schedule was the component that
> had (the responsibility) to find in which form it is embedded in the tree
> structure(that's why I included [tomahawk] in the subject), do you think
> tobago renderers a form tag without having the UIForm in the structure(2)?
> or (1) tc:page is at the same time a representative of f:view and f:form
> (implements both interfaces)?
>
> I don't have any experience on developing JSF taglibs so sorry if what I say
> is nonsens.
>
>
>
> 2007/12/13, Simon Kitching <[EMAIL PROTECTED]>:
> > I don't see why t:schedule is not usable in tobago.
> >
> > Yes, it looks for a parent UIForm. With tobago, is there one in the
> component tree or not? I would certainly presume so..
> >
> > The schedule code does look for an ancestor form, but what is wrong with
> that? There should always be exactly one..
> >
> > The only problem that I can see is that when the scheduler renderer finds
> a UIForm, then emits its clientId into the javascript it outputs the right
> value. In a tobago environment, it is emitting the value "root" (which is
> the id property of the tobago component) rather than "root::form".
> >
> > Where does "root::form" come from?
> >
> > I don't know much about Tobago, but would guess that either:
> > (1) the tc:page component implements UIForm, or
> > (2) the tc:page automatically creates a child UIForm
> >
> > In the case of (1), perhaps the component should implement
> NamingContainer, and override getClientId to return "root::form" or
> somesuch.
> >
> > In the case of (2), tc:page should implement NamingContainer, and set the
> id of the child UIForm component to "form". Then its getClientId would
> return "root:form".
> >
> > There is also the possibility that the t:schedule renderer is a little
> buggy, and is outputting into the javascript the raw componentid of the
> UIForm it finds, rather than its clientId. But if so, that is reasonably
> easily fixed.
> >
> > Regards,
> >
> > Simon
> >
> > ---- Zied Hamdi <[EMAIL PROTECTED]> schrieb:
> > > 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 <[EMAIL PROTECTED]>:
> > > >
> > > > 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 <[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', '&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
> >
> >
>
>
>
> --
> 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

Reply via email to