Community
Participate
Working Groups
Build ID: M20080911-1700 Steps To Reproduce: Currently there is no way to create markup specific or unique to a given view (design/preview) using the available transform operations. The decorator options provide a mechanism to make the markup distinct, but this is limited for some scenarios. For example, some tag libs have logic or conditional tags (JSTL, Struts) that have child element content in the body of the tag... <c:catch var="ex"> ... </c:catch> <c:if test="${not empty ex}"> <c:out value="${ex}"/> </c:if> Would be great for a developer creating Design Time tag converter meta-data to be able to display a place holder with an image and label describing the logic tag in the design view, as well as display the markup for the child element contents, but only display the child contents in the preview mode - without an image or label for the parent logic tag. Would be great to enhance the set of tag converter transform operations in WPE tag support with a new one that would execute child operations depending on a given view mode (a parameter to the new operation). More information: If the proposed transform operation does not belong with the WPE tag support, it would be great if the Design Time meta-data framework for tag support and transform operations exposed the view mode from the ITagConverter object so that a developer can write their own transform operation that can check the view mode. Currently, an instance of DTTagConverter contains the value of the mode, but DTTagConverter is an internal class. Also, there is no public way to get the tag converter. The ITagConverterContext does not provide a method to get the tag converter (though the internal implementation, DTTagConverterContext, does have the protected member data, DTTagConverter).
Plan for 3.1.2/3.2
Created attachment 167352 [details] patch with new transform operation and addition to the operations registered in the plugin.xml This patch includes the new CheckModeOperation implementation along with the addition of the class in the list of transform operations in the plugin.xml. The fix requires the addition of a new public method to get the mode from an internal class, the DTTagConverterContext. In the future, we might want to expose getMode() as part of public API. The interface ITagConverter declares a setMode() operation but does not have a getMode() exposed. Might be useful to expose getMode() there as well as on the ITagConverterContext. However, for this stage in the release, best not to change these interfaces. Will add a second patch with a JUnit test.
Raghu, please consider for PMC approval.
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such. This is 'hotbug' request from Oracle. The patch enables the adopter product to enhance design-time rendering of tags in the Web Page Editor based on the current view: design or preview. * Is there a work-around? If so, why do you believe the work-around is insufficient? No workaorund * How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added? Manual testing. Junit test will be added * Give a brief technical overview. Who has reviewed this fix? See description and comment 2 * What is the risk associated with this fix? low-medium
Created attachment 167521 [details] additional patch containing the junit test I'll apply the junit patch along with the original patch.
Patches checked into head for 3.2RC1.
New Gerrit change created: https://git.eclipse.org/r/114213
New Gerrit change created: https://git.eclipse.org/r/114214
Gerrit change https://git.eclipse.org/r/114213 was merged to [master]. Commit: http://git.eclipse.org/c/jsf/webtools.jsf.git/commit/?id=598da983ba6149e5d65a06052d61457989bb0803
Gerrit change https://git.eclipse.org/r/114214 was merged to [master]. Commit: http://git.eclipse.org/c/jsf/webtools.jsf.git/commit/?id=e91b1489fa98bb207be2f72ff1ebda0aa2a8e3b8