You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jeff Bischoff <jb...@klkurz.com> on 2006/12/06 20:35:42 UTC
Re: OutputLink - CommandLink query
> And the commandLink on the other hand
> can support actions but can't open windows.
Gladly, this is not true. Just use the target attribute. You can even
make a commandButton open in a new window, by wrapping it in a
commandLink. Here's some working code from my actual application:
<h:commandLink id="showReportButton"
action="#{trialBalanceForm.prepareReport}" target="_blank">
<h:commandButton value="Create Report" styleClass="styleFont styleLabel"/>
</h:commandLink>
Regards,
Jeff Bischoff
Kenneth L Kurz & Associates, Inc.
Amit Kushwaha wrote:
> Hi,
>
> I need the best of command link and output link...ie execute an action
> and open a window.
>
> AFAIK, the outputLink can open a new window on click but can't support
> actions. And the commandLink on the other hand
> can support actions but can't open windows.
>
> What I really need is both. So, when u click a link it executes an
> operation on a managed bean and the result of that is
> included in the new window.
>
> Much appreciated, TIA.
>
> Amit
>
>
>
>
>
Re: OutputLink - CommandLink query
Posted by Jeff Bischoff <jb...@klkurz.com>.
Yes, try to make everything work with commandLink. outputLink is mostly
just for links to other websites.
Amit Kushwaha wrote:
> Cool. Thanks again, Jeff.
>
> Also, could you do open up java script window with a commandLink? Cos,
> no onClick?
>
> Here is the code am using in the outputLink,
>
> <h:outputLink id="lookup" onclick="openWindow('lookup.faces',
> 'lookup', 45, 100, 750, 50); return false;">
> <h:outputText value="Lookup"/>
> </h:outputLink>
>
> But no action...So back to the commandLink to make it work.
>
> TIA.
>
> Amit
>
> Jeff Bischoff wrote:
>> > And the commandLink on the other hand
>> > can support actions but can't open windows.
>>
>> Gladly, this is not true. Just use the target attribute. You can even
>> make a commandButton open in a new window, by wrapping it in a
>> commandLink. Here's some working code from my actual application:
>>
>> <h:commandLink id="showReportButton"
>> action="#{trialBalanceForm.prepareReport}" target="_blank">
>> <h:commandButton value="Create Report" styleClass="styleFont
>> styleLabel"/>
>> </h:commandLink>
>>
>> Regards,
>>
>> Jeff Bischoff
>> Kenneth L Kurz & Associates, Inc.
>>
>> Amit Kushwaha wrote:
>>> Hi,
>>>
>>> I need the best of command link and output link...ie execute an
>>> action and open a window.
>>>
>>> AFAIK, the outputLink can open a new window on click but can't
>>> support actions. And the commandLink on the other hand
>>> can support actions but can't open windows.
>>>
>>> What I really need is both. So, when u click a link it executes an
>>> operation on a managed bean and the result of that is
>>> included in the new window.
>>>
>>> Much appreciated, TIA.
>>>
>>> Amit
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
>
>
Re: OutputLink - CommandLink query
Posted by Amit Kushwaha <bl...@googlemail.com>.
Cool. Thanks again, Jeff.
Also, could you do open up java script window with a commandLink? Cos,
no onClick?
Here is the code am using in the outputLink,
<h:outputLink id="lookup" onclick="openWindow('lookup.faces',
'lookup', 45, 100, 750, 50); return false;">
<h:outputText value="Lookup"/>
</h:outputLink>
But no action...So back to the commandLink to make it work.
TIA.
Amit
Jeff Bischoff wrote:
> > And the commandLink on the other hand
> > can support actions but can't open windows.
>
> Gladly, this is not true. Just use the target attribute. You can even
> make a commandButton open in a new window, by wrapping it in a
> commandLink. Here's some working code from my actual application:
>
> <h:commandLink id="showReportButton"
> action="#{trialBalanceForm.prepareReport}" target="_blank">
> <h:commandButton value="Create Report" styleClass="styleFont
> styleLabel"/>
> </h:commandLink>
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
> Amit Kushwaha wrote:
>> Hi,
>>
>> I need the best of command link and output link...ie execute an
>> action and open a window.
>>
>> AFAIK, the outputLink can open a new window on click but can't
>> support actions. And the commandLink on the other hand
>> can support actions but can't open windows.
>>
>> What I really need is both. So, when u click a link it executes an
>> operation on a managed bean and the result of that is
>> included in the new window.
>>
>> Much appreciated, TIA.
>>
>> Amit
>>
>>
>>
>>
>>
>
>
>