JBoss Developer: Message List - Default populate rich:calendar with today date on page load?Most recent forum messageshttps://developer.jboss.org/community/richfaces?view=discussionsJive Engage2010-11-04T13:55:11Z2010-11-04T13:55:11ZenRe: Default populate rich:calendar with today date on page load?Ilya Shaikovsky/people/ilya_shaikovskydo-not-reply@jboss.com2010-11-04T13:55:11Z2010-11-04T13:55:11Z<!-- [DocumentBodyStart:7a780d8f-6832-49ac-8568-52ca751eed56] --><div class="jive-rendered-content"><p>first should be resolved using different Beans initiated for different pages</p><p>currentDate - only talls at which month calendar wil lbe opened in inline mode when there is no value.</p></div><!-- [DocumentBodyEnd:7a780d8f-6832-49ac-8568-52ca751eed56] --><img src='/beacon?t=1518931314393' />2010-11-04T13:55:11Z7 years 3 months ago0Re: Default populate rich:calendar with today date on page load?David Jitendranath/people/davestardo-not-reply@jboss.com2010-11-03T16:50:05Z2010-11-03T16:50:05Z<!-- [DocumentBodyStart:b6647b8d-fa2b-48e9-ac42-acf80db8f849] --><div class="jive-rendered-content"><p>Thanks for the useful response.&#160;&#160; If I returned the current date in the getter method, I may not want the same behaviour for that field in other seam pages.&#160; For eg: On an edit or create page it is useful to have the getter method return the current date so that the user need not enter the 'created date' but on a list page however you do not want to display current date instead you want it to show the 'created date'.</p><p>As Aman has asked earlier, is the "currentDate" attribute useful for such a requirement? how can you use the "currentDate" attribute?&#160; what value do you set for that attribute?&#160; Thanks!!!</p></div><!-- [DocumentBodyEnd:b6647b8d-fa2b-48e9-ac42-acf80db8f849] -->2010-11-03T16:50:05Z7 years 4 months ago10Re: Default populate rich:calendar with today date on page load?Ilya Shaikovsky/people/ilya_shaikovskydo-not-reply@jboss.com2010-10-11T10:27:38Z2010-10-11T10:27:38Z<!-- [DocumentBodyStart:bdd45df2-c8f4-4e30-ba49-152430153e81] --><div class="jive-rendered-content"><p>still not see the problem.</p><blockquote class="jive-quote">&lt;calendar value = "#{bean.date}"/&gt; </blockquote><p>where bean.date property has default value on server side. Which will be updated after submit with choosen one.</p></div><!-- [DocumentBodyEnd:bdd45df2-c8f4-4e30-ba49-152430153e81] -->2010-10-11T10:27:38Z7 years 4 months ago0Re: Default populate rich:calendar with today date on page load?Muneeswaran Balasubramanian/people/muneeswaranbaludo-not-reply@jboss.com2010-10-11T06:18:47Z2010-10-11T06:18:47Z<!-- [DocumentBodyStart:4a621555-f525-42c8-93cb-4627c8dd973c] --><div class="jive-rendered-content"><p>Hi Aman,</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160; At first you create HTMLForm variable in Bean and make getter,setter method for that variable and in the getter method you call one method.Then,Bind the varible with the form like using binding attribute.By this,that method is automatically called when you will enter into the page.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; You just put the date variable in the Bean and initialize the date variable as Date date=new Date(); in the method which is called in the getttermethod of html form.You will get te current date at the time of initialization.</p></div><!-- [DocumentBodyEnd:4a621555-f525-42c8-93cb-4627c8dd973c] -->2010-10-11T06:18:47Z7 years 4 months ago20Re: Default populate rich:calendar with today date on page load?Rocky S/people/boy18njdo-not-reply@jboss.com2010-10-08T18:05:50Z2010-10-08T18:05:50Z<!-- [DocumentBodyStart:31327f15-c62d-458f-bb4d-87d3884989e0] --><div class="jive-rendered-content"><p>If you mean set the "value" attribute to today date. Then how would I bind the value to a bean.</p></div><!-- [DocumentBodyEnd:31327f15-c62d-458f-bb4d-87d3884989e0] -->2010-10-08T18:05:50Z7 years 4 months ago10Re: Default populate rich:calendar with today date on page load?Rocky S/people/boy18njdo-not-reply@jboss.com2010-10-08T14:53:46Z2010-10-08T14:53:46Z<!-- [DocumentBodyStart:56d7816d-051c-40ed-b8c8-1440c2848817] --><div class="jive-rendered-content"><p>Hi Ilya,</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>There is no "calendar" attribute. Do you mean "currentDate" attribute ? What would be its value?</p></div><!-- [DocumentBodyEnd:56d7816d-051c-40ed-b8c8-1440c2848817] -->2010-10-08T14:53:46Z7 years 4 months ago20Re: Default populate rich:calendar with today date on page load?Ilya Shaikovsky/people/ilya_shaikovskydo-not-reply@jboss.com2010-10-08T10:05:04Z2010-10-08T10:05:04Z<!-- [DocumentBodyStart:1d005a97-bcac-4dcb-bf91-a2c52f9da9b0] --><div class="jive-rendered-content"><p>so just define value of the calendar attribute to today date by default.</p></div><!-- [DocumentBodyEnd:1d005a97-bcac-4dcb-bf91-a2c52f9da9b0] -->2010-10-08T10:05:04Z7 years 4 months ago30Default populate rich:calendar with today date on page load?Rocky S/people/boy18njdo-not-reply@jboss.com2010-10-08T02:21:57Z2010-10-08T02:21:57Z<!-- [DocumentBodyStart:6f581df0-abf7-4833-b95a-5b210349b43e] --><div class="jive-rendered-content"><p>How to default populate rich:calendar value with today date on search screen? When the page loads by default it should search by today date. User should be able to change the prepopulated date to his choice and do search.</p><p style="min-height: 8pt; padding: 0px;">&#160;</p><p>Thanks</p></div><!-- [DocumentBodyEnd:6f581df0-abf7-4833-b95a-5b210349b43e] -->2010-10-08T02:21:57Z7 years 4 months ago70