Hi, I am not sure what you are trying to do this for, but from the sound of it the identifierToPathConverter isn't the right thing... this converter operates on the values only, so if your input value is just an "attribute name" rather than a path or UUID, I don't see any easy way to recover the path in this case. The node being stored to is unfortunately not available at this point. Trying to get it out of the LocationController seems like a very bad plan to me. Instead I would no use the identifierToPathConverter, and instead subclass the Field class and/or the FieldDefinition class to implement the behavior you need. From the field it should be possible to obtain the JCRItem being stored, and hence the path.
Regards from Vienna, Richard > -----Ursprüngliche Nachricht----- > Von: [email protected] > [mailto:user-list-owner@magnolia- cms.com] Im Auftrag von Piotr > Baraniak (via Magnolia Forums) > Gesendet: Dienstag, 22. Dezember 2015 10:14 > An: Magnolia User List > Betreff: [magnolia-user] Re: Is possible to get LocationController > inside custom identifierToPathConverter? > > Hello, > Thank you for response, but didn't help me, because I still have no > idea how to inject ContentConnector. Maybe my knowledge about Magnolia > is not enough, but when I just added constructor including > ContentConnector annotated Inject or add setter the same way, my > Converter was not initialized at all. So I don't know if I should do > it this way or configure another setter in Configuration app, but then > I don't know how to set reference to ContentConnector. I'm using Magnolia > 5.3.12 if it matter in this case. > > On the other hand I did workaround and store path in field value too, > but still interested how it should be done correctly. > > -- > Context is everything: http://forum.magnolia- > cms.com/forum/thread.html?threadId=ec544c3d-1544-4979-805f- > 17a3de7c26bd > > > ---------------------------------------------------------------- > For list details, see http://www.magnolia-cms.com/community/mailing- > lists.html > Alternatively, use our forums: http://forum.magnolia-cms.com/ To > unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details, see http://www.magnolia-cms.com/community/mailing-lists.html Alternatively, use our forums: http://forum.magnolia-cms.com/ To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
