8 Replies Latest reply on Mar 16, 2007 12:37 PM by pmuir

    s:SelectDate not popup

    bengao

      I am using Facelet + Seam 1.2 Patch1 JBoss 4.0.5 (EJB 3 profile Installation) to develop a web application.

      I try to use s:SelectDate in a simple page modified from booking sample book.xml


      <h:outputLabel for="receiveDate">Received Date:</h:outputLabel>

      <h:inputText id="receiveDate" value="#{transaction.txDateReceived}" required="true">
      <s:convertDateTime pattern="MM/dd/yyyy"/>
      </h:inputText>
      <s:selectDate for="receiveDate">
      <h:graphicImage url="img/dtpick.gif" style="margin-left:5px;cursor:pointer"/>
      </s:selectDate>



      The selectDate component rendered correctly, I can see icon, if I put mouse over image, mouse shape changed. but I cannot click it to active popup.

      Please advise.

      thanks,

      Ben

        • 1. Re: s:SelectDate not popup
          shane.bryzak

          Do you have the Seam resource servlet configured in your web.xml?


           <servlet>
           <servlet-name>Seam Resource Servlet</servlet-name>
           <servlet-class>org.jboss.seam.servlet.ResourceServlet</servlet-class>
           </servlet>
          
           <servlet-mapping>
           <servlet-name>Seam Resource Servlet</servlet-name>
           <url-pattern>/seam/resource/*</url-pattern>
           </servlet-mapping>
          


          • 2. Re: s:SelectDate not popup
            cavani

            With you did this, ignore me please.

            This files needed from Booking:

            css/date.css

            img/cal-next.png
            img/cal-prev.png
            img/input.bg.gif

            on of HTML:

            <link href="css/date.css" rel="stylesheet" type="text/css" />
            


            • 3. Re: s:SelectDate not popup
              bengao

              Thanks, a lot. Popup shows now, I can select date.

              But the appears seems not right. no arrow images on top. select month and year looks very bad.

              I did copied these files files and included css in my xhtml.

              Did i mission anything? Is the pattern String Right?

              <url-pattern>/seam/resource/*</url-pattern>
              
              


              Thanks a lot
              Ben

              • 4. Re: s:SelectDate not popup
                cavani

                It is important that your page are located right relative the image and css this way:

                \yourPage.xhtml
                \img\...
                \css\date.css

                This bug me in the past.

                • 5. Re: s:SelectDate not popup
                  bengao

                  Cavani,

                  the files and directory are in the way your indicated.

                  Can you think of anything else?

                  Thanks,
                  Ben

                  • 6. Re: s:SelectDate not popup
                    cavani

                    nopes.... sorry

                    • 7. Re: s:SelectDate not popup

                      Hello,

                      I'm still having trouble getting the <s:selectDate> to work with night builds of Seam (later than the 1.2.0 patch). As I reread postings like this and the JIRA issues I have tried to file repeatedly over this, I want to make the following request to the Seam developers - first, let's look at this:

                      "cavani" wrote:


                      This files needed from Booking:

                      css/date.css

                      img/cal-next.png
                      img/cal-prev.png
                      img/input.bg.gif

                      on <head> of HTML:



                      Now, in addition to the Seam Resource Servlet, the <s:selectDate> requires the files above. So instead of constantly asking users of the framework to pull files in from the example, how about just improving <s:selectDate> so that any required resources are provided by the Seam Resource Servlet? And, for the purposes of skinning, you can come up with some solution that allows the developer to override the defaults? Speaking as someone who is actively using the framework with a goal of getting to a production release, I don't typically diff the examples with each release of Seam - mainly, I look at the documentation.

                      I ask this because I've been using Seam for nearly 8 months on a major project - now, I only pick up a new version of Seam when needed (for example, I need fixes in the seam email component....). It's an unpleasant surprise when a feature like s:selectDate stops working - I've learned how to use it twice now, and with the nightly builds, I can't even get it to work. I've also learned from discussions in the JIRA issues that s:selectDate may in fact be deprecated/dropped in future Seam releases - if that's the case, then why so much change around s:selectDate?

                      Thanks,
                      Brad Smith

                      • 8. Re: s:SelectDate not popup
                        pmuir

                        A partial answer - for 1.3.0 the seam components will be built on top of the ajax4jsf cdk (component development kit). The Seam components will then use the a4j skinning.

                        As part of this we're considering streamling the components - all visual components go into richfaces, all infrastructure in seam (i.e. something like s:convertEnum would definitely remain in Seam, but something like s:selectDate will most likely move to richfaces) - but this is an open discussion :)

                        Richfaces currently is missing a calendar/selectDate component, so perhaps we will use Seam's, or they will import theirs from Richfaces 2