Opened 7 years ago

Closed 7 years ago

#15136 closed defect (fixed)

parameters of a list created with markup are not correctly applied to children created programmatically

Reported by: cjolif Owned by: ykami
Priority: high Milestone: 1.8
Component: DojoX Mobile Version: 1.7.2
Keywords: Cc: Eric Durocher
Blocked By: Blocking:

Description (last modified by cjolif)

I'm creating a simple mobile application and I have a problem.

I have a markup created list:

<ul id="news" 
   data-dojo-type="dojox.mobile.RoundRectList" 
   data-dojo-props='variableHeight:true'>
</ul>

Then I'm trying to create items by code and add them to the list.

	var li = new ListItem({
        	class: "",
		href: item.url,
		hrefTarget: "_blank",
		arrowClass: "mblDomButtonBlueCircleArrow"
	});
	news.addChild(li);

The thing is that even if my list has variableHeight: true the list items won't get the right CSS class for that.

This comes from the fact that in ListItem, the this.inherited() call for the "startup" method is called _after_ setting the variable height class while the inheritance of the variableHeight property from the list parent to the item is done in the parent method. A simple solution would obviously be to call this.inherited() before however I have no idea of the implication

Attachments (1)

15136.patch (615 bytes) - added by Eric Durocher 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by cjolif

Cc: Eric Durocher added
Description: modified (diff)
Milestone: tbd1.8

Changed 7 years ago by Eric Durocher

Attachment: 15136.patch added

comment:2 Changed 7 years ago by Eric Durocher

(IBM, CCLA) Patch attached: moved this.inherited() call before setting the mblVariableHeight class.

Last edited 7 years ago by Eric Durocher (previous) (diff)

comment:3 Changed 7 years ago by ykami

Priority: undecidedhigh
Status: newassigned

comment:4 Changed 7 years ago by ykami

Resolution: fixed
Status: assignedclosed

In [28295]:

Fixes #15136 !strict. Moved this.inherited() call before setting the mblVariableHeight class. Thanks edurocher for the patch.

Note: See TracTickets for help on using tickets.