Hi

Since my last update on tapestry 4.1 I have a problem when using getClientId(). I have a Component (DateRangePicker) consisting of a SelectBox and two DropDownDatePickers. To do some javascript (setting the datePicker visible/invisible,depending on the range type (between,from,to,noSelection)). I want to get the clientIds of the subWidgets. Before the update all worked but now the clientIds seem to be calculated wrong or I am using them wrong.

I am getting my ids as follows (part of the renderComponent method of the DateRangePicker):

   super.renderComponent(writer, cycle);

   Map<String,String> parms = new HashMap<String,String>();
   parms.put("selectId", getComponent("rangeSelection").getClientId());
   parms.put("beginId", getComponent("begin").getClientId());
   parms.put("endId", getComponent("end").getClientId());

My DateRangePickers are defined as follows in the Page template:
   <div jwcid="@DateRangePicker" value="ognl:range1"/>
   <div jwcid="@DateRangePicker" value="ognl:range2"/>

The template Code of the DateRangePicker component:
   <div class="date-range-picker">
<select jwcid="[EMAIL PROTECTED]" value="ognl:currentSelection" model="ognl:ranges"></select>
           <div jwcid="[EMAIL PROTECTED]" value="ognl:beginDate"/>
           <div jwcid="[EMAIL PROTECTED]" value="ognl:endDate"/>
      </div>

The generated javascript with the corresponding ids (retrieved through the code above is):

        new 
synedra.DateRangePicker("rangeSelection","begin","end",{"0":"","1":"today","2":"yesterday","3":"precise","4":"between","5":"before","6":"after","7":"lastweek","8":"lastmonth"});

        new 
synedra.DateRangePicker("rangeSelection","begin","end",{"0":"","1":"today","2":"yesterday","3":"precise","4":"between","5":"before","6":"after","7":"lastweek","8":"lastmonth"});

But the expected code would be:

        new 
synedra.DateRangePicker("rangeSelection","begin","end",{"0":"","1":"today","2":"yesterday","3":"precise","4":"between","5":"before","6":"after","7":"lastweek","8":"lastmonth"});

        new 
synedra.DateRangePicker("rangeSelection_0","begin_0","end_0",{"0":"","1":"today","2":"yesterday","3":"precise","4":"between","5":"before","6":"after","7":"lastweek","8":"lastmonth"});


I hope someone can help me to.

Kind, regards
            Robert



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to