So... here's the lowdown on potential modifications for this issue. As of now, I've got it going locally as it is described below (passes all cargo tests and deploys and works). Please give it a quick read and provide feedback.
I should note that the modifications discussed will apply for this issue (APF-499, plus APF-500, APF-501, and APF-502, which are all subtasks of APF-404).
A) I believe the following files should keep the names they have because other resources like jsp files in the web-common module refer to them in their current case, and changing them to adhere to the Tapestry convention would force us to change them in all other web distribution options.
./src/main/webapp/WEB-INF/pages/mainMenu.html
./src/main/webapp/WEB-INF/pages/mainMenu.page
./src/main/webapp/WEB-INF/pages/passwordHint.html
./src/main/webapp/WEB-INF/pages/passwordHint.page
./src/main/webapp/WEB-INF/pages/signup.html
./src/main/webapp/WEB-INF/pages/signup.page
B) I've renamed the following *.html*.page files to adhere to the Tapestry convention.
Classnames different than page names:
./src/main/webapp/WEB-INF/pages/ActiveUsers.html
./src/main/webapp/WEB-INF/pages/ActiveUsers.page (class name: BasePage)
./src/main/webapp/WEB-INF/pages/SelectFile.html
./src/main/webapp/WEB-INF/pages/SelectFile.page (class name: FileUpload)
./src/main/webapp/WEB-INF/pages/ShowFile.html
./src/main/webapp/WEB-INF/pages/ShowFile.page (class name: FileDisplay)
./src/main/webapp/WEB-INF/pages/Users.html
./src/main/webapp/WEB-INF/pages/Users.page (class name: UserList)
Classnames same as page names:
./src/main/webapp/WEB-INF/pages/Error.html
./src/main/webapp/WEB-INF/pages/Error.page
./src/main/webapp/WEB-INF/pages/Reload.html
./src/main/webapp/WEB-INF/pages/Reload.page
./src/main/webapp/WEB-INF/pages/UserForm.html
./src/main/webapp/WEB-INF/pages/UserForm.page
C) I've been able to move the './src/main/webapp/WEB-INF/pages' directory to './src/main/webapp/WEB-INF/tapestry', as suggested. In addition, for those pages that have the same as their coreesponding classes (Error, Reload & UserForm), I was able to comment out their '<page name="Error" specification-path="tapestry/Error.page"/>' line in the tapestry.application file, and specify a '<meta key="org.apache.tapestry.page-class-packages" value="org.appfuse.webapp.action"/>' setting so that Tapestry would find them automatically. As for the others (those pages that do not share the same name as their classes), they still have the 'specification-path' setting. Combining the two styles seems to work.
So... here's the two good options as I see them:
1) Don't do anything:
Leave everything the way it is, and just be satisfied that it is not exactly configured the Tapestry way. The disadvantages to this are twofold...
a) A person experienced with Tapestry may expect things to 'be' and 'look' a certain way, so it would be good to conform to that if possible.
b) It seems silly to require folks to have to put more xml in tapestry.application if they don't have to by simply naming things the same way and taking advantage of the 'org.apache.tapestry.page-class-packages' setting.
2) Do something:
2.1) Leave mainMenu, passwordHint & signUp as is so web-common and other web modules don't have to change.
2.2) Make the rest of these pages have the same name as the java class behind them (ActiveUsers becomes BasePage, SelectFile becomes FileUpload, ShowFile becomes FileDisplay, Users becomes UserList), and use the 'org.apache.tapestry.page-class-packages' setting. The advantage to this is... we have a discrete 3 cases where it doesn't adhere to the Tapestry convention for good reason, and from that point forward, we don't need any extra xml configuration.
I'd vote a weak +1 for Option 2. Let me know what you think. If those more experienced with Tapestry care to trump me here, I'm not gonna put up a fight.
So... here's the lowdown on potential modifications for this issue. As of now, I've got it going locally as it is described below (passes all cargo tests and deploys and works). Please give it a quick read and provide feedback.
I should note that the modifications discussed will apply for this issue (
APF-499, plusAPF-500,APF-501, andAPF-502, which are all subtasks ofAPF-404).A) I believe the following files should keep the names they have because other resources like jsp files in the web-common module refer to them in their current case, and changing them to adhere to the Tapestry convention would force us to change them in all other web distribution options.
./src/main/webapp/WEB-INF/pages/mainMenu.html
./src/main/webapp/WEB-INF/pages/mainMenu.page
./src/main/webapp/WEB-INF/pages/passwordHint.html
./src/main/webapp/WEB-INF/pages/passwordHint.page
./src/main/webapp/WEB-INF/pages/signup.html
./src/main/webapp/WEB-INF/pages/signup.page
B) I've renamed the following *.html*.page files to adhere to the Tapestry convention.
Classnames different than page names:
./src/main/webapp/WEB-INF/pages/ActiveUsers.html
./src/main/webapp/WEB-INF/pages/ActiveUsers.page (class name: BasePage)
./src/main/webapp/WEB-INF/pages/SelectFile.html
./src/main/webapp/WEB-INF/pages/SelectFile.page (class name: FileUpload)
./src/main/webapp/WEB-INF/pages/ShowFile.html
./src/main/webapp/WEB-INF/pages/ShowFile.page (class name: FileDisplay)
./src/main/webapp/WEB-INF/pages/Users.html
./src/main/webapp/WEB-INF/pages/Users.page (class name: UserList)
Classnames same as page names:
./src/main/webapp/WEB-INF/pages/Error.html
./src/main/webapp/WEB-INF/pages/Error.page
./src/main/webapp/WEB-INF/pages/Reload.html
./src/main/webapp/WEB-INF/pages/Reload.page
./src/main/webapp/WEB-INF/pages/UserForm.html
./src/main/webapp/WEB-INF/pages/UserForm.page
C) I've been able to move the './src/main/webapp/WEB-INF/pages' directory to './src/main/webapp/WEB-INF/tapestry', as suggested. In addition, for those pages that have the same as their coreesponding classes (Error, Reload & UserForm), I was able to comment out their '<page name="Error" specification-path="tapestry/Error.page"/>' line in the tapestry.application file, and specify a '<meta key="org.apache.tapestry.page-class-packages" value="org.appfuse.webapp.action"/>' setting so that Tapestry would find them automatically. As for the others (those pages that do not share the same name as their classes), they still have the 'specification-path' setting. Combining the two styles seems to work.
So... here's the two good options as I see them:
1) Don't do anything:
Leave everything the way it is, and just be satisfied that it is not exactly configured the Tapestry way. The disadvantages to this are twofold...
a) A person experienced with Tapestry may expect things to 'be' and 'look' a certain way, so it would be good to conform to that if possible.
b) It seems silly to require folks to have to put more xml in tapestry.application if they don't have to by simply naming things the same way and taking advantage of the 'org.apache.tapestry.page-class-packages' setting.
2) Do something:
2.1) Leave mainMenu, passwordHint & signUp as is so web-common and other web modules don't have to change.
2.2) Make the rest of these pages have the same name as the java class behind them (ActiveUsers becomes BasePage, SelectFile becomes FileUpload, ShowFile becomes FileDisplay, Users becomes UserList), and use the 'org.apache.tapestry.page-class-packages' setting. The advantage to this is... we have a discrete 3 cases where it doesn't adhere to the Tapestry convention for good reason, and from that point forward, we don't need any extra xml configuration.
I'd vote a weak +1 for Option 2. Let me know what you think. If those more experienced with Tapestry care to trump me here, I'm not gonna put up a fight.