I'm looking to use either a CommandButton or a CommandLink to open a new tab or window. This is largely a problem because the URL is somewhat dynamic.
Effectively I have a list with checkboxes, the user will select some records which they need which should open up another tab containing the URL and Ids selected. It looks a bit like this:
String redirect = URL.getSalesforceBaseUrl().toExternalForm() + '/apex/AnotherApplication?firstcontact=' + firstContact + '&queue=' + queue;
PageReference pageRef = new PageReference(redirect);
return pageRef;
This produces a URL like below depending on what's been WalgreensListens Surveyselected:
www.salesforce.com/apex/AnotherApplicat ... ,003GHI789
I'm fairly sure I can't use CommandButtons to do this, and when I use a CommandLink, using the parameter...
target="_blank"
... Is ignored.
Is there any way around this or am I SOOL?
Thanks!
Using a CommandButton/CommandLink to Open a New Tab/Window
Why not use a link or linkbutton like this...
Then in your CheckBox selector just have AJAX update that button eveyr time a checkbox is selected
Code: Select all
<p:linkButton id="lnlSalesForce" value="Bookmark" href="#{myView.buildSalesForceUrl}" target="_blank" />
Code: Select all
<p:ajax process="@this" update="lnkSalesForce" />
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests