views:

292

answers:

1

Hello everyone,

Env : IE7 & FireFox3.5, jsf1.2, richfaces3.3.X, seam2.2.0, jboss5.1

I have a very long xhtml form, and somewhere in the middle, the user have to fill a dataTable, then click a button (i use here a commandLink) that will post the dataTable, compute things, and validate the data.

Then, the user wants to continue filling his form.

Problem : when i submit, the page reload at the top, and i have not a clue on how i could use the anchor system with the commandLink.

I can do that with an outputlink, but then i wouldn't be POSTing my data..

I tried putting my link#anchor in the pageflow (faces-config.xml or pages.xml), i tried the "rel" attribute of the commandLink, but i must have misunderstood what it does.

Someone told me about the "autoscroll" feature in myfaces, but i'm not really for adding another taglib just for one feature

I hope i was clear enough, and sorry for my poor english

Thanks :)

+2  A: 

Use Javascript.

window.onload = function() {
    window.location.hash = '#{bean.anchorName}';
}
BalusC
Wouhouuu ! it works ! Thanks, really !
Maxime ARNSTAMM
You're welcome.
BalusC