A way to modify marvin_param in searchresults.jsp

User dfd663fd5c

04-11-2008 16:27:31

Dear all,





I am trying to modify the "mview_param" in "searchresults.jsp" provided in the examples directory.


I have read the marvin view applet examples, but in the case of the searchresults.jsp, layouts and parameters are a bit different in what marvin applet examples shows.


I have added a header column by:
Quote:



mview_param("LayoutH",":1:2:L:0:0:1:1:c:L:0:1:1:1:c");


mview_param("cell0","|Molecule|Results");


mview_param("paramH",":L:12b:L:12b");


This worked perfectly.


Otherwise, for the "layout",I've tried to insert a buttom:
Quote:



......


......


int col = 1; //the column number where the label starts





int fwidth = 1; //the width of the label in columns





for(int i=0;i<viewRows;i++) {





if(i>=(viewRows-userRows)) { //user fields _below_ the structure





col = 0;





fwidth = 2;





}





if (i>0) {


viewLayout += ":"; }





viewLayout += "L:"+i+":"+col+":1"; //+fwidth+":c:n:0:10"; }





viewLayout += ":B:24:1";



.......


viewParam +=":B:12:search:_self";


.......


.......


mview_param("cell<%= cellIndex %>","<%=getCellParam(cellIndex, source,


dataFieldNames,(Object[])dataFieldValues.get(i), viewCell, disSim)%>"


+" Search |%|templink.htm";)



The buttom does not appear in the table. So I am asking if I should insert it in "dataFieldNames" function or if my code is not correct?





Thanks in advance for the help!

ChemAxon 7c2d26e5cf

05-11-2008 15:27:38

Your code is not correct. The cell separator characters missed from your code.


It should looks like that:


Code:
mview_param("cell<%= cellIndex %>", "|<%= cell parameter value %>", "|Search|%|this is the url");



The following applet example demonstrates how to use button in MarvinView applet. I can help to customize your applet layout: MarvinView Example - Adding advanced components to molecule tables