</definition>
<definition name="page.displayknowledge" extends="baseLayout">
+ <put-attribute name="study_properties" value="/jsp/knowledgeProperties.jsp"/>
<put-attribute name="presentation_pane" value="/study/displayKnowledge.jsp"/>
</definition>
<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
-<%@page import="org.splat.dal.bo.som.KnowledgeElement"%>
<%@page import="org.splat.som.ApplicationRights"%>
-<%@page import="org.splat.simer.ApplicationSettings"%>
<%@page import="java.util.ResourceBundle"%>
-<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="org.splat.simer.Action"%>
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Initialization of the context
=============================================================================================================================
<s:set var="user"><%=connected%></s:set>
<s:set var="format"><%=format%></s:set>
<s:set var="today"><%=tostring.format(java.util.Calendar.getInstance().getTime())%></s:set>
-<html>
+<script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
- <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
-
- <script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
-
- <body onLoad="initialize('<%=result%>')">
+<script>
+$(document).ready(function () {
+ initialize('<%=result%>');
+});
+</script>
<!-- Search criteria section
=============================================================================================================================
</select>
</td>
</tr>
- <tr>
- <td colspan=5 align=left>
- <s:if test="visibility == 'PRIVATE'">
- <input type=radio name="visibility" value="PRIVATE" checked onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" onClick="changeFilter()"><s:text name="field.either"/>
- </s:if>
- <s:elseif test="visibility == 'PUBLIC'">
- <input type=radio name="visibility" value="PRIVATE" onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" checked onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" onClick="changeFilter()"><s:text name="field.either"/>
- </s:elseif>
- <s:elseif test="visibility == 'onlypublic'">
- <input type=radio name="visibility" value="PRIVATE" disabled onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="onlypublic" checked onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" disabled onClick="changeFilter()"><s:text name="field.either"/>
- </s:elseif>
- <s:else>
- <input type=radio name="visibility" value="PRIVATE" onClick="changeFilter()"><s:text name="field.private"/>
- <input type=radio name="visibility" value="PUBLIC" onClick="changeFilter()"><s:text name="field.public"/>
- <input type=radio name="visibility" value="all" checked onClick="changeFilter()"><s:text name="field.either"/>
- </s:else>
- </td>
- </tr>
<tr>
<td colspan=2><s:text name="criterion.author"/> </td>
<td colspan=3 align=center>
</div>
</div>
</div>
-
- </body>
-</html>
\ No newline at end of file
<%@page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
-<%@page import="org.splat.dal.bo.som.Study"%>
<%@page import="org.splat.som.ApplicationRights"%>
-<%@page import="org.splat.simer.ApplicationSettings"%>
<%@page import="java.util.ResourceBundle"%>
-<%@page import="java.util.Calendar"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="org.splat.simer.Action"%>
<%@page import="com.opensymphony.xwork2.ActionContext"%>
<%@taglib prefix="s" uri="/struts-tags"%>
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Initialization of the context
=============================================================================================================================
<s:set var="user"><%=connected%></s:set>
<s:set var="format"><%=format%></s:set>
<s:set var="today"><%=tostring.format(java.util.Calendar.getInstance().getTime())%></s:set>
-<html>
+<script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
- <link href=<s:url value="/skin/default.css"/> rel="stylesheet" type="text/css">
-
- <script language="JavaScript" type="text/javascript" src="../js/search.js"></script>
-
- <body onLoad="initialize('<%=result%>')">
+<script>
+$(document).ready(function () {
+ initialize('<%=result%>');
+});
+</script>
<!-- Search criteria section
=============================================================================================================================
</div>
</div>
</div>
-
- </body>
-</html>
\ No newline at end of file
*/
private static final long serialVersionUID = -3104321907432838476L;
- /**
- * "Private", "Public", "All".
- */
- private String _visibility = null;
/**
* Knowledge type index when among all.
*/
sprop.setAuthor(him);
}
// Set of the visibility
- if ("all".equals(_visibility)) {
KnowledgeElement.Properties other = sprop.copy();
other.setVisibility(Visibility.PUBLIC);
_result = getSearchService().selectKnowledgeElementsWhere(sprop,
other);
- } else {
- Visibility reparea;
- if ("onlypublic".equals(_visibility)) {
- reparea = Visibility.PUBLIC;
- } else {
- reparea = Visibility.valueOf(_visibility);
- }
- sprop.setVisibility(reparea);
- if (reparea == Visibility.PRIVATE) {
- sprop.setActor(getConnectedUser());
- }
-
- _result = getSearchService().selectKnowledgeElementsWhere(sprop);
- }
session.put(RESULT_KEY, _result); // For redisplaying the page without re-executing the search
return "refresh";
}
return _state;
}
- public String getVisibility() {
- return _visibility;
- }
-
public String getWords() {
return _words;
}
this._state = value;
}
- public void setVisibility(final String value) {
- this._visibility = value;
- }
-
public void setWords(final String value) {
this._words = value;
}
@SuppressWarnings("unchecked")
protected void loadFilter() {
Map<String, Object> session = getSession();
- User user = getConnectedUser();
Map<String, Object> filter = (Map<String, Object>) session
.get("knowledge.filter"); // A default filter is supposed being set at start
- _visibility = (String) filter.get("visibility");
_criteriaMatch = (String) filter.get("matchamong");
_contextMatch = (String) filter.get("matcontext");
_state = (String) filter.get("type");
_reference = (String) filter.get("reference");
_words = (String) filter.get("title");
_context = (List<SimulationContext>) filter.get("context");
-
- if (user == null) {
- _visibility = "onlypublic";
- }
}
@Override
Map<String, Object> filter = (Map<String, Object>) session
.get("knowledge.filter"); // A default filter is supposed being set at start
- filter.put("visibility", this._visibility);
filter.put("matchamong", this._criteriaMatch);
filter.put("matcontext", this._contextMatch);
filter.put("type", this._state);
type.context.module = Module de calcul
type.context.component = Brique technologique
+type.knowledge.usecase = Use case
type.knowledge.bestpractice = Bonne pratique
type.knowledge.limitation = Limitation
type.knowledge.inconsistency = Incohérence
type.context.module = Solver
type.context.component = Software component
+type.knowledge.usecase = Use case
type.knowledge.bestpractice = Best practice
type.knowledge.limitation = Limitation
type.knowledge.inconsistency = Inconsistency
<property name="projectSettings" ref="projectSettings" />
<property name="knowledgeElementTypeService"
ref="knowledgeElementTypeService" />
+ <property name="publicationService" ref="publicationService" />
</bean>
<bean id="openStudy" class="org.splat.simer.OpenStudy"
parent="openObject" scope="session">
<property name="projectElementService"
ref="projectElementService" />
- <property name="publicationService" ref="publicationService" />
<property name="studyService" ref="studyService" />
<property name="stepService" ref="stepService" />
<property name="repositoryService" ref="repositoryService" />