Skip to main content
Participating Frequently
October 7, 2010
Question

Navigation Library with runtime metadata in Parsley?

  • October 7, 2010
  • 1 reply
  • 2242 views

Hi There,

I'm working with the Adobe Navigation Library. I'm trying to do something with a PM where instead of defining the [Landmark] tag on the class itself, I want this to be assigned dynamically for that type (or for an id) from the context, so that a particular PM class could be reused in different navigation schemes in multiple apps.

In the Navigation library, there's a LandmarkDecorator (extends ObjectDefinitionDecorator) which is looking at the ClassInfo ONLY, and the [Landmark] decoration from the mxml tag doesn't appear in ClassInfo of course. At that point, for other tags which work in conjunction with [Landmark], it throws an error because it cannot see a [Landmark] tag.

What I want to do is:

1. Attach the [Landmark] (and other) Navigation tags to objects at runtime using tags in mxml or xml
2. Possible modify the AbstractNavigationDecorator to see the dynamically-added tag(s) so that the Landmark prerequisite can be satisfied

Also, here's what the mxml looks like:

<Object type="{NewsPM}">
     <landmark:LandmarkDecorator name="content.news"/>
     <landmark:EnterDecorator method="firstEnter"
                                             time="first"/>
</Object>

Any ideas?

Thanks in advance,

Bruce Flowers

This topic has been closed for replies.

1 reply

Participating Frequently
October 8, 2010

Hi Bruce,

That was a bug and I've just committed a fix. I've attached a working snapshot for you here.

It should generally be possible with all of our Parsley dependent extentions to use them with metadata, MXML, XML and ActionScript. If you have further issues, let us know.

Best,

Alex

Participating Frequently
October 8, 2010

Thanks for the quick fix Alex!

I updated from the repo and the initial problem of registering the dynamic metadata no longer throws an error. I also see that the invocations are now working for these dynamic tags. 

If I find any other issues I'll let you know, but right now it's all working very well!

Best,

Bruce

Participating Frequently
November 1, 2010

Hi Alex,

Things were working nicely for a while, but now I found another issue which you may or may not be aware of:

Runtime-added Navigation metadata tags work fine in ADL, however: in an AIR release build, I believe we're losing them.  This is only with tags added at runtime via xml or mxml in the context definition.  If I go back to PM's and hardcode the metadata tags, navigation functions normally. 

Any idea what's happening here, and what I might be doing wrong (or is it a bug?)

Thanks,

Bruce Flowers