Problem with h:inputText

I have a data edit form which contains more than one fields and a submit button.I want to modify few fields and few not. Data are populating from database into that form and on clicking save button data r saving into database using following code.
<h:outputText value="File Name : "></h:outputText>
<h:inputText value="#{FileBean.selectedRow.fileName}"></h:inputText>
<h:outputText value="Asset Number : "></h:outputText>
<h:inputText value="#{FileBean.selectedRow.refNo}"></h:inputText>
Code 2.
<h:outputText value="File Name : "></h:outputText>
<h:inputText value="#{FileBean.selectedRow.fileName}" readonly="true"></h:inputText>
or
<h:outputText value="File Name : "></h:outputText>
<h:inputText value="#{FileBean.selectedRow.fileName}" disabled="true"></h:inputText>
Both are not working.....

Doublepost, please continue here: http://forum.java.sun.com/thread.jspa?threadID=5249317
Don't use the back button to edit posts, you're going to repost the topic again. Use the edit button for that.

Similar Messages

  • Problem with t:inputText in s:subForm

    Howdy,
    I'm using a subform within my application. It contains an input text field as well as a submit button. Submitting per submit button works fine. But when the input text field is empty and I hit enter while focused on it a wrong action is performed. How can I solve this?
    <s:subForm id="searchForm">
                        <t:inputText value="#{SearchBean.searchString}" size="30"
                             style="vertical-align: top; margin-top:0px; border:1px solid black; height:13px;" />
                        <t:commandLink action="#{SearchBean.doSearch}" type="submit" >
                             <f:verbatim>
                                  <img class="menuImage" style="margin-left: 10px; float:none;"
                                       src="img/search.png" alt="" onload="fixPNG(this)" />
                             </f:verbatim>
                             <h:outputText value="#{messages['search.product']}" />
                        </t:commandLink>
                   </s:subForm>

    But when the input text field is empty and I hit enter while focused on it a
    wrong action is performed.And when the inputfield is not empty?
    I don't have experience with Tomahawk components, but I guess you'd better to report it to the Tomahawk boys as it's a SUN forum here. Check their mailing lists or issue lists.

  • Problem with inputText and autoTab="true"

    Hi to everyone
    I've a strange problem with the property autotab.
    if i have this situation:
    <af:inputText id="it1" columns="2" autoTab="true"
    maximumLength="2" autoSubmit="true">
    </af:inputText>
    <af:inputText id="it2" columns="1" maximumLength="1">
    </af:inputText>
    when the cursor pass from the first inputText to the second, the last character of the first inputText is cancelled. Anyone has the same problem? How can i solve it?
    Thanks in advance to everyone.

    use like this:
    <af:inputText id="it1" columns="1" autoTab="true"
    maximumLength="3" autoSubmit="true" partialTriggers="it2">
    </af:inputText>
    <af:inputText id="it2" columns="1" maximumLength="1" autoSubmit="true" autoTab="true" partialTriggers="it1 it3">
    </af:inputText>
    <af:inputText id="it3" columns="1" maximumLength="1" partialTriggers="it2">
    </af:inputText>

  • Problem with Date fields in Search panel

    Hi all,
    I use TP2 and in my jspx page I have a search panel with two date fields and table where the results is displayed. But there is a problem with these date fields, because when I search dates the results is nothing even I retype the date from table. Also I have other pages where this problem exist with same structure.
    Could somebody help me with some advice?
    Thanks in advance!

    Hi Frank,
    Thanks for the answer.
    I use the standart method to make search panel with drag and drop the data control to the page. The other search panel fileds work fine, only the date fileds are problem. Maybe something in view object doesn't work properly.
    Here I post the code from my page.
    <table border="1" style="margin:5px;">
    <tr>
    <td>
    <af:showDetailHeader text="ТЪРСЕНЕ" disclosed="true"
    inlineStyle="width:780px;">
    <table cellspacing="2" cellpadding="3" border="0">
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.EGN.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.EGN.inputValue}"
    label="#{bindings.EGN.hints.label}"
    columns="#{bindings.EGN.hints.displayWidth}"
    maximumLength="#{bindings.EGN.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.LNC.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.LNC.inputValue}"
    label="#{bindings.LNC.hints.label}"
    columns="#{bindings.LNC.hints.displayWidth}"
    maximumLength="#{bindings.LNC.hints.precision}"
    simple="true"/>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.AccPersonID.hints.label}"/>
    </td>
    <td align="left">
    <af:inputText value="#{bindings.AccPersonID.inputValue}"
    label="#{bindings.AccPersonID.hints.label}"
    columns="#{bindings.AccPersonID.hints.displayWidth}"
    maximumLength="#{bindings.AccPersonID.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.PersonName.hints.label}"/>
    </td>
    <td align="left" colspan="5">
    <af:inputText value="#{bindings.PersonName.inputValue}"
    label="#{bindings.PersonName.hints.label}"
    columns="#{bindings.PersonName.hints.displayWidth}"
    maximumLength="#{bindings.PersonName.hints.precision}"
    simple="true"/>
    </td>
    </tr>
    <tr align="left">
    <td align="right">
    <af:outputLabel value="#{bindings.DateFrom.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateFrom.inputValue}"
    label="#{bindings.DateFrom.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateFrom.format}"/>
    </af:inputDate>
    </td>
    <td align="right">
    <af:outputLabel value="#{bindings.DateTo.hints.label}"/>
    </td>
    <td align="left">
    <af:inputDate value="#{bindings.DateTo.inputValue}"
    label="#{bindings.DateTo.hints.label}"
    simple="true">
    <af:convertDateTime pattern="#{bindings.DateTo.format}"/>
    </af:inputDate>
    </td>
    </tr>
    <tr>
    <td align="right">
    <af:commandButton actionListener="{bindings.Execute.execute}"
    text="#{bundle.FindBtn_LABEL}"
    disabled="#{!bindings.Execute.enabled}"
    icon="/images/find.png"/>
    </td>
    <td align="left">
    <af:commandButton text="#{bundle.FindClearBtn_LABEL}"
    icon="/images/find_clear.png"
    action="#{PeopleBean.onClearVCBtn}"/>
    </td>
    </tr>
    </table>
    </af:showDetailHeader>
    </td>
    </tr>
    </table>
    Also I have a result table for the search panel, but I don't believe the problem can be there because it works fine when I search in fields different by inputDate.
    Do you have any suggestions?

  • Problem with rerendering h:panelGrid with rendered attribute

    Hi,
    I am new to jsf and trying to learn its features as I find it easy and fast for development purpose.I have been developing with jsf for past few weeks and got myself stuck with a problem, tired of which I had to take the forum's help :). My problem is that I need to show/hide h:panelGrid using any of the options below:
    I tried putting the grid in the div and show/hide that div using javascript..works fine but the problem with this is, even when the div is hidden the components (h:inputText ) within the grid are submitted with the form, which should not be the case since its hidden (as with normal jsps).
    I worked around with rendered attribute of the grid, and show/hide this grid using the backing bean method which is actually a valueChangeListener of h:selectOneMenu and set the boolean for the rendered to true/false as required, the grid is hide/shown correctly, but this isn't giving me any solution because when I submit the form with this grid shown on the view, its components values are still not submitted :( I dont know whats the reason behind this or what clue am I missing here. I dont know why when the grid is shown correclty, its components values are not submitted.. hence not validated too..
    Any help will be highly appreciable.
    Regards
    srehman

    >
    gimbal2 wrote:
    No, in "normal jsps" you'll get the same thing - even though you
    visibly hide a component, it is still there and thus will still be part
    of a form submit. If you don't want form fields to submit, you'll have
    to make sure they are physically not there, or the fields are disabled.Well thanks alot for correcting me on this mate.
    Don't know either, it should work if you did everything correctly. Are
    you sure the databinding (to a JSF backing bean field) of the grid is
    correct? When you create a similar setup but without any of the
    show/hide logic, does it work then?I guess I have done it correctly but let me tell you, I have no direct binding to the grid itself, instead I have h:inputText fields in the grid that are bound to the backing bean's properties, which I need to submit and validate too. e.g{color:#800000}<h:panelGrid id="myPanel" columns="3" rendered="Bean.renderStatus">
    <h:outputText value="variable"/>
    <h:inputText id="v" value="Bean.property" required="true">
    <a4j:support ......... />
    </h:inputText>
    </h:panelGrid>{color}
    {color:#800000}<rich:message for="v"/>{color}
    Here I am able to hide and show the grid but I am unable to submit the field in any case whether its hidden or shown :( At first the grid is hidden and then on the valueChangeListener of h:selectOneMenu rendered value is set to either true or false.( renderStatus is set in the value change listener ).
    And yeah without this logic of hide/show its working fine with me. Any guess or idea what am I doing wrong here.
    Thanks for your time by the way.
    Regards,
    Shoaib

  • Problem with binding in rich:tabPanel

    I have the problem with binding in rich component. In the first request the tabPanel work fine, but in the second request the component is not displayed. When i remove binding="#{organizationController.tabPanel}" everything works well. Anybody can help me? thanks.
    <rich:tabPanel style="height : 63px; width:auto; border:0px;" id="panelOrganizationForm" binding="#{organizationController.tabPanel}" >
    <rich:tab label="Dados da organizacao" id="tab1">
                   <h:panelGrid columns="2" id="panelGridOrganizationForm">
         <h:outputText value="Id: " id="idlabel"/>
         <h:inputText value="#{organizationController.organization.organizationId}" styleClass="input" id="organizationId" required="true"/>
         <h:outputText value="Nome: " id="nameLabel"/>
         <h:inputText size="60" value="#{organizationController.organization.organizationName}"
         styleClass="input" id="organizationName"/>
         </h:panelGrid>
         </rich:tab>
    </rich:tabPanel>
    <a4j:commandButton value="Voltar" action="back" id="bot" immediate="true"/>

    Guys
    Thanks a lot, both of your replies are immensely instructive. Maybe a little background on what I'm trying to do. In the table, I have header rows with dependent line rows. When a check box is ticked in the header, I want the corresponding check boxes in the dependent lines to be checked automatically (in slave fashion and ideally without using JavaScript). My idea was to update the bound components (for the lines) from within the Bean (in response to change on the header). However, given there's only a single component for each column in the table, this of course doesn't make sense.
    I'm trying to get to the typical MVC workflow of a) user updates a View component, b) Controller detects the change and updates the Model, c) The Model fires a property change event, which the View detects and updates appropriately. What's the way to achieve this in JSF (by design)?
    Here's a simple fragment (which does not work):
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <!-- (1) This is the master and (2) should refresh on update here --/>
                <h:selectBooleanCheckbox onchange="submit()" value="#{line.lineSelected}"/>
              </h:column>
              <h:column>
                <!-- (2) This is the slave and I want this to update in response to a change of (1) above --/>
                <h:selectBooleanCheckbox value="#{line.slaveSelected}"/>
              </h:column>
            </h:dataTable>In the setter method for lineSelected, I'm setting slaveSelected to the new value but the View is not refreshing based on this. How do I get the View to update (each dependent line) based on the new values for slaveSelected?
    Thanks again
    Lance

  • Problem with Richfaces, JSF 1.2, Facelets application

    Hello
    I have trouble using Weblogic 10.3.3 with my JSF-application which is constructed using Richfaces 3.3.3 and Facelets. First I had problems with deployment but with adding weblogic.xml to project.
    This is the weblogic.xml content :
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd"
    xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app">
    <library-ref>
    <library-name>jsf</library-name>
    <specification-version>1.2</specification-version>
    <implementation-version>1.2</implementation-version>
    <exact-match>false</exact-match>
    </library-ref>
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    </weblogic-web-app>
    This application works without problems in Glassfish 2.1 but when I try to access my application in Weblogic, I get following exception :
    Error 500--Internal Server Error
    javax.el.ELException: /Main.xhtml: The class 'katva.soa.logging.web.soaloggerweb.SessionController' does not have the property 'navigateToMonitor'.
         at com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:53)
         at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
         at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
         at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
         at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
         at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
         at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
         at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
         at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    SessionController - managed bean has method mentioned above, here is the part of the page where the SessionController - bean is referenced:
    <a4j:form id="linkForm">
    <li><h:commandLink value="#{msgs.Main_logSearchLink}" action="#{SessionController.navigateToMonitor}"/></li>
    <li><h:commandLink value="#{msgs.Main_maintenanceLink}" action="#{SessionController.navigateMaintenance}"/></li>
    </a4j:form>
    Could someone help with this ? I am getting desperate and I would need to solve this quite quickly...
    Thank you for everyone who can help with this
    Best Regards Tuomas Katva

    This is probably related: Facelets not rendered on Weblogic 10.3.3
    A step by step example
    - create a web.xml file, with the following contents:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5">
        <context-param>
            <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
            <param-value>.xhtml</param-value>
        </context-param>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>server</param-value>
        </context-param>
        <context-param>
            <param-name>org.richfaces.SKIN</param-name>
            <param-value>blueSky</param-value>
        </context-param>
        <context-param>
            <param-name>org.richfaces.CONTROL_SKINNING</param-name>
            <param-value>enable</param-value>
        </context-param>
        <filter>
            <filter-name>RichFaces Filter</filter-name>
            <filter-class>org.ajax4jsf.Filter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>RichFaces Filter</filter-name>
            <servlet-name>Faces Servlet</servlet-name>
            <dispatcher>REQUEST</dispatcher>
            <dispatcher>FORWARD</dispatcher>
            <dispatcher>INCLUDE</dispatcher>
        </filter-mapping>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <listener>
            <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
        </listener>
    </web-app>- create a faces-config.xml file with at least the following contents:
    <?xml version='1.0' encoding='UTF-8'?>
    <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
                  version="1.2">
        <application>
            <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
        </application>
    </faces-config>- create an example page
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html
            PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">
    <head>
        <title></title>
    </head>
    <body>
    <a4j:form id="form">
        <rich:panel header="Login" style="width: 750px">
            <h:panelGrid columns="3">
                <h:outputText id="label" value="Password"/>
                <h:inputText id="login" value="Type Your Password"/>
                <rich:message for="login"/>
                <f:facet name="footer">
                    <rich:toolBar height="20" itemSeparator="line">
                        <rich:toolBarGroup location="right">
                            <h:commandButton value="Click To Login"/>
                        </rich:toolBarGroup>
                    </rich:toolBar>
                </f:facet>
            </h:panelGrid>
        </rich:panel>
    </a4j:form>
    </body>
    </html>- package this into the following structure:
    WAR
        WEB-INF
             faces-config.xml
             web.xml
             lib
                commons-beanutils-1.7.0.jar
                commons-collections-3.2.jar
                commons-digester-1.8.jar
                commons-logging-1.0.4.jar
                jhighlight-1.0.jar
                jsf-api.jar
                jsf-facelets.jar
                jsf-impl.jar
                jstl-api-1.2.jar
                jstl-impl-1.2.jar
                richfaces-api-3.3.1.GA.jar
                richfaces-impl-3.3.1.GA.jar
                richfaces-ui-3.3.1.GA.jar
        test.xhtmlAnd deploy it to WebLogic. Upon deployment the following logging is observed:
    Jul 4, 2011 2:09:44 PM com.sun.faces.config.ConfigureListener contextInitialized
    INFO: Initializing Mojarra (1.2_14-b01-FCS) for context '/JSFFaceletsRichFaces'
    Jul 4, 2011 2:09:45 PM com.sun.faces.spi.InjectionProviderFactory getProviderInstance
    SEVERE: JSF1030: The specified InjectionProvider implementation 'com.bea.faces.WeblogicInjectionProvider' cannot be loaded.
    Jul 4, 2011 2:09:45 PM com.sun.faces.spi.InjectionProviderFactory createInstance
    INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.CacheManager getCacheFactory
    INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.LRUMapCacheFactory createCache
    INFO: Creating LRUMap cache instance using parameters: {org.richfaces.CONTROL_SKINNING=enable, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml, com.sun.faces.injectionProvider=com.bea.faces.WeblogicInjectionProvider, org.richfaces.SKIN=blueSky}
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.LRUMapCacheFactory createCache
    INFO: Creating LRUMap cache instance of default capacity
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.CacheManager getCacheFactory
    INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.LRUMapCacheFactory createCache
    INFO: Creating LRUMap cache instance using parameters: {org.richfaces.CONTROL_SKINNING=enable, javax.faces.STATE_SAVING_METHOD=server, javax.faces.DEFAULT_SUFFIX=.xhtml, com.sun.faces.injectionProvider=com.bea.faces.WeblogicInjectionProvider, org.richfaces.SKIN=blueSky}
    Jul 4, 2011 2:09:45 PM org.ajax4jsf.cache.LRUMapCacheFactory createCache
    INFO: Creating LRUMap cache instance of default capacityEnter the URL to access the application, for example, http://localhost:7001/JSFFaceletsRichFaces/faces/test.xhtml
    et voila RichFaces and Facelets on WebLogic

  • ADF Code Corner 069 : problem with returned value

    Hello,
    I use jdeveloper 11.1.2.2.0 and am trying to follow the sample 69 from ADF Code Croner : how-to create a custom LOV using bounded task flows. http://www.oracle.com/technetwork/developer-tools/adf/learnmore/69-custom-lov-with-btf-276178.pdf
    I have a problem with the returned value. The correct value is returned in the inputText but it seems that it is just at UI level and that binding layer is not impacted. If user click on next button, all others rows show the same value in the inputText (the value chosen before in the lov), and not the correct value which must be value from db.
    How can I solve this problem?
    note : opening the 69-sample, jdeveloper ask me to migrate some files (jpr/jws) from previous version of jdeveloper.
    Edited by: h0s on 8 oct. 2012 06:14

    Yes It happens with the downloaded sample. You can do this test :
    Launch EmployeesForm activity -> Open the LOV and select a department -> click next and see that the department id is the same for all rows.
    jdeveloper 11.1.2.2.0

  • How to solve problem with JSF table's border (style) ??

    Hi, I would like to create table in JSF like this
                   <table  align="center"
                             width="250"
                             style="border-collapse: collapse; border: 1px black solid;" >
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;">
                             Header A
                        </td>               
                   </tr>
                   <tr>
                        <td> a1 </td>
                        <td> a2 </td>
                   </tr>
                   <tr>
                        <td> b1 </td>
                        <td> b2 </td>
                   </tr>
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;" >                          
                             <BUTTON value="12" > button1 </BUTTON>
                             <BUTTON value="12">  button2 </BUTTON>
                        </td>
                   </tr>
                   </table>I don't know how to create borders like this with JSF's components.
    I know how to create table and collspan, but I have a problem with
    border and style.
    below is example that I creat it, but borders are not OK
    IF ANYONE FIND SOLUTION I WILL BE TANKFUL
    JSF:
    <hx:panelBox id="box1"
               layout="pageDirection"
               bgcolor="silver"
               align="center"
               style="border: 1px red solid;"
               border="0">
              <hx:panelBox id="box2" layout="pageDirection" width="100%" bgcolor="#aec74e" height="100%" align="center" style="border: 1px black solid;">
                   <center>
                        <h:outputText styleClass="outputText" id="text9" value="Prazniki"></h:outputText>
                   </center>                         
              </hx:panelBox>
              <h:panelGrid styleClass="panelGrid" id="grid1" columns="3">
                   <h:outputText styleClass="outputText" id="text4" value="#{msgs.planDan}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text3" value="#{pc_Koledar.praznikBean.dan}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text5" value="#{msgs.planMesec}">
                   </h:outputText>
                   <h:selectOneMenu styleClass="selectOneMenu" id="menu1" value="#{pc_Koledar.praznikBean.selectedMesec}">          
                    <f:selectItems value="#{pc_Koledar.praznikBean.meseci}" />          
                   </h:selectOneMenu>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text6" value="#{msgs.planLeto}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text2" value="#{pc_Koledar.praznikBean.leto}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text7" value="#{msgs.nazivPraznika}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text1" value="#{pc_Koledar.praznikBean.nazivPraznika}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
              </h:panelGrid>
              <hx:panelBox id="box3"           
                         align="center"
                         layout="lineDirection"
                         width="100%"
                         style="border: 1px black solid;" bgcolor="#aec74e">
                        <center>
                          <hx:commandExButton type="submit" value="Dodaj" id="button1" action="#{pc_Koledar.doButton1Action}" lang="CP1250">
                          </hx:commandExButton>
                           <hx:commandExButton type="submit" id="button3" action="#{pc_Koledar.doButton3Action}" value="Prika�">
                          </hx:commandExButton>
                        </center>
              </hx:panelBox>
    </hx:panelBox>

    Couldn't you use styleClass or id for CSS?

  • Problem with f:convertDateTime

    Hi ,
    I am having a problem with f:convertDateTime tag.
    Here is the code that I wrote.
    <h:inputText id="txtCollDate" value="#{FormData.dateObtained}">
    <f:convertDateTime pattern="MMdd"/>
    </h:inputText>
    Let me explain you my scenario. I have a Date object in my managed bean "FormData". But in the front-end I just want to show the month(MM) & day(dd) in the InputText field. Till now it is working fine.
    When I submit the form, it is taking the year as 1970 & updating the database with that.
    Please reply back to me if you guys have any idea.
    Thanks in advance for you time.
    Vasu.

    Hi Chris,
    Let's say the user is entering date (mmDD) for the first time, I will assign the current year. IF the date has been already entered then it should take the already existing year. But when I use this f:convertDateTime it is not giving me the year for the already entered dates.
    Can you suggest me how can I created my own converted?
    Thanks,
    Vasu.

  • Browser compatibility problem with t:selectOneMenu and JavaScript calendar

    I'm having problem with <t:selectOneMenu> and JavaScript calendar on IE. It works fine on Firefox but doesn't work on IE.
    The JSF code is as follows:
    <tr>
                                       <td align="right">
                                            Archive Date
                                       </td>
                                       <td align="left" colspan="3">
                                       <table cellpadding="0" cellspacing="0" border="0">
                                       <tr>
                                       <td>
                                       <span class="tuny_text">After&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateAfter" value="Archive Date After" rendered="false"/>
                                            <br/>
                                            <t:inputText required="false" value="#{nonItemImageSearchPage.stringArchiveDateAfter}" name="txtArchiveDateAfter" id="txtArchiveDateAfter" forceId="true"  styleClass="inp" style="width: 128px">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateAfter" name="dtpArchiveDateAfter" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateAfter" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       <td>
                                       <span class="tuny_text">Before&#160;(Ex. Oct 18, 2007)</span>
                                            <h:outputLabel for="txtArchiveDateBefore" value="Archive Date Before" rendered="false"/>
                                            <br/>
                                            <t:inputText value="#{nonItemImageSearchPage.stringArchiveDateBefore}" name="txtArchiveDateBefore" id="txtArchiveDateBefore" forceId="true" style="width:128px" styleClass="inp">
                                       </t:inputText>
                                            <t:graphicImage value="/images/calendar.png" id="dtpArchiveDateBefore" name="dtpArchiveDateBefore" forceId="true" style="border: 2px solid #EEE; cursor: pointer"></t:graphicImage>
                                            <br/>
                                            <t:message for="txtArchiveDateBefore" styleClass="form_error" replaceIdWithLabel="true"></t:message>
                                       </td>
                                       </tr>
                                       </table>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpBackground" value="Background"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpBackground" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.backgroundId}" styleClass="inp" style="width: 150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                            <s:selectItems value="#{nonItemImageSearchPage.backgroundPrefsList}"
                                                      var="backgroundPrefs" itemValue="#{backgroundPrefs.id}" itemLabel="#{backgroundPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td  align="right" class="left_separator">
                                            <h:outputLabel for="drpTheme" value="Theme"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpTheme" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.themeId}" styleClass="inp WCHhider" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.themePrefsList}"
                                                      var="themePrefs" itemValue="#{themePrefs.id}" itemLabel="#{themePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpSeason" value="Season"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpSeason" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.seasonId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.seasonPrefsList}"
                                                      var="seasonPrefs" itemValue="#{seasonPrefs.id}" itemLabel="#{seasonPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpClothing" value="Clothing"/>
                                       </td>
                                       <td align="left"  >
                                            <t:selectOneMenu id="drpClothing" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.clothingId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.clothingPrefsList}"
                                                      var="clothingPrefs" itemValue="#{clothingPrefs.id}" itemLabel="#{clothingPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right" >
                                            <h:outputLabel for="drpToy" value="Toy"/>
                                       </td>
                                       <td align="left" class="right_separator">
                                            <t:selectOneMenu id="drpToy" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.toyId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.toyPrefsList}"
                                                      var="toyPrefs" itemValue="#{toyPrefs.id}" itemLabel="#{toyPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td align="right" class="left_separator">
                                            <h:outputLabel for="drpJuvenile" value="Juvenile"/>
                                       </td>
                                       <td align="left" >
                                            <t:selectOneMenu id="drpJuvenile" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.juvenileId}" styleClass="inp" style="width:150px">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.juvenilePrefsList}"
                                                      var="juvenilePrefs" itemValue="#{juvenilePrefs.id}" itemLabel="#{juvenilePrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                  </tr>
                                  <tr>
                                       <td align="right">
                                            <h:outputLabel for="drpGroup" value="Grouping"/>
                                       </td>
                                       <td align="left"  class="right_separator">
                                            <t:selectOneMenu id="drpGroup" forceId="true" value="#{nonItemImageSearchPage.nonItemImageSearchModel.modelGroupingId}" styleClass="inp" style="width:150px;">
                                            <f:selectItem itemLabel="--------" itemValue="-1"/>
                                                 <s:selectItems value="#{nonItemImageSearchPage.groupPrefsList}"
                                                      var="groupPrefs" itemValue="#{groupPrefs.id}" itemLabel="#{groupPrefs.description}" />
                                            </t:selectOneMenu>
                                       </td>
                                       <td class="left_separator">&#160;</td>
                                       <td>&#160;</td>
                                  </tr>
    The JavaScript code is as follows:
    <script type="text/javascript" language="javascript">
         var dtpArchiveDateBefore = new MooCal("txtArchiveDateBefore");
         var dtpArchiveDateAfter = new MooCal("txtArchiveDateAfter");
         window.addEvent("domready", function(){
           $("dtpArchiveDateBefore").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
         /*$("txtArchiveDateBefore").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateBefore.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateBefore.minYear = 1800;
                        dtpArchiveDateBefore.maxYear = 2017;
        $("dtpArchiveDateAfter").addEvent("click", function(e){
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
       /* $("txtArchiveDateAfter").addEvent("click", function(e){
                 e.target.blur();
                    var event = new Event(e).stop();
                      var x = (event.client.x)-150;
                      var y = event.client.y;
                      dtpArchiveDateAfter.show(x,y);  // Display the calendar at the position of the mouse cursor
                      dtpArchiveDateAfter.minYear = 1800;
                        dtpArchiveDateAfter.maxYear = 2017;
         </script>When the calendar is above t:selectOneMenu, it doesn't show up on t:selectOneMenu area. Could anyone help me solve the issue?
    Thanks
    Rashed

    There are dozens of CSS attributes that can (and have to) be handwritten. Trouble with them is that, like text shadows, they don't appear in all browsers. I have nine different browsers installed and test pages in ALL of them before I "finish" building site or page for a template.
    I try to build for Firefox, out of personal preference for it, but I have to do things that work with IE because it still holds the market share (46%IE to 42%FF), and I will only go with designs that work in IE, FF, NS, Opera, Safari, and Chrome.
    As to your questions.
    1. The compatibility check is most likely current with the time of the build. I don't know if that component updates as browsers do, but I'd tend to think it doesn't. I'm using CS4  and there haven't been any updates for it in nearly a year. Firefox has released 4.0, Opera released 11, and Safari released 5 since then. The updater would have found and downloaded something if it was available.
    2. I could only guess. Text shadows DON'T show up in design view (or in IE) but they do in browser preview. It's just a UI quirk, and it means "trial and error" is the onyl way to get what you want.
    3. The quick-selects which are in DW dropdowns or popouts are the ones most  common to CSS designs and have been proven to work with all browsers at the time of release of your particular build of DW.
    Hope that helps..

  • Problem with Validations

    Hi All,
    I have another problem with validators. I have some components like inputText and selectOneChoice and selectBooleanCheckBox. I set the Required attribute to "true" and immediate attribute to "true". For selectOneChoice component autoSubmit attribute is set to "true".
    Here My problem is when i select one option in the selectOneChoice component then the value of the InputText should be changed depending on the value of the selectOneChoice Component.
    But When I select the option in the selectOneChoice component, I'm getting error popup dialog for the validation of all other components as selectOneChoice. so I'm unable to perform the required task.
    could anyone help me out,
    Thanks in advance,
    -Prapansol

    Prapan Sol,
    Please refer to the tag documentation on the af:subform tag. A combination of subforms and the use of the immediate attribute should solve your problem.
    http://www.oracle.com/technology/products/adf/adffaces/11/doc/multiproject/adf-richclient-api/tagdoc/af_subform.html
    --Ric                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • A problem with threads

    I am trying to implement some kind of a server listening for requests. The listener part of the app, is a daemon thread that listens for connections and instantiates a handling daemon thread once it gets some. However, my problem is that i must be able to kill the listening thread at the user's will (say via a sto button). I have done this via the Sun's proposed way, by testing a boolean flag in the loop, which is set to false when i wish to kill the thread. The problem with this thing is the following...
    Once the thread starts excecuting, it will test the flag, find it true and enter the loop. At some point it will LOCK on the server socket waiting for connection. Unless some client actually connects, it will keep on listening indefinatelly whithought ever bothering to check for the flag again (no matter how many times you set the damn thing to false).
    My question is this: Is there any real, non-theoretical, applied way to stop thread in java safely?
    Thank you in advance,
    Lefty

    This was one solution from the socket programming forum, have you tried this??
    public Thread MyThread extends Thread{
         boolean active = true;          
         public void run(){
              ss.setSoTimeout(90);               
              while (active){                   
                   try{                       
                        serverSocket = ss.accept();
                   catch (SocketTimeoutException ste){
                   // do nothing                   
         // interrupt thread           
         public void deactivate(){               
              active = false;
              // you gotta sleep for a time longer than the               
              // accept() timeout to make sure that timeout is finished.               
              try{
                   sleep(91);               
              }catch (InterruptedException ie){            
              interrupt();
    }

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with threads running javaw

    Hi,
    Having a problem with multi thread programming using client server sockets. The program works find when starting the the application in a console using java muti.java , but when using javaw multi.java the program doesnt die and have to kill it in the task manager. The program doesnt display any of my gui error messages either when the server disconnect the client. all works find in a console. any advice on this as I havent been able to understand why this is happening? any comment would be appreciated.
    troy.

    troy,
    Try and post a minimum code sample of your app which
    does not work.
    When using javaw, make sure you redirect the standard
    error and standard output streams to file.
    Graeme.Hi Graeme,
    I dont understand what you mean by redirection to file? some of my code below.
    The code works fine under a console, code is supposed to exit when the client (the other server )disconnects. the problem is that but the clientworker side of the code still works. which under console it doesnt.
    public class Server{
    ServerSocket aServerSocket;
    Socket dianosticsSocket;
    Socket nPortExpress;
    ClientListener aClientListener;
    LinkedList queue = new LinkedList();
    int port = 0;
    int clientPort = 0;
    String clientName = null;
    boolean serverAlive = true;
    * Server constructor generates a server
    * Socket and then starts a client threads.
    * @param aPort      socket port of local machine.
    public Server(int aPort, String aClientName, int aClientPort){
    port = aPort;
    clientName = aClientName;
    clientPort = aClientPort;
    try{
    // create a new thread
    aServerSocket = new ServerSocket(port) ;
    // connect to the nPortExpress
    aClientListener = new ClientListener(InetAddress.getByName(clientName), clientPort, queue,this);
    // aClientListener.setDaemon(true);
    aClientListener.start();
    // start a dianostic port
    DiagnosticsServer aDiagnosticsServer = new DiagnosticsServer(port,queue,aClientListener);
    // System.out.println("Server is running on port " + port + "...");
    // System.out.println("Connect to nPort");
    catch(Exception e)
    // System.out.println("ERROR: Server port " + port + " not available");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Server port " + port + " not available", JOptionPane.ERROR_MESSAGE);
    serverAlive = false;
    System.exit(1);
    while(serverAlive&&aClientListener.hostSocket.isConnected()){
    try{
    // connect the client
    Socket aClient = aServerSocket.accept();
    //System.out.println("open client connection");
    //System.out.println("client local: "+ aClient.getLocalAddress().toString());
    // System.out.println("client localport: "+ aClient.getLocalPort());
    // System.out.println("client : "+ aClient.getInetAddress().toString());
    // System.out.println("client port: "+ aClient.getLocalPort());
    // make a new client thread
    ClientWorker clientThread = new ClientWorker(aClient, queue, aClientListener, false);
    // start thread
    clientThread.start();
    catch(Exception e)
    //System.out.println("ERROR: Client connection failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client connection failure", JOptionPane.ERROR_MESSAGE);
    }// end while
    } // end constructor Server
    void serverExit(){
         JOptionPane.showMessageDialog(null, "Server ","ERROR: nPort Failure", JOptionPane.ERROR_MESSAGE);
         System.exit(1);
    }// end class Server
    *** connect to another server
    public class ClientListener extends Thread{
    InetAddress hostName;
    int hostPort;
    Socket hostSocket;
    BufferedReader in;
    PrintWriter out;
    boolean loggedIn;
    LinkedList queue;      // reference to Server queue
    Server serverRef; // reference to main server
    * ClientListener connects to the host server.
    * @param aHostName is the name of the host eg server name or IP address.
    * @param aHostPort is a port number of the host.
    * @param aLoginName is the users login name.
    public ClientListener(InetAddress aHostName, int aHostPort,LinkedList aQueue,Server aServer)      // reference to Server queue)
    hostName = aHostName;
    hostPort = aHostPort;
    queue = aQueue;
    serverRef = aServer;      
    // connect to the server
    try{
    hostSocket = new Socket(hostName, hostPort);
    catch(IOException e){
    //System.out.println("ERROR: Connection Host Failed");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort Failed", JOptionPane.ERROR_MESSAGE);     
    System.exit(0);
    } // end constructor ClientListener
    ** multi client connection server
    ClientWorker(Socket aSocket,LinkedList aQueue, ClientListener aClientListener, boolean diagnostics){
    queue = aQueue;
    addToQueue(this);
    client = aSocket;
    clientRef = aClientListener;
    aDiagnostic = diagnostics;
    } // end constructor ClientWorker
    * run method is the main loop of the server program
    * in change of handle new client connection as well
    * as handle all messages and errors.
    public void run(){
    boolean alive = true;
    String aSubString = "";
    in = null;
    out = null;
    loginName = "";
    loggedIn = false;
    while (alive && client.isConnected()&& clientRef.hostSocket.isConnected()){
    try{
    in = new BufferedReader(new InputStreamReader(client.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(client.getOutputStream()));
    if(aDiagnostic){
    out.println("WELCOME to diagnostics");
    broadCastDia("Connect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    out.println("WELCOME to Troy's Server");
    broadCastDia("Connect : client "+client.getInetAddress().toString());
         out.flush();
    String line;
    while(((line = in.readLine())!= null)){
    StringTokenizer aStringToken = new StringTokenizer(line, " ");
    if(!aDiagnostic){
    broadCastDia(line);
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    else{
    if(line.equals("GETIPS"))
    getIPs();
    else{
    clientRef.sendMessage(line); // send mesage out to netExpress
    out.println(line);
    out.flush();
    } // end while
    catch(Exception e){
    // System.out.println("ERROR:Client Connection reset");
                             JOptionPane.showMessageDialog(null, (e.toString()),"ERROR:Client Connection reset", JOptionPane.ERROR_MESSAGE);     
    try{
    if(aDiagnostic){
    broadCastDia("Disconnect : diagnostics "+client.getInetAddress().toString());
    out.flush();
    else {       
    broadCastDia("Disconnect : client "+client.getInetAddress().toString());
         out.flush();
    // close the buffers and connection;
    in.close();
    out.close();
    client.close();
    // System.out.println("out");
    // remove from list
    removeThreadQueue(this);
    alive = false;
    catch(Exception e){
    // System.out.println("ERROR: Client Connection reset failure");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Client Connection reset failure", JOptionPane.ERROR_MESSAGE);     
    }// end while
    } // end method run
    * method run - Generates io stream for communicating with the server and
    * starts the client gui. Run also parses the input commands from the server.
    public void run(){
    boolean alive = true;
    try{
    // begin to life the gui
    // aGuiClient = new ClientGui(hostName.getHostName(), hostPort, loginName, this);
    // aGuiClient.show();
    in = new BufferedReader(new InputStreamReader(hostSocket.getInputStream()));
    out = new PrintWriter(new OutputStreamWriter(hostSocket.getOutputStream()));
    while (alive && hostSocket.isConnected()){
    String line;
    while(((line = in.readLine())!= null)){
    System.out.println(line);
    broadCast(line);
    } // end while
    } // end while
    catch(Exception e){
    //     System.out.println("ERRORa Connection to host reset");
    JOptionPane.showMessageDialog(null, (e.toString()),"ERROR: Connection to nPort reset", JOptionPane.ERROR_MESSAGE);
    try{
    hostSocket.close();
         }catch(Exception a){
         JOptionPane.showMessageDialog(null, (a.toString()),"ERROR: Exception", JOptionPane.ERROR_MESSAGE);
    alive = false;
    System.exit(1);
    } // end method run

Maybe you are looking for

  • I cant receive email

    I cant receive any emails. I have sent myself a test email but received an error saying: "Delivery has failed to these recipients or distribution lists: [email protected] The recipient's mailbox is full and can't accept messages now. Microsoft Exchan

  • EDI 820 (Urgent)

    Hi All, We have EDI payments setup in our US SOB and have been using the EDI process (Payment Order/Remittance Advice (PYO) process) without any problem. I am trying to setup the EDI payments in Canada SOB which uses the same Oracle 11.5.10.2 instanc

  • Do Custom Types need to contain primitive attributes?

    Hi, i am trying to make use of the UDT feature of the Oracle 11 ODP.NET driver. I am using a patched Version of the 11g driver (Oracle.DataAccess.dll file-size: 917'504, date:8. Juni 2008, 11:35:58) against a Oracle Database 10g Enterprise Edition Re

  • How can I make my BB 8800 read arabic characters?

    I havn't bought the BB yet, I just want to make sure if it can read arabic characters..... It's really important help please....

  • In a region iframe src a blob file problem?

    hi , I try to make an example like this:I have a table which store blob files.And I try to see the file content in html region htp.p('<iframe src="ptest?n='||:P1_FILE_ID||'" width="650" height="450" /> </iframe> <item name="deneme" type="button" oncl