Categories | Question details Back To List | ||||||||||||||
Checked List not working with JSP When I have the following code in HTML, the check boxes are checked on load but when I write the same code in JSP, they are not selected on load. Please let me know what am I doing wrong. Note that tree_cl is from Sample directory. <script> tree=new dhtmlXTreeObject("treeboxbox_tree","100%","100%",0); tree.setImagePath("../imgs/"); tree.enableCheckBoxes(1); tree.enableThreeStateCheckboxes(true); tree.loadXML("tree_cl.xml"); </script> Thanks Sushma Answer posted by Support on Jan 24, 2008 02:36 Actually there must be no difference for javascript code is page a native HTML or result of JSP script. If in result no checkboxes rendered at all - please check that image path points to correct directory, because checkboxes in tree are images, not the real inputs. >>I write the same code in JSP Do you use same static XML file or somy dynamic JSP source ? Answer posted on Jan 24, 2008 08:38 I am using the same sample static xml file. If i am not wrong the image path is not an issue because checks when i call the setCheck() method but having problem when using checked attribute in XML. Please suggest. Sushma. Answer posted on Jan 24, 2008 09:19 Attached is the screen shot of the output from html and JSP. the image path is not set right then the unchecked image should not come up either and when we say setCheck() and if it is using the checked image to display then it should not display as checked. Attachments (1)
Answer posted by sushma thunga on Jan 24, 2008 14:28 I tried to debug moving the HTML and script code from JSP to xyz.html and accessed it from windows explorer as : C:\Projects\..\..\..\pro_list_checked.html it shows the checked boxes but when i try to access the same html via weblogic as : http://localhost:7021/../../pro_list_checked.html its not coming up. Do you think its something to do with weblogic , if yes please suggest a solution. Sushma.
Answer posted by Support on Jan 25, 2008 03:10 The code of checkboxes is pretty simple, and must not be affected by the way page processed. ( it just check presense of "checked" attribute and render state accordingly ) I think the problem may be cause by you server software which may transparently process XML data. Please try to use attached js file instead of original dhtmlxcommon.js - it will show the XML exactly as it visible for component - please check that it still contains checked state for necessary items. Attachments (1)
|