Commit dbab29ae authored by piotr.gawron's avatar piotr.gawron
Browse files

clicking on reaction in submaps didn't work

parent eea1ca55
......@@ -3,8 +3,9 @@ minerva (10.0.1) unstable; urgency=medium
* Bug fix: export to image
* Bug fix: trigger reaction and physical stimulation reactions are no
longer allowed (CellDesigner data model issue)
* Bug fix: clicking on reactions in submaps
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 16 Sep 2016 13:01:16 +0200
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 21 Sep 2016 13:01:16 +0200
minerva (10) stable; urgency=medium
......
......@@ -12,7 +12,6 @@ import javax.faces.event.ActionEvent;
import org.apache.log4j.Logger;
import org.primefaces.event.SelectEvent;
import org.primefaces.event.map.PointSelectEvent;
import org.primefaces.model.map.LatLng;
import lcsb.mapviewer.bean.MapBean.ClientMapData;
......@@ -235,23 +234,6 @@ public class SearchBean extends AbstractMarkerManagerBean<SearchElementResult> i
/**
* This method is invoked by client when map is clicked.
*
* @param event
* click event with coordinates
*/
public void mapClicked(final PointSelectEvent event) {
logger.debug("Map clicked");
addSessionParam(STRING_SEARCH_SESSION_PARAM + getCurrentMapId(), null);
Point2D coord = mapBean.getTopModelMapData().getcConverter().toPoint(event.getLatLng());
addSessionParam(COORDINATE_SEARCH_SESSION_PARAM + getCurrentMapId(), coord);
addSessionParam(COORDINATE_SEARCH_MODEL_ID_SESSION_PARAM + getCurrentMapId(), getCurrentTopModel().getId());
searchByCoordinates(coord, getCurrentTopModel());
}
/**
* This method is invoked by client when map is clicked (any map except of the
* main).
*
* @param actionEvent
* event data
*/
......@@ -327,7 +309,7 @@ public class SearchBean extends AbstractMarkerManagerBean<SearchElementResult> i
// find objects on the map
SearchElementResult result = searchService.searchByCoordinates(searchParams);
searchService.assignIcons(result, 0);
super.addResult(result);
addResult(result);
// send markers to the map
refreshDataInJavascript(false);
......@@ -415,6 +397,9 @@ public class SearchBean extends AbstractMarkerManagerBean<SearchElementResult> i
* @see #mapBean
*/
public MapBean getMapBean() {
if (mapBean == null) {
mapBean = findBean(MapBean.class);
}
return mapBean;
}
......@@ -614,7 +599,7 @@ public class SearchBean extends AbstractMarkerManagerBean<SearchElementResult> i
* @return currently browsed map
*/
private Model getCurrentTopModel() {
return mapBean.getCurrentTopModel();
return getMapBean().getCurrentTopModel();
}
/**
......
......@@ -106,11 +106,12 @@
</div>
</h:panelGroup>
<p:panel header="Candidates" toggleable="true" rendered="#{((not empty cc.attrs.element.dataMining[0]) or (not empty cc.attrs.element.dataMining[1]))}" collapsed="true" style="font-size: 100%;width:100%" >
<h:dataTable value="#{cc.attrs.element.dataMining}" var="candidateRow">
<p:panel header="Candidates" toggleable="true" rendered="#{not empty cc.attrs.element.other['dataMining']}" collapsed="true" style="font-size: 100%;width:100%" >
<h:dataTable value="#{cc.attrs.element.other['dataMining']}" var="candidateRow">
<h:column>
<f:facet name="header">
<a href="#{cc.attrs.element.dataMiningColumns[0].link}" target="_blank">#{cc.attrs.element.dataMiningColumns[0].name}</a>
<a href="#{cc.attrs.element.other['dataMiningColumns'][0].link}" target="_blank">#{cc.attrs.element.other['dataMiningColumns'][0].name}</a>
</f:facet>
<ui:repeat var="suggestedElement" value="#{candidateRow[0].suggestedElements}">
......@@ -124,7 +125,7 @@
</h:column>
<h:column>
<f:facet name="header">#{cc.attrs.element.dataMiningColumns[1].name}</f:facet>
<f:facet name="header">#{cc.attrs.element.other['dataMiningColumns'][1].name}</f:facet>
<ui:repeat var="suggestedElement" value="#{candidateRow[1].suggestedElements}">
<h:panelGroup layout="block" rendered="#{empty suggestedElement.link}">
<h:outputText value="#{suggestedElement.name}" />,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment