<< 28-August-2008 : bevinbot on ##jsf at freenode [download] [back] >>
 
 
time nick message

02:37

<jdlee>

my header facet's not showing up in my dataTable :(

02:50

<edburns>

~seen rlubke

02:50

<javabot>

edburns, At 8/27/08 6:12 PM rlubke said: anyone know of a way to configure a timeout for connecting to a repository when gathering dependencies using maven2?

03:09

<jdlee>

edburns: ryan can't make it on to irc. he wants to know if he should call

03:15

<edburns>

jdlee: Really? That would be great.

03:15

<edburns>

jdlee: I love this community!

03:15

<jdlee>

okie dokie

03:16

<edburns>

I don't know how you come by this information, some non-IRC IM?

03:18

<edburns>

jdlee: Hello?

03:20

<jdlee>

edburns: sorry... Yahoo IM, think

03:20

<jdlee>

he might have walked away, but i passed the message along :)

03:22

<jdlee>

speaking of walking away, it's time to watch The Greatest American Dog with my wife, then more JSFOne prep work until unseemly hours of the night... :)

03:22

<edited>

when is JSFOne?

03:22

<jdlee>

next week

03:22

<jdlee>

9/4-9/6 in Virginia, USA :)

03:22

<jdlee>

http://jsfone.com

03:23

<jdlee>

lots of smart people presenting. and me.. hehe

03:23

<jdlee>

self-deprecation++

03:23

<jdlee>

8-)

03:23

<jdlee>

biab

06:29

<cofeineSunshine>

good morning people

07:25

<AdrienC>

hi

07:29

<cofeineSunshine>

howdy

07:29

<cofeineSunshine>

wanna see high russian goverment person?

07:29

<cofeineSunshine>

http://www.youtube.com/watch?v=VGV25M2kpfM

09:57

<b52deb_>

ppl any step by step jsf book ?

11:38

<redrebel_>

I have a table populated by a database. I want to add a column that has a button for each row

11:39

<redrebel_>

how do I extract that row when the button is clicked?

11:39

<redrebel_>

I'm using netbeans woodstock components

12:13

<acidjnk>

redrebel__, one way is to inject the whole table to a backing bean, then access the current row with getRowData or similar.

12:13

<acidjnk>

with a binding

12:36

<edburns>

PHEW!

12:49

<vezzoni>

morning

12:49

<cofeineSunshine>

redrebel__: another way is add <f:setPropertyActionListener> to commandButton, and provide currentRow value, or elements ID

12:52

<cofeineSunshine>

before this i have been using a commandLink with atached <f:param/>. It simply sets request parameter

13:13

<jdlee>

mornin'

13:13

<edburns>

jdlee: Hello.

13:13

<edburns>

jdlee: As evidence of our slowing economy here in the U.S.A., a conference I was supposed to speak at in San Jose in October was just "rescheduled" to February.

13:14

<edburns>

jdlee: Do you have any concrete evidence in your life that supports the claims that the economy is slowing?

13:14

<edburns>

jdlee: If I may ask, of course.

13:14

<edburns>

jdlee: I mean, have you seen anything FIRST HAND to support the oft sensationalized claims one hears in the corporate media?

13:15

<dragonOfTheWest>

I'm riding my bike to work, and I don't want to -- does that count as evidence?

13:15

<edburns>

dragonOfTheWest: Sure does.

13:16

<edburns>

dragonOfTheWest: How far is the ride, and how hot is it outside?

13:16

<dragonOfTheWest>

Here in Salt Lake City it's about 67F when I ride in, and it's about a 1/2 bike ride.

13:16

<dragonOfTheWest>

1/2 hour*

13:17

<dragonOfTheWest>

but about a month ago it was pretty hot.

13:23

<jdlee>

jdlee: tbh, i don't have any real first hand experience. we've been nelst enough that I haven't felt (or at least noticed) just a whole lot

13:23

<jdlee>

beyond gas and the like, but, like I said, we've been blessed enough to have enough cushion that those things aren't too painful

13:40

<jdlee>

edburns_away: fwiw, here's Jonah Goldberg's take on the economy:

13:41

<jdlee>

I've been watching the Democratic Convention closely, so I know for a fact the American dream has been delivered vicious beat down and the economy is little better than North Korea's. So how come the government just announced the economy grew at 3.3% last quarter?

13:41

<jdlee>

hehe

14:00

<raydecampo>

Government numbers are lies

14:05

<raydecampo>

If they calculated inflation by the formula in use in the 70s we would have double digit inflation

14:06

<jdlee>

maybe that formula was flawed?

14:06

<jdlee>

like the GNP vs GDP thing?

14:06

<jdlee>

jdlee is not an economist :P

14:06

<raydecampo>

Neither am I

14:06

<raydecampo>

Let me see if I can find the article on it

14:13

<raydecampo>

I can't find the original article I read but this one seems pretty similar: http://www.investorsadv.com/market-commentary/by-matt/the-cpi-lie/

14:16

<raydecampo>

I wish I could find the original article it had a chart with the inflation numbers using the three different formulas over the past few decades

14:16

<raydecampo>

Each time they change it inflation goes down

14:16

<jdlee>

magic! :)

14:44

