tags:

views:

275

answers:

3

hi I'm new to this JSF world, please bear with me if I'm asking some silly thing

i'm using UI tags for my application and I have a scenario that I need to generate a calendar control to make the user to select the date I followed the ui tags documentation and wrote the code like this:

  <table width="100%">
    <tr>
    <td>
           <ui:calendar binding="#{booking.calDate}"
           id="calDate"
       dateFormatPattern="dd/MM/yyyy" 
       label="Date ::"/>
       </td>
       </tr>
     </table>

and my backing bean contains

  private Calendar calDate = new Calendar();

with appropriate getters and setters

when I tried to load the page I'm getting the calendar component disorted. I'm getting cross marks and nonsense things with some javascript errors.

please help me in resolving this issue

Thanks in anticipation

A: 

Hello,

The component is coming from which JSF library? In others words, what do you have at the beginning of your XHTML file?

The only library I know is coming from Facelets, and it does not provide any component!

In addition, if calDate is a java.util.Calendar class, then you cannot bind this class to a JSF component!

Maybe you can have a look to Tomahawk, or Richfaces, that provide good calendar component...

romaintaz
i tried that way even it didnt work
A: 

Are you using MyFaces? If so, you may need to configure the MyFaces filter. This loads up the JavaScript and images etc. and may be the cause of your JavaScript and image loading problems.

Obviously if you're not using MyFaces this wont be an issue!

Phill Sacre
i1m using sun java studio creators ui tags
can use please help me what filter need to be setted...?
+1  A: 

I got the solution by myself - the issue is with the javascript code. it reads the javascript from themes.jar, which i placed in web-inf/lib folder still it was unable to access that. so I extracted the same and placed it in web-inf and it's working fine