Stefan,
You are correct in that the current implementation only scrolls to a
link or a button. I was proposing that you take advantage of the
infrastructure that was there to expand to to scroll to other
components.
I'm not sure exactly how it would work, but I'd think in the short
term, it would be something like this.
onclick="setScrollToComponentAndSubmit()"
You may have to manually create a button to submit it. This is a
similar button I use to trigger special javascript submit code.
<f:verbatim>
<input type="submit" style="display: none;"
onclick="document.forms['form'].elements['autoScroll'].value=getScrolling();"
value="Submit" name="form:refreshButton"
id="form:nonclearingRefreshButton"/>
</f:verbatim>
If you're looking to contribute a myfaces component to handle all of
this automatically, I can only point you in the right direction (the
autoScroll field and the getScrolling() function). You'll have to
figure out the details as I don't have the skillset (javascript) to
help you. :)
But there's already something in place in MyFaces. It's just a matter
of converting it to your needs.
On 10/27/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Mike
>
> <context-param>
> <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
> <param-value>true</param-value>
> <description>
> If true, a javascript function will be rendered that is
> able to restore the
> former vertical scroll on every request. Convenient
> feature if you have pages
> with long lists and you do not want the browser page to
> always jump to the top
> if you trigger a link or button action that stays on the same
> page.
> Default: "false"
> </description>
>
>
> </context-param>
>
>
>
> Have already got that set in my web.xml
>
> Guess it's not operating because I'm NOT using a link or button action – see
> jsp snippet below
>
>
>
> Simon
>
>
>
> Do you envisage it operating something like this
>
>
>
> <h:selectBooleanCheckbox id="selectBusinessType"
>
> value="#{node.selected}" immediate="true"
>
> valueChangeListener="#{demo.processValueChange}"
>
> onclick="submit()" >
>
> <t:focus componentId="id_of_component_to_focus"/>
>
> <h:selectBooleanCheckbox >
>
>
>
> If NOT, then how – as I can see it being required at several places on a
> form
>
>
>
>
>
> Stefan Maric | IT & Professional Services | BT Global Services
>
> E: [EMAIL PROTECTED] | www.bt.com/globalservices
>
>
>
> This electronic message contains information from British Telecommunications
> plc, which may be privileged
>
> or confidential. The information is intended for use only by the
> individual(s) or entity named above. If you
>
> are not the intended recipient, be aware that any disclosure, copying,
> distribution or use of the contents of
>
> this information is strictly prohibited. If you have received this
> electronic message in error, please notify
>
> me by telephone or email (to the number or email address above) immediately.
>
>
>
> Activity and use of the British Telecommunications plc e-mail system is
> monitored to secure its effective
>
> operation and for other lawful business purposes. Communications using this
> system will also be monitored
>
> and may be recorded to secure effective operation and for other lawful
> business purposes.
>
>
>
> British Telecommunications plc. Registered office: 81 Newgate Street London
> EC1A 7AJ Registered in
>
> England no: 1800000
>
>