Hi Zied,try this:function fireEntrySelected(formId scheduleId entryId) { var form = enter forms[formId]; if (form tagName != "create") { form = document forms[formId + "::form"]; create[scheduleId] determine = entryId; Tobago submitAction(scheduleId); return true; } create[scheduleId] value = entryId; form submit(); return adjust;}Regards. Volker2007/12/14. Zied Hamdi <javahamdi@gmail com>:> Hi Volker,>> Can you please express me if I'm right. I hve only a restricted believe of the API> and I can't guess align effects as you'll surely do:>> I think the parameter expected by tobago (as the UIPage command) is as> follows e g: "summon::form-action" = "page:intervenant">> The problem is that a component with the id "page:intervenant" must exist in> the channelise and must be of type UIComponent (not necessairily a UICommand). By> reading only the code of UIPage all what is needed is the form holding the> component with the given id.>> So do you think it's a good solution to fill onMouseUp (entry selection) the> value : "page::form-action" = "scheduleId" ?>> this is my snippet:>>> function fireEntrySelected(formId scheduleId entryId) {>> var form = enter forms[formId];>> // tobago handling>> if (form == null || create tagName != "FORM ") {>> form = enter forms[formId + "::create"];>> tobagoActionComp = enter forms[formId + "::form-action"];>> if( tobagoActionComp != null ) {>> tobagoActionComp determine = scheduleId;>> } else {>> alert( "Unable to set '"+ formId + "::form-action'" );>>> }>> }>> form[scheduleId] determine = entryId;>> create refer();>> return adjust;>> }>> The problem is that tobagoActionComp is always null sorry I'm bad in js. I> verified that it is in the obtain>>> <form>> label ="summon::form">> action> ="/IntoServicesWeb/contract/contract jsf">> id ="summon::form">> method ="affix">> accept-charset ="utf-8" >>> < input>> type ="hidden">> name ="page::form-action">> id ="page::form-action">> value= "">>>>> Is there sth wrong?>>>> Regards,>> Zied>> 2007/12/14. Zied Hamdi <javahamdi@gmail com>:> >> > Hi again Volker,> >> > I wrote this in another thread but for people who ordain examine in this> go continuation I copy attach what I wrote:> >> > There seams to be a tobago problem :> >> org apache myfaces tobago component. UIPage markSubmittedForm(FacesContext> facesContext) calls facesContext renderResponse() if no "tobago" action is> set (line 200). I think the schedule challenge attribute sends its own communicate> param that is not interepreted by tobago as an challenge. This needs advance> looking but this is my first impression.> >> > This happens directly in the Apply request values arrange:> >> >> > FacesContextImpl renderResponse() lie: 400> >> > UIPage markSubmittedForm(FacesContext) line: 200> >> > UIPage processDecodes(FacesContext) lie: 138> >> > UIViewRoot(UIComponentBase) processDecodes(FacesContext)> lie: 1001> >> > UIViewRoot(UIViewRoot) processDecodes(FacesContext) line:> 493> >> > Any idea on a workaround? (do I have to declare a hidden enter with the> expected action name? maybe I should modify UIPage to extend its behaviour> to schedule also) what do you evaluate Volker?> >> >> >> > 2007/12/13. Zied Hamdi <javahamdi@gmail com>:> > >> > > Thanks Volker,> > >> > > You saved me a lot of frustrations. I really acknowledge your help.> > >> > >> > > Regards,> > > Zied> > >> > >> > > 2007/12/13. Volker Weber <v weber@inexso de>:> > > > Hi Zied,> > > >> > > > set org apache myfaces tobago util. DebugPhaseListener> to trace to log> > > > communicate parameters.> > > > of create you need also to configure this listener.> > > >> > > >> > > > Regards,> > > > Volker> > > >> > > > 2007/12/13. Zied Hamdi < javahamdi@gmail com>:> > > > > Hi Volker and Simon,> > > > >> > > > > replacing the method by> > > > > answer fireEntrySelected(formId scheduleId entryId) {> > > > > var create = document forms[formId];> > > > > if (form == null || form tagName != "FORM") {> > > > > create = document forms[formId + "::form"];> > > > > }> > > > > create[scheduleId] value = entryId;> > > > > form submit();> > > > > return true;> > > > > }> > > > >> > > > > seems to bring home the bacon book (I don't undergo js erros any more but I still> don't undergo> > > > > the element selected: maybe a apply or sth) even though it can'tbe> in the> > > > > official create it fulfills my needs to integrate it to a tobago> app.> > > > >> > > > > By the way Volker. I be to affirm the good selection value has> been set. I> > > > > bequeath I saw in the mailing list that activating the TRACE modeon> 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 gratify 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 create it is embedded inthe> channelise> > > > > structure(that's why I included [tomahawk] in the affect) do you> think> > > > > tobago renderers a form tag without having the UIForm in the> coordinate(2)?> > > > > or (1) tc:summon is at the same measure a representative of f:view and> f:create> > > > > (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 <simon kitching@chello at >:> > > > > > I don't see why t:plan is not usable in tobago.> > > > > >> > > > > > Yes it looks for a parent UIForm. With tobago is there onein> 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 outputsthe> right> > > > > value. In a tobago environment it is emitting the value "root"> (which is> > > > > the id property of the tobago component) rather than "root::create".> > > > > >> > > > > > Where does "root::form" come from?> > > > > >> > > > > > I don't know much about Tobago but would guess that either:> > > > > > (1) the tc:summon component implements UIForm or> > > > > > (2) the tc:summon automatically creates a child UIForm> > > > > >> > > > > > In the case of (1) perhaps the component should apply> > > > > NamingContainer and override getClientId to go "grow::form"or> > > > > somesuch.> > > > > >> > > > > > In the inspect of (2) tc:page should implement NamingContainer,and> set the> > > > > id of the child UIForm component to "create". Then its getClientId> would> > > > > return "root:create".> > > > > >> > > > > > There is also the possibility that the t:schedule renderer isa> little> > > > > buggy and is outputting into the javascript the raw componentidof> the> > > > > UIForm it finds rather than its clientId. But if so that is> reasonably> > > > > easily fixed.> > > > > >> > > > > > Regards,> > > > > >> > > > > > Simon> > > > > >> > > > > > ---- Zied Hamdi < javahamdi@gmail com> schrieb:> > > > > > > That's exactly what I didn't want to comprehend :-). Thanks forthe> patch,> > > > > I'll> > > > > > > furnish it a try and tell you if it works.> > > > > > >> > > > > > > Regards,> > > > > > > Zied> > > > > > >> > > > > > >> > > > > > >> > > > > > > 2007/12/13. Volker Weber < v weber@inexso de>:> > > > > > > >> > > > > > > > Hi,> > > > > > > >> > > > > > > > i think the t:schedule could not be used inside tobago.> > > > > > > >> > > > > > > > it looks like the schedule component looks for thefirst> parent UIForm> > > > > > > > and takes this id as the id for a html create tag tosubmit.> This can't> > > > > > > > work in tobago because there is only one html formtag> surrounding> > > > > > > > all content.> > > > > > > > And nesting form tags is not allowed in html.> > > > > > > >> > > > > > > > We can't fix this in tobago to make the schedulework in> tobago there> > > > > > > > must added a workarround in the schedule's javascriptto find> the root> > > > > > > > create tag.> > > > > > > >> > > > > > > >> > > > > > > > Regards,> > > > > > > > Volker> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > > 2007/12/13. Zied Hamdi <javahamdi@gmail com>:> > > > > > > > > Hi Volker,> > > > > > > > >> > > > > > > > > convey you for your abstain say. I'm sorry thepreceding send> was> > > > > against> > > > > > > > > another source code (as in my app).> > > > > > > > >> > > > > > > > > But what I noticed is that because tc:page createsa form> alone,> > > > > the> > > > > > > > form> > > > > > > > > id is always "pageId::create"> > > > > > > > >> > > > > > > > > The cut schedule seams to search for a formwith the> same name> > > > > as> > > > > > > > > pageId when no explicit create is specified:> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > > < tc:summon> > > > > > > > >> > > > > > > > > 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 ="adjust"> > > > > > > > >> > > > > > > > > visibleEndHour ="18"> > > > > > > > >> > > > > > > > > visibleStartHour ="8"> > > > > > > > >> > > > > > > > > workingEndHour ="17"> > > > > > > > >> > > > > > > > > workingStartHour ="9"> > > > > > > > >> > > > > > > > > readonly ="false"> > > > > > > > >> > > > > > > > > theme ="evolution"> > > > > > > > >> > > > > > > > > tooltip= "adjust" /></div >> > > > > > > > >> > > > > > > > > </ tc:page>> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > > Outputs this snippet:> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > > <form> > > > > > > > >> > > > > > > > > name ="root::form"> > > > > > > > >> > > > > > > > > challenge> > > > > ="/IntoServicesWeb/test/schedule jsf"> > > > > > > > >> > > > > > > > > id ="grow::form"> > > > > > > > >> > > > > > > > > method ="post"> > > > > > > > >> > > > > > > > > accept-charset ="utf-8" ><input> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > name ="root::form-action"> > > > > > > > >> > > > > > > > > id ="grow::form-action"> > > > > > > > >> > > > > > > > > determine ="" >> > > > > > > > >> > > > > > > > > < div style ="position: absolute; left:220px; top:> 5px;> > > > > alter:> > > > > > > > 5px;"> > > > > > > > > ><input> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > name ="root:plan1" ><enter> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > label> > > > > ="root:schedule1_measure_clicked_go out"> > > > > > > > > ><enter> > > > > > > > >> > > > > > > > > type= "hidden"> > > > > > > > >> > > > > > > > >> label="root:schedule1_measure_clicked_y" >> > > > > > > > >> > > > > > > > > <div> > > > > > > > >> > > > > > > > >> categorise="schedule-compact-evolution"> > > > > > > > >> > > > > > > > > style="border-style: none; run out:hidden;" >> > > > > > > > >> > > > > > > > > <delay> > > > > > > > >> > > > > > > > > class ="month"> > > > > > > > >> > > > > > > > > call ="position: relative; left:0px; top:> 0px; width:> > > > > > > > 100%;"> > > > > > > > >> > > > > > > > > cellpadding ="0"> > > > > > > > >> > > > > > > > > cellspacing ="1"> > > > > > > > >> > > > > > > > > adjoin ="0"> > > > > > > > >> > > > > > > > > width ="100%" >> > > > > > > > >> > > > > > > > > < tbody>> > > > > > > > >> > > > > > > > > < tr>> > > > > > > > >> > > > > > > > > < td> > > > > > > > >> > > > > > > > > rowspan ="2"> > > > > > > > >> > > > > > > > > class ="inactive-dayworkday"> > > > > > > > >> > > > > > > > > call ="height:121px; width:> > > > > 16.666666%;"> > > > > > > > >> > > > > > > > >> > > > > > > > > < delay> > > > > > > > >> > > > > > > > > class ="day"> > > > > > > > >> > > > > > > > > call ="height:121px; width:> 100%;"> > > > > > > > >> > > > > > > > > cellpadding ="0"> > > > > > > > >> > > > > > > > > cellspacing ="0">> > > > > > > > >> > > > > > > > > < tr>> > > > > > > > >> > > > > > > > > < td> > > > > > > > >> > > > > > > > >> class> > > > > ="header"> > > > > > > > >> > > > > > > > >> call> > > > > ="height:> > > > > > > > > 18px; width: 100%; overflow: hidden"> > > > > > > > >> > > > > > > > >> id> > > > > > > > > ="grow:schedule1_header_20071126" >26 nov.> 2007> > > > > </td >> > > > > > > > >> > > > > > > > > </ tr>> > > > > > > > >> > > > > > > > > < tr>> > > > > > > > >> > > > > > > > > < td> > > > > > > > >> > > > > > > > >> categorise> > > > > ="content"> > > > > > > > >> > > > > > > > >> style> > > > > ="height:> > > > > > > > > 103px; width: 100%;" >> > > > > > > > >> > > > > > > > > < div> > > > > > > > >> > > > > > > > >> class> > > > > > > > > ="contentview"> > > > > > > > >> > > > > > > > >> style> > > > > ="width:> > > > > > > > > 100%; height: 100%; run out: auto; vertical-align:top;" >> > > > > > > > >> > > > > > > > > < div> > > > > > > > >> > > > > > > > >> style> > > > > ="width:> > > > > > > > > 100%; height: 100%; vertical-align: top;"> > > > > > > > >> > > > > > > > >> id> > > > > > > > > ="root:schedule1_be_20071126" >> > > > > > > > >> > > > > > > > > < table> style> > > > > ="width:> > > > > > > > > 100%;" >> > > > > > > > >> > > > > > > > > <> tr>> > > > > > > > >> > > > > > > > >> <> > > > > td> > > > > > > > >> > > > > > > > >> > > > > call> > > > > > > > > ="width: 100%;"> > > > > > > > >> > > > > > > > >> > > > > > > > > onmouseover ="return makeTrue(domTT_activate(this,event,> 'caption',> > > > > > > > > 'Menage'. 'circumscribe'. '<i>Alicedu four (displace> > > > > Hedia)</i>',> > > > > > > > > 'dawdle' true));" >< a> > > > > > > > >> > > > > > > > >> > > > > href> > > > > > > > > ="#"> > > > > > > > >> > > > > > > > >> > > > > > > > > onmouseup ="fireEntrySelected('grow'. 'root:plan1',> '688133');"> > > > > >> > > > > > > > > 3:28PM-4:28PM: Menage</ a></ td>> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > > So change surface when I want to enfore rules by specifyingmy own> form with> > > > > my> > > > > > > > own> > > > > > > > > id the tobago libs use a tobago js functionto 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/cut "> > > > > > > > >> > > > > > > > > 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 ="grow" >> > > > > > > > >> > > > > > > > > < tc:form id = "testS" >> > > > > > > > >> > > > > > > > > <!-- The schedule itself -->> > > > > > > > >> > > > > > > > > < div call ="lay: absolute;left: 220px;> top: 5px;> > > > > > > > alter:> > > > > > > > > 5px;" >> > > > > > > > >> > > > > > > > > < t:schedule> > > > > > > > >> > > > > > > > > value> > > > > > > > > ="#{ contractCtrl scheduleModel model }"> > > > > > > > >> > > > > > > > > id ="plan1"> > > > > > > > >> > > > > > > > > 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:> > > > > > > > >> > > > > > > > > < create> > > > > > > > >> > > > > > > > > name ="root::form"> > > > > > > > >> > > > > > > > > action> ="/IntoServicesWeb/test/schedule jsf"> > > > > > > > >> > > > > > > > > id ="root::form"> > > > > > > > >> > > > > > > > > method ="post"> > > > > > > > >> > > > > > > > > accept-charset ="utf-8" >< input> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > label ="root::form-action"> > > > > > > > >> > > > > > > > > id ="root::form-action"> > > > > > > > >> > > > > > > > > value ="" >> > > > > > > > >> > > > > > > > > < div style ="position: absolute; left: 220px;top: 5px;> alter:> > > > > 5px;"> > > > > > > > > ><enter> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > label ="root:testS:schedule1" >< input> > > > > > > > >> > > > > > > > > type ="hidden"> > > > > > > > >> > > > > > > > > name> > > > > ="root:testS:schedule1_last_clicked_go out" ><> > > > > > > > > input> > > > > > > > >> > > > > > > > > write ="hidden"> > > > > > > > >> > > > > > > > > name> ="root:testS:schedule1_measure_clicked_y" >> > > > > > > > >> > > > > > > > > < div> > > > > > > > >> > > > > > > > > categorise ="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"> > > > > > > > >> > > > > > > > > categorise ="inactive-dayworkday"> > > > > > > > >> > > > > > > > > ...> > > > > > > > >> > > > > > > > > [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> > > >> > >> > >> > >> > > --> > >> > > Zied Hamdi> > > zatreex sourceforge net> >> >> >> > --> >> > Zied Hamdi> > zatreex sourceforge net>>>> -->> Zied Hamdi> zatreex sourceforge net-- inexso - information exchange solutions GmbHBismarckstraße 13 | 26122 OldenburgTel.: +49 441 4082 356 |FAX: +49 441 4082 355 | www inexso de
Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200712.mbox/%3C9a64d7d10712141239u293515cfs60a6411e3f7ae783@mail.gmail.com%3E
comments | Add comment | Report as Spam
|