Class: JavaMappingGRAPHVIZ
- Inherits:
-
JavaMappingLargeText
show all
- Defined in:
- lib/ontomde-uml2-struts/jsp_edit.rb,
lib/ontomde-uml2-struts/mappingForJsp.rb,
lib/ontomde-uml2-struts/mappingForBean.rb
Instance Method Summary
collapse
#getJavaParse, #getJavaToString
Methods inherited from JavaMapping
#getFormCopyTo, #getFormInitFrom, #getFormType, #java_Name, #java_helper_addMethods!, #java_helper_customCode, #java_qualifiedName, #rdf_uri, #struts_generateHelper
Instance Method Details
#actionMapMethName(field) ⇒ Object
231
232
233
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 231
def actionMapMethName(field)
return "#{field.java_Name}_map"
end
|
#actionMapUrl(datatype, field, owner) ⇒ Object
234
235
236
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 234
def actionMapUrl(datatype,field,owner)
return "/webapp/GraphVizDemoall-submit.do?#{Muml_Classifier::STRUTS_DISPATCH_FIELD_NAME}=#{actionMapMethName(field)}#myMap"
end
|
#actionMethName(field) ⇒ Object
228
229
230
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 228
def actionMethName(field)
return "#{field.java_Name}_img"
end
|
#addActionFieldMethod!(field, action, form) ⇒ Object
adds special action for this type
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 244
def addActionFieldMethod!(field,action,form)
m=action.struts_createAndAddExecuteOperation(actionMethName(field))
m.java_code=<<END
#{action.struts_formCastJavaCode(form)}
return #{action.struts_getActionHelper.java_qualifiedName}.writeGraphviz(mapping,response, form.getReference().get#{field.java_NameBean}());
END
m2=action.struts_createAndAddExecuteOperation(actionMapMethName(field))
m2.java_code=<<END
#{action.struts_formCastJavaCode(form)}
return #{action.struts_getActionHelper.java_qualifiedName}.writeGraphvizMap(mapping,response, form.getReference().get#{field.java_NameBean}());
END
end
|
#getJSP(datatype, field, owner) ⇒ Object
237
238
239
240
241
|
# File 'lib/ontomde-uml2-struts/mappingForJsp.rb', line 237
def getJSP(datatype,field,owner)
s=field.uml_isReadOnly? ? "" : super(datatype,field,owner)
return %{#{s}#{s.empty? ? "" : "<br>" }<html:img action="#{owner.context[:strutsActionName]}?#{Muml_Classifier::STRUTS_DISPATCH_FIELD_NAME}=#{actionMethName(field)}" usemap="#{actionMapUrl(datatype,field,owner)}"/>}
end
|
#struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop) ⇒ Object
852
853
854
855
|
# File 'lib/ontomde-uml2-struts/jsp_edit.rb', line 852
def struts_edit_writeFieldGeneric_DisplayTable_displayTag_column(prop)
prop.write %{<%-- skip graphviz field #{prop.java_Name} --%>\n}
end
|