<TOV_>

dragonOfTheWest: Hi are you here?

14:44

<dragonOfTheWest>

TOV_: yup

14:44

<TOV_>

dragonOfTheWest: I have gott a lttle problem with acegi

14:45

<TOV_>

dragonOfTheWest: ??? ??? ???? ??,

14:45

<TOV_>

dragonOfTheWest: can you help me?

14:45

<dragonOfTheWest>

TOV_: I'll try

14:45

<TOV_>

ok thanx

14:46

<TOV_>

dragonOfTheWest: the problem is its seems to me that accessDecisionManager doesnt work in common

14:46

<TOV_>

I attached acegi sources

14:46

<TOV_>

And my login page doesnt work

14:46

<TOV_>

any password/login is wrong

14:47

<TOV_>

<property name="usersByUsernameQuery">

14:47

<TOV_>

<value>

14:47

<TOV_>

select users_id as username,password, enabled

14:47

<TOV_>

from users_id

14:47

<TOV_>

where user_id=?

14:47

<TOV_>

</value>

14:47

<TOV_>

</property>

14:47

<TOV_>

I enter valid login/pass

14:47

<TOV_>

and been redirected to error page

14:47

<dragonOfTheWest>

~tell TOV_ about pastebin

14:47

<javabot>

TOV_, http://rifers.org/paste

14:47

<TOV_>

ok sorry

14:48

<TOV_>

http://rifers.org/paste/show/7987

14:48

<TOV_>

SO I attached sources

14:48

<TOV_>

UnanimousBased.java

14:48

<TOV_>

there is method called "decide"

14:49

<TOV_>

I added there breakpoint

14:49

<TOV_>

And this breakpoint have never launched

14:49

<jottinger>

re

14:50

<jdlee>

jottinger: hey

14:50

<dragonOfTheWest>

TOV_: should the users_id be user_id?

14:50

<jottinger>

added two things to the qotd today... "show all classes in package X" and date parsing :)

14:51

<dragonOfTheWest>

TOV_: in the select

14:52

<TOV_>

dragonOfTheWest mm what you mean? my table for users called users_id and there is a field named user_id

14:52

<dragonOfTheWest>

TOV_: select user_id as username instead of select users_id as username

14:55

<TOV_>

dragonOfTheWest oh sorry but I think that throuble not in this

14:56

<dragonOfTheWest>

TOV_: right, I'm just pointing that out

14:56

<dragonOfTheWest>

TOV_: so, can you paste your config.xml

14:57

<TOV_>

dragonOfTheWest no i changed user_id it didnt helped

14:57

<TOV_>

moment

14:57

<TOV_>

dragonOfTheWest which config?

14:57

<TOV_>

dragonOfTheWest spring?

14:58

<dragonOfTheWest>

TOV_: yep

15:00

<TOV_>

http://www.papernapkin.org/pastebin/view/2458/

15:00

<dragonOfTheWest>

dragonOfTheWest looking

15:01

<TOV_>

http://www.papernapkin.org/pastebin/view/2459/

15:01

<TOV_>

last right

15:03

<TOV_>

dragonOfTheWest: probably it can be situation with contexts files

15:03

<TOV_>

dragonOfTheWest: I include my authContext.xml in applicationContext.xml

15:03

<TOV_>

not in servlet context

15:03

<TOV_>

I read that this is right

15:04

<TOV_>

But is seems that acegi doesnt work

15:04

<TOV_>

May be smth listener was not configured or smth else

15:07

<dragonOfTheWest>

TOV_: are you getting errors in your server log on startup?

15:07

<TOV_>

nothing

15:07

<TOV_>

everything is file

15:07

<TOV_>

no exceptions no messages

15:07

<dragonOfTheWest>

and when you try and login -- what happens?

15:08

<TOV_>

I am redirecting to the error page

15:08

<TOV_>

in any case

15:08

<dragonOfTheWest>

is the sql query being called?

15:08

<TOV_>

Where I can see it?

15:09

<TOV_>

I thought that its in decide method

15:09

<TOV_>

"decide"

15:09

<TOV_>

But this method never invokes

15:09

<TOV_>

breakpoints never accesses

15:10

<dragonOfTheWest>

dragonOfTheWest still thinking and looking

15:10

<TOV_>

But where I can see whether query called or not?

15:11

<TOV_>

TOV_ wil be avail in 5 mins

15:18

<dragonOfTheWest>

TOV_: usually there's a setting in your jdbc properties file that let's you turn on the output of the sql being generated

15:19

<dragonOfTheWest>

TOV_: other than that, nothing jumps out at me. I would change what you have for httpSessionContextIntegrationFilter to this, until you get it working. http://www.papernapkin.org/pastebin/view/2460/

15:19

<dragonOfTheWest>

TOV_: it just seems safer.

15:20

<dragonOfTheWest>

TOV_: can you pastebin your web.xml as well?

15:27

<SummerWO>

I'm using a valueChangeListener to recognize when a h:selectBooleanCheckbox changes state.. Unfortunately it only fires on a check, not on an uncheck.. Is there something I must do?

15:39

<jdlee>

wow.. deja vu

15:39

<jdlee>

:)

15:39

<jdlee>

