spring roo - how to resolve the errors coming in jspx file -
spring roo - how to resolve the errors coming in jspx file -
i created project through spring too. after added 1 table , create model, controller , view. in view show.jspx
when run it, got error in browser console "empty string passed getelementbyid()"
.
here show.jspx
:
<?xml version="1.0" encoding="utf-8" standalone="no"?> <div class="mainbar" xmlns:spform="http://www.springframework.org/tags/form" xmlns:form="urn:jsptagdir:/web-inf/tags/form" xmlns:util="urn:jsptagdir:/web-inf/tags/util" xmlns:table="urn:jsptagdir:/web-inf/tags/form/fields" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:spring="http://www.springframework.org/tags" xmlns:field="urn:jsptagdir:/web-inf/tags/form/fields" xmlns:jsp="http://java.sun.com/jsp/page" xmlns:page="urn:jsptagdir:/web-inf/tags/form" version="2.0"> <jsp:directive.page contenttype="text/html;charset=utf-8"/> <jsp:output omit-xml-declaration="yes"/> <c:set var="cancreate" value="false" /> <c:set var="canupdate" value="false" /> <c:set var="candelete" value="false" /> <c:set var="canlist" value="true" /> <c:if test="${not empty privilege , privilege eq 'role_admin'}"> <c:set var="cancreate" value="true" /> <c:set var="candelete" value="true" /> <c:set var="canupdate" value="true" /> </c:if> <c:set var="tab" value="${param.tab}"/> <page:tabs id="i_selectaccount_list"> <field:tabitem tabid="selectaccountdetails" isactive="${empty tab or tab eq 0}" id="t_selectaccount_selectaccounts_new_label"> <page:show_in_list id="ps_com_softtrends_mboutique_model_selectaccount" object="${selectaccounts}" path="/selectaccounts" z="" create="${cancreate}" update="${canupdate}" delete="${candelete}" list="${canlist}" displaytitle="false"> <c:if test="${not empty privilege , privilege eq 'role_admin'}"> <field:display_in_table field="selectaccountname" id="ps_com_softtrends_mboutique_model_selectaccount_selectaccountname" object="${selectaccount.selectaccountid}" z=""/> </c:if> <field:display_in_table field="selectaccountname" id="ps_com_softtrends_mboutique_model_selectaccount_selectaccountid" object="${selectaccount.selectaccountid}" z=""/> </page:show_in_list> </field:tabitem> <spring:message code="label_com_softtrends_mboutique_model_selectaccount_selectaccountname" var=""/> <util:panel id="" title="" openpane="false"/> <div class="widget-content"> <table:table data="${existingselectaccount}" id="l_com_softtrends_mboutique_model_selectaccount" path="/selectaccounts/deleteselectaccount/${selectaccountid}" typeidfieldname="selectaccountid" create="false" update="true" delete="true" show="false" addparampage="tab" addparamvalpage="0"> <table:column id="c_com_softtrends_mboutique_model_selectaccount_selectaccountname" property="selectaccount" maxlength="-1"/> </table:table> </div> </page:tabs> </div>
here controller show method:
@requestmapping(value = "/{selectaccountid}", method = requestmethod.get) public string show(@pathvariable("selectaccountid") integer selectaccountid, model uimodel) { uimodel.addattribute("selectaccount", selectaccount.findselectaccount(selectaccountid)/*.getselectaccountname()*/); uimodel.addattribute("itemid", selectaccountid); homecoming "selectaccounts/show"; }
this model class method:
public static long countselectaccounts() { homecoming entitymanager().createquery("select count(o) selectaccount o", long.class).getsingleresult(); }
in line:
<util:panel id="" title="" openpane="false"/>
fill empty attributes: id
, title
required.
spring-roo
Comments
Post a Comment