Class: JavaMappingURL

Inherits:
JavaMappingText show all
Defined in:
lib/ontomde-uml2-struts/mappingForJsp.rb

Instance Method Summary collapse

Methods inherited from JavaMappingText

#getJavaParse, #getJavaToString, #struts_edit_writeFieldGeneric_DisplayTable_displayTag_column

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

#getJSP(datatype, field, owner) ⇒ Object



35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 35

def getJSP(datatype,field,owner)
  # cf: http://www.osix.net/modules/article/?id=586
  n=datatype.java_Name.downcase #TODO
  return <<END
 <html:text property="#{field.java_Name}" size="20%" maxlength="#{self.maxStringLength}" styleId="#{n}" #{::Muml_DataType::STRUTS_ERROR_STYLE}  disabled="true"/>

<a onclick="javascript:document.getElementById('#{n}').disabled=false;document.getElementById('#{n}').value='';;">
<img  src="res//orange/image/edit.gif" />
</a>&nbsp;<a onclick="javascript:window.open(document.forms[0].#{field.java_Name}.value);return false">
<img  src="res//orange/image/go.gif" />
</a>
END
end