pastebin your page

15:42

<SummerWO>

=)

15:43

<SummerWO>

I wish I could, it's on another computer. I can retype parts of it..

15:44

<SummerWO>

Is there a pastebin for this channel?

15:46

<jottinger>

jdlee: any comments on the immediate thing?

15:48

<TOV_>

dragonOfTheWest: Hi I am back

15:49

<TOV_>

dragonOfTheWest thats my web.xml

15:49

<TOV_>

http://www.papernapkin.org/pastebin/view/2461/

15:49

<SummerWO>

http://pastebin.com/m2d132025

15:49

<SummerWO>

Sorry.. I did that before Isaw the link.

15:49

<TOV_>

I have changed bean as you said-no effect

15:50

<SummerWO>

jdlee: If you'd like more of the page, please let me know.

15:52

<jdlee>

SummerWO: ooh... that's inside a table, which makes things trickier

15:52

<jdlee>

jottinger: i haven't had a chance to read it closely

15:54

<TOV_>

dragonOfTheWest: can you see it?

15:54

<dragonOfTheWest>

TOV_: yes, and it looks fine to me

15:54

<TOV_>

ok thanx

15:54

<dragonOfTheWest>

TOV_: I don't know what else to try -- gl

15:54

<TOV_>

but in this case I cant understand whats wrong

15:54

<TOV_>

ok np thanks

15:55

<dragonOfTheWest>

TOV_: yeah, it's hard to find what's not working, when you're not getting feedback from anything in your logs

15:55

<TOV_>

yes

15:55

<dragonOfTheWest>

TOV_: let me know when you figure it out

15:55

<SummerWO>

jdlee: What must I do differently inside a table? I didn't realize it was more complicated.

15:55

<TOV_>

ok course thanks

15:56

<SummerWO>

Should I put the <h:form> just around the checkboxes as opposed to the entire table?

15:58

<nikolaj_a>

Hi guys.

16:00

<SummerWO>

The latter did not work.. ugh.. I'd like this to work right!

16:01

<TOV_>

hehehe

16:01

<TOV_>

PreparedStatementCallback; bad SQL grammar [SELECT username,password,enabled FROM users WHERE username = ?]

16:01

<TOV_>

dragonOfTheWest: you see? thats acegi debug

16:02

<TOV_>

but why there is users table I have configured it for users_id table

16:02

<TOV_>

looks like spring ignoring my parameters and beans

16:04

<SummerWO>

jdlee: I'm not trying to push you.. Just curious if you're still available to help?

16:05

<jdlee>

SummerWO: gimme just a few minutes...

16:06

<SummerWO>

No problem! Just checking. Thank yo.

16:11

<SummerWO>

The next question is how do I figure out which checkbox was selected.. Which row.. Which Item do I need to update..

16:16

<dragonOfTheWest>

TOV_: ah -- at least you have something to work from :)

16:16

<TOV_>

yes

16:17

<TOV_>

It want to see users table or simply it could not eat my spring beans

16:17

<TOV_>

My users table called users_id

16:17

<TOV_>

I dont want to call it like users

16:17

<TOV_>

"users"

16:18

<TOV_>

I attached acegi sources and began to debug

16:18

<TOV_>

It says me that mydb.users table doesnt exist

16:18

<TOV_>

and thats right

16:18

<TOV_>

there is no users table in my db

16:19

<TOV_>

but there is users_id table there

16:21

<TOV_>

I renamed table to users

16:21

<TOV_>

but now it needs columns named like username password and enabled

16:21

<TOV_>

I cant understand this is a right acegi situation or smth wrong in spring?

16:22

<TOV_>

I have specified sql to authorise in spring config

16:22

<TOV_>

Why it tries to execute default sql?

16:28

<SummerWO>

jdlee: If I run out for about an hour, will you still be here? I'm anxious to learn how to do this.. But I do need to take care of something..

16:32

<jdlee>

i'll be here all day (until 5pm CST at least and probably later)

16:33

<SummerWO>

Okay, I'll be back in a little. Mind if I msg you my email just in case I miss your response?

16:36

<jdlee>

no problem

16:39

<nikolaj_a>

nikolaj_a eyes jdlee loading his spam cannon.

16:39

<jdlee>

hahaha

16:40

<nikolaj_a>

:D

16:40

<SummerWO>

I'm still here.

16:40

<SummerWO>

=)

17:01

<SummerWO>

Is there a good reference, either on the Web or book, that Ishould get for this stuff?

17:04

<nikolaj_a>

SummerWO: Just out of curiosity, but what are you having difficulties with?

17:05

<SummerWO>

JSF.. http://pastebin.com/m2d132025 My valueChangeListener is only being called when I uncheck the box.. Not when I check it.

17:08

<nikolaj_a>

SummerWO: And it triggers a submit in both cases?

17:08

<SummerWO>

Amogn other things..

17:08

<SummerWO>

I don't know if the submit is triggered.. my valueChangeListener is only being called on a uncheck.. That's all I know.

17:09

<nikolaj_a>

SummerWO: Try to do an onclick="alert('Hello!');"

17:10

<SummerWO>

Okay, let's see.

17:11

<SummerWO>

I see the dialog on both check and uncheck.

