If you modify the generated code by SPRING-ROO, make sure the name used in controller and view was right/same, since we use different convention compared to ROO's generated items.
Dev info:
IMS-SISv3 || SPRING || ROO
error, issue, RnD, notes for my colleagues ... anything related with my job. A good programmer should be a good and fast reader. This log just to cut the costs of my RnD. Nothing personal :)
Tuesday, 30 October 2012
Monday, 29 October 2012
Spring: java.lang.IllegalStateException
Neither BindingResult nor plain target object for bean name 'id' available as request attribute
Solusi:
DevInfo:
Spring 3.06 || IMS-SISv3
Solusi:
- Check pada view sama ada bean "id" dipanggil.
- Jika perlu, provide bean/BindingResult pada controller,
- jika tidak, remove daripada view tersebut.
DevInfo:
Spring 3.06 || IMS-SISv3
Tuesday, 16 October 2012
DOJO 1.7: TabContainer - selected tab PROGRAMMATIC
ni yg aku buat kat hostel.
Hantar 1 parameter drpd controller nama dia tabId
uiModel.addAttribute("tabId"," blockInfo");
return "collegemains/show";
then baca dalam page
then set value xxxSelected;
last print value xxxSelected masa generate tab.
tapi cara ni guna programmatic, cuba cari guna declarative.
<script type="text/javascript">
dojo.ready(function()
{
var tc = new dijit.layout.TabContainer({ style: "height: 100%; width: 100%;"}, "tc-hostelInfo");
var blockInfoSelected = false;
var hostelPersonnelInfoSelected = false;
var hostelHouseInfoSelected = false;
if ("${param.tabId}"=='blockInfo' ) { blockInfoSelected=true;}
if ("${param.tabId}"==' hostelPersonnelInfo') { hostelPersonnelInfoSelected= true;}
if ("${param.tabId}"==' hostelHouseInfo') { hostelHouseInfoSelected=true;}
var cpBlock = new dijit.layout.ContentPane({
title: "Hostel Block",
href : "${tabHostelBlockUrl}page=1& size=${empty param.size ? 10 : param.size}",
selected: blockInfoSelected, parseOnLoad: blockInfoSelected
});
var cpFellow = new dijit.layout.ContentPane({
title: "Hostel Personnel",
href : "${tabHostelPersonnelUrl}page= 1&size=${empty param.size ? 10 : param.size}",
selected: hostelPersonnelInfoSelected, parseOnLoad: hostelPersonnelInfoSelected
});
var cpUnit = new dijit.layout.ContentPane({
title: "Hostel Unit",
href : "${tabHostelHouseUrl}page=1& size=${empty param.size ? 10 : param.size}",
selected: hostelHouseInfoSelected, parseOnLoad: hostelHouseInfoSelected
});
tc.addChild(cpBlock);
tc.addChild(cpFellow);
//tc.addChild(cpUnit);
tc.startup();
});
</script>
Dev info: Code=IKCM-APR || Framework=DOJO,SPRING || Language=JAVA,JSP
DOJO 1.7: dijit.layout.TabContainer - selected tab
ada declaration camni
Dev info: Code: IKCM-APR || Framework: DOJO, SPRING
<div data-dojo-type="dijit/layout/ContentPane" title="My first tab" data-dojo-props="selected: true">
so, pada page yg ada tab, sebelum <html>
declare
<c:if test="${not empty tabId}">
<c:choose>
//contohnya hantar uiModel.addAttribute(" tabId","studyLeave");
// tapi aku tak sure sama ada leh guna test="${tabId eq 'studyLeave'}" atau test="${ tabId=='studyLeave'}"
<c:when test="${tabId eq 'studyLeave'}">
<c:set var="studyLeaveSelected" value="true" />
</c:when>
<c:otherwise>
//kat sini set utk tab yg memula nk tunjuk kalau takde tab yg kita select
<c:set var="studyLeaveSelected" value="true" />
</c:otherwise>
</c:choose>
</c:if>
pastu pada declaration
<div data-dojo-type="dijit/layout/ ContentPane" title="My first tab" data-dojo-props="selected:<c:out value="${st udyLeaveSelected}" default="false" /> ">
Thursday, 11 October 2012
Displaytag: Total pada footer
Boleh rujuk sendiri rujukan displaytag, ini nota ringkas buat diriku yang mudah lupa..
Apa yang penting:
Apa yang penting:
- varTotal kena assign value, contoh varTotal="total"
- property total="true" kena set pada column
- boleh display guna variable pada (1) tadi, contoh ${total.column3}.
- setakat ni memang guna columnN dimana N ialah kedudukan/indeks column yg anda mahu display total bermula dengan nilai 1.
Monday, 8 October 2012
Ibatis 2: ORA-00911: invalid character error
org.springframework.jdbc.BadSqlGrammarException: SqlMapClient operation; bad SQL grammar []; nested
exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/icms/biz/dao/ibatis/maps/StaffExpertise.xml.
--- The error occurred while applying a parameter map.
--- Check the STEXP.getActSEBSId-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00911: invalid character
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLEx
ceptionTranslator.java:97)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:72)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:80)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(Abstrac
tFallbackSQLExceptionTranslator.java:80)
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:212
)
Friday, 5 October 2012
IBATIS 2 SQL Map: LIKE + '%'
Jumpa 1 isu dengan SQL Mapping apabila cuba gunakan LIKE dengan '%' dalam SQL Map framework IBATIS 2
Subscribe to:
Posts (Atom)