how to adda drop-down box to the basic info page of publisher portal? - wso2-api-manager

I have wso2am4.0.0 and run success.
I want to change the textbox to drop down box of the Roles of basic info page (https://localhost:9443/publisher, Develop > Basic Info) , like image below.
How do I modify the source code of carbon-apimgt to make this change?

The publisher portal code can be found here - https://github.com/wso2/carbon-apimgt/tree/v9.0.174/features/apimgt/org.wso2.carbon.apimgt.publisher.feature

AFAIK, it's not possible. For that, you need to populate the existing roles list. Current publisher Rest API does not have such a resource to populate the role list and it only contains a validation resource[1].
[1] - https://apim.docs.wso2.com/en/latest/reference/product-apis/publisher-apis/publisher-v2/publisher-v2/#tag/Roles

Related

Filter page datasource based on record selection

I seem to be struggling with this. I am working on a project management app in Google App Maker. I am using SQL data models. The portion of the app I am having trouble with is several project detail pages linked with a project list page. I have no trouble going from the project list page to the first project detail page.
I have a table widget in the project list page, and the onClick code for a table row is:
app.datasources.Projects.selectKey(widget.datasource.item._key);
app.showPage(app.pages.ProjectPage);
This filters the first detail page with the primary key of the record in focus. No problem here. When I want to navigate the next detail page that has a different datasource (but I still need to filter using the same primary key) I am struggling.
If someone can guide me in making a button in the first detail page that when clicked gets the _key of the project loaded in that current page and filters another detail page for the same project in focus, (using another data model, let's call it ProjectBudgetPage for example) I would really appreciate the help.
This was one my latest attempts at navigation to other detail pages within a project, this was for an onClick event:
var widgets = widget.parent.descendants;
var projectID = widgets.HiddenProjectID.text;
var projectDataSource = app.datasources.ProjectBudgetView.item;
projectDataSource = projectID;
app.showPage(app.pages.ProjectInfoPage);
which results in: (TypeError) : Cannot read property '__gwt_instance' of undefined
at HeaderProjectTabs.HeaderContainer.InfoTabButton.onClick:5:5
I am not sure if I understood properly but I suggest that you start by checking this official App Maker template available here https://developers.google.com/appmaker/templates/partner-management/ which provides a ready-to-run app you can use to manage an internal list of partners, but you can also customize it with your own needs. I recently used most of the UI and logic of this template and I was able to integrate it with SQL data models and it works really great.
I noticed that for this template they are saving the (widget.datasource.item._key) to a Page custom property which you can access afterwards. Custom properties are page-level properties that store data for a single user session. Custom properties are useful when you need to bind properties of multiple widgets to a single value. More info available here https://developers.google.com/appmaker/ui/binding#custom_properties
In your scenario, you can create a new custom property (string) inside your ProjectInfoPage and then you can add a script to the button onClick event in your ProjectPage to save the _key or any other item to a page property. For example:
app.pages.ProjectInfoPage.properties.ProjectKey = widget.datasource.item._key;
app.showDialog(app.pages.ProjectInfoPage);
Then you can get the “ProjectKey” property by adding this to the onAttach event in your ProjectInfoPage:
var key = app.pages.ProjectInfoPage.properties.ProjectKey;
…
In the onAttach event you can filter the new model or pass the property values to a server script. I believe there are other approaches but I hope this helps!

adding new menu in Select (All,Inverted Selection) in Alfresco Share

I am newbie to the Alfresco.Now my requirement is how to add new menu[All(All pages)] in Select. wherever user perform search function lets say 250 results have found & user selects All in page 1 & its selecting only current page results and not selecting entire 250 records & then user goes page by page can edit the properties for the entire 250 records.in the new functionality if user selects [All(All pages)] then all records should be selected & edit the properties for 250 records at one go.So I want to add new menu with All(All pages) & change the existing menu current labels as All(Current Page).How to achieve this functionality and what files need to changed.How should i know that which files are currently used?Is there any debugger can be used to know the files?
Alfresco Version
4.2.e
My guess, is that if you go through this previous version of Jeff Potts' Tutorial you will be able to figure this out by yourself.
Simplest option is to edit label of that particular action in out of box property file.
You can find it under
<ALF_HOME>\tomcat\webapps\share\WEB-INF\classes\alfresco\messages\slingshot.properties
This entry
menu.select.all=All
Change label here and it will be reflected.
NOTE: It is not best way to implement this. Ideally you need to override property file and change label
The issue here is that only the items shown on the page have been loaded. This means that the metadata for the items not shown on the page won't be available. The metadata of each node is used to evaluate it's applicability to any action. If the node is locked or has had its permissions changed then it won't be possible to edit it. This is why "all" only means all items on the current page of data.

Load flash builder app from a URl

I have an browser based application built with Flash Builder (actually Flex 3.5) with a Java backend. The application works well. It has a default login page and users can always login and view products by typing the product id in an input field to display product and other info.
I will like to modify this application in such a way that a product page can be viewed by just including the product id in the url something like www.myserver.com/?product_id=1234577
I am completely at lost on how to implement this and not even sure if this is possible at all.
Yes, this is definitely possible.
The key details are from Pass url parameters to a swf (flash) movie:
Look at loaderInfo.parameters["product_id"] in your Flex code; as your application initializes, hook into your current logic that brings up info when you type in a product ID.
You may use this approach . You can pass parameters like (if embedded in jsp page)
var flashvarsWF = {};
flashvarsWF.product_id= '<%=productId%>';
And you can pass this flashvarsWF in
swfobject.embedSWF()
In flex main application(mxml), you can receive this as
var pId:String = this.parameters.productId;

Invoking immediate save for Shield UI ASP.NET Chart

I am using Shield UI ASP.NET Charts to show registered (and logged in) users informations regarding their accounts. I went through the documentation, but can't find a solution to the following thing: is it possible to invoke an immediate save once the user clicks on the export icon?
I am enabling the save so:
<ExportOptions AllowExportToImage="true" AllowPrint="false" />
Are there any edditional parameters to be set?
There are no additional properties to be set/enabled because it is not possible to invoke an immediate save/export of the chart's image (skipping the filename and location choices).
However you may take use of the additional tooltips:
ExportTooltip="" or/and PrintTooltip=""
to provide the users some more information if needed.

ajax Address field for email client-like environment (asp.net)

There is this magical To-Address field in yahoo mail , which you can type-in the names and shows you an auto-complete list , click on the names and then a block shows up in the field , each block has a tiny x mark and you can just delete the names from the field and all remaining block shift to left to fill it's place !
how can i achieve this behavior for a address field in my application , with minimal effort on asp.net ?
plus : i mainly looking for a .net component which is preferably free to use , the commercial one's are appreciated .
Rather than a .NET component, take a look at some client side plugins. TagIt, for JQuery, is a good one for doing just what you are talking about doing. Here is a demo: http://webspirited.com/tagit/
You can also wire up a web service and retrieve values from the server based on the input the user has entered (auto complete functionality). It's definitely one close to what you are referring to.

Resources