17:12

<nikolaj_a>

SummerWO: Regarding your question about which row is clicked, you can access that one by binding the data table component to your backing bean (by setting the binding attribute on the dataTable element) Example: <rich:dataTable ... binding="#{manage.dataTable}"> and then in your backing bean put a getDataTable() and a setDataTable(HtmlDataTable hdt).

17:13

<dragonOfTheWest>

TOV_: sorry -- I stepped out for a minute -- but actually I'm not sure what is happening. sorry.

17:13

<nikolaj_a>

SummerWO: Then in your updateCompatible() method you can do a hdt.getRowData() which will return a reference to the object in the affected row.

17:13

<SummerWO>

I'm reading.. Thank you.

17:14

<SummerWO>

Learning this on my own is difficult.. I appreciate it. I'm going to try that in just a sec. Thank you.

17:14

<nikolaj_a>

SummerWO: Hehe, learning it on your own or not takes a little banging your head into walls ;)

17:14

<nikolaj_a>

SummerWO: We've all been there.

17:15

<SummerWO>

Is there a book you recommend for this?

17:15

<nikolaj_a>

SummerWO: I'd take a trip on this IRC channel over a book any day of the week.

17:16

<nikolaj_a>

SummerWO: By the way, which version of JSF are you using?

17:17

<SummerWO>

1.2.. Tomcat 6.

17:17

<SummerWO>

Well, I can buy all the books I want for reference.. I think I can use one =)

17:17

<SummerWO>

In addition to hanging out here..

17:19

<nikolaj_a>

SummerWO: If you like reading I'd recommend the JavaServer Faces: The Complete Reference. It's a lot of pages but very detailed, and the author is hanging out in here :)

17:20

<SummerWO>

Oh yeah? Who?? =)

17:20

<SummerWO>

Sold.

17:20

<nikolaj_a>

SummerWO: I started out with JavaServer Faces in Action from Manning, which is also quite good.

17:20

<SummerWO>

Maybe I'll get both.

17:21

<nikolaj_a>

SummerWO: Well, they're both good :)

17:21

<SummerWO>

I still haven't figured out how to get the valueChangeListener to fire on a check b/c it's inside a rich:dataTable.. hopefully jdlee will get back to me.. :-)

17:21

<nikolaj_a>

SummerWO: Apparently you're not the only one who've had this problem... http://forums.sun.com/thread.jspa?messageID=4411384

17:22

<nikolaj_a>

SummerWO: It might be a bug in the Mojarra code.

17:22

<nikolaj_a>

nikolaj_a looks to rlubke_

17:22

<SummerWO>

I saw that.. In fact it's open in my firefox now.. But it's old so I didn't realize it was still relevant.

17:24

<Core-Dump>

i should be able to use <h:commandButton> with MyFaces and Tobago the same way as with just MyFaces right ?

17:27

<medwards>

Core-Dump: yup

17:27

<Core-Dump>

somehow the value parameter of commandButton is ignored (need to use label) and the action does not seem to go off, the same project with just myfaces, without tobago works

17:28

<medwards>

We still use them here and there with RichFaces

17:28

<Core-Dump>

hmm or is tobago 1.0.18 only meant to be used with MyFaces 1.1.x?

17:29

<nikolaj_a>

SummerWO: I can't find any issue reports on the problem.

17:29

<SummerWO>

nikolaj_a: jdlee said it's complicated because it's within a table.

17:30

<nikolaj_a>

SummerWO: You might want to add one at https://javaserverfaces.dev.java.net/issues/ so someone from the dev team can have a look at it.

17:31

<nikolaj_a>

SummerWO: Well, it's still supposed to work even if it's within a data table :P Have you tried with a regular data table instead of the RichFaces one?

17:31

<SummerWO>

No, I have not.

17:31

<SummerWO>

Is it as simple as just changing the <rich:dataTable> tags?

17:32

<nikolaj_a>

SummerWO: Also, what's the scope of your #{manage} bean?

17:32

<nikolaj_a>

SummerWO: You haven't used any RichFaces-specific stuff, so I guess you should be able to just change the data table element yes.

17:32

<SummerWO>

request

17:33

<nikolaj_a>

SummerWO: Try changing the scope to session and make another test.

17:33

<SummerWO>

Ok

17:34

<nikolaj_a>

SummerWO: If you're going to stick to RichFaces you might consider using <a4j:support event="onclick"/> instead of the onclick event on the checkbox.

17:34

<nikolaj_a>

SummerWO: But I'd give the scope change a try first.

17:35

<SummerWO>

I changed scope and to <h:dataTable> and now it fires on both... But I uncheck and it quickly rechecks..

17:36

<nikolaj_a>

SummerWO: Haha, that's... weird :)

17:36

<nikolaj_a>

SummerWO: Can I see the full source of your bean?

17:36

<SummerWO>

It's on a separate network.. I can retype the relevant parts..

17:36

<Core-Dump>

ah now i see there is a tobago 1.1 snapshot, this seems to work with MyFaces 1.2.x

17:37

<nikolaj_a>

SummerWO: The constructor and the getter and setter methods for list.

17:39

<nikolaj_a>

SummerWO: And the source for the objects in the list.

