<script type="text/_javascript_">
function doAction () {
var f = document.forms['myForm'];
f.elements['myForm:_link_hidden_'].value='myLink';
f.submit();
}
</script>
Ricardo.
On 7/13/06,
ved.gunjan <[EMAIL PROTECTED]> wrote:
Hi Dhananjay,Thanks for the help...i know it is an evil idea but im having a requirement which is causing me a headache.Here's my requirment...I have 4 tabs and on clicking on any of the one tab...i have to show its content, pulled form server, below that tab.The content display area is same for all the tabs...so when i switch between the tabs the content should aslo change as per the tab.I have tried using tomahawk tab component but the look and feel of the tomahawk tab component is not very great.so i decided to create these tabs using t:outputLabel.here's the code<TABLE cellSpacing=0 cellPadding=0 width=422> < TR> <TD class ="foldT" width="110"> <t:outputLabel id= "gen" value="General" onclick= " update('general'); " /> </TD > <TD class= "foldT" width="104"> <t:outputLabel value="Requirement" onclick="update('requirement');" /> </TD> < TD class="foldT" width= "104"> <t:outputLabel value="Design" onclick= "update('design');" /> </TD > </TR > </TABLE>and i'm having DIV component which hide/show using _javascript_.<t:panelGrid width="100%" columns="1" styleClass= "allborders" > <t:div id="generalTab" style="display: block;" forceId="true" > <jsp:include page="general.jsp" /> </t:div> <t:div id="designTab" style ="display: none;" forceId="true" > <jsp:include page = "design.jsp" /> </t:div> <t:div id="requirementTab" style ="display: none;" forceId="true" > <jsp:include page = "requirement.jsp" /> </t:div > </t:panelGrid>The approach may not be the best i agree.But if i go by this approach then i have call the action method binding of jsf in the javacript where i have created the tabs.Please suggest me a better approach.ThanksVed
This is probably an "evil" idea but can you not lookup what the page is
doing and submit the form with the proper parameters set?
Afaik, the commandLink is going to convert hyperlink clicks to a form
POST anyway...
-----Original Message-----
From: Andrew Robinson [mailto: [EMAIL PROTECTED]]
Sent: Thursday, 13 July 2006 7:53 AM
To: MyFaces Discussion
Subject: Re: How to call JSF method binding expressions from a java
script.
There is no built in way. You have to invoke an AJAX call to the
server, setup the Faces context, possibly restore your view then
evaluate the EL.
-AndrewOn 7/12/06, ved.gunjan wrote:
>
> Hi Experts
> How to call JSF method binding expressions from a _javascript_.
> For example i want to call ==>
action="">> of a command link from _javascript_.
>
> Waiting for the experts reply.
> Thanks
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
This correspondence is for the named persons only.
It may contain confidential or privileged information or both.
No confidentiality or privilege is waived or lost by any mis transmission.
If you receive this correspondence in error please delete it from your system immediately and notify the sender.
You must not disclose, copy or relay on any part of this correspondence, if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender except where the sender expressly,
and with the authority, states them to be the opinions of the Department of Emergency Services, Queensland.__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

