Announcement Announcement Module
Collapse
No announcement yet.
Conversion from page to model Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Conversion from page to model

    Hi,

    We're using SWF2.2 and JSF1.2 in a portal environment.

    Our example. We have a combobox containing 'countries' as String on our page. On a transition, we want to save the current value as a Code, that is resolved by a CodeService.

    We don't know how to do this. Does anybody have some hints?

    Can we for example use a TypeConverter or do we need a seperate 'page model'?

    Regards,
    michael

  • #2
    Michael,

    Spring Web flow's mvc-jsf example uses a combo box to get the search result size from the user which is similar to what you are trying to do. Following is a code snippet from search jsf page
    Code:
    			<h2>Search Hotels</h2>
    			<h:form id="mainForm">
    				<fieldset>
    					<div class="field">
    						<div class="label">
    							<h:outputLabel for="searchString">Search String:</h:outputLabel>
    						</div>
    						<div class="input">
    							<sf:clientTextValidator promptMessage="Search hotels by name, address, city, or zip.">
    								<h:inputText id="searchString" value="#{searchCriteria.searchString}" />
    							</sf:clientTextValidator>
    						</div>
    					</div>
    					<div class="field">
    						<div class="label">
    						   	<h:outputLabel for="pageSize">Maximum results:</h:outputLabel>
    						</div>
    						<div class="input">
    							<h:selectOneMenu id="pageSize" value="#{searchCriteria.pageSize}">
    								<f:selectItems value="#{referenceData.pageSizeOptions}" />
    							</h:selectOneMenu>
    				   		</div>
    					</div>
    					<div class="buttonGroup">
    						<sf:commandButton id="findHotels" value="Find Hotels" processIds="*" action="search" />
    					</div>
    			    </fieldset>
    			</h:form>

    Comment

    Working...
    X