17:40

<SummerWO>

http://pastebin.com/m50fb38d2

17:41

<SummerWO>

I'm going to hammer away at this for a minute.. brb

17:43

<nikolaj_a>

SummerWO: Uhm, I don't think you can do it like this. You need to keep the same list or it'll just revert the values all the time.

17:45

<SummerWO>

Ohh.

17:46

<nikolaj_a>

private List<IDevice> list = null;

17:47

<nikolaj_a>

SummerWO: Then do a null check on the in the getter and initialize it only if it's null.

17:47

<nikolaj_a>

SummerWO: And also make a setter method.

17:48

<nikolaj_a>

public List<IDevice> getList () { if (list == null) { list = manager.gatherDevices(); } return list; }

17:50

<SummerWO>

I'm with you, just looking at the code -- thanks.. back shortly.

18:02

<SummerWO>

nikolaj_a: Thanks for all the help. I'm working on it. Need to digest this!

18:02

<nikolaj_a>

SummerWO: Hehe, anytime :)

18:04

<SummerWO>

I'm in good shape.. Now need to figure out which row was checked.. I'm tgoing to follow your advice. Here goes.

18:05

<nikolaj_a>

SummerWO: That's an easy one, luckily.

18:09

<jdlee>

SummerWO: hey

18:10

<SummerWO>

jdlee: Hey!

18:10

<jdlee>

SummerWO: you might add f:setPropertyActionListener to ... hmm...

18:10

<jdlee>

there's not a command button...

18:10

<jdlee>

hidden field, anyone? nikolaj_a?

18:11

<nikolaj_a>

jdlee: I think it was a scope problem with the bean actually.

18:11

<jdlee>

that row id or something needs to be sent back when the form submits

18:11

<nikolaj_a>

jdlee: And the list was regenerated every time, so the value kept being reset.

18:11

<jdlee>

nikolaj_a: that may be part of it, but I bet the fact that it's inside a dataTable will be problematic

18:11

<SummerWO>

I have gotten past the list being regenerated.. Your simple advice did the trick.. It makes perfect sense.

18:11

<jdlee>

jdlee nods

18:12

<jdlee>

:\ that wasn't enough lunch :()

18:12

<SummerWO>

Now I'm trying to get only the one row to update... Instead of all rows.

18:12

<nikolaj_a>

jdlee: Actually getting the correct value should be easy by binding the dataTable to the backing bean and calling dataTable.getRowData().

18:14

<jdlee>

nikolaj_a: that may be true. i've never used a model with a dataTable (directly)

18:14

<jdlee>

:P

18:14

<nikolaj_a>

jdlee: Pfft, newbie :D

18:15

<nikolaj_a>

Actually, I have never tried it from within a value change method...

18:15

<nikolaj_a>

So I'm a little newbieish, too :P

18:15

<jdlee>

possibly :P

18:15

<SummerWO>

<rich:dataTable binding="#{manage.dataTable} -- So dataTable is of type HtmlDataTable? What does it get set to?

18:16

<nikolaj_a>

SummerWO: Make a get and set method in whatever class #{manage) points to.

18:17

<nikolaj_a>

SummerWO: In the above case you MUST call them public HtmlDataTable getDataTable() {} and public void setDataTable(HtmlDataTable hdt) {}

18:18

<SummerWO>

I just used eclipse to generate teh set/get

18:18

<nikolaj_a>

SummerWO: Ok, that should be fine.

18:18

<nikolaj_a>

SummerWO: Just make sure they are named correctly or it won't work.

18:19

<SummerWO>

Now Ineed to figure out how to use getRowData() ...

18:19

<nikolaj_a>

SummerWO: dataTable.getRowData() in the updateCompatible() method.

18:19

<nikolaj_a>

SummerWO: Try to output it in the log to make sure you've got hold of the object you actually think it is.

18:19

<medwards>

one day we just need to write a fucking thorough HOWTO on datatables...

18:20

<medwards>

pardon my french... I think its appropriate in this case.

18:20

<nikolaj_a>

medwards: You're right ;)

18:20

<nikolaj_a>

medwards: It's by far the hardest part of JSF.

18:20

<SummerWO>

I'm debugging now...

18:21

<SummerWO>

NullPointerException ... Do I need to set the dataTable or will the binding do that for me?

18:22

<nikolaj_a>

SummerWO: The binding will call the get and set methods.

18:22

<jdlee>

there are those who say UIData needs to be ditched

18:22

<jdlee>

jdlee eyes dmlloyd :P

18:22

<rlubke>

medwards: Have you seen this? http://balusc.blogspot.com/2006/06/using-datatables.html

18:22

<nikolaj_a>

rlubke: That one saved my butt.

18:22

<dmlloyd>

jdlee: I agree with... whoever that is. Let's ditch it!!

18:23

<dmlloyd>

actually it's just a symptom of a deeper problem... but I hope that pete & co will be working on those

18:23

<nikolaj_a>

Who's Pete?

18:23

<rlubke>

We just closed dmlloyd's issues out as he's a habitual complainer :)

18:24

<dmlloyd>

ha

18:24

<nikolaj_a>

Haha :)

18:24

<dmlloyd>

pete muir, our official Red Hat JSF dude

