greptilian logo

IRC log for #javaee, 2014-01-05

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
00:33 pdurbin "is this the channel for the Joint Strike Fighter programme" -- http://www.evanchooly.com/logs/%2523%2523jsf/2014-01-04
02:08 cem1 joined ##javaee
02:08 cem1 hey pdurbin , sfisque
02:09 cem1 jsf has many disadvantages then adv
02:33 pdurbin cem1: such as?
02:34 sfisque is curious where this convo will lead....
02:42 cem1 first less transparent then servlet or jsp  aka more framework handles (more then struts 2) ,2) support for browsers are in question currently it support chrome<prime faces 100%>,FF<90% :/> , documentation SUCKS! , its more like a language tooo much thing involved
02:42 cem1 xhtml and jsf get me confused when i config in front end
02:43 cem1 validation: not as smart as struts :/
02:43 cem1 ajax crap no JS :(
02:45 cem1 dont use IE :D
02:46 cem1 "ajax crap no JS :(" meant to say no front end validation
02:48 pdurbin cem1: you can do validation in the bean
02:49 sfisque 1) you can validate both server side and client side in jsf.
02:49 sfisque 2) it's tag driven, just like struts/tiles, wicket, spring mvc, etc.
02:49 cem1 lol it comes with very few validation missing values , length .
02:49 sfisque 2) xhtml is just a document encoding.  jsf is a page technology.
02:49 sfisque * 3)
02:50 sfisque missing values == required
02:50 sfisque length can be handled with the Regex pattern validator
02:50 cem1 struts on other hand gives regex
02:50 sfisque learn the platform before denegrating it
02:51 cem1 sfisque said its big curve
02:51 sfisque yes jsf has warts, but none of those warts are what you listed
02:51 cem1 k
02:51 cem1 you may post something diff :/ its been 1 day
02:52 pdurbin cem1: yeah, not email validation built in so we added this one, for example: org.hibernate.validator.constraints.Email
02:52 cem1 more correctly 3 hours :(
02:52 pdurbin er. no* email bean validation built in, I meant
02:53 cem1 yes but struts gives me email validation on hand then JSF 2 where i need to handle myself :(
02:54 cem1 sfisque, you get confused for beginner with jsf and xhtml
02:54 sfisque email validation is simple.  all you ahve to do is use the constructor for InternetAddress in javamail api.  if it returns a valid object, it's a good email address, otherwise throw an Exception
02:54 cem1 1) you can validate both server side and client side in jsf--> Need to see it
02:54 sfisque 3 line validator
02:55 pdurbin cem1: we just import that thing and use this: @Email(message = "Please enter a valid email address.")
02:55 cem1 we are talking about JSF 2 :/
02:56 sfisque cem1, you can wire f:ajax "onevent" attribute with javascript linkages
02:57 sfisque also many jsf widgets have onXXX handler wireing for linking direct javascript
02:57 sfisque and yes, cem1 as pdurbin indicates, you can also use the very rich javabean validation framework (i forget the JSR # for it)
02:58 pdurbin we're new to bean validation but we like it a lot
02:59 pdurbin we can put our validation rules right on the entity and JSF enforces them
03:01 * cem1 for one sec thought can forget about UI :/
03:01 pdurbin cem1: we're using JSF 2.2 if that matters
03:02 cem1 why you choose JSF 2 ?
03:02 pdurbin it's what the team knows
03:02 pdurbin experience with it since 2006
03:03 pdurbin I'm playing catch up... new to JSF myself :)
03:03 pdurbin I agree JSF has a learning curve
03:03 cem1 does framework required lots of experience ?
03:03 cem1 requires*
03:04 pdurbin frameworks need to be learned
03:05 cem1 sfisque, i know the topic might be different if you could have told the disadv (i wonder what could those be)
03:05 cem1 i forgot struts 2
03:16 pdurbin cem1: you aren't happy with the JSF documentation?
03:16 cem1 :/
03:17 pdurbin there's the 1000 page java ee tutorial... some JSF stuff in there ;)
03:19 cem1 1000 page :(
03:20 cem1 i'm hungry going to have food later you guys bye sfisque,pdurbin and all
03:20 cem1 left ##javaee
03:58 AartBluestoke joined ##javaee
04:22 AartBluestoke joined ##javaee
09:07 neuro_sys joined ##javaee
09:07 neuro_sys joined ##javaee
10:40 Guest72429 joined ##javaee
12:46 knuke joined ##javaee
13:15 trollolol joined ##javaee
13:16 trollolol joined ##javaee
14:11 book` joined ##javaee
16:02 Guest72429 joined ##javaee
16:47 ak____ joined ##javaee
17:20 Guest72429 joined ##javaee
18:20 Guest72429 joined ##javaee
18:22 syncsys_ joined ##javaee
18:22 sajjadg joined ##javaee
18:25 syncsys_ hi
18:26 sajjadg hi
18:30 syncsys_ http://pastebin.ca/2530059  how to declare a function inside a .jsp page which can be called in the same page many times (I plan to make a recursive function to iterate some hierarhical objects untill the hirarchy finishes)
18:34 sfisque in order to declare a function in a jsp, you need to generate a scriptlet.  which is considered "bad form".  if you need that level of processing, put it in a controller bean that massages the data from the back end, and creates a list or tree that the page can then render appropriately in a table or tree tag
18:36 syncsys_ the controller is already sending an object with hirarchy. I have to show that object, so would need view logic in jsp
18:38 sfisque not necessarily.  you can do the tree render in a tag definition or use a third party tag for rendering a tree.  if you're using JSF, primefaces and other libs have tags for that specifically.  if you're using pure jsp, i'm sure google will turn up some opensource solutions to render a tree
18:40 sfisque if you're doing this "just to learn", the key will be to extract the "piece" that is repeatedly rendered and put in some conditional logic <c:if> or <c:choose> to have the piece include itself with the next node in the tree or end processing at that leaf
18:41 sfisque [node.jsp]    { if there are children, include node.jsp with each child } else {end processing at this node and return }
18:46 syncsys_ sfisque,  if you see the pastebin, thats exactly what I have done
18:46 syncsys_ what what options do i have, make a javascript recursive function or jsp scriptlet function?
18:47 sfisque what do you need this function to do?
18:47 syncsys_ so that I can call that function in an if else block. e.g if (this element has children){call function to loop the childresn}
18:48 syncsys_ and that will recurse for each dhild
18:48 syncsys_ until the child has no further children
18:48 syncsys_ this is the code i got from Quest
18:49 syncsys_ sfisque,  so what do you suggest
18:50 sfisque no need.   have the top level page include the page that renders a node and pass the "current node".  in the node page, render the "current node", then have an IF block that either includes the node page (recursion) with the next child node, or finishes rendering for that current node (close tags, etc.)
18:50 sfisque if you need indenting or right shifting, you can pass in a "depth" value as well
18:52 syncsys_ including a page that has the jsp/html script or calling a declared method for that, is almost the same thing in terms of logic
18:52 sfisque except you don't want to be muddying the view layer with unnecessary code
18:53 syncsys_ the code is the view code any way.. isnt it?
18:53 sfisque remember, someday, someone else might be maintaining this code, and they might know how to find you if you do something makes them go homicidal
18:54 syncsys_ hm
18:54 sfisque using a tag is better form than writing raw code
18:54 sfisque in a view template
18:54 syncsys_ taglibs?
18:54 sfisque that's one solution
18:54 sfisque <c:xxx> are tags
18:55 syncsys_ hm, didnt touched taglibs yet but it is s good solution i heard
18:55 sfisque or binding against backing beans via unified EL
18:55 sfisque taglibs put the code where it belongs, "not in the view" :-)
18:55 syncsys_ hm. so I need a piece of reusable code for the node somewhee
18:55 syncsys_ where
18:55 syncsys_ just a minut.
18:56 syncsys_ let me formulate something
18:57 sfisque anywho, i am off for a bit.  be well and code strong!
18:58 syncsys_ http://pastebin.ca/2530059     at line 35 a box is declared. this loop of boxes end at 144. Now at line 96, the current box may have many more  similar child boxes in side the box-body. and so on.
19:28 balo_ joined ##javaee
19:28 wicketn02b joined ##javaee
19:35 pdurbin joined ##javaee
19:38 Lappro joined ##javaee
19:38 Lappro joined ##javaee
19:56 balo joined ##javaee
20:00 Lappro joined ##javaee
20:00 book` joined ##javaee
20:18 neuro_sy1 joined ##javaee
20:19 neuro_sy1 joined ##javaee
20:20 neuro_sys joined ##javaee
20:35 syncsys_ how to pass the jsp var to javascript method? c:forEach var="box" items="${board.childBoxList}">        <script> displayBoxesRecursively("${box}");</script>           </c:forEach>
20:35 syncsys_ left ##javaee
20:37 balazare joined ##javaee
21:51 Quest joined ##javaee
21:52 Quest Trying to display some nodes in recursive manner with a template jsp, but the 2nd level nodes (boxes in this case for lines 54-57) are not being displayed. http://pastebin.ca/2530100 lines 25-28 and 54-57 are observable. any clues?
23:44 Quest issue solved

| 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.