Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

labelFunction issue in AdvancedDataGrid (Test Case Attached) Formatting #472

Closed
alinakazi opened this issue Sep 23, 2019 · 7 comments
Closed
Assignees
Projects

Comments

@alinakazi
Copy link
Member

Test Case :
https://paste.apache.org/uxwvf

@piotrzarzycki21 piotrzarzycki21 self-assigned this Oct 4, 2019
@piotrzarzycki21 piotrzarzycki21 added this to TO DO in Royale ASJS Oct 4, 2019
piotrzarzycki21 added a commit that referenced this issue Oct 14, 2019
@piotrzarzycki21
Copy link
Member

This issue has to be fixed in two steps

  1. Fix NumberFormatter - Done - I just pushed fix and it should be available with build 28
  2. Fix labelFunction - I will try to get back to that on tomorrow or on Wednesday

@piotrzarzycki21
Copy link
Member

@aharui I have implemented labelFunction handling in item renderer in following way, but it doesn't work and I think it may be a compiler issue.

  1. I have created DataGridColumnICollectionViewModel for AdvancedDataGridColumnList which holds columnIndex
  2. AdvancedDataGridView sets columnIndex
  3. DataItemRendererFactoryForICollectionViewAdvancedDataGridData sets columnIndex in AdvancedDataGridListData using created model
  4. AdvancedDataGridListData provides all data in item renderer to call labelFunction

I'm assigning my labelFunction like that:
<mx:AdvancedDataGridColumn dataField="ci_Code" headerText="Code" width=".40" labelFunction="fn_FormatGrid" />

For some reason it's not being called from item renderer. It looks like some anonymous function without any params in debugger. I'm attaching example with build based on my branch.
adg_labelfunction.zip

piotrzarzycki21 added a commit that referenced this issue Oct 29, 2019
@piotrzarzycki21
Copy link
Member

@alinakazi , @pashminakazi I just pushed changes which should fix this issue. Note that there were also fixes on compiler sight, so make sure that you have also fresh version of that one.

@piotrzarzycki21
Copy link
Member

@pashminakazi any update on this ?

@pashminakazi
Copy link
Contributor

Example : https://paste.apache.org/pdbn4
labelfunction

@piotrzarzycki21
Copy link
Member

piotrzarzycki21 commented Oct 31, 2019

Example : https://paste.apache.org/pdbn4
labelfunction

@pashminakazi but your example itself is invalid - do you see that ? You are providing data source with strings:
new ArrayCollection(["24236482.324234", "23424.435","42344.23423"]);

and later you are trying to reach item with property item.ci_Code <- This property doesn't exists at all. Remove property item.ci_Code and it will work.
fmtAmount.format(item);

Or provide proper data source:

new ArrayCollection([{ci_Code : "24236482.324234"}, {ci_Code :"23424.435"},{ci_Code :"42344.23423"}]);

To me issue is resolved. Function is launching properly and formatter was also fixed.

Royale ASJS automation moved this from TO DO to Done Oct 31, 2019
@pashminakazi
Copy link
Contributor

Issue has been resolved Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Royale ASJS
  
Done
Development

No branches or pull requests

3 participants