18:24

<dmlloyd>

or rather, one of

18:24

<rlubke>

Stan only working on JSFUnit these days?

18:25

<dmlloyd>

I'm not sure honestly, I think he's focusing on integration mostly

18:25

<SummerWO>

Grr, my dataTable is still null.

18:25

<yamaguchi>

can i change html head section with jsf or how can i accomplish this when using jsf in my dynamic web application ?

18:25

<dmlloyd>

it's the seam guys who are really looking at JSF from an implementation perspective lately

18:25

<SummerWO>

Oops, wrong tag in the <dataTable>

18:26

<dmlloyd>

stan mostly works with getting it to work with the AS

18:26

<rlubke>

rlubke nods

18:26

<jdlee>

dmlloyd: hi :)

18:26

<dmlloyd>

hi! :)

18:26

<nikolaj_a>

yamaguchi: Are you using JSP, Facelets, or something else entirely?

18:27

<dmlloyd>

I wish I had more time to spend on the spec, but it's about #152 on my priority list :)

18:27

<yamaguchi>

i am using jsf+facelets and want to be able to update current head elements in some way i dont know

18:28

<nikolaj_a>

yamaguchi: You can just add a <head> ... </head> section in your xhtml files.

18:28

<yamaguchi>

yes but this is static thinking

18:28

<yamaguchi>

what about dynamic ?

18:28

<qoob>

dmlloyd: now you made me curious what is at about #151 and #153?

18:28

<nikolaj_a>

yamaguchi: static?

18:28

<jdlee>

man...testing ViewExpiredExceptions is tiresome

18:28

<nikolaj_a>

yamaguchi: What do you need to put in there?

18:29

<yamaguchi>

what about when i would like to determine head section at runtime ?

18:29

<nikolaj_a>

jdlee: Haha, just set session timeout to 1 minute :P

18:29

<dmlloyd>

qoob: lol. me too

18:29

<jdlee>

nikolaj_a: that's what I've done, but I still have to sit and wait for a minute :P

18:29

<qoob>

dmlloyd: so #151 is to find out what #153 is about? :D

18:29

<yamaguchi>

i need to put to it undefinite number of link elements and also be able to change title for example dynamically

18:29

<dmlloyd>

qoob: maybe #153 is to find out about #151 :)

18:30

<dmlloyd>

that'd be more typical of my life

18:30

<nikolaj_a>

yamaguchi: You're using templating, right?

18:30

<yamaguchi>

yes

18:30

<qoob>

jdlee: how about a second browserwindow with an action, that invalidates the session?

18:30

<SummerWO>

Do you guys have a recommended example for using a <select> via JSF?

18:30

<qoob>

jdlee: or just kill the cookies

18:30

<qoob>

jdlee: which would also be helpfull for not having had enough lunch :P

18:31

<yamaguchi>

the web content is handled by jsf+facelets but those frameworks helps you to fill the body not head i think..

18:31

<nikolaj_a>

yamaguchi: <head><ui:insert name="styles"/><ui:insert name="scripts"/><ui:insert name="links"/></head>

18:32

<jdlee>

i could do with some cookies to destroy

18:32

<jdlee>

jdlee heads to the pantry :P

18:32

<SummerWO>

MANY thanks to nikolaj_a and jdlee.. Among others. I REALLY appreciate the help. I'm learning a lot and it's working!

18:32

<jdlee>

great!

18:32

<jdlee>

:)

18:32

<nikolaj_a>

yamaguchi: Then you can optionally put extra stuff in there on each page by doing <ui:define name="links"><link .../></ui:define>

18:32

<nikolaj_a>

SummerWO: Nice :)

18:32

<yamaguchi>

alright but i would like also to bo able to change this title from within any ui:component that will be insered on page how can i do this

18:32

<nikolaj_a>

yamaguchi: Same way.

18:33

<qoob>

dmlloyd: hahaha

18:33

<yamaguchi>

my ui:components hold only partial markup like <div>....</div> so body elements only hmm...

18:33

<nikolaj_a>

yamaguchi: <head><title><ui:define name="title">Default Title</ui:define></title> <!-- rest of defines here --></head>

18:35

<nikolaj_a>

yamaguchi: Oops, I meant <ui:insert name="title"> in the above.

18:35

<nikolaj_a>

yamaguchi: Then in each page you do: <head> <title> <ui:define name="title">Page-specific title here</ui:define> </title> </head>

18:36

<nikolaj_a>

The <head><title> stuff is filtered out because of the ui:composition tag and only the relevant stuff (title in this case) is transferred to the template.

18:36

<yamaguchi>

ok i hope i understand you well i try and see if it works..

18:37

<nikolaj_a>

yamaguchi: AND as a little bonus, the page will still render with the correct title without going through the Faces Servlet.

18:37

<nikolaj_a>

But I'm the only person using that feature in the whole world apparently :D

18:37

<yamaguchi>

really ? heh

18:38

<qoob>

nikolaj_a: yep :P

18:38

<jdlee>

slim pickins :|

18:40

<nikolaj_a>

yamaguchi: You can still put global stylesheet etc stuff in the template as long as you put it outside the <ui:insert/> elements and still within the <head>

