Getting the properties of a component with getMetaData() returns them in the wrong order.

Description

IF you define properties in a component, they are displayed in a dump of an instance of the component in order :

But if you try to get the metadata to actually use the properties, they are displayed in a random order:

They should be in the same order, or at least have a way to access the properties. This allows for the easy creation of forms etc that map to components.

Environment

Centos/Tomcat
and
OS X/CommandBox

Attachments

2

Activity

Pothys - MitrahSoft 
1 June 2022 at 12:02

I've checked this ticket with the lucee latest build 6.0.0.179-SNAPSHOT. Now the properties order of getComponentMetaData/getMetaData returns the same as the component properties order

Zac Spitzer 
1 June 2022 at 08:20

Pothys - MitrahSoft 
11 May 2022 at 15:18
(edited)

sorting the properties array on componentImpl.java line 1581 changes the properties order in getComponentMetaData() result.

I added a fix to this ticket
Pull Request:

Pothys - MitrahSoft 
13 December 2016 at 07:23

I've added test case for this ticket. When we try to access the property with getMetaData(), they display property in random order.But In ACF, it seems same order as component order

Pull Request: https://github.com/lucee/Lucee/pull/135

Dominic Watson 
9 July 2015 at 09:26

Awesome , I'll take a look at implementing that. Much cleaner.

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 8 July 2015 at 10:10
Updated 1 June 2022 at 12:02
Resolved 1 June 2022 at 12:02