tag:blogger.com,1999:blog-5396570633771229267.post8651127878201340122..comments2024-03-29T00:04:12.306+01:00Comments on The BalusC Code: Composite component with multiple input fieldsBalusChttp://www.blogger.com/profile/00299057045960008647noreply@blogger.comBlogger41125tag:blogger.com,1999:blog-5396570633771229267.post-54062799542409867532019-04-02T11:56:59.675+02:002019-04-02T11:56:59.675+02:00Hi BalusC, thank for this article. But trying to i...Hi BalusC, thank for this article. But trying to implement this, i'm run into a problem, with mojarra 2.2.13-SP1 in Wildfly 10 the updateDaysIfNecessary listener never get called. I've tried to add event attribute with change value to f:ajax, but nothing happens.<br /><br />Best regards.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-30672890257345832442017-06-06T22:15:42.644+02:002017-06-06T22:15:42.644+02:00Hi BalusC
From this example, I am trying to have a...Hi BalusC<br />From this example, I am trying to have a minDate and a maxDate. Therefore, when I select the year of my minDate (or maxDate) both month and day fields must be updated. Therefore, if my minDate = 1946-December-07, and I choose year 1946, the months should be only december and days should be 7 to 31. When in my inpuDate.java, the value coming of getConvertedValue(FacesContext contextAnonymoushttps://www.blogger.com/profile/06979571000950008195noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-56907875288593083092016-08-29T15:15:11.010+02:002016-08-29T15:15:11.010+02:00Hi BalusC, what would be the correct way to reuse ...Hi BalusC, what would be the correct way to reuse your component to make a period component (which takes a startDate and a endDate)?<br /><br />In your component, you override the getSubmittedValue() and return a formatted string ("dd-MM-yyyy"). But how should I return the value for a period? Do I absolutely need to return something as a String (let's say in a "dd-MM-yyyy,Unknownhttps://www.blogger.com/profile/01551140872112957579noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-9559806838326975002016-08-17T21:32:18.367+02:002016-08-17T21:32:18.367+02:00Hi BalusC,
I tried to implement your example, but ...Hi BalusC,<br />I tried to implement your example, but when I click the button in the Bean is null the properties date1, date2, date3...I initialize those properties but those took the value of bean and not the value of the componentAnonymoushttps://www.blogger.com/profile/10406006020403859714noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-20598210400353893072015-11-07T15:12:34.625+01:002015-11-07T15:12:34.625+01:00Hi BalusC,
My challenge is totally different. I h...Hi BalusC,<br /><br />My challenge is totally different. I have multiple h:input tags in my jsf page. And I want to create an object with each and every h:input tag. To do so I am calling a method with static parameter (this method checks whether any row exists in database with the given static parameter, if yes it fetches the value.)<br /><br />But my challenge is, if there is no record Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-43620874349038769922015-05-13T21:03:17.000+02:002015-05-13T21:03:17.000+02:00BalusC,
Is there any way to initialize a composite...BalusC,<br><br />Is there any way to initialize a composite component in a way similar to f:viewAction?<br><br />For example, I want to render a toplist with a particular ID. I'd like to pass the ID as the ui:param inside the ui:include.<br><br />Is it possible to do this?<br><br />Thanks,<br><br />V.Anonymoushttps://www.blogger.com/profile/17723220542321971233noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-21254518622625727492015-03-28T09:55:47.120+01:002015-03-28T09:55:47.120+01:00I must admit that composites yet again confuse me....I must admit that composites yet again confuse me. Initially I thought that CC is yet another template engine eventually and long awaited to be designed the proper way. Unfortunately my hopes have been ripped apart by trying to have a "composite" table column.<br /><br />Also this blog post confuses me: why am I forced to write again some Java code, i.e. a backing bean of a component? whaefelingerhttps://www.blogger.com/profile/16283144470997327104noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-67844701249565847122014-12-30T21:11:30.063+01:002014-12-30T21:11:30.063+01:00Ok, I can confirm that your code doesn't work ...Ok, I can confirm that your code doesn't work with WAS 8.0.0.9, it has custom JSF implementation based on Apache MyFaces. As I said earlier it throws error 'BeanValidator W cannot validate component with empty value: form:range_chooser:hiddenValue'. When I tried to implement it at home on WildFly 8.2 + Apache MyFaces 2.2, everything worked fine. I suspect that it's related to Anatoly314https://www.blogger.com/profile/15136430443616530520noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-46783282070703154372014-12-30T10:57:38.609+01:002014-12-30T10:57:38.609+01:00Sorry, It looks that it doesn't accept to post...Sorry, It looks that it doesn't accept to post code, I put the whole question here: http://pastebin.com/hC73R8Ng Thank youAnatoly314https://www.blogger.com/profile/15136430443616530520noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-50780205207954258222014-12-30T10:56:12.910+01:002014-12-30T10:56:12.910+01:00Hi BalusC,
I've a few questions...
This is som...Hi BalusC,<br />I've a few questions...<br />This is something basic, but I can't get it:<br /><br />this should submit the whole page, am I wrong? In your video it's shown that only necessary fields are updated.<br />I tried to change it to <br /> but I have now the following problem, I receive an exception 'form:input: Conversion error occurred.' What am I doing wrong? I Anatoly314https://www.blogger.com/profile/15136430443616530520noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-26196039232448332992014-10-08T02:12:18.955+02:002014-10-08T02:12:18.955+02:00Hey, BalusC!
Great article!
Question:
how to add ...Hey, BalusC!<br />Great article!<br /><br />Question:<br />how to add atributes onclick and onchange to cc?mbanovichttps://www.blogger.com/profile/14338676884683267128noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-34033613661705342982014-04-24T12:10:19.024+02:002014-04-24T12:10:19.024+02:00This article rocks. As usual.
Thanks !This article rocks. As usual.<br />Thanks !A.Dumeigehttps://www.blogger.com/profile/11218988964799053428noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-11199963781964898602013-12-06T20:31:25.309+01:002013-12-06T20:31:25.309+01:00Hi,
Excuseme BalusC i have a new problem. i chan...Hi, <br />Excuseme BalusC i have a new problem. i change your java code and remove all calendar. i create a new class with name CustomDate and int it define 3 int varable as year, month and day. <br />in the backing bean i replace CustomDate with Date.<br />when i call a xhtml page i work good. but when i submit a form it throw a exception and say can not cast Date to CustomDate.<br />do you فرزند ایرانhttps://www.blogger.com/profile/11046527932821298900noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-90019008756704266992013-12-06T17:34:13.529+01:002013-12-06T17:34:13.529+01:00Very Very ... Thanks. ;)Very Very ... Thanks. ;)فرزند ایرانhttps://www.blogger.com/profile/11046527932821298900noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-18636881302178116502013-12-06T17:21:25.205+01:002013-12-06T17:21:25.205+01:00HashMap is ordered by hashcode, not by insertion o...HashMap is ordered by hashcode, not by insertion order. Use LinkedHashMap to order by insertion order like ArrayList.BalusChttps://www.blogger.com/profile/00299057045960008647noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-46922189647059137092013-12-06T17:18:57.006+01:002013-12-06T17:18:57.006+01:00BalusC i repleace Integer[] with Map for reason th...BalusC i repleace Integer[] with Map for reason that it show me month name. it works. but Order of month is not true. how can i solve it? is there a solution?<br />thanks for your attention and your good articleفرزند ایرانhttps://www.blogger.com/profile/11046527932821298900noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-2614830130457614592013-12-03T10:23:39.854+01:002013-12-03T10:23:39.854+01:00Very good exapmle,
But is is possible to add a cha...Very good exapmle,<br />But is is possible to add a change event to this component? I need to use an ajax call when the value of date changes.<br />So that i can reackt with f:ajax on an change event and render something else or save the value with an ajax call into the bean attribute.Anonymoushttps://www.blogger.com/profile/17979659694676700626noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-29938137626230795852013-11-07T11:33:45.988+01:002013-11-07T11:33:45.988+01:00@Chuk: JSF implicitly uses <ui:component> fo...@Chuk: JSF implicitly uses <ui:component> for composites. So just using it directly is cleaner than <ui:composition> or even <html>.BalusChttps://www.blogger.com/profile/00299057045960008647noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-15449817941687825002013-11-07T03:03:53.921+01:002013-11-07T03:03:53.921+01:00First off thanks for this indepth blog on composit...First off thanks for this indepth blog on composite component. <br /><br />IHAQ regarding ui:component. I've always created my composite component without the ui:component outer tag. What's the difference of having the ui:component tag?<br /><br />ThanksChuk Leehttps://www.blogger.com/profile/03368380922817442586noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-82163862484395755172013-10-11T08:21:48.454+02:002013-10-11T08:21:48.454+02:00When setting the child components to "invalid...When setting the child components to "invalid" in case of an exception it works for me. Probably not the best solution but it seems to work.Heiko Tappehttps://www.blogger.com/profile/01015729782434470130noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-49676175235475501252013-10-10T08:04:28.714+02:002013-10-10T08:04:28.714+02:00can we change the slider in the time picker to a t...can we change the slider in the time picker to a text box entry?<br /><br />My requirement is to type in the time to the calendar. like a editable drop down where we can enter from 0-12 and another from 0-59<br />Dileep Gopalakrishnanhttps://www.blogger.com/profile/09468695931471284718noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-24231722485236857352013-10-08T22:08:28.817+02:002013-10-08T22:08:28.817+02:00Hi BalusC,
Could you please help me in
http://st...Hi BalusC,<br /><br />Could you please help me in<br /><br />http://stackoverflow.com/questions/19257142/unable-to-use-poverlaypanel-inside-composite-componenthauntinghttps://www.blogger.com/profile/02544083472891428171noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-83731233236048616182013-10-04T15:51:16.685+02:002013-10-04T15:51:16.685+02:00I'm using something similar to this method (my...I'm using something similar to this method (myfaces 2.0.18) and I noticed that the selectBooleanCheckbox component values weren't being saved when an ajax event occurred. I traced the problem down to the "cc" attribute not being resolved in the processValidators method stack of my custom class. This lead me to discover that there is a difference in implementation of Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-30794217737921685742013-09-27T13:41:36.002+02:002013-09-27T13:41:36.002+02:00Actually the problem is not because of using a con...Actually the problem is not because of using a converter or not. It's just that the values are reset when a converter exception is thrown in getConvertedValue.Heiko Tappehttps://www.blogger.com/profile/01015729782434470130noreply@blogger.comtag:blogger.com,1999:blog-5396570633771229267.post-39495848630152677742013-09-25T17:18:22.690+02:002013-09-25T17:18:22.690+02:00Yes. Great article and works like a charm.
But I n...Yes. Great article and works like a charm.<br />But I noticed some problem when for instance one of the input fields is just a text (without a converter assigned). And now "getConvertedValue" throws a ConverterException because the whole thing is invalid.<br />The newly entered text isn't kept but reset to its former value. Why is that? And what can I do about that?Heiko Tappehttps://www.blogger.com/profile/01015729782434470130noreply@blogger.com