The Important values to change are the <display-name>, the localDispatcherName, the mainDecoratorLocation and the webSiteId.
[color=red]<context-param>
<param-name>webSiteId</param-name>
<param-value>PRACTICE</param-value>
<description>A unique ID used to look up the WebSite entity to get information about catalogs, etc.</description>
</context-param>
<context-param>
<param-name>localDispatcherName</param-name>
<param-value>practice</param-value>
<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
<param-name>mainDecoratorLocation</param-name>
<param-value>component://practice/widget/CommonScreens.xml</param-value>
<description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
</context-param> [/color]
•For now just put websiteId as "PRACTICE", you will explanation after some time in this tutorial only.
•For now put the value: "component://practice/widget/CommonScreens.xml" in for the mainDecoratorLocation and you will see why in a while. This location is used in pointing to the main decorator location in screens like
${parameters.mainDecoratorLocation}
Which increases the code Independence from changing the path at many places when we need to change the main decorator location. At that time we just need to change the location there only and it will work for all the screens where it has been used. One more advantage of doing this in screens is the purpose of resuability of existing screens which we can use from other components, but it decorate that screen by your decorator only as the same pattern is used at all the places and in all the components to show the mainDecoratorLocation. Concentrate on this when you add decorators in your screens in not too distant future with the development of this application.
[color=red]<context-param>
<param-name>webSiteId</param-name>
<param-value>PRACTICE</param-value>
<description>A unique ID used to look up the WebSite entity to get information about catalogs, etc.</description>
</context-param>
<context-param>
<param-name>localDispatcherName</param-name>
<param-value>practice</param-value>
<description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
</context-param>
<context-param>
<param-name>mainDecoratorLocation</param-name>
<param-value>component://practice/widget/CommonScreens.xml</param-value>
<description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
</context-param> [/color]
•For now just put websiteId as "PRACTICE", you will explanation after some time in this tutorial only.
•For now put the value: "component://practice/widget/CommonScreens.xml" in for the mainDecoratorLocation and you will see why in a while. This location is used in pointing to the main decorator location in screens like
${parameters.mainDecoratorLocation}
Which increases the code Independence from changing the path at many places when we need to change the main decorator location. At that time we just need to change the location there only and it will work for all the screens where it has been used. One more advantage of doing this in screens is the purpose of resuability of existing screens which we can use from other components, but it decorate that screen by your decorator only as the same pattern is used at all the places and in all the components to show the mainDecoratorLocation. Concentrate on this when you add decorators in your screens in not too distant future with the development of this application.
本文详细介绍了web应用中几个关键配置参数的作用及设置方法,包括webSiteId、localDispatcherName和mainDecoratorLocation等。这些参数对于确定网站实体信息、本地调度器标识及主装饰器屏幕位置至关重要。
1446

被折叠的 条评论
为什么被折叠?



