Class: JavaMappingBoolean
- Inherits:
-
JavaMapping
show all
- Defined in:
- lib/ontomde-uml2-struts/mappingForJsp.rb,
lib/ontomde-uml2-struts/mappingForBean.rb
Instance Method Summary
collapse
Methods inherited from JavaMapping
#addActionFieldMethod!, #getFormCopyTo, #getFormInitFrom, #getFormType, #java_Name, #java_helper_addMethods!, #java_helper_customCode, #java_qualifiedName, #rdf_uri, #struts_edit_writeFieldGeneric_DisplayTable_displayTag_column, #struts_generateHelper
Instance Method Details
#getJavaParse(jsrc) ⇒ Object
83
84
85
|
# File 'lib/ontomde-uml2-struts/mappingForBean.rb', line 83
def getJavaParse(jsrc)
return %{((#{jsrc}).compareTo("true")==0)}
end
|
#getJavaToString(jsrc) ⇒ Object
80
81
82
|
# File 'lib/ontomde-uml2-struts/mappingForBean.rb', line 80
def getJavaToString(jsrc)
return %{((#{jsrc}) ? "true" : "false")}
end
|
#getJSP(datatype, field, owner) ⇒ Object
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 71
def getJSP(datatype,field,owner)
if field.context[:jspUseXmdaTaglib]
return %{<xmda:checkbox property="#{field.java_Name}"/>\n}
else
return %{
<html:hidden property="#{field.java_Name}" />
<logic:equal value="true" property="#{field.java_Name}" name="#{STRUTS_BEAN_KEY}" >
<input type="checkbox" name="#{field.java_Name}_tmp" onClick='document.forms[0].#{field.java_Name}.value=this.checked;' checked />
</logic:equal>
<logic:notEqual value="true" property="#{field.java_Name}" name="#{STRUTS_BEAN_KEY}" >
<input type="checkbox" name="#{field.java_Name}_tmp" onClick='document.forms[0].#{field.java_Name}.value=this.checked;' />
</logic:notEqual>
}
end
end
|