1
我必须禁用使用Liferay搜索容器从数据库中检索的行。我有一些条件存储在数据库中。根据Liferay搜索容器中的数据库中的条件禁用一行
我想达到的目的是:
- 我展示它的出勤需要标记的学生名单。
- 有时候,学生可能会提前请假,在这种情况下,出席人数预先标记在数据库中。
- 因此,当显示标记出席表格时,我想通过禁用包含已出席标记的学生的数据的行来禁用标记出席。
我想要做的是,如果出席预先标记,显示预先标记出席的表格上的行,并且不允许用户标记该学生出席,即禁用该行。
我该如何做到这一点?
编辑: 的代码片段
Mark Attendance for Today:
<%=new java.util.Date()%>
<portlet:actionURL name="updateAtt" var="updateAttURL" />
<aui:form name="updateAtt" action="<%=updateAttURL.toString() %>" method="post" >
Choose Date to mark Attendance:
<liferay-ui:input-date formName="attendanceDate" yearRangeStart="<%=year %>" yearRangeEnd="<%=year %>"
yearValue="<%=year %>" monthValue="<%=month %>" dayValue="<%=day %>"
dayParam="datt" monthParam="matt" yearParam="yatt" />
<portlet:renderURL var="viewstudentDataURL"/>
<liferay-ui:search-container delta="20" emptyResultsMessage="No Results Found">
<liferay-ui:search-container-results total="<%= studentAttendanceDetails .size() %>"
results="<%= ListUtil.subList(studentAttendanceDetails , searchContainer.getStart(), searchContainer.getEnd()) %>" />
<liferay-ui:search-container-row modelVar="search"
className="com.corpserver.mis.portal.model.Student">
<%
String LImageId = String.valueOf(search.getFileEntryId());
long ImageId = Long.valueOf(LImageId);
DLFileEntry image = DLFileEntryLocalServiceUtil .getFileEntry(ImageId);
String imageURL = "/documents/" + image.getGroupId() + "/" + image.getFolderId() + "/" + image.getTitle()+"/"+image.getUuid();
%>
<liferay-ui:search-container-column-text name="student Photo" href = "">
<img src="<%=imageURL%>" height="50" width="50"/>
</liferay-ui:search-container-column-text>
<!-- Code to display student Image -->
<%
String eol = System.getProperty("line.separator");
%>
<liferay-ui:search-container-column-text name='student Name' value='<%=String.valueOf(search.getstudentFname()) + String.valueOf(search.getstudentLname()) + "<br>" + String.valueOf(search.getstudentTitle()) %>' href="" >
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Attendance Status">
<label>Present</label><input type = "radio" name ='updateattendance<%=String.valueOf(search.getstudentId())%>' value = "Present" />
<label>Absent</label><input type = "radio" name= 'updateattendance<%=String.valueOf(search.getstudentId())%>' value = "Absent"/>
</liferay-ui:search-container-column-text>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator searchContainer="<%=searchContainer %>" paginate="<%=true %>" />
</liferay-ui:search-container>
<input type = "submit" value = "Update"/>
</aui:form>
</body>
</html>
嗨,您是否可以禁用标记出席的输入控件?如果是的话,给我们的搜索容器行的jsp代码 – yannicuLar 2013-05-13 07:34:28
@yannicuLar: 我已经更新了与使用..代码片段.. – 2013-05-13 08:14:48
@SeeyaK ___无关的问题:___我在你的代码中看到'