greptilian logo

IRC log for #javaee, 2014-01-11

Please see http://irclog.greptilian.com/javaee for which days have been logged.

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
01:18 trollolol joined ##javaee
04:28 firebird1 joined ##javaee
04:32 firebird1 i'm not getting ajax behavior even after i set f:ajax
04:32 firebird1 the whole page gets reloaded
04:33 firebird1 <h:commandButton value="Balance" action="#{bl.showBalance}"><f:ajax execute="@form"/>
04:33 firebird1 </h:commandButton>
04:33 firebird1 ?
04:34 firebird1 pdurbin
04:35 firebird1 should i need to paste whole code ?
04:38 firebird1 http://pastebin.com/2ZqKTQeS
05:21 sfisque execute @form submits the whole form, unless you have multiple forms, you're going to submit the whole page
05:33 wol sfisque, its not doing ajax call but the whole page page gets reloaded (like normal submit)
05:45 * wol working with jsf is nightmare
05:50 sfisque what version of jsf is your container providing?   f:ajax is 2.x.  if your container is 1.x jsf, you wont get an ajax submit
06:00 wol i'm using tomcat 7.0
06:06 sfisque ok.  i do not think tc bundles jsf, so i'm assuming you're bundling jsf in your war file.  do you know what version is being bundled?
06:08 wol yes adding javax.faces-2.2.3 , jsf-api-2.2.3 jar, jsf-impl-2.2.3,prime faces.jar
06:08 wol in lib
06:12 wol sfisque, all are 2.0 versions
06:14 sfisque ok.  what servlet version is referenced in your web.xml?
06:17 sfisque and secondly, do you have the "f" namespace bound in your page or facelet that contains that f:ajax tag?
06:17 wol since i'm using Tomcat 7 it must be servlet 3.0
06:17 wol yes i have f:namespace
06:17 sfisque oh, add  @this to the execute string
06:17 wol xmlns:f="http://java.sun.com/jsf/core"
06:17 sfisque i've seen this before
06:18 sfisque so execute = "@this @form"
06:19 sfisque ive seen wierdness where you have to force the ajax to submit the button press.  it might have just been primefaces wierdness, though.  so this might not fix it for you
06:21 wol :'(
06:22 wol its submitting as normal form
06:23 wol aka no ajax
06:24 sfisque what does bl.showBalance() return?
06:24 sfisque void?  String?
06:24 wol void
06:25 sfisque ok
06:25 wol primefaces works fine
06:25 sfisque how many forms on the page?
06:25 wol copy pasted the code it works fine <primefaces>
06:25 wol 1 form
06:26 sfisque aye, i find PF has very good ajax support
06:26 sfisque a few anomolies in early versions, but at 3.5 + it's pretty good
06:28 sfisque try specifying the event on the f:ajax
06:28 wol i did that too
06:28 sfisque ok
06:29 wol so @this means that element only
06:29 sfisque what event did you specify?
06:29 sfisque @this is the component that triggers the ajax , so in this case @this == commandButton
06:29 wol keypress
06:29 sfisque try "click"
06:29 sfisque or onClick
06:30 sfisque i forget which "event" requires
06:31 sfisque "click"  — just checked the javadoc
06:31 sfisque f:ajax event = "click"
06:32 wol how about i press enter key
06:33 wol keypress ?
06:33 sfisque keypress will only work if that button is the default component in the form
06:33 wol k normal submit  :/
06:34 sfisque i think there is a way to specify the default component in a form.   time to peruse the javadoc some more
06:35 sfisque found it.  looks like you have to add an "onkeypress" handler in the <h:form> that triggers the commandButton (use jquery or such to connect to it)...
06:38 sfisque assuming you have multiple buttons, enter triggers the first button in the form.  if you have 1 button, enter "should" trigger it, but ajax then needs multiple events linked
06:39 sfisque appears "click" is the default behavior for ajax on a commandButton. so you'l have to do extra work to get the keypress linkage
06:39 sfisque not sure event takes multiples, so you might have to specify several f:ajax with different event specified
06:40 sfisque but try "click keypress" first .. might get lucky
06:41 * wol falls from mountain
06:41 sfisque found this in SO:
06:41 sfisque S O
06:41 sfisque <h:form id="form1">
06:41 sfisque <h:inputText value="#{myBean.query}" onkeypress="if (event.keyCode == 13) document.getElementById('f​orm1:search').click();"/>
06:41 sfisque <h:commandButton id="search" value="Search" action="#{myBean.submitQuery()}"/>
06:41 sfisque </h:form>`
06:42 sfisque so making the form intercept the enter key and do a "button.click()" call should trigger the ajax
06:47 sfisque well, heading off to bed.   GL
06:48 * sfisque crosses fingers for wol
06:48 wol bad documentation for jasper reports :/
06:54 wol nope doesnt work go for primeface
09:58 sajjadg joined ##javaee
10:37 neuro_sys joined ##javaee
10:37 neuro_sys joined ##javaee
11:07 brecht joined ##javaee
11:08 brecht hi all
11:08 brecht i'm looking for some basic explanation on JList with ListModel
11:54 wol using primefaces its soo cooooooool
11:54 wol k this is a bug or not i have no clue
11:58 AlexCzar joined ##javaee
12:00 wol whenever i reset the state it get restted as before onchange
12:00 wol pdurbin,
13:02 sajjadg joined ##javaee
13:30 pdurbin wol: have you tried http://tomee.apache.org rather than trying to add all the JSF jars to tomcat yourself?
15:07 kobain joined ##javaee
15:39 trollolol joined ##javaee
15:49 wol joined ##javaee
16:34 Guest88897 joined ##javaee
17:05 kotten joined ##javaee
17:13 Guest88897 joined ##javaee
19:12 sajjadg joined ##javaee
19:46 Guest88897 joined ##javaee
20:31 neuro_sys joined ##javaee
22:10 neuro_sys joined ##javaee
22:10 neuro_sys joined ##javaee

| Channels | #javaee index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

Please see http://irclog.greptilian.com/javaee for which days have been logged.