Height of textarea

I cannot seem to find a way to change the height of a textarea which is inside a report row.
Currently i have tried following:
1 change column attributes -> element attributes to different kind of css values for setting height
2 added the css in the column formating -> css style
3 added a css class in the page html header and the setting the column formating -> css class to this css class.
Non of those seem to make any changes to the textarea.
more specific data (
at point 1 and 2 i tried those values: ( height:20px and max-height:20px )
at point 3 i added this to the html header:
<style type="text/css">
.textarea
width:30px;
height:20px;
and then at the column formatting -> css class i added (.textarea and also tried textarea without the dot)
So hope someone can give the guidelines to solve this succesfully
TIA

Hi Marc,
In column attributes page of the column, under column attributes, use 'Element Width' (Width) and 'Number of Rows' (Height) to alter the width and height of the text areas.
Regards
Satty

Similar Messages

  • ERROR USING HTML textarea with Java String

    I have a form in HTML that has a textarea for input messages.
    When user press submit, a java servlet gets the information and stores it in a Database as a String.
    Later, I have a JSP thata retrieves that information from the database and put it as the value propertie of another textarea in the page so user can modify it if wanted, but I am having a hard time finding how to do so , because when I do the line:
    <textarea .....bla bla.... value=
    <%=some_string%>
    .....bla >
    and the some_string has more than one line ( e.g "\n" or "\r" caracteres ), I got an error when displaying the page. Can anyone help me with that please ???
    Thanks.

    here's my codes again for reference. hope it helps to rectify the matter
    // edit.jsp
    String search = (String)request.getParameter("txtSearch");
    String parameter = (String)"%"+search+"%";
    String sSQL = "select * from tblArticle where Title LIKE '"+parameter+"'";
    <%
    try {
    while(Rs.next()) {
    %>
    <tr>
    <td width="16%" height="157" align="center">Article:</td>
    <td width="88%" height="157"><textarea rows="15" name="txtArt" cols="86" value="<%= txtArt %>"></textarea></td>
    </tr>
    </table>
    <%
    // .....

  • ScrollPanes & TextAreas - Repositioning in 1.5 with .scrollRectToVisible()

    So I've an uneditable text area with the words wrapping around sitting inside a scroll pane.
    My user clicks a button and the program fetches some text from an XML document and displays it on the screen.
    The trouble is that the window automatically scrolls to the bottom of the text field, while ideally I'd like my user to be able to read from top down without having to start by manually repositioning every page.
    So after I set my text, I've been trying to pull off a .scrollRectToVisible(Rectangle) method, which as best as I can tell is the only way to reposition scroll bars in Java 1.5.
    I've tried applying the method to the textArea object itself, which from what I can tell is that way it should be done, with rectangles of all shapes and sizes, most notably
    h = textArea.getSize().height;
    w = textArea.getSize().width;
    (0,0,0,0)(0,0,1,1) (0,0,w,h) (w,h,0,0)(w,h,-1,-1)
    and so forth with all the permutations of those variables you can imagine.
    But, alas, no cigar. I can't get my text window to begin it's short life visible from the top.
    Am getting something simple and basic wrong? The only thing I've found so far that might be relevent is that the API specifies a seperate .scrollRectToVisible(Rectangle) method for JtextFields, over and above that which exists for other components. Which:
    "Scrolls the field left or right."
    Since I'm wrapping my words I only need up and down scroll, but gotta admit I'm stuck for how to accomplish this.
    Here's the relevent code in my document, in case it helps:
    //declare
         JTextArea letterSurface;
         JScrollPane scrollPane;
    public void init() {
    //initialise
         letterSurface = new JTextArea("initial bullshit") ;
         scrollPane = new JScrollPane(letterSurface);
    //The text area properties
         letterSurface.setEditable(false);
         letterSurface.setLineWrap(true);
         letterSurface.setWrapStyleWord(true);
         letterSurface.setBackground(Color.white);
         letterSurface.setForeground(Color.black);
         letterSurface.setForeground(Color.black);
         letterSurface.setFont(font);
    //place
         getContentPane().add(scrollPane, BorderLayout.CENTER);
    //then in a differnt text fetching method
         letterSurface.setText(lettertext);
         letterSurface.repaint();
    //and finally
         letterSurface.scrollRectToVisible(r);
    //where r is a rectangle of all sorts of wonderful shapes and sizes as mentioned above
    I've tried applying the .scrollRectToVisible() method to the scrollPane itself but that give me no joy either.
    I'd be grateful for any insight anyone has.
    Thankyou kindly.
    M.

    Dear Walker, thanks for the tip about .invokeLater(), it's a very useful little method and did exactly the trick. Would have taken me weeks to find it one my own.
    I'll likely put this to lots of good use in the future too.
    Thanky you very much.
    da.futt - not setting the scrollBar value directly from the begining was just plain dumbness on my part. Thanks for pointing it out.
    M.

  • Custom Popup - Passing values back to Textarea with HTML Editor

    I have created a Custom Popup which is to populate a "Textarea with HTML Editor".
    I have found that the Custom Popup works fine if the target item is defined as a "Textarea", or "Textarea (auto-height)", or "Textarea w/Character Counter" (although the counter is not automatically updated), or "Textarea w/Character Counter & Spellcheck", or "Textarea with Spell Checker".
    However, if the target item is defined as "Textarea with HTML Editor" the Custom Popup does not populate the target item. No error message is produced. If the target item already had data, the data is unchanged.
    Is this a known bug?

    "Textarea with HTML Editor" is actually two objects on the screen with javascript keeping the data in the two objects in sync as you type in the editor.
    You have to populate both objects as you try to syncronize the data from your popup.
    I built a screen using dHTML that switches between the HTML Editor and the Text with Spell check and use Javascript to keep the two (actually three objects in sync)
    My button that switches from one view to the other uses the following syntax:
    javascript:setEqual('P9904_HTML_MESSAGE','P9904_MESSAGE','P9904_MESSAGEDiv');
    'P9904_HTML_MESSAGE' is the HTML view of the data with spell check
    'P9904_MESSAGE' is the html editor view of the data
    'P9904_MESSAGEDiv' is the extra object that Oracle uses for the editor
    This is the fuction that keeps the data in sync:
    function setEqual(fromObjectID,toObjectID,htmlObjectID)
    document.getElementById(toObjectID).value = document.getElementById(fromObjectID).value;
    document.getElementById(htmlObjectID).innerHTML=document.getElementById(fromObjectID).value;
    I hope this helps.
    Michael Snyder

  • LinkElement become NOT clickable when it scroll out of TextArea view

    Hi:
    I am writing a online call center product with flash builder 4.5.
    I found a tricky problem with LinkElement.
    I use the TextArea as the display stage for each incoming and outgoing message. Obviously, the messages includes image and href.
    I use LinkElement to display them.
    As conversation continues, the TextArea's view scrolls to display more and more content.
    When LinkElement scrolls out of the viewable area of TextArea, it becomes NOT clickable!!!
    If I change the size or height of TextArea, make the LinkElement shows in view of TextArea, it becomes Clickable.
    But changing the size of TextArea is not a workable way to fix this problem, espetially for a long conversation.
    The source code is too long, I have to show some snapshot.
    =============================================================================
    Following is function to generate Paragraph to be inserted into TextArea.
    private function imageToLocalParagraph(
    role:int, customerId:int, stationId:int, imageTitle:String, imageUrl:String):ArrayList{
    var selfName:String = getRoleName(role, customerId, stationId);
    var color:uint = getColor(role);
    var timeStr:String = getTimeString();
    var list:ArrayList = new ArrayList();
    var p:ParagraphElement = new ParagraphElement();
    var span:SpanElement = new SpanElement();
    span.text =
    timeStr + " " + selfName;
    span.fontSize = _fontSize;
    span.color = color;
    p.addChild(span);
    list.addItem(p);
    var p2:ParagraphElement = new ParagraphElement();
    var inf:Object = {color:0xFF0000};  
    p2.linkHoverFormat = inf;
    var link:LinkElement = new LinkElement();
    link.href = imageUrl;
    link.target = "_blank";
    link.addEventListener(FlowElementMouseEvent.CLICK, onImageClick);
    var linkSpan:SpanElement = new SpanElement();
    linkSpan.text = "点击打开" + imageTitle;
    linkSpan.fontSize = _fontSize;
    linkSpan.color = color;
    link.addChild(linkSpan);
    p2.addChild(link);
    list.addItem(p2);
    return list;
    Following is the TextArea that contains each paragraph.
    =================================================================
    <s:TextArea id="textArea"
    editable="false"
    focusEnabled="true"
    horizontalCenter="0"
    width="100%"
    height="70%">
    <s:textFlow>
    <s:TextFlow>
    <s:p><s:a href="http://adobe.com/" target="_blank"></s:a></s:p>
    </s:TextFlow>
    </s:textFlow>
    </s:TextArea>
    When sprite is created complete, event listener is set for TextArea and this. ParagraphElementEvent is new defined event to receive paragraph list.
    this.textArea.textFlow.addEventListener(
    CompositionCompleteEvent.COMPOSITION_COMPLETE, compositionCompleteHandler);
    this.addEventListener(ParagraphElementEvent.TYPE, onParagraphElementEvent);
    When receiving paragraph list event, TextArea will add it and auto scroll view to bottom.
    ========================================================================================== ============
    private function onParagraphElementEvent(event:ParagraphElementEvent):void {
    if (event.eventId == this._customer.customerId) {
    var list:ArrayList = event.paragraphElementList;
    for (var i:int = 0; i < list.length; i++) {
    var p:ParagraphElement = (ParagraphElement)(list.getItemAt(i));
    this.textArea.textFlow.addChild(p);
    // auto scrolling to bottom with 3 ways, the last one is perfect
    // (1) this.textArea.appendText("");
    // (2) this.textArea.scrollToRange(int.MAX_VALUE, int.MAX_VALUE);
    // (3) call scrollToBottom twice when textFlow.addChild and textFlow.CompositionCompleteEvent
    scrollToBottom();
    private function compositionCompleteHandler(event:CompositionCompleteEvent):void {
    scrollToBottom();
    private function scrollToBottom():void {
    this.textArea.validateNow();
    var maximum:Number = this.textArea.scroller.verticalScrollBar.maximum;
    this.textArea.scroller.verticalScrollBar.value = maximum;
    I don't think it is a problem of Flash builder 4.5.
    LinkElement is a commen component.
    Thanks
    Steven

    hi:
    the reason has been figured out:
    It results from CompositionCompleteEvent.COMPOSITION_COMPLETE.
    this.textArea.textFlow.addEventListener(CompositionCompleteEvent.COMPOSITION_COMPLETE, compositionCompleteHandler);
    If we scrolls the text area to show the LinkElement invisible,
    Click the the Link element, will trigger CompositionCompleteEvent again.
    In my implementation, CompositionCompleteEvent  will scrolls the text area to bottom immediately.
    It looks that the link not works.
    The reason is found, but another question is created:
    What is the solution for the text area, which satisfys two aspects:
    (1) auto scroll to bottom;
    (2) make the link element workable when scrolls.
    This is important for IM applications.

  • JTable and Adjusrt Row Height

    Hi,
    1. Can we adjust variable row height for each row,
    2. Also as we adjust the column widht, can we adjust the row height by dragging,
    3.Suppose i have JTextArea as a cell renderer , how can i display all the text in a row with out having to use a scroll bar,
    Ashish

    That's a lot of questions..... but here are your answers:
    1. Can we adjust variable row height for each row,Yes, use JTable's setRowHeight method to set the height of each row.
    2. Also as we adjust the column widht, can we adjust the row height by dragging,You should be able to adjust the column width by clicking the mouse on the edge of the column header and drag. There is no automatic provision for changing the row height that way -- you'll have to add a mouse listener to the rowheader and write your own code to perform the resizing.
    3.Suppose i have JTextArea as a cell renderer , how can i display all the text in a row with out having to use a scroll bar, You'll have to figure out how many rows (based on the sum of the individual row's height) the textarea occupies (taking into consideration the font that you used to render the textarea). I have my own way of doing things but if you search this forum, you'll find a lot of discussion on how to do it.
    ;o)
    V.V.

  • TextArea sizing question

    hi,
    i have a TextArea. when i try to set its size it does not work before the window is shown.
    after the window is shown there is no problem with the setSize.
    any idea why?
    import java.awt.*;
    import java.awt.event.*;
    public class Components extends CloseableFrame
         TextArea textArea = null;
         public static void main(String[] args)
              Components f = new Components();
              f.setBounds(100, 100, 340, 300);
              f.setVisible(true);
         public Components()
              super("Components");
              setLayout(new java.awt.FlowLayout(
                   java.awt.FlowLayout.CENTER, 20, 10));
              textArea = new TextArea("my text", 20, 40, TextArea.SCROLLBARS_VERTICAL_ONLY);
              textArea.setForeground(Color.red);
              add(textArea);
              textArea.setSize(10, 10); // <<=== NOW WORKING !!!!!!
              Button btn = new Button("button");
              add(btn);
              btn.addActionListener(
                   new ActionListener() {
                        double sizeFactor = 0.5;
                        public void actionPerformed(ActionEvent e) {
                             Dimension size = textArea.getSize();
                             size.width = (int) (size.width * sizeFactor);
                             size.height = (int) (size.height * sizeFactor);
                             textArea.setSize(size); // <== WORKING !!!
                             if (sizeFactor == 0.5)
                                  sizeFactor = 2;
                             else
                                  sizeFactor = 0.5;
    }

    When you call setSize or pack the layout manager collects the preferred sizes of the components and lays them out. Until then it doesn't have the information available to give you.

  • JTable and adjusting Row height

    Hi,
    How to make a row height adjustable, like user can click on the row and drap to increase the height of the row,
    Also if i have JTextArea as cell rendere how do i dynamically adjust the row height to display all the text
    Ashish

    That's a lot of questions..... but here are your answers:
    1. Can we adjust variable row height for each row,Yes, use JTable's setRowHeight method to set the height of each row.
    2. Also as we adjust the column widht, can we adjust the row height by dragging,You should be able to adjust the column width by clicking the mouse on the edge of the column header and drag. There is no automatic provision for changing the row height that way -- you'll have to add a mouse listener to the rowheader and write your own code to perform the resizing.
    3.Suppose i have JTextArea as a cell renderer , how can i display all the text in a row with out having to use a scroll bar, You'll have to figure out how many rows (based on the sum of the individual row's height) the textarea occupies (taking into consideration the font that you used to render the textarea). I have my own way of doing things but if you search this forum, you'll find a lot of discussion on how to do it.
    ;o)
    V.V.

  • Flex Tree - leaf object height is overlapping.

    Hello folks,
       I am trying to build a tree component with an item renderer as below: The Text Area what I am adding as leaf node is overlapping on the next item branch node. As Tree extends List, I sent VariableRowHeight property to true. Some how tree is not treating this object as a leaf node it seems.
    Could you please guide me ??
    package my.renderers
    import flash.display.DisplayObject;
    import mx.controls.TextArea;
    import mx.controls.Tree;
    import mx.controls.listClasses.ListBase;
    import mx.controls.treeClasses.TreeItemRenderer;
    import mx.controls.treeClasses.TreeListData;
    public class MyTreeItemRenderer extends TreeItemRenderer
    public function MyTreeItemRenderer()
    super();
    override protected function commitProperties():void
    super.commitProperties();
    var textArea = new TextArea();
    override protected function createChildren():void
    super.createChildren();
    textArea.width=200;
    textArea.height= 80;
    textArea.includeInLayout = true;
    override public function set data(value:Object):void
    super.data = value;
    var _tree:Tree = Tree(this.parent.parent);
    var tld:TreeListData= TreeListData(listData)
    if(!_tree.dataDescriptor.isBranch(value))
    ListBase(this.parent.parent.parent.parent).rowHeight = textArea.height;
    trace("This is a Leaf, and so adding the Child Element" + value.toString());
    this.parent.parent.addChild(textArea);
    if(_tree.dataDescriptor.isBranch(value))
    if(_tree.contains(textArea))
    trace("This is not a Leaf and so remove the Child Element");
    removeChild(DisplayObject(textArea));
    override protected function updateDisplayList(
    unscaledWidth:Number, unscaledHeight:Number):void
    super.updateDisplayList(unscaledWidth, unscaledHeight);
    var tld:TreeListData= TreeListData(listData)
    var _tree:Tree = Tree(this.parent.parent);
    if(_tree.dataDescriptor.isBranch(tld.item))
    if(super.icon) {
    super.icon.visible=true;
    if(super.label){
    super.label.visible=true;
    else
    if(super.icon)
    super.icon.visible=false;
    if(super.label)
    super.label.visible=false;
    <my:MyTree
    variableRowHeight="true"
    indentation="0"
    defaultLeafIcon="{null}"
    folderClosedIcon="{null}"
    folderOpenIcon="{null}"
    width="100%" height="100%"
    dataProvider="{treeData}"
    showRoot="false"
    labelField="@label" />
    package my.controls
    import flash.events.MouseEvent;
    import mx.controls.Tree;
    import mx.controls.listClasses.IListItemRenderer;
    import mx.core.ClassFactory;
    import my.renderers.MyTreeItemRenderer;
    * This class extends the Tree adding separator node capability. 
    public class MyTree extends Tree
    //  Constructor
    * Constructor.
    public function MyTree()
    super();
    itemRenderer = new ClassFactory(MyTreeItemRenderer);
    //  Overridden methods
             * Override to prevent separator to be visually highlighted.
            override protected function mouseOverHandler(event:MouseEvent):void
    return;
            var item:IListItemRenderer = mouseEventToItemRenderer(event);
            if (item != null && !MyTreeItemRenderer(item).isSeparator)
                    super.mouseOverHandler(event);
             * Override to prevent separator to be selected.
            override protected function mouseDownHandler(event:MouseEvent):void
    return;
            var item:IListItemRenderer = mouseEventToItemRenderer(event);
            if (item != null && !MyTreeItemRenderer(item).isSeparator)
                    super.mouseDownHandler(event);

    Thanks pm.  I finally got it to work.  Apparently the functions implemented when using ITreeDataDescriptor don't always make sense.  To get something to be seen as a leaf and not a branch.  item.isBranch can't be the only to show false.  The item.getChildren call must also return a null ICollectionView or something crazy like that , otherwise , your leaves will have disclosure symbols beside them.

  • Problem with retrieving single digit date and month

    Hello Sir,
    I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
    1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
    By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
    This is the jsp for creating and editing the records.
    <HTML>
    <HEAD>
         <TITLE> CRM Event Information </TITLE>
    <script language="JavaScript" src="../javascript/misc.js"></script>
    <script language="JavaScript">
    function saveMe(methodHow) {
         var elementNumber = CRMEvent.elements.length
         var field1 = "";
         var field2 = "";
         var field3 = "";
         var field4 = "";
         var field5 = "";
         var field6 = "";
         var field7 = "";
         var field8 = "";
         for(i=0; i < elementNumber; i++){
              submitForm.elements.name = CRMEvent.elements[i].name;
              submitForm.elements[i].value = CRMEvent.elements[i].value;
         for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
              if (addTemp.field1oneToMany1Value[k] == ""){
              addTemp.field1oneToMany1Value[k] = "9999"
              if (addTemp.field2oneToMany1Value[k] == ""){
              addTemp.field2oneToMany1Value[k] = "99"
              if (addTemp.field3oneToMany1Value[k] == ""){
              addTemp.field3oneToMany1Value[k] = "99"
              if (addTemp.field4oneToMany1Value[k] == ""){
              addTemp.field4oneToMany1Value[k] = "9999"
              if (addTemp.field5oneToMany1Value[k] == ""){
              addTemp.field5oneToMany1Value[k] = " "
              if (addTemp.field6oneToMany1Value[k] == ""){
              addTemp.field6oneToMany1Value[k] = " "
              if (addTemp.field7oneToMany1Value[k] == ""){
              addTemp.field7oneToMany1Value[k] = " "
              if (addTemp.field8oneToMany1Value[k] == ""){
              addTemp.field8oneToMany1Value[k] = " "
              if (eval(oneToMany1.addedItems.options.length - 1) == k){
                   field1 = field1 + addTemp.field1oneToMany1Value[k];
                   field2 = field2 + addTemp.field2oneToMany1Value[k];
                   field3 = field3 + addTemp.field3oneToMany1Value[k];
                   field4 = field4 + addTemp.field4oneToMany1Value[k];
                   field5 = field5 + addTemp.field5oneToMany1Value[k];
                   field6 = field6 + addTemp.field6oneToMany1Value[k];
                   field7 = field7 + addTemp.field7oneToMany1Value[k];
                   field8 = field8 + addTemp.field8oneToMany1Value[k];
              }else{
                   field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
                   field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
                   field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
                   field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
                   field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
                   field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
                   field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
                   field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
              submitForm.elements[eval(i)].name      = "eventtype"
              submitForm.elements[eval(i)].value      = field1
              submitForm.elements[eval(i+1)].name      = "dd_crmstart"
              submitForm.elements[eval(i+1)].value      = field2
              submitForm.elements[eval(i+2)].name      = "mm_crmstart"
              submitForm.elements[eval(i+2)].value      = field3
              submitForm.elements[eval(i+3)].name      = "yy_crmstart"
              submitForm.elements[eval(i+3)].value      = field4
              submitForm.elements[eval(i+4)].name      = "crmremark_code"
              submitForm.elements[eval(i+4)].value      = field5
              submitForm.elements[eval(i+5)].name      = "crmperson_firstname"
              submitForm.elements[eval(i+5)].value      = field6
              submitForm.elements[eval(i+6)].name      = "crmperson_lastname"
              submitForm.elements[eval(i+6)].value      = field7
              submitForm.elements[eval(i+7)].name      = "crmnote"
              submitForm.elements[eval(i+7)].value      = field8
              submitForm.elements[eval(i+8)].name      = "mode"
              submitForm.elements[eval(i+8)].value      = methodHow
         submitForm.method="post";
         onSave(submitForm);
         function onSave(form) {
         if (!oneToMany1.addedItems.options.length == 0) {
              for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
                   validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
                   if (validate.elements[0].value != '9999') {
                        if(!validateForm('validate','validation','isNumber')) {
                             alert("CRM Event Information "+ i + ": Year must be number");
                             return false;      
                        if(!validateForm('validate','validation','checkrange')) {
                             alert("CRM Event Information "+ i + ": Year out of range");
                             return false;      
              form.submit();
              return true;
    </script>
    </HEAD>
    <BODY BGCOLOR=#ffffff>
    <BASEFONT="3">
    <FONT SIZE = -1>
    <%@ page errorPage="errorPage.jsp" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="dss.*" %>
    <!-- instantiate -->
    <jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
    <jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
    <jsp:useBean id="query" class="dss.QueryData" scope="session" />
    <%
    // *************check for user session *************
         session = request.getSession();
    if (session.getValue("userSession") == null) {
    response.sendRedirect (response.encodeRedirectUrl
    ("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
    else {
         String dhr_id = "";
    String mode = "";
    String eventtype = "9999";
    String crmremark_code = "";
    String crmperson = "";
    String crmnote = "";
    String crmKey = "";
         String dd_crmstart = "99";
         String mm_crmstart = "99";
    Vector tempVector = new Vector();
              Vector CRMEventVector = new Vector();
              Vector CRMEventPerson = new Vector();
              Vector monthVector = new Vector();
              Vector dayVector = new Vector();
              Vector field1Vector = new Vector();
              Vector field5Vector = new Vector();
              Vector field6Vector = new Vector();
              Vector field7Vector = new Vector();
              Vector field8Vector = new Vector();
              Vector field234Vector = new Vector();
              Vector tempDayVector = new Vector();
              Vector tempMonthVector = new Vector();
              Vector tempYearVector = new Vector();
              Connection conn = null ;
              conn = pool.getConnection() ;
              dss.Database db = new dss.Database( conn ) ;
              dhr_id = request.getParameter("dhr_id");
         try {
    mode = request.getParameter("mode");
    dhr_id = request.getParameter("dhr_id");
                   //look up Setting List
                   String strSQL = "";
                   //look up CRM Event Type List
                   strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
                   db.setSQL( strSQL ) ;
                   db.query() ;
                   CRMEventVector = db.getSelectionList() ;
                   //look up Month List
                   db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
                   db.query() ;
                   monthVector = db.getSelectionList();
                   //look up Day List
                   db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
                   db.query() ;
                   dayVector = db.getSelectionList();
                   // ************ EDIT Mode *************
    if (mode.equals("edit"))
              //out.println("mode is edit");     
    mode = "edit";
         //***********get archaeology_pkey based on dhr_id
                        int archKey = 0;
                             strSQL = " SELECT archaeology_pkey "+
                                            " FROM archaeology "+
                                            " WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
                             //out.println(strSQL);
                             Statement stmt2 = conn.createStatement();
                             ResultSet rs2 = stmt2.executeQuery(strSQL);
                             while (rs2.next()) {
                                  archKey = rs2.getInt(1);
                             rs2.close();
                             stmt2.close();
                   // ********* end getting **************
              strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
                   " From archaeologycrmevent " +
                   " Where archaeology_pkey =" + archKey ;
              Statement stmtSQL = conn.createStatement();
              ResultSet rset = stmtSQL.executeQuery(strSQL);
              ResultSetMetaData rsmd = rset.getMetaData() ;
                   while (rset.next()) {
                   //get values
                   field1Vector.addElement(rset.getString(1));
                   field234Vector.addElement(rset.getString(2));
                   field5Vector.addElement(rset.getString(3));
                   field6Vector.addElement(rset.getString(4));
                   field7Vector.addElement(rset.getString(5));
                   field8Vector.addElement(rset.getString(6));
                   //crmKey = rset.getString(7);
                   for (int i=0; i<field234Vector.size(); i++){
                        StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");                              
                        while (tempDate.hasMoreTokens() ) {
                             tempYearVector.addElement (     tempDate.nextToken());
                             tempMonthVector.addElement(     tempDate.nextToken());
                             tempDayVector.addElement (     tempDate.nextToken());
         } //end edit
         } //end try
         catch ( Exception e) {
              out.println ( e.toString() ) ;
         } finally {
              db.cleanup() ;
    %>
    <P>
    <FORM NAME="oneToMany1">
    <TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
    <TR>
    <TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
    <p align="center">
         <font face="Arial" size="2" color="#FFFFFF">
         <b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
         </font>
         </p>
         </td>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
    <TD WIDTH=112 height="21">
              <%
              out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
              %>
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
    <TD WIDTH=455 height="21"><font size="1">
         <%
         out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
         out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
         %>
    </select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
    <TD WIDTH=112 height="30">
              <input type="text" name="field5" size="15" value="<%=crmremark_code%>">
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
              CRM Person/ Organization: </FONT></B></TD>
    <TD WIDTH=455 height="30">
         <% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>     
         <TABLE BORDER="0">
              <TR><TD>
              <FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
              </TD>
              <TD>
         <FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
              </TD>
              </TR>
         </TABLE>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
    <TD COLSPAN="3" width="660" height="79">
         <TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
         </TD>
    </TR>
    <TR>
    <TD COLSPAN="4">
         <table border="0" cellspacing="0" cellpadding="0" align="center">
         <tr>
         <td width="50" align="left"> </td>
         <td align="center">
              <input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
         </td>
         <td width="50" align="right"> </td>
         </tr>
         </table>
    </TD>
    </TR>
    <tr>
    <td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
    </td>
    </tr>
    </TABLE>
    <%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //|------------------------------------------------------------------------------------------------------------------------
    //| Start code for one-to-many in edit mode /
    //|---------------------------------------------
    %>
    <script language="javascript">
    /* Check to see if the necessary arrays have been defined - if not define them */
         try{
              if (!eval("addTemp.addoneToMany1Name")){
              //alert("False");
              addTemp.addoneToMany1Name = Array();
              addTemp.addoneToMany1Value = Array();
              for(i = 1; i <= 8; i++){
                   eval("addTemp.field" + i + "oneToMany1Value = Array();");
              }else{
              //alert("already created");
    /* Catch any errors that may occur when checking if arrays are defined */
         catch(e) {
              alert(e);
    <%
    Enumeration field1_      = field1Vector.elements();
    Enumeration field2_      = tempDayVector.elements();
    Enumeration field3_      = tempMonthVector.elements();
    Enumeration field4_      = tempYearVector.elements();
    Enumeration field5_      = field5Vector.elements();
    Enumeration field6_      = field6Vector.elements();
    Enumeration field7_      = field7Vector.elements();
    Enumeration field8_      = field8Vector.elements();
         Object currentfield1 = "";
         Object currentfield2 = "";
         Object currentfield3 = "";
         Object currentfield4 = "";
         Object currentfield5 = "";
         Object currentfield6 = "";
         Object currentfield7 = "";
         Object currentfield8 = "";
         int counter = 0;
         int clength = 1;
    while (field1_.hasMoreElements()){
    //out.println("while field1_ has more elements");
    //|---------------------------------------------------------------------------------------------------------------------------
    //| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
    //|------------------------------------------------------------------------------------------------------------
    //     currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
    //     currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
         currentfield1 = field1_.nextElement();
    //     currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
    //     currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
         currentfield2 = field2_.nextElement();
    //     currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
    //     currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
         currentfield3 = field3_.nextElement();
         currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
         currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
    //     currentfield4 = field4_.nextElement();
         currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
         currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
    //     currentfield5 = tempElement;
         currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
         currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
    //     currentfield6 = field6_.nextElement();
         currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
         currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
    //     currentfield7 = field7_.nextElement();
         currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
         currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
    //     currentfield8 = field8_.nextElement();
         out.println("oneToMany1.addedItems.options.length ="+clength+";");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
    //           Use first line for text boxes and memo fields, Use second line for Select Boxes /
    //     out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" +      currentfield1 + "\";");
         out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" +      currentfield1 + "';");
    //     out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" +      currentfield2 + "\";");
         out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" +      currentfield2 + "';");
    //     out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" +      currentfield3 + " \";");
         out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" +      currentfield3 + "';");
         out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" +      currentfield4 + "\";");
    //     out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" +      currentfield4 + "';");
         out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" +      currentfield5 + "\";");
    //     out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" +      currentfield5 + "';");
         out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" +      currentfield6 + "\";");
    //     out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" +      currentfield6 + "';");
         out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" +      currentfield7 + "\";");
    //     out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" +      currentfield7 + "';");
         out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" +      currentfield8 + "\";");
    //     out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" +      currentfield8 + "';");
         clength = clength + 1;
         counter = counter + 1;
    %>
    </script>
    </FORM>
    </FONT>
    <BR>
    <FORM NAME="CRMEvent">
    <input type="hidden" name=dhr_id value=<%=dhr_id %>>
    <!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
    <input type="hidden" name=mode value=<%=mode%>>
    <table border="0" width="100%" cellspacing="1">
    <tr>
         <%
              if (mode.equals("add")) {
              %>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
    <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
         <% } else if (mode.equals("edit")){
         %>
    <td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
         <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
         <%
         %>
    </tr>
    </table>
    <%
    }; //end else for checking session
    %>
    </FORM>
    <HR>
    Click the next button to move to the next screen without saving the current screen.<br>
    Click the save button to save the current screen and then move to the next screen.<br>
    <p>
    <form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    </form>
    <form name="validate">
    <input type="hidden" name="validation">
    </form>
    </BODY>
    </HTML>

    Hello Sir,
    I have the following code. Cuurently when I insert date in this format 1984/11/14 and also in this format 1984/11/4 and retrieve the following two dates, I could successfully populate the dates into the corresponding fields in the form. But earlier in the database, there are some records created in the following formats:
    1984/3/1 and 1987/10/4(i.e.,yyyy/mm/dd).In the form when I try to populate them into their corresponding fields I am able to populate only 1984 into the year filed in the first case and in the second case I could populate 1987 and 10 into the year and month fields. I could not populate the values of the records with single digit either in month or day fields.
    By observing the code, could you let me know what needs to be done in order to populate the previously created records with the single digit month and date.
    This is the jsp for creating and editing the records.
    <HTML>
    <HEAD>
         <TITLE> CRM Event Information </TITLE>
    <script language="JavaScript" src="../javascript/misc.js"></script>
    <script language="JavaScript">
    function saveMe(methodHow) {
         var elementNumber = CRMEvent.elements.length
         var field1 = "";
         var field2 = "";
         var field3 = "";
         var field4 = "";
         var field5 = "";
         var field6 = "";
         var field7 = "";
         var field8 = "";
         for(i=0; i < elementNumber; i++){
              submitForm.elements.name = CRMEvent.elements[i].name;
              submitForm.elements[i].value = CRMEvent.elements[i].value;
         for (k = 0; k < oneToMany1.addedItems.options.length; k++){;
              if (addTemp.field1oneToMany1Value[k] == ""){
              addTemp.field1oneToMany1Value[k] = "9999"
              if (addTemp.field2oneToMany1Value[k] == ""){
              addTemp.field2oneToMany1Value[k] = "99"
              if (addTemp.field3oneToMany1Value[k] == ""){
              addTemp.field3oneToMany1Value[k] = "99"
              if (addTemp.field4oneToMany1Value[k] == ""){
              addTemp.field4oneToMany1Value[k] = "9999"
              if (addTemp.field5oneToMany1Value[k] == ""){
              addTemp.field5oneToMany1Value[k] = " "
              if (addTemp.field6oneToMany1Value[k] == ""){
              addTemp.field6oneToMany1Value[k] = " "
              if (addTemp.field7oneToMany1Value[k] == ""){
              addTemp.field7oneToMany1Value[k] = " "
              if (addTemp.field8oneToMany1Value[k] == ""){
              addTemp.field8oneToMany1Value[k] = " "
              if (eval(oneToMany1.addedItems.options.length - 1) == k){
                   field1 = field1 + addTemp.field1oneToMany1Value[k];
                   field2 = field2 + addTemp.field2oneToMany1Value[k];
                   field3 = field3 + addTemp.field3oneToMany1Value[k];
                   field4 = field4 + addTemp.field4oneToMany1Value[k];
                   field5 = field5 + addTemp.field5oneToMany1Value[k];
                   field6 = field6 + addTemp.field6oneToMany1Value[k];
                   field7 = field7 + addTemp.field7oneToMany1Value[k];
                   field8 = field8 + addTemp.field8oneToMany1Value[k];
              }else{
                   field1 = field1 + addTemp.field1oneToMany1Value[k]+"|";
                   field2 = field2 + addTemp.field2oneToMany1Value[k]+"|";
                   field3 = field3 + addTemp.field3oneToMany1Value[k]+"|";
                   field4 = field4 + addTemp.field4oneToMany1Value[k]+"|";
                   field5 = field5 + addTemp.field5oneToMany1Value[k]+"|";
                   field6 = field6 + addTemp.field6oneToMany1Value[k]+"|";
                   field7 = field7 + addTemp.field7oneToMany1Value[k]+"|";
                   field8 = field8 + addTemp.field8oneToMany1Value[k]+"|";
              submitForm.elements[eval(i)].name      = "eventtype"
              submitForm.elements[eval(i)].value      = field1
              submitForm.elements[eval(i+1)].name      = "dd_crmstart"
              submitForm.elements[eval(i+1)].value      = field2
              submitForm.elements[eval(i+2)].name      = "mm_crmstart"
              submitForm.elements[eval(i+2)].value      = field3
              submitForm.elements[eval(i+3)].name      = "yy_crmstart"
              submitForm.elements[eval(i+3)].value      = field4
              submitForm.elements[eval(i+4)].name      = "crmremark_code"
              submitForm.elements[eval(i+4)].value      = field5
              submitForm.elements[eval(i+5)].name      = "crmperson_firstname"
              submitForm.elements[eval(i+5)].value      = field6
              submitForm.elements[eval(i+6)].name      = "crmperson_lastname"
              submitForm.elements[eval(i+6)].value      = field7
              submitForm.elements[eval(i+7)].name      = "crmnote"
              submitForm.elements[eval(i+7)].value      = field8
              submitForm.elements[eval(i+8)].name      = "mode"
              submitForm.elements[eval(i+8)].value      = methodHow
         submitForm.method="post";
         onSave(submitForm);
         function onSave(form) {
         if (!oneToMany1.addedItems.options.length == 0) {
              for (i=1;i<=oneToMany1.addedItems.options.length;i++) {
                   validate.elements[0].value = addTemp.field4oneToMany1Value[i-1];
                   if (validate.elements[0].value != '9999') {
                        if(!validateForm('validate','validation','isNumber')) {
                             alert("CRM Event Information "+ i + ": Year must be number");
                             return false;      
                        if(!validateForm('validate','validation','checkrange')) {
                             alert("CRM Event Information "+ i + ": Year out of range");
                             return false;      
              form.submit();
              return true;
    </script>
    </HEAD>
    <BODY BGCOLOR=#ffffff>
    <BASEFONT="3">
    <FONT SIZE = -1>
    <%@ page errorPage="errorPage.jsp" %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="dss.*" %>
    <!-- instantiate -->
    <jsp:useBean id="pool" scope="session" class="dss.ConnectionPool" />
    <jsp:useBean id="SelectBox" scope="session" class="dss.dataMisc" />
    <jsp:useBean id="query" class="dss.QueryData" scope="session" />
    <%
    // *************check for user session *************
         session = request.getSession();
    if (session.getValue("userSession") == null) {
    response.sendRedirect (response.encodeRedirectUrl
    ("dssLogin.jsp?Origin=dssACCRMEventAddEdit.jsp"));
    else {
         String dhr_id = "";
    String mode = "";
    String eventtype = "9999";
    String crmremark_code = "";
    String crmperson = "";
    String crmnote = "";
    String crmKey = "";
         String dd_crmstart = "99";
         String mm_crmstart = "99";
    Vector tempVector = new Vector();
              Vector CRMEventVector = new Vector();
              Vector CRMEventPerson = new Vector();
              Vector monthVector = new Vector();
              Vector dayVector = new Vector();
              Vector field1Vector = new Vector();
              Vector field5Vector = new Vector();
              Vector field6Vector = new Vector();
              Vector field7Vector = new Vector();
              Vector field8Vector = new Vector();
              Vector field234Vector = new Vector();
              Vector tempDayVector = new Vector();
              Vector tempMonthVector = new Vector();
              Vector tempYearVector = new Vector();
              Connection conn = null ;
              conn = pool.getConnection() ;
              dss.Database db = new dss.Database( conn ) ;
              dhr_id = request.getParameter("dhr_id");
         try {
    mode = request.getParameter("mode");
    dhr_id = request.getParameter("dhr_id");
                   //look up Setting List
                   String strSQL = "";
                   //look up CRM Event Type List
                   strSQL ="select crmtype_code value, item display from code_crmtype order by 2" ;
                   db.setSQL( strSQL ) ;
                   db.query() ;
                   CRMEventVector = db.getSelectionList() ;
                   //look up Month List
                   db.setSQL( "select LPAD(to_char(month_code),2,'0') value , item display from code_month order by 1" ) ;
                   db.query() ;
                   monthVector = db.getSelectionList();
                   //look up Day List
                   db.setSQL( "select LPAD(to_char(day_code),2,'0') value , item display from code_day order by 1" ) ;
                   db.query() ;
                   dayVector = db.getSelectionList();
                   // ************ EDIT Mode *************
    if (mode.equals("edit"))
              //out.println("mode is edit");     
    mode = "edit";
         //***********get archaeology_pkey based on dhr_id
                        int archKey = 0;
                             strSQL = " SELECT archaeology_pkey "+
                                            " FROM archaeology "+
                                            " WHERE UPPER(dhr_id)='"+ dhr_id.toUpperCase() + "'";
                             //out.println(strSQL);
                             Statement stmt2 = conn.createStatement();
                             ResultSet rs2 = stmt2.executeQuery(strSQL);
                             while (rs2.next()) {
                                  archKey = rs2.getInt(1);
                             rs2.close();
                             stmt2.close();
                   // ********* end getting **************
              strSQL = "Select crmtype_code, crmstart, crmremark, crmperson_firstname, crmperson_lastname, crmnote "+
                   " From archaeologycrmevent " +
                   " Where archaeology_pkey =" + archKey ;
              Statement stmtSQL = conn.createStatement();
              ResultSet rset = stmtSQL.executeQuery(strSQL);
              ResultSetMetaData rsmd = rset.getMetaData() ;
                   while (rset.next()) {
                   //get values
                   field1Vector.addElement(rset.getString(1));
                   field234Vector.addElement(rset.getString(2));
                   field5Vector.addElement(rset.getString(3));
                   field6Vector.addElement(rset.getString(4));
                   field7Vector.addElement(rset.getString(5));
                   field8Vector.addElement(rset.getString(6));
                   //crmKey = rset.getString(7);
                   for (int i=0; i<field234Vector.size(); i++){
                        StringTokenizer tempDate = new StringTokenizer((String)field234Vector.elementAt(i),"/");                              
                        while (tempDate.hasMoreTokens() ) {
                             tempYearVector.addElement (     tempDate.nextToken());
                             tempMonthVector.addElement(     tempDate.nextToken());
                             tempDayVector.addElement (     tempDate.nextToken());
         } //end edit
         } //end try
         catch ( Exception e) {
              out.println ( e.toString() ) ;
         } finally {
              db.cleanup() ;
    %>
    <P>
    <FORM NAME="oneToMany1">
    <TABLE BORDER=1 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" BGCOLOR="#BBBBBB">
    <TR>
    <TD BGCOLOR="#002B82" COLSPAN=9 width="100%" height="31">
    <p align="center">
         <font face="Arial" size="2" color="#FFFFFF">
         <b>6. CRM Event Information - </b>DHR ID# : <%=dhr_id %>
         </font>
         </p>
         </td>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>CRM Event Type: </FONT></B></TD>
    <TD WIDTH=112 height="21">
              <%
              out.println ( SelectBox.strSelectionList((Vector)CRMEventVector.elementAt(0), (Vector)CRMEventVector.elementAt(1), "field1", "", eventtype, "180" ));
              %>
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="21"><FONT SIZE=-1><B>Event Date: </FONT></B></TD>
    <TD WIDTH=455 height="21"><font size="1">
         <%
         out.println ("<b><font size = 1>Date: "+ SelectBox.strSelectionList((Vector)dayVector.elementAt(0), (Vector)dayVector.elementAt(1), "field2", "", dd_crmstart, "180" ));
         out.println ("Month: "+ SelectBox.strSelectionList((Vector)monthVector.elementAt(0), (Vector)monthVector.elementAt(1), "field3", "", mm_crmstart, "180" ));
         %>
    </select><B>Year:</B><input type="text" name="field4" size="4" id="Year" maxlength="4">
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>ID# Associated with Event:</B> </FONT></TD>
    <TD WIDTH=112 height="30">
              <input type="text" name="field5" size="15" value="<%=crmremark_code%>">
    </TD>
    <TD WIDTH=89 ALIGN="RIGHT" height="30"><FONT SIZE=-1><B>
              CRM Person/ Organization: </FONT></B></TD>
    <TD WIDTH=455 height="30">
         <% // Modified by Robert Cox 09/12/2001 - changed field size from 20 to 30 // %>     
         <TABLE BORDER="0">
              <TR><TD>
              <FONT SIZE="1"><B>First:</B></FONT><input type="text" name="field6" size="15">
              </TD>
              <TD>
         <FONT SIZE="1"><B>Last:</B></FONT><input type="text" name="field7" size="15">
              </TD>
              </TR>
         </TABLE>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=83 ALIGN="RIGHT" height="79"><FONT SIZE=-1><B>CRM Event Comments: </FONT></B></TD>
    <TD COLSPAN="3" width="660" height="79">
         <TEXTAREA ROWS="5" NAME="field8" cols="65"></TEXTAREA>
         </TD>
    </TR>
    <TR>
    <TD COLSPAN="4">
         <table border="0" cellspacing="0" cellpadding="0" align="center">
         <tr>
         <td width="50" align="left"> </td>
         <td align="center">
              <input type="button" value="Add" onClick="addUpdate(1,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Modify" onClick="addUpdate(2,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Update" onClick="addUpdate(3,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
              <input type="button" value="Remove" onClick="addUpdate(4,8,oneToMany1,Array('field1','field2','field3','field4','field7','field6'))">
         </td>
         <td width="50" align="right"> </td>
         </tr>
         </table>
    </TD>
    </TR>
    <tr>
    <td width="100%" align="center" height="40" colspan="4"><select size="3" name="addedItems" style="width:100%">
    </td>
    </tr>
    </TABLE>
    <%/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //|------------------------------------------------------------------------------------------------------------------------
    //| Start code for one-to-many in edit mode /
    //|---------------------------------------------
    %>
    <script language="javascript">
    /* Check to see if the necessary arrays have been defined - if not define them */
         try{
              if (!eval("addTemp.addoneToMany1Name")){
              //alert("False");
              addTemp.addoneToMany1Name = Array();
              addTemp.addoneToMany1Value = Array();
              for(i = 1; i <= 8; i++){
                   eval("addTemp.field" + i + "oneToMany1Value = Array();");
              }else{
              //alert("already created");
    /* Catch any errors that may occur when checking if arrays are defined */
         catch(e) {
              alert(e);
    <%
    Enumeration field1_      = field1Vector.elements();
    Enumeration field2_      = tempDayVector.elements();
    Enumeration field3_      = tempMonthVector.elements();
    Enumeration field4_      = tempYearVector.elements();
    Enumeration field5_      = field5Vector.elements();
    Enumeration field6_      = field6Vector.elements();
    Enumeration field7_      = field7Vector.elements();
    Enumeration field8_      = field8Vector.elements();
         Object currentfield1 = "";
         Object currentfield2 = "";
         Object currentfield3 = "";
         Object currentfield4 = "";
         Object currentfield5 = "";
         Object currentfield6 = "";
         Object currentfield7 = "";
         Object currentfield8 = "";
         int counter = 0;
         int clength = 1;
    while (field1_.hasMoreElements()){
    //out.println("while field1_ has more elements");
    //|---------------------------------------------------------------------------------------------------------------------------
    //| define field elements - Use first and second lines if text box or memo field, Use third line if select box /
    //|------------------------------------------------------------------------------------------------------------
    //     currentfield1 = query.replaceString(field1_.nextElement().toString(),"'","\'").trim();
    //     currentfield1 = query.replaceString(currentfield1.toString(),"\"","\\" + "\"");
         currentfield1 = field1_.nextElement();
    //     currentfield2 = query.replaceString(field2_.nextElement().toString(),"'","\'").trim();
    //     currentfield2 = query.replaceString(currentfield2.toString(),"\"","\\" + "\"");
         currentfield2 = field2_.nextElement();
    //     currentfield3 = query.replaceString(field3_.nextElement().toString(),"'","\'").trim();
    //     currentfield3 = query.replaceString(currentfield3.toString(),"\"","\\" + "\"");
         currentfield3 = field3_.nextElement();
         currentfield4 = query.replaceString(field4_.nextElement().toString(),"'","\'").trim();
         currentfield4 = query.replaceString(currentfield4.toString(),"\"","\\" + "\"");
    //     currentfield4 = field4_.nextElement();
         currentfield5 = query.replaceString(field5_.nextElement().toString(),"'","\'").trim();
         currentfield5 = query.replaceString(currentfield5.toString(),"\"","\\" + "\"");
    //     currentfield5 = tempElement;
         currentfield6 = query.replaceString(field6_.nextElement().toString(),"'","\'").trim();
         currentfield6 = query.replaceString(currentfield6.toString(),"\"","\\" + "\"");
    //     currentfield6 = field6_.nextElement();
         currentfield7 = query.replaceString(field7_.nextElement().toString(),"'","\'").trim();
         currentfield7 = query.replaceString(currentfield7.toString(),"\"","\\" + "\"");
    //     currentfield7 = field7_.nextElement();
         currentfield8 = query.replaceString(field8_.nextElement().toString(),"'","\'").trim();
         currentfield8 = query.replaceString(query.replaceString(query.replaceString(currentfield8.toString(),"\"","\\" + "\""),"\r","\\" + "r"),"\n","\\" + "n");
    //     currentfield8 = field8_.nextElement();
         out.println("oneToMany1.addedItems.options.length ="+clength+";");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("oneToMany1.addedItems.options[" + counter + "].text = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("oneToMany1.addedItems.options[" + counter + "].value = '" + counter + "';");
    // First Line - Displayed fields, Second Line - Count value /
         out.println("addTemp.addoneToMany1Name[" + counter + "] = \"" + currentfield1 + " - " + currentfield2 + " - " + currentfield3 + " - " + currentfield4 + " - " + currentfield7 + " - " + currentfield6 + "\";");
         out.println("addTemp.addoneToMany1Value[" + counter + "] = \"" + counter + " \";");
    //           Use first line for text boxes and memo fields, Use second line for Select Boxes /
    //     out.println("addTemp.field1oneToMany1Value[" + counter + "] = \"" +      currentfield1 + "\";");
         out.println("addTemp.field1oneToMany1Value[" + counter + "] = '" +      currentfield1 + "';");
    //     out.println("addTemp.field2oneToMany1Value[" + counter + "] = \"" +      currentfield2 + "\";");
         out.println("addTemp.field2oneToMany1Value[" + counter + "] = '" +      currentfield2 + "';");
    //     out.println("addTemp.field3oneToMany1Value[" + counter + "] = \"" +      currentfield3 + " \";");
         out.println("addTemp.field3oneToMany1Value[" + counter + "] = '" +      currentfield3 + "';");
         out.println("addTemp.field4oneToMany1Value[" + counter + "] = \"" +      currentfield4 + "\";");
    //     out.println("addTemp.field4oneToMany1Value[" + counter + "] = '" +      currentfield4 + "';");
         out.println("addTemp.field5oneToMany1Value[" + counter + "] = \"" +      currentfield5 + "\";");
    //     out.println("addTemp.field5oneToMany1Value[" + counter + "] = '" +      currentfield5 + "';");
         out.println("addTemp.field6oneToMany1Value[" + counter + "] = \"" +      currentfield6 + "\";");
    //     out.println("addTemp.field6oneToMany1Value[" + counter + "] = '" +      currentfield6 + "';");
         out.println("addTemp.field7oneToMany1Value[" + counter + "] = \"" +      currentfield7 + "\";");
    //     out.println("addTemp.field7oneToMany1Value[" + counter + "] = '" +      currentfield7 + "';");
         out.println("addTemp.field8oneToMany1Value[" + counter + "] = \"" +      currentfield8 + "\";");
    //     out.println("addTemp.field8oneToMany1Value[" + counter + "] = '" +      currentfield8 + "';");
         clength = clength + 1;
         counter = counter + 1;
    %>
    </script>
    </FORM>
    </FONT>
    <BR>
    <FORM NAME="CRMEvent">
    <input type="hidden" name=dhr_id value=<%=dhr_id %>>
    <!-- <input type="hidden" name=crmKey value=<%//=crmKey %>> -->
    <input type="hidden" name=mode value=<%=mode%>>
    <table border="0" width="100%" cellspacing="1">
    <tr>
         <%
              if (mode.equals("add")) {
              %>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
    <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('add')"></td>
         <% } else if (mode.equals("edit")){
         %>
    <td width="103"><input type="button" value="<< Previous" name="Previous" onclick="history.go(-1)"></td>
    <td width="67"><input type="button" value="Next >>" name="Next" onClick="callNext(this.form, '<%=dhr_id%>', 'dssMenuChoice.jsp?item=2,1,1,7', '<%=mode%>')" ></td>
    <td width="120"></td>
         <td width="52"><input type="button" value="Save" name="Save" onClick="saveMe('edit')"></td>
         <%
         %>
    </tr>
    </table>
    <%
    }; //end else for checking session
    %>
    </FORM>
    <HR>
    Click the next button to move to the next screen without saving the current screen.<br>
    Click the save button to save the current screen and then move to the next screen.<br>
    <p>
    <form name="submitForm" action="dssACCRMEventDB.jsp" action="post">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    <input type="hidden" name="temporary"><input type="hidden" name="temporary"><input type="hidden" name="temporary">
    </form>
    <form name="validate">
    <input type="hidden" name="validation">
    </form>
    </BODY>
    </HTML>

  • Errors in implementing Text Layout Framework text flow- selection event not found

    please help me i have implemented the same project givan at adobe open source code site.
    This is my code
    <?xml version="1.0" encoding="utf-8"?>
    <!--
    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.
    NOTICE:  Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the Adobe license agreement
    accompanying it.  If you have received this file from a source
    other than Adobe, then your use, modification, or distribution
    of it requires the prior written permission of Adobe.
    -->
    <!-- Demonstrate some example controls.  This example does not attempt to create a control for every property in the TextLayoutFramework -->
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" label="Text Editor Example" initialize="init()" backgroundColor="#FFFFFF" horizontalScrollPolicy="off" verticalScrollPolicy="off">
    <mx:Script>
    <![CDATA[
    import flashx.textLayout.container.ContainerController;
    import flashx.textLayout.conversion.TextConverter;
    import flashx.textLayout.edit.EditManager;
    import flashx.textLayout.edit.IEditManager;
    import flashx.textLayout.edit.ElementRange;
    import flashx.textLayout.edit.SelectionState;
    import flashx.textLayout.elements.Configuration;
    import flashx.textLayout.elements.TextFlow;
    import flashx.textLayout.events.StatusChangeEvent;
    import flashx.textLayout.events.SelectionEvent;
    import flashx.textLayout.formats.ITextLayoutFormat;
    import flashx.textLayout.formats.TextLayoutFormat;
    import flashx.textLayout.formats.TextAlign;
    import flashx.textLayout.formats.VerticalAlign;
    import flashx.textLayout.formats.BlockProgression;
    import flashx.textLayout.formats.Direction;
    import flashx.textLayout.tlf_internal;
    import flashx.undo.UndoManager;
    import flash.display.Sprite;
    import flash.system.Capabilities;
    // the textFlow being worked on
    private var _textFlow:TextFlow = null;
    // container to hold the text
    private var _container:Sprite = null;
    // data providers for enumerated list boxes
    static private const textAlignData:Array = [
    { label:"Justify", data:TextAlign.JUSTIFY},
    { label:"Left", data:TextAlign.LEFT},
    { label:"Right", data:TextAlign.RIGHT},
    { label:"Center", data:TextAlign.CENTER},
    { label:"End", data:TextAlign.END},
    { label:"Start", data:TextAlign.START}
    static private const verticalAlignData:Array = [
    { label:"Bottom", data:VerticalAlign.BOTTOM },
    { label:"Justify", data:VerticalAlign.JUSTIFY },
    { label:"Middle", data:VerticalAlign.MIDDLE },
    { label:"Top", data:VerticalAlign.TOP }
    static private const blockProgressionData:Array = [
    { label:"TopToBottom", data:BlockProgression.TB },
    { label:"RightToleft", data:BlockProgression.RL }
    static private const directionData:Array = [
    { label:"LeftToRight", data:Direction.LTR },
    { label:"RightToleft", data:Direction.RTL }
    * initialization
    private function init():void
    // create a sprite to hold the TextLines
    _container = new Sprite();
    textArea.rawChildren.addChild(_container);
    fontFamily.dataProvider = populateFontFamily();
    versionInfo.text = "Vellum: " + flashx.textLayout.BuildInfo.kBuildNumber + (Configuration.tlf_internal::debugCodeEnabled ? " Debug" : " Release")
    + ", Flex: " + mx_internal::VERSION
    + ", Player: " + Capabilities.version;
    * Create an array of available font families
    static private function populateFontFamily():Array
    // really this returns an array of fonts - would be nice to strip it down to just the families
    var fonts:Array = Font.enumerateFonts(true);
    var fontfamily:Array = new Array();
    fonts.sortOn("fontName", Array.CASEINSENSITIVE);
    for(var i:int = 0; i< fonts.length; i++)
    // trace(fonts[i].fontName);
    fontfamily.push({label: fonts[i].fontName, data: fonts[i].fontName});
    return fontfamily;
    /** called to set the size of this panel */
    public function setSize(w:int,h:int):void
    this.width = w;
    this.height = h;
    textArea.width = width;
    textArea.height = height > bottomTabs.height ? this.height-bottomTabs.height : 0;
    if (_textFlow)
    _textFlow.flowComposer.getControllerAt(0).setCompositionSize(textArea.width,textArea.heigh t);
    _textFlow.flowComposer.updateAllControllers();
    /** called when the bottom tabs finally gets sized. */
    private function bottomTabsResize():void
    setSize(width,height);
    /** The TextFlow to edit. */
    public function get textFlow():TextFlow
    { return _textFlow; }
    public function set textFlow(newFlow:TextFlow):void
    // clear any old flow if present
    if (_textFlow)
    _textFlow.flowComposer = null;
    _textFlow = null;
    _textFlow = newFlow;
    if (_textFlow)
    _textFlow.flowComposer.addController(new ContainerController(_container,textArea.width,textArea.height));
    // setup event listeners for selection changed and ILG loaded
    _textFlow.addEventListener(SelectionEvent.SELECTION_CHANGE,selectionChangeListener,false,0 ,true);
    _textFlow.addEventListener(StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,graphicStatusCha ngeEvent,false,0,true);
    // make _textFlow editable with undo
    _textFlow.interactionManager = new EditManager(new UndoManager());
    // initialize with a selection before the first character
    _textFlow.interactionManager.selectRange(0,0);
    // compose the new textFlow and give it focus
    _textFlow.flowComposer.updateAllControllers();
    _textFlow.interactionManager.setFocus();
    /** Receives an event any time an ILG with a computed size finishes loading. */
    private function graphicStatusChangeEvent(evt:StatusChangeEvent):void
    // recompose if the evt is from an element in this textFlow
    if (_textFlow && evt.element.getTextFlow() == _textFlow)
    _textFlow.flowComposer.updateAllControllers();
    /** Receives an event any time the selection is changed.  Update the UI */
    private function selectionChangeListener(e:SelectionEvent):void
    var selectionState:SelectionState = e.selectionState;
    var selectedElementRange:ElementRange = ElementRange.createElementRange(selectionState.textFlow, selectionState.absoluteStart, selectionState.absoluteEnd);
    // set display according to the values at the beginning of the selection range.  For point selection/characterFormat use getCommonCharacterFormat as that tracks pending attributes waiting for the next character
    var characterFormat:ITextLayoutFormat = _textFlow.interactionManager.activePosition == _textFlow.interactionManager.anchorPosition ? _textFlow.interactionManager.getCommonCharacterFormat() : selectedElementRange.characterFormat;
    var paragraphFormat:ITextLayoutFormat = selectedElementRange.paragraphFormat;
    var containerFormat:ITextLayoutFormat = selectedElementRange.containerFormat;
    updateComboBox(fontFamily,characterFormat.fontFamily);
    fontSize.text = characterFormat.fontSize.toString();
    lineHeight.text = characterFormat.lineHeight.toString();
    updateComboBox(textAlign,paragraphFormat.textAlign);
    textIndent.text = paragraphFormat.textIndent.toString();
    columnCount.text = containerFormat.columnCount.toString();
    columnGap.text = containerFormat.columnGap.toString();
    updateComboBox(verticalAlign,containerFormat.verticalAlign);
    updateComboBox(blockProgression,_textFlow.computedFormat.blockProgression);
    updateComboBox(directionBox,_textFlow.computedFormat.direction);
    /** Helper function to update a comboBox in the UI */
    private function updateComboBox(box:ComboBox,val:String):void
    for (var i:int = 0; i < box.dataProvider.length; i++)
    if (box.dataProvider[i].data == val)
    box.selectedIndex = i;
    return;
    box.text = val;
    * These functions are helpers for the various widgets to actually perform the operations on the TextFlow
    private function changeFontFamily(newFontFamily:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.fontFamily = newFontFamily;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeFontSize(newFontSize:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.fontSize = newFontSize;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeLeading(newLeading:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.lineHeight = newLeading;
    IEditManager(_textFlow.interactionManager).applyLeafFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeTextAlign(newAlign:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.textAlign = newAlign;
    IEditManager(_textFlow.interactionManager).applyParagraphFormat(pf);
    _textFlow.interactionManager.setFocus();
    private function changeTextIndent(newIndent:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.textIndent = newIndent;
    IEditManager(_textFlow.interactionManager).applyParagraphFormat(pf);
    _textFlow.interactionManager.setFocus();
    private function changeColumnCount(newCount:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.columnCount = newCount;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeColumnGap(newGap:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.columnGap = newGap;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeVerticalAlign(newAlign:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.verticalAlign = newAlign;
    IEditManager(_textFlow.interactionManager).applyContainerFormat(cf);
    _textFlow.interactionManager.setFocus();
    private function changeBlockProgression(newProgression:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var cf:TextLayoutFormat = new TextLayoutFormat();
    cf.blockProgression = newProgression;
    IEditManager(_textFlow.interactionManager).applyFormatToElement(_textFlow,cf);
    _textFlow.interactionManager.setFocus();
    /** Set direction on the rootElement.  This effects both columnDirection and default reading order. */
    private function changeDirection(newDirection:String):void
    if (_textFlow && _textFlow.interactionManager is IEditManager)
    var pf:TextLayoutFormat = new TextLayoutFormat();
    pf.direction = newDirection;
    IEditManager(_textFlow.interactionManager).applyFormatToElement(_textFlow,pf);
    _textFlow.interactionManager.setFocus();
    ]]>
    </mx:Script>
    <!-- <mx:VBox horizontalScrollPolicy="off" verticalScrollPolicy="off" width="100%" height="100%"> -->
    <mx:Canvas id="textArea" width="520" height="400"/>
    <mx:TabNavigator id="bottomTabs" width="100%" creationPolicy="all" paddingLeft="4" paddingBottom="8" backgroundColor="#D9D9D9" color="#202020" horizontalScrollPolicy="off" verticalScrollPolicy="off" resize="bottomTabsResize()">
    <mx:HBox label="Text" backgroundColor="#D9D9D9" width="496" horizontalScrollPolicy="off" verticalScrollPolicy="off" >
    <mx:Label text="Font:"/>
    <mx:ComboBox id="fontFamily" editable="true" enter="changeFontFamily(fontFamily.text)"  close="changeFontFamily(fontFamily.text)" width="200"/>
    <mx:Label text="Size:"/>
    <mx:TextInput id="fontSize" enter="changeFontSize(fontSize.text)" width="40"/>
    <mx:Label text="LineHeight:"/>
    <mx:TextInput id="lineHeight" enter="changeLeading(lineHeight.text)" width="40"/>
    </mx:HBox>
    <mx:HBox label="Para" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Alignment:"/>
    <mx:ComboBox id="textAlign" close="changeTextAlign(textAlign.selectedItem.data)" dataProvider="{textAlignData}"/>
    <mx:Label text="FirstLineIdent:"/>
    <mx:TextInput id="textIndent" enter="changeTextIndent(textIndent.text)" width="40"/>
    </mx:HBox>
    <mx:HBox label="Container" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Columns:"/>
    <mx:TextInput id="columnCount" toolTip="auto or a number" enter="changeColumnCount(columnCount.text)" width="40"/>
    <mx:Label text="Gap:"/>
    <mx:TextInput id="columnGap" toolTip="a number" enter="changeColumnGap(columnGap.text)" width="40"/>
    <mx:Label text="VerticalAlignment:"/>
    <mx:ComboBox id="verticalAlign" close="changeVerticalAlign(verticalAlign.selectedItem.data)" dataProvider="{verticalAlignData}"/>
    </mx:HBox>
    <mx:HBox label="Flow" backgroundColor="#D9D9D9" width="496">
    <mx:Label text="Progression:"/>
    <mx:ComboBox id="blockProgression" close="changeBlockProgression(blockProgression.selectedItem.data)" dataProvider="{blockProgressionData}"/>
    <mx:Label text="Direction:"/>
    <mx:ComboBox id="directionBox" close="changeDirection(directionBox.selectedItem.data)" dataProvider="{directionData}"/>
    </mx:HBox>
    <mx:HBox label="Version" backgroundColor="#D9D9D9" width="496">
    <mx:TextInput id="versionInfo" editable="false" width="100%"/>
    </mx:HBox>
    </mx:TabNavigator>
    <!-- </mx:VBox> -->
    </mx:VBox>

    Probably something is going wrong when the application is being built, and textLayout.SWC is not found. Are you using Flex or Flash Pro to build it? What version? Does this error come up when you build the project, or when you run it?
    Thanks,
    - robin

  • Firefox will not load a richtextbox control properly. It did in older versions.

    I have been using a third party software for a richtext box control that has been working properly until I loaded Firefox 4.0. The control overlays other controls now and will not allow me to toggle between html mode and web page mode. It works ok in Internet Explorer. The code that is not working is shown below:
    <TABLE id="Table1" style="Z-INDEX: 105; LEFT: 0px; WIDTH: 630px; POSITION: absolute; TOP: 112px; HEIGHT: 470px"
    cellSpacing="1" cellPadding="1" width="630" border="1">
    <TR>
    <TD>
    <!--
    =====================================================================
    RichTextBox For ASP.NET
    http://www.RicherComponents.com/
    =====================================================================
    =====================================================================
    This in-page editor code is Copyright 2002-2003 RicherComponents Ltd
    =====================================================================
    -->
    <link href='c:' rel='stylesheet' type='text/css'><table cellspacing="0" cellpadding="0" border="0" style="border-width:0px;border-style:Solid;border-collapse:collapse;border-color:0;border-width:0;border-style:Solid;">
    <tr>
    <td style="height:100%;"><table cellspacing="0" cellpadding="0" border="0" style="border-width:0px;border-style:Solid;height:100%;width:100%;border-collapse:collapse;border-color:0;border-width:0;border-style:Solid;">
    <tr align="center" valign="middle">
    <td style="height:100%;"><textarea id="RichTextBox1" name="RichTextBox1" wrap="virtual" rows="20" cols="100"></textarea></td>
    </tr>
    </table></td>
    </tr><tr>
    <td align="right" style="width:100%;"><table align="Right" border="0">
    <tr align="center">
    <td align="center"></td><td align="center"></td>
    </tr>
    </table></td>
    </tr>
    </table>

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove Cookies" from sites causing problems:
    * Firefox > Preferences > Privacy > Cookies: "Show Cookies"

  • Webkit. How to connect external javascript from dir C:

    I can't execute javascript from dir C:
    I have some html, that I load in Webkit with loadContent(). In that html invoked function test(). Function contains in a separate javascript file.
    <head>     
    <script language='javascript' type='text/javascript' src="file:///C:/temp/test.js"></script>
    <script>
         function getText() { var val = document.getElementById('text_area').value;
              prompt('getText', "val");
    </script>          
    </head>
    <body>
           <textarea id='text_area' name='text_area' style="width:100%; height:100%"></textarea>     
           <script> test(); </script>
    </body>External javascript (test.js)
    function test() {
            alert('It works!');
         getText();           
    }External js doesn't work. PromptHandler (AlertHandler) doesn't catch anything. If I use wEngine.executeScript('test'), appear error: netscape.javascript.JSException: ReferenceError: Can't find variable: getText.
    But that code works on any other browsers.

    Thank you for the problem report!
    This looks like a bug in WebView. A Jira issue has been filed to track this: http://javafx-jira.kenai.com/browse/RT-17330. Note that the issue may end up classified as not-a-bug because the ability to run local scripts from dynamic contents may be considered a security hole.
    As a workaround, try saving your HTML into a temporary file and load it using WebEngine.load(). It should work as in any other browser. Another option is to include all necessary code in the HTML document loaded with WebEngine.loadContent(), but I gather that is undesirable in your case.
    Edited by: 890759 on Oct 11, 2011 5:19 AM
    Edited by: 890759 on Oct 11, 2011 5:21 AM

  • Jgalcambra/or any one i need ur help please...

    i have anew problem .......... very intresting one..
    in my project i use jsp as my front end , database is mssql , web server is apache tomcat........am also using servelts along with these jsp ....
    even tomcat is running i am able to open jsp files....
    in my project i mean in the front end there is login page for user id & pass word.....when i enter values in those fields i am not able to login..
    i am getting an errorpage sayin incorrect login which is designed by me only... i have already haviv these user name & password in my my database.... login page has to basically verify the input values whatever we give with these database values & go to next page but this is not happening....i am not gettin any sort of syntax error....can u please help me in fixin this problem

    i checked out all these things...the data is being retrieved from the database and the parameters being passed are also being assigned properly...the two values are not being compared properly and hence access is not allowed...the same code worked on a different system..here is the code....
    the following is the servlet:
    import java.io.IOException;
    import java.io.PrintStream;
    import java.sql.*;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class ELogin extends HttpServlet
        public ELogin()
        public void service(HttpServletRequest httpservletrequest, HttpServletResponse httpservletresponse)
            throws ServletException, IOException
            httpservletresponse.setContentType("text/html");
            java.io.PrintWriter printwriter = httpservletresponse.getWriter();
            String s  = httpservletrequest.getParameter("uid");
            String s1= httpservletrequest.getParameter("pw");
            String s2 = httpservletrequest.getParameter("dep");
            int i=1;       
            try
                HttpSession httpsession = httpservletrequest.getSession(true);
                Date date = new Date();
                SimpleDateFormat simpledateformat = new SimpleDateFormat("h:mm a");
                String s3 = simpledateformat.format(date);
                Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:3413;DatabaseName=Project", "Product", "product");
                Statement statement = connection.createStatement();
                ResultSet resultset1 = statement.executeQuery(" select * from emp_log ");
                boolean flag = false;
                do
                    i++;
                    if(!resultset1.next())
                        break;
                    user1 = resultset1.getString(1);
                    pass1 = resultset1.getString(2);
                    Dep1  = resultset1.getString(3);
    /* i think the problem is in the following part of the code*/
                    if(s.equals(user1) && s1.equals(pass1) && s2.equals(Dep1))
                        javax.servlet.ServletConfig servletconfig = getServletConfig();
                        RequestDispatcher requestdispatcher = getServletContext().getRequestDispatcher("/Activity.jsp");
                        httpsession.setAttribute("Empname", s);
                        httpsession.setAttribute("Depname", s2);
                        httpsession.setAttribute("loginTime", s3);
                        httpsession.setMaxInactiveInterval(0x3938700);
                        requestdispatcher.forward(httpservletrequest, httpservletresponse);
                        flag = true;
                } while(true);
                if(!flag)
                    String s4 = "Wrong Password,Please retype!!!";
                    httpsession.setAttribute("DepError1", s4);
                    httpsession.setMaxInactiveInterval(0x3938700);
                    RequestDispatcher requestdispatcher2 = httpservletrequest.getRequestDispatcher("/ErrorPageForEmpLogin.jsp");
                    requestdispatcher2.include(httpservletrequest, httpservletresponse);
            catch(Exception exception)
                System.out.println((new StringBuilder()).append("SQLException: ").append(exception).toString());
        static String user1;
        static String pass1;
        static String Dep1;
        static String DepErrorInEmp;
        static String DepErr;
        static String user2;
        static String pass2;
        static String Dep2;
        static String DepErrorInAdmin;
        static String DepErr1;
    this is the login page:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page language="java" import="java.util.* ,java.text.SimpleDateFormat ,java.sql.*" %>
    <% java.util.Date  todayDate = new java.util.Date();
       int month = todayDate.getMonth()+1;
       int date = todayDate.getDate();
       int year = todayDate.getYear()+1900;
       int time = todayDate.getHours();
       String dateOnly = Integer.toString(month)+ "/" + Integer.toString(date)+ "/" +Integer.toString(year);%>
    <html>
    <html>
    <head>
    <title> Activity </title>
    <script language="javascript" >
    function showText()
      var thetime=new Date();
      var nhours = <%= todayDate.getHours()%>;
      var nmins = <%= todayDate.getMinutes()%>;
      var nsecn = <%= todayDate.getSeconds()%>;
      var AorP=" ";
    /*if (nhours>=12)
        AorP="P.M.";
    else
        AorP="A.M.";*/
    if (nhours>=25)
        nhours-=24;
    if (nhours==0)
    nhours=12;
    if (nsecn<10)
    nsecn="0"+nsecn;
    if (nmins<10)
    nmins="0"+nmins;
    if (nhours<10)
    nhours="0"+nhours;
      document.clockform.clockStart.value=nhours+":"+nmins+":"+nsecn+" "+AorP;
    document.getElementById("time").style.display = '';
    </script>
    <SCRIPT language="JavaScript">
    function startclock()
    var thetime=new Date();
    var nhours=thetime.getHours();
    var nmins=thetime.getMinutes();
    var nsecn=thetime.getSeconds();
    var AorP=" ";
    /*if (nhours>=12)
        AorP="P.M.";
    else
        AorP="A.M.";*/
    if (nhours>=25)
        nhours-=24;
    if (nhours==0)
    nhours=12;
    if (nsecn<10)
    nsecn="0"+nsecn;
    if (nmins<10)
    nmins="0"+nmins;
    document.clockform.clockEnds.value=nhours+":"+nmins+":"+nsecn+" "+AorP;
    setTimeout('startclock()',1000);
    </script>
    <script language="javascript" type="text/javascript">
    function submitAddfunction()
        var type = document.clockform.At;
             if(type.value == "Select")
           window.alert("Please select activity type");
           type.focus();
         else
           document.clockform.action="http://10.32.244.169:8082/Activity/Add";
              document.clockform.submit();
    function submitLogfunction() 
      { //if(i==2)
        var x = window.confirm("Do you want to logout?");
        if (x)
         document.clockform.action="http://10.32.244.169:8082/Activity/Logout";
         document.clockform.submit();
       else
          var type=document.clockform.At;
          type.focus();
    </script>
    </head>
    <body background="background1.JPG" onLoad="startclock()">
    <font face= "verdana" size="4" color=#804000>Version 1</font> <br><br>
    <%   String userName = (String)session.getAttribute("Empname");
         session.setAttribute("Empname",userName);
         String depName = (String)session.getAttribute("Depname");
         session.setAttribute("Depname",depName);
         String LoginTime = (String)session.getAttribute("loginTime");
         session.setAttribute("loginTime",LoginTime);
         session.setMaxInactiveInterval(60000000); %>
    <font face= "verdana" size="6" color=#804000>Welcome <%=userName%></font>
    <form name="clockform"><br><br>
    <font face= "verdana" size="4" color=#400000>
    <div  style="position:absolute; left:30px; top:120px; width:750px; height:323px;">
      Current Time:</font><font size="2" color=#400000> <%= todayDate %></font><br><br><br><br><br><br>
      '<%=depName%>'
    <INPUT TYPE="text" name="Dep"  size="12" value = '<%=depName%>'  style="visibility:hidden" ><br>
    <INPUT TYPE="text" name="user" size="12" value = '<%=userName%>' style="visibility:hidden" >
    <div  style="position:absolute; left:150px; top:100px; width:750px; height:323px;">
    <font face= "verdana" size="4" color=#400000>
    <center><table>
    <div  style="position:absolute; left:10px; top:10px; width:750px; height:323px;"> Login Time</div>
    <div  style="position:absolute; left:150px; top:10px; width:750px; height:323px;">
      <input type=text name="logintime" size="6" value='<%= LoginTime %>'  readonly ></div>
    <div  style="position:absolute; left:300px; top:10px; width:750px; height:323px;"> Date</div>
    <div  style="position:absolute; left:350px; top:10px; width:750px; height:323px;">
      <input type=text name="date" size="8" value='<%= dateOnly %>'  readonly > </div>
    <div  style="position:absolute; left:10px; top:50px; width:750px; height:323px;">Activity Type</div>
    <div  style="position:absolute; left:150px; top:50px; width:750px; height:323px;">
      <select name="At" onChange="showText()">
         <option value="Select">--Select--</option>
           <%
             Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
             Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:3413;DatabaseName=Project", "Product", "product");
             Statement st = con.createStatement();
             ResultSet rs = st.executeQuery(" select Activity_Type from Dep_names where Dep_name='"+depName+"'");%>
           <% while(rs.next())
                   String Activity=rs.getString(1);
                  StringTokenizer z = new StringTokenizer(Activity, ",");
                while(z.hasMoreTokens())
              {%>
                  <option><%=z.nextToken()%></option>
               <%}
             }%>
      </select></div>
    <div  style="position:absolute; left:10px; top:90px; width:750px; height:323px;">Started Time</div>
    <div  style="position:absolute; left:150px; top:90px; width:750px; height:323px;">
      <input type=text name="clockStart" id="time"   size="6" style="display:none" readonly></div>
    <div  style="position:absolute; left:10px; top:130px; width:750px; height:323px;">End Time</div>
    <div  style="position:absolute; left:150px; top:130px; width:750px; height:323px;">
      <INPUT TYPE="text" name="clockEnds" size="6"  readonly>
    </div>
    <div  style="position:absolute; left:10px; top:170px; width:750px; height:323px;">Comments</div>
    <div  style="position:absolute; left:150px; top:170px; width:750px; height:323px;">
      <textarea name="comment" cols="50" rows="6" > </textarea>
    </div><br><br><br>
    <div  style="position:absolute; left:145px; top:290px; width:750px; height:323px;">
      <input type=button TITLE="Click here to add ur record" name="add" value=" ADD "  onClick="submitAddfunction()" >
      <input type="button" TITLE="View Records" name="view" value="View"                onClick="javascript:window.open('http://10.32.244.169:8082/Activity/XlEmployeeReports.jsp');">
      <input type=button name="logout" value=" Logout "  onClick="submitLogfunction()">
    </div>
    </table>
    </center>
    </font>
    </div>
    </form>
    from the jsp page U R accessing servlet & in servlet comparision is taking place..............
    thanks in advance
    </body>
    </html>

  • JTable - Wrapping text in a cell.

    Hello,
    Can anyone tell me how to dynamically wrap the text in a particular cell of a JTable if it is to long to be displayed on one line? I don't care if it affects the row height, in fact I would like the row height to be automatically adjusted to fit the text.
    Basically, I have a table with 3 columns, the third of which is a "notes" column and allows up to 500 characters to be displayed. When the text is too long the table truncates it with an elipsis (...) and the user can't see the rest. I would like the text to wrap within the cell (changing the row height) so that the user can read the entire note more easily. In addition, and I realize this may add a significant wrinkle, my client does not want to see a scrollbar just the whole note.
    Has anybody been able to do this?
    Thank you,
    G Poole

    i didn't like the code in that article, it seemed too messy. here's what i did for my application:
        static class CardObjectRenderer extends DefaultTableCellRenderer {
            private int minHeight = -1;
            private final JLabel label = new JLabel();
            private final JTextArea textArea = new JTextArea();
            public CardObjectRenderer() {
                textArea.setLineWrap(true);
                textArea.setWrapStyleWord(true);
            public Component getTableCellRendererComponent(
                JTable table,
                Object value,
                boolean isSelected,
                boolean hasFocus,
                int row,
                int column) {
                Component c = null;
                switch (column) {
                    case 0 : // the image
                        ImageIcon icon = (ImageIcon) value;
                        minHeight = Math.max(minHeight, icon.getIconHeight());
                        label.setIcon(icon);
                        c = label;
                        break;
                    case 2 : // the help
                    case 1 : // the answer
                        String text = (String) value;
                        textArea.setText(text);
                        minHeight =
                            Math.max(minHeight, textArea.getPreferredSize().height);
                        c = textArea;
                        break;
                    default :
                        throw new RuntimeException("invalid column! " + column);
                // the final column in my table
                if (column == 2) {
                    if (table.getRowHeight(row) != minHeight) {
                        table.setRowHeight(row, minHeight);
                    minHeight = -1;
                return c;
        }i use a single instance of this cell renderer for every cell in my table, because i know exactly what is going in there. that is, i have a table model which reflects the column order i have here, etc.
    the thing that kills the cpu is the call to table.setRowHeight(int row, int height)... you need to check that you actually need to set it before you before you do. if you simply set it each time then your renderer gets called again and again and again. you can check it very simply:
        if (table.getRowHeight(row) != minHeight) {
            table.setRowHeight(row, minHeight);
        }(note that the text height still isn't perfect, but it suffices for my requirements)
    hope that helps some of you.
    cheers,
    chris

Maybe you are looking for

  • Crash dr watson in layout editor

    I have an intermittent problem. When I go in layout editor, I have often crash when I click on field. (Dr Watson) After one crash, I have always crash when I go to layout editor, I am not able to work in it without having the crash. After many manipu

  • Error in Creating Web Dynpro DC - Project

    While creating DC (in NWDS) on NWDI track/SC, I'm getting an error during the "Create Project" step.  Error says, this DC already exists (though it's a brand new DC).  It creates a DC on SC but it's not creating a project; thus, it doesn't show up in

  • OC4J Security fails to authenticate users on a 64 bit solarisx86 machine

    Hi, I am using a database login module to authenticate users. The login module I use is DBTableLoginModule. On 32 bit windows based machine, the module functions perfectly fine. When I deployed my project on a 64 bit solarisx86 machine, users are no

  • Transform the schema name with APPLY_DML_HANDELER

    Hello: I have referred following notes, but I was trying to transform the schema name from schema_name_A to Schema_name_B in APPLY_DML_HANDELER, which does not seem like working. 264035.1 How To Transform Schema Name In Streams 309575.1 How To Transf

  • Officejet Pro 8500A won't scan

    Suddenly printer was no longer connected wirelessly. After many tries at iuninstall/reinstall and following everthing I can find, I had my tech come out. He was able to connect printer wirelessly through my network. Howevder, he was unable to get the