18:41

<nikolaj_a>

yamaguchi: And you can also put in some stylesheet stuff that will be overridden if the page provides it's own. This is done by putting <style> blah blah blah</style> INSIDE the <ui:insert name="styles"> </ui:insert> in the template.

18:41

<nikolaj_a>

yamaguchi: With a little creativity that templating mechanism is very powerful.

18:41

<yamaguchi>

but when i define those links i must write finite number of link elements

18:42

<yamaguchi>

hmm..

18:42

<nikolaj_a>

yamaguchi: Well, you can generate the list in the template or in the page.

18:42

<yamaguchi>

how ?

18:43

<nikolaj_a>

yamaguchi: You're free to grab the list from a backing bean and use <ui:repeat> to iterate it, rendering a <link> in each iteration.

18:43

<nikolaj_a>

yamaguchi: I've never needed that, but it's possible.

18:43

<yamaguchi>

oh i see

18:43

<nikolaj_a>

yamaguchi: I can imagine that would be useful for implementing a skinning framework.

18:44

<yamaguchi>

:)

18:45

<yamaguchi>

what about something like i store a list of css styles or javascript script files somewhere and must gererate each link or script for each element of this list

18:45

<yamaguchi>

will ui: repeat be useful ?

18:48

<nikolaj_a>

<ui:define name="scripts"> <ui:repeat value="#{bean.listOfScripts}" var="sc"> <script src="#{sc.url}"></script> </ui:repeat> </ui:define>

18:48

<yamaguchi>

:)

18:48

<yamaguchi>

thanks

18:48

<nikolaj_a>

yamaguchi: Keep this up and I begin to demand payment :D

18:49

<yamaguchi>

heh :)

18:49

<nikolaj_a>

yamaguchi: I take donuts as payment, too :D

18:49

<yamaguchi>

where is my money

18:49

<yamaguchi>

:D

18:49

<yamaguchi>

so you have your business here ?

18:49

<jdlee>

fwiw, mojarra scales has sc:links that the Scales components lean on for putting scripts, css, etc in the head

18:50

<nikolaj_a>

yamaguchi: Nah, I'm just here to hang our with the other dudes :)

18:50

<nikolaj_a>

hang out *

18:50

<duude>

hello all

18:51

<nikolaj_a>

duude: Hi :)

18:51

<duude>

i have a java program i wrote

18:51

<yamaguchi>

you have your dude ;)

18:51

<nikolaj_a>

jdlee: Isn't that only for the other Scales components in the same page?

18:51

<jdlee>

nikolaj_a: that timing was AWESOME!

18:51

<duude>

i wanna send some input to it, then get its output from my jsp page

18:51

<nikolaj_a>

Haha yeah :D

18:51

<jdlee>

that's what it's meant for, but i might be usable by others (if not, I can fix that)

18:51

<nikolaj_a>

nikolaj_a thanks duude for the perfect timing.

18:51

<duude>

is <include> that easy?

18:52

<duude>

your welcome?

18:52

<jdlee>

[13:50] <nikolaj_a> yamaguchi: Nah, I'm just here to hang our with the other dudes :)

18:52

<jdlee>

[13:50] * duude (n=sadsack@ip67-152-13-222.z13-152-67.customer.algx.net) has joined ##jsf

18:52

<nikolaj_a>

:D

18:52

<yamaguchi>

hahaha :D

18:52

<nikolaj_a>

I hit enter like two seconds before you logged on :D

18:53

<duude>

im confused

18:53

<duude>

but impressed

18:54

<nikolaj_a>

To your question: No, it might be a lot easier for just call your Java stuff from a bean used by your JSP.

18:54

<nikolaj_a>

duude: The other way is a bit CGI-like.

18:55

<nikolaj_a>

duude: Not to mention that you would have a hard time actually locating your program since the web container probably have no notion of where in the file system it's placed.

18:56

<duude>

i don't know how to use beans :(

18:57

<duude>

ive taught myself jsp...

18:57

<nikolaj_a>

<jsp:useBean>

18:57

<duude>

i dont do it right

18:57

<jdlee>

beans?

18:57

<jdlee>

jdlee cues Brak

18:57

<nikolaj_a>

duude: http://java.sun.com/products/jsp/tags/11/syntaxref11.fm14.html

18:57

<duude>

thanks nik

18:57

<duude>

i owe u... again

18:58

<nikolaj_a>

duude: :)

18:58

<duude>

haha

18:58

<duude>

i just googled and was at that page already

18:58

<duude>

:)

18:58

<nikolaj_a>

duude: I did google.com, jsp usebean, I'm feeling lucky :D

18:59

<nikolaj_a>

All this JSF knowledge and I can't get a simple filewriter to work!

18:59

<jdlee>

even cookie clobbering, ViewExpiredException handling is a pain :|

18:59

<jdlee>

nikolaj_a: newb! :)

19:00

<nikolaj_a>

jdlee: :P

19:02

<nikolaj_a>

Ah, the joys of flushing.

19:12

<duude>

im a newber than you!

19:12

<nikolaj_a>

I hope 9 years of Java development has at least taught me a little bit :)

19:14

<medwards>

9 I thought you were still doing your bachelors?

19:14

<nikolaj_a>

medwards: Business Administration, yes :)

19:14

<duude>

hes been developing whilst in the womb

19:14

<medwards>

So you alrady have your masters in CS?

19:14

<duude>

and med, you stalkin him?

19:14

<nikolaj_a>

I have an AP in computer science I finished in 2001

19:15

<nikolaj_a>

duude: Yeah, medwards is an evil stalker :P

19:15

<bj_990>

Do you guys think going for a masters is worth it?

19:16

<nikolaj_a>

bj_990: In Denmark it definitely is. You'll get paid at least 50% more.

19:16

<nikolaj_a>

Unless you're very good at negotiating your salary.

19:16

<jdlee>

bj_990: MSCS, or MBA? :P

19:20

<medwards>

nikolaj_a: my solution is just to be 50% more awesome.

19:20

<medwards>

Extra lettters just bog me down :P

19:20

<nikolaj_a>

medwards: Which was also my solution ;)

19:20

<yamaguchi>

nikolaj_a: what if i have defined some area in my page with ui:insert and dependent of request parameters i would like to attach with ui:define different templates ?

19:21

<nikolaj_a>

yamaguchi: You have access to the #{request} object like always.

19:21

<yamaguchi>

yes but c:if seems to not work :(

19:22

<yamaguchi>

is there any other solution ?

19:22

<nikolaj_a>

yamaguchi: Really? Can I see your source?

19:22

<nikolaj_a>

yamaguchi: In pastebin.

19:22

<nikolaj_a>

~pastebin

19:22

<javabot>

http://rifers.org/paste

19:22

<yamaguchi>

it is in my mind for now i am not developing if i do not know if it is possible

19:23

<nikolaj_a>

yamaguchi: How can you know that <c:if> is not working, then?

19:23

<yamaguchi>

oh this yes hmm...

19:26

<yamaguchi>

i try do write something in pastebin one moment ...

19:29

<raydecampo>

Are you using <c:if> in a loop?

19:30

<nikolaj_a>

yamaguchi: Actually, I think it might be easy to get the template path from a backing bean.

19:30

<nikolaj_a>

easier *

19:31

<yamaguchi>

http://pastebin.com/m5f0e9bee

19:31

<yamaguchi>

can this be done ?

19:31

<yamaguchi>

can you tell me ?

19:33

<nikolaj_a>

yamaguchi: Try it out?

19:33

<raydecampo>

nikolaj_a: he'd have to code it up first :)

19:33

<nikolaj_a>

raydecampo: Alright, I'll try it out then :P

19:34

<yamaguchi>

in the above example it shows no action here always even when i add action parameter

19:34

<raydecampo>

yamaguchi: did you try swapping the order? Is it last one wins?

19:34

<qoob>

should be

19:35

<qoob>

you could put the <c:if inside of the <ui:define

19:35

<raydecampo>

and replace it with the rendered attribute

19:35

<yamaguchi>

it seams that somehow the action is beeing stored and only the first request matters

19:36

<yamaguchi>

when i swapped those elements and requested page.faces?action=xxx i got action is xxx but then i tried without params and i got action is

19:37

<yamaguchi>

but should be no action here

19:37

<yamaguchi>

strange

19:38

<yamaguchi>

i seems that first requested wins and then i always the same

19:38

<yamaguchi>

it *

19:48

<bj_990>

wow.. 50% more...

19:48

<bj_990>

i think i need to move over there... :)

19:48

<jdlee>

bj_990: don't. they have stupid landmarks :)

19:49

<jdlee>

jdlee nudges nikolaj_a

19:49

<raydecampo>

bj_990: plus you won't be able to afford a car

19:50

<nikolaj_a>

Not to mention that you will pay about 50% of your salary in taxes.

19:50

<nikolaj_a>

And VAT is 25%.

19:51

<yamaguchi>

nikolaj_a: ok it works with ui:include with src backed in bean :)

19:51

<nikolaj_a>

yamaguchi: Great :)

19:54

<yamaguchi>

nikolaj_a: ok thanks for now maybe tomorrow i will have some questions :)

19:54

<yamaguchi>

thank you dudes :D bye

19:54

<nikolaj_a>

yamaguchi: Where are you from?

19:54

<yamaguchi>

guess..

19:55

<nikolaj_a>

Poland?

19:55

<yamaguchi>

huh you are good ?

19:55

<yamaguchi>

how did you know ?

19:55

<nikolaj_a>

yamaguchi: Hehe, I might be online if you log on while at work.

19:56

<yamaguchi>

and where are you from ?

19:56

<nikolaj_a>

yamaguchi: I'm from Denmark.

19:56

<yamaguchi>

:)

19:56

<nikolaj_a>

One of my friends is throwing a party tomorrow, so I won't be online in the evening :P

19:56

<nikolaj_a>

Beers > JSF.

19:57

<yamaguchi>

ok

19:57

<yamaguchi>

so have a fun tomorrow

19:57

<nikolaj_a>

Thanks :)

19:57

<yamaguchi>

see you then bye

19:58

<nikolaj_a>

yamaguchi: Bye.

19:58

<medwards>

hahahahha

19:58

<medwards>

damn nikolaj_a you're an ass...