Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] browse for file relative to file being editied

This is currently not possible with @BasePathsProvider. This feature assumes that the selected path will be contained by one of the base paths. This assumption is most evident in the nature of the browse dialog that you get. We probably should support both behaviors. Maybe a flag on @BasePathProvider? If parent navigation is allowed, then I guess we would use native browse dialogs instead of the constrained relative path dialogs that we currently use with this feature.

 

Some other questions to consider…

 

1. Is this actually a scenario where an absolute path or a relative path would be ok? Think of the case where otherfile.xml is on a different drive letter and there is no way to write a relative path from the current location.

 

2. Does there need to be a limit of how far parent navigation can traverse? Numeric limit? Semantic limit (ie, can only go as far as project root)?

 

Note that you can implement your own browse action handler and validation service to solve this within the scope of current capabilities.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Friday, May 13, 2011 8:28 AM
To: Sapphire project
Subject: [sapphire-dev] browse for file relative to file being editied

 

Hey,

 

Lets say I have a property where I want to specify a Path that will be relative to the current file being edited.  So if the other file is in the same directory it would be resolve "otherfile.xml" and if the other file is in a parent directory it would resolve to "../otherfile.xml" and if its in a sibling directory it would resolve "../otherdir/otherfile.xml".   Is this possible using the @BasePathProvider?

--
Greg Amerson
Liferay, Inc.


Back to the top