Putting "buttons" into results tables .....

User e25fe1ac40

17-12-2004 00:01:50

I am trying to alter searchresults.jsp (of the distributed JSP example set) to have buttons in each cell of an mview "hits table" to perform an operation related to each compound (get a different kind of data) .... I see that I can make alterations to most mview parameters within the script except for the mview_param("cell#", .....) set, which seem to be generated by a call to "getCelllParam() ... I think the onlly way to for me to proceed is to generate the mview_param("cell" ...) data within the script instead of calling getCellParam() .... but, perhaps, there is a better way? Thanks .....

ChemAxon 9c0afc9aaf

17-12-2004 12:36:09

Hi,





getCellParam() is to support the following features:





- automatically displaying data in all user defined columns


- supporting custom layouts, that can be defined in the .jchemsite file (or in setup.jsp)





Of course, you can generate your own layout too.





You can find an example here for defining the layout:





http://www.chemaxon.com/marvin/doc/dev/example-view2.2.html





Alternatively you may also use a single HTML button, which detects which cell is selected.


This is the way Delete and Modify works in the example.


I admit though that it's not so stylish as a different button for each cell.

User e25fe1ac40

17-12-2004 15:49:54

I am not familiar with the ".jchemsite" file ... is there a description of this somewhere ...yes, if I can find a place to put my new layout and then simply retrieve it (or portions thereof) with getCellParam(), I do think that would be the best solution ....

User e25fe1ac40

17-12-2004 17:56:45

Ok, I found the .jchemsite file and it looks like a convenient way to perhaps do what I want to do --- however, I get an error on using the the example "jchem" form on any databases I have:





java.io.IOException: Cannot import in format chime


at chemaxon.marvin.util.e.a(Unknown Source)


....


....





and, of course, no structures get displayed (although all the other requested data is displayed) ...


The structure is imported as the contents of the "cd_structure" field as far as I can tell ...

ChemAxon 9c0afc9aaf

19-12-2004 11:07:06

Hi,





If you set the form in .jchemsite file, could you show the content of the file ?





Otherwise if you use your own method instead of getCellParams(), make sure you convert the whole string into proper javascript format with HTMLTools.convertForJavascript()

User e25fe1ac40

20-12-2004 07:17:22

Yes, here is the form part of the jchemsite file .... I have also modified the searchresults.jsp file, but don't believe any changes I made there would cause this particular error:





propertyTableName=JChemProperties


useStructureCache=false








FDA_Approvals.form.jchemform.rows=9


FDA_Approvals.form.jchemform.cols=3


FDA_Approvals.form.jchemform.celldim=250:160


FDA_Approvals.form.jchemform.layout=:3:2:L:0:0:1:2:w:n:0:10:M:1:0:2:1:c:n:1:10:L:1:1:1:1:w:n:L:2:1:1:1:nw:n


FDA_Approvals.form.jchemform.param=:L:10:M:150:150:L:11b:L:10


FDA_Approvals.form.jchemform.cell=ID: <cd_id>;<cd_structure><cd_formula>;MW: <cd_molweight>;Name:<molname>

ChemAxon 9c0afc9aaf

20-12-2004 08:42:57

Hi,





The built-in example form configuration and the document at


http://www.jchem.com/examples/jsp1_x/forms.html


has some mistakes in them.





Although the text says you should write "$cd_structure" , the "$" is somehow left out.





Please put a "$" sign before "cd_structure" or "dissimilarity".





We will correct the form examples ASAP.





We also understand that this is not a very convenient way of setting the layout, so we are planning to develop an interactive form editor later.





I was thinking more on your issue, and found that modifying the


.jchemsite file probably will not be enough to add buttons to the example.


You should probably hard-code the layout into the JSP.


(without using getCellParams)





If you want an easier solution, you can also use a single HTML button for all cells.

User e25fe1ac40

24-12-2004 17:48:46

I have successfully incorporated buttons into my "results hit list" and would like to visually enhance the table for my users in a couple of ways. What I want to do is highlight some of the hits based on certain data field characteristics. I am wondering what characteristics of a display table of hits are controllable at the "cellular" level? I know fonts can be italicized or bolded, but would like to change the font color, I don't see where that is possible? Another possibility would be changing the molecule or text area background color, but that does not appear to be possible at the cellular level as far as I can tell either? Is this correct? Thanks for all your suggestions and help ....

ChemAxon 7c2d26e5cf

27-12-2004 19:11:07

Marvin does not support higlighted text at cellular level.


But we will consider your request.





About molecule background


Why don't you play with molecule dimensionals? 3 dimensioned molecules are displayed with different background color than 2D molecules. Those molecules that you would like to highlight, should be cleaned in 3D.


Is it a suitable solution for you?

User e25fe1ac40

27-12-2004 19:30:57

Yes, I had noticed that and had considered it .... now I may consider this option again ... Thank you ....

ChemAxon 7c2d26e5cf

04-01-2005 14:18:11

The next release of Marvin (3.5.2) will support HTML tags in labels. But this feature will be available only in Swing mode.


To highlight a label, you should do this





In Marvin Beans





viewPane.setL(2, "<html><font COLOR='#ff0000'>red label</font></html>");





in Marvin Applet (Swing)





<param name="cell2" value="|CCC|<html><font COLOR='#ff0000'>red text</font></html>">

User e25fe1ac40

10-01-2005 22:37:12

[Note: Tamas - After I wrote this I noticed you said release "3.5.2" - the download site has only 3.5.1, so ONLY 3.5.2 has the HTML tag capability? If so, would it be possible for me to ontain a "pre-release" version of it? - Thanks, Manton]





Hi Tamas - I've tried to implement your suggestion below for HTML tags after upgrading our Marvin to 3.5.1 (verified by clicking on the "About" link in the resulting "view" window) and had difficulty when I use the "marvin.js" utility. I think I am invoking the "swing" version of mview (but not absolutely sure) by one of two methods:





1) passing the gui parameters "by writing CGI-like parameters in the URL of the page":





?jvm=plugin&gui=swing





or


2) by including





marvin_jvm = "plugin";


marvin_gui = "swing";





in my javascript





along with the folllowing to pass along the HTML tags:





mview_param("cell0", "|CCC|<html><font COLOR='#ff0000'>red text<font></html>");





The propane molecule is displayed, but the tags are ignored and only displayed as text????





- Manton


Tamas wrote:
The next release of Marvin (3.5.2) will support HTML tags in labels. But this feature will be available only in Swing mode.


To highlight a label, you should do this:





In Marvin Beans:





viewPane.setL(2, "<html><font COLOR='#ff0000'>red label</font></html>");





in Marvin Applet (Swing):





<param name="cell2" value="|CCC|<html><font COLOR='#ff0000'>red text</font></html>">

ChemAxon 7c2d26e5cf

11-01-2005 10:52:00

This feature is not available yet. You have to wait Marvin 3.5.2. It will be released very soon.





Tamas