I'm trying to write a second menu to the home folder plugin and I want to write a piece of html in the text block (between the carrousel block and the Plugin Instances) so the user can navigate to another plugins.
How can I use the buildfire.navigation.navigateTo (pluginData) function there? How can I write the function using the ?
Where are the pluginData that the function needs?
- pluginId
- instanceId
- folderName
- title
Because when I'm trying to use it (I'm trying the navigateHome(); function to make sure it works), I get an Access Denied error.
Right now I'm trying this:
<a onclick="javascript:buildfire.navigation.navigateHome();">
and it doesn't work.
How can I navigate to another plugins?
Thanks in advance.
Here is the official documentation on Navigation https://github.com/BuildFire/sdk/wiki/How-to-use-Navigation
Fundamentally javascript:buildfire.navigation.navigateHome() should work. Please post the error you receive so we may review it.
Navigating to another plugin can be done with
buildfire.navigation.navigateTo (pluginData)
pluginData {
pluginId: (string) The id of the plugin type you'd like to navigate to.
,instanceId: (string) The the instance of the plugin you'd like to navigate to.
,folderName (string) The folder name of the plugin that you'd like to navigate to.
,title (string) The title that should show up in the title bar once the plugin is loaded.
,queryString (string) Optional. This is a query string that will be passed to the next plugin's window.location.search. example: "name=Larry&age=36&showDetails=true"
}
Ref: https://github.com/BuildFire/sdk/wiki/How-to-use-Navigation#buildfirenavigationnavigateto-plugindata
You also should take a look at Dynamic Data to make sure you have the latest references to the plugin as they may change
Ref: https://github.com/BuildFire/sdk/wiki/How-to-use-the-Datastore-Dynamic-Data
All this being said, I'd like to draw your attention to ActionItems which are currently implemented in your carousel
Ref: https://github.com/BuildFire/sdk/wiki/BuildFire-Action-Items-Component
Related
I am some what new to extending Jenkins and was wondering how would i generate the code for adding a credentials drop down like the one in this picture.
(source: jenkins.io)
I have looked at some examples and noted they used this jelly code
<f:entry title="${%Credentials}" field="credentialsId">
<c:select/>
</f:entry>
But when i implement this my Credentials line in the build job settings dose not contain the drop down.
Note figured it out. Posting answer for others benefit. In order to dynamically fill the list you must create a doFillCredentialsIdItems like the method bellow along with adding a import to the credentials plugin.
public ListBoxModel doFillCredentialsIdItems(#AncestorInPath Item item, #QueryParameter String credentialsId) {
StandardListBoxModel result = new StandardListBoxModel();
return result
.includeEmptyValue()
.includeAs(ACL.SYSTEM, Jenkins.get(),
UsernamePasswordCredentialsImpl.class)
.includeCurrentValue(credentialsId);
}
Im trying to get some information from my page source. I run my automated tests on every release but want to avoid updating the release number manually as im trying to integrate my tests in CI and was hoping i could pull the tag from the page source.
All i know that works here is Drivers.getDriver.getPageSource but have no idea how to pull information.
The main issue im having is that the version is in 2 sections:
< meta http-equiv="version" content="1.4.39" >
I want to be able to take the 1.4.39 out of the page source and add to string
This surely is possible, you just had to have locator for this element.
For example if I take it's cssSelector as:
meta[http-equiv*='version']
We can easily do this:
driver.findElement(By.cssSelector("meta[http-equiv*='version']")).getAttribute("content")
This will return you 1.4.39 as String value.
Hope this helped.
Good day Everyone,
I am new to Play framework and am trying to get started building an application. Under the app/controllers folders i have created sub packages so i have something like app/controllers/products/ProductController.class.
In my routes.conf file i have added a sample route like this
GET /createproduct controllers.products.ProductController.listAllProducts()
POST /createproduct controllers.products.ProductController.createProductDetail()
and i can goto the url http://localhost:9000/createproduct and see a sample view that i created.
My issue now is that i want to add a form to the view and when i try to use the form helper method to POST data to the POST URL above from my new view like this
#helper.form(action = routes.products.ProductController.createProductDetail()) {
i get the error that
value products is not a member of object controllers.routes
All the samples that i saw online only use the route.Application example which is doesnt fit my issue.
So my question is how do i reverse route to this action or route from a view using the Form helper
The valid syntax is:
[full-package-name].routes.[controller].[method]
So in your case it should be
controllers.products.routes.ProductController.createProductDetail()
controllers.routes is imported implicity, therefore for using with controllers in default package you can short it to:
routes.Controller.action()
I can create a link to a page using this .tml code. This generates a link to eg "/path/case314":
<t:pagelink page="${pageName}" t:context="case">
linked text
</t:pagelink>
I want to create a path to eg "/path/case314#comment-id-90".
If I try to direct my link to an anchor within a page, like so (where there is a div of id #comment-id-${currentComment.id} in the targeted page):
<t:pagelink page="${pageName}#comment-id-${currentComment.id}" t:context="case">
linked text
</t:pagelink>
Then I lose my context, and I get the default pageName path, like so: "/path/caseexample#comment-id-90". Which doesn't exist, so Tapestry throws an exception.
The same thing happens if I try to create a class manually constructing the link- passing pageName as a parameter results in "caseexample" rather than the correct "case314".
Can anyone tell me how I can build an anchor link while maintaining the necessary context for the pagelink to work?
Thank you!
<t:pagelink page="prop:pageName" anchor="comment-id-${currentComment.id}" context="case">linked text</t:pagelink>
Just for information, see there for the list of parameters available for the pagelink component.
You'll see the "anchor" param used by uklance.
I need to execute the following steps:
1. Start an IE browser window and open a URL (Done using StartBrowser(final string URL)
2. Start a session (done by logging in)
3. Now, I want to enter a different URL in the same browser window which has the same session.
My question is related to Step 3. How can I overwrite the URL in the existing IE window.
Note: I am using a keyword driven framework written in java.
From the IBM RFT online help: You can use the loadURL() method of the browser object.
If you do not have the browser object already 'learned' into your object map, just record a click on the browser toolbar. Then you can modify that line to be Browser_htmlBrowser().loadURL("http://stackoverflow.com");
Thanks Tom. I agree that loadURL has the implementation to do what I need.
There is one more aspect that may interest others looking at this question, i.e. the way the appropriate browser object is captured. Obviously the easist way is to use the RFT record and click way, and use the appropriate recognition properties or the other way is to implement it is find the existing browseron the fly when the method is called irrespective of recognistion properties etc which may be more useful for some scenarios or frameworks, like it is done below.
RootTestObject root = getRootTestObject();
TestObject[] testobj = root.find(atDescendant(".class", "Html.HtmlBrowser"));
BrowserTestObject bto;
bto = new BrowserTestObject(testobj[0]);
bto.loadUrl(curParamOne);