Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<bean class="org.openmrs.ui2.core.page.PageFactory" autowire-candidate="false">
	<property name="additionalViewProviders">
		<map>
			<entry key="(your-module-id)-module">
				<bean class="org.openmrs.ui2.core.page.SpringMvcPageViewProvider">
					<property name="pages">
						<map>
							<entry key="pageNameIn2x" value="/module/(your-module-id)/(your-page).form" />
						</map>
					</property>
				</bean>
			</entry>
		</map>
	</property>
</bean>

If you don't want to include the entire page, you may put one or both of these in your JSP:

  • <!-- START 2.x PAGE CONTENT -->
  • <!-- END 2.x PAGE CONTENT -->

How to expose a Spring MVC url as a 2.x Fragment

...

Code Block
<bean class="org.openmrs.ui2.core.fragment.FragmentFactory" autowire-candidate="false">
	<property name="additionalViewProviders">
		<map>
			<entry key="(your-module-id)-pages">
				<bean
					class="org.openmrs.ui2.core.fragment.SpringMvcPageAsFragmentViewProvider">
					<property name="fragments">
						<map>
							<entry key="fragmentNameIn2x" value="/module/(your-module-id)/(your-page).form" />
						</map>
					</property>
				</bean>
			</entry>
		</map>
	</property>
</bean>

If you don't want to include the entire page, you may put one or both of these in your JSP:

  • <!-- START 2.x FRAGMENT CONTENT -->
  • <!-- END 2.x FRAGMENT CONTENT -->

You may use query parameters on map entry's values, but you must use

...