Foren

Whats the use of FormName and field attributes in aui tag lib

Oussama Denden, geändert vor 11 Jahren.

Whats the use of FormName and field attributes in aui tag lib

New Member Beiträge: 9 Beitrittsdatum: 10.12.12 Neueste Beiträge
Good day,

Provided that i have the following scenario.

<entity name="Destination" remote-service="false" local-service="true">
		<column name="distinationId" type="long" primary="true" />
		<column name="city" type="String" />
		<column name="date" type="Date" />
</entity>



now i have this form in my view jsp:


<aui:form action="<%=myURL%>" method="post">
<aui:field-wrapper>
			<aui:fieldset label="depart-point-information" column="true">
				<aui:button-row>
					<aui:input inlinefield="true" inlinelabel="false" name="departCity" field="city" model="<%=Destination.class %>" bean="<%=departPoint %>">
						<aui:validator name="required" />
					</aui:input>
				</aui:button-row>
				
				<aui:button-row>
					<aui:input name="departDate" field="date" model="<%=Destination.class %>" bean=" <%=departPoint %>">
						<aui:validator name="required" />
						<aui:validator name="date" />
					</aui:input>
				</aui:button-row>
			</aui:fieldset>
			
			<aui:fieldset label="arrival-point-information" column="true">
				<aui:button-row>
					<aui:input inlinefield="true" inlinelabel="false" name="arrivalCity" field="city" model="<%=Destination.class %>" bean="<%=arrivalPoint %>">
						<aui:validator name="required" />
					</aui:input>
				</aui:button-row>
				
				<aui:button-row>
					<aui:input name="arrivalDate" field="date" model="<%=Destination.class %>" bean="<%=arrivalPoint %>">
						<aui:validator name="required" />
						<aui:validator name="date" />
					</aui:input>
				</aui:button-row>
			</aui:fieldset>
		</aui:field-wrapper>
</aui:form>


i was hoping that this will generate a html with field names = the name attribute i used and i was thinking that "field" attribute as well as "formName" attribute are used to differenciate the entity fields names from the form fields names but it wasn't the case the generated html always append the portlet namespace with the entity field name so i end up with two city fields and two date fields which i can't use server side please could any one help i don't want to use javascript