Multi save list in Spring MVC? - list

Is there any way to save list of object and their collections just by one click save?
I mean list populated with already filled input text by object's value and justONE button "Save" to update all the items of the list.

Yes. Create one long JSON String and send it to your SPring MVC Controller.
See these posts for help:
JQuery, Spring MVC #RequestBody and JSON - making it work together
Problem with Spring 3 + JSON : HTTP status 406?

Related

Oracle Apex Event when page gets changed with custom attributes in plugin

I am currently trying to develop a plugin in oracle apex. This plugin consists of attributes which have SQL queries. I want to pass this SQL queries into the child component. In this case the child component is a dialog window.
I can pass different values like numbers or strings easily as page items with the url approach. However using this approach is not very scalable because of the URL restriction of maximum 2000 characters.
e.g. with APEX_UTIL.PREPARE_URL
Therefore I thought of storing SQL-Queries in the database and then query it in the dialog.
And here is the problem: How can I store the SQL Queries when the plugin is configured?
I do not like to have the logic in the render call, because this way everytime the plugin gets rendered it makes some unnecessary database requests.
Is there something like an event when the page gets saved with the plugin? Or a possibility to have some PL/SQL code after the page gets changed which can access the plugin attributes?

Generating dynamic list columns fields in SharePoint list form

We have created a custom list form with SharePoint designer and now the requirement is like below:
User will request server creation using this form and now server can be of any type which user can choose from a drop-down such as Production,stage,Test or multiple production servers are required. And for each server type, there will be corresponding 20-25 fields which user need to fill for that server details. so i want to know the best way to achieve this as we cant create 200-250 list columns in this list and scrolling also will be a difficult task while user will submit the request. So what is the best way to achieve this requirement?
You can create a list containing all server types that will be used to create a server type lookup. Then you can create a list with a 'Server Type' column and 'Server Requirements' (multiple lines of text) column. You can store all requirements for a particular server as a JSON object e.g.:
{"RAM":"8GB", "CPU":"4"}
OR you can create a nested JSON object for each server type e.g.
{"ServerType": "Staging", "Requirements": {"RAM":"8GB", "CPU":"4"}}
wherever you want to show/send/populate data, you just need to retrieve this json and parse.
Hope this helps.
first I think the recommended way would be to try OOTB SharePoint solutions and in Your case I think You could try to use ContentTypes and OOTB list forms.
Lets say You create a content type per server type. To each type You add only the 20-25 fields that are corresponding to this server type. Then in list settings in advanced settings You turn on content type management and You add does content types to the list (also hide the default Element content type). After that when the user will want to add a new item to the list he will be albo to chose between the content types (server types in Your case), and after that the form will have only the fields that are added to this content type. Also in edit form the user will be able to pick between content types and will see only the corresponding fields. Please see the attached screens to also understand what I mean on a very simple case:
list
ContentType1 (ColumnA)
ContentType2 (ColumnB, ColumnC)
if this OOTB features are not enough and You already created a custom form using SharePoint Designer
Then You should be able to attach custom javascript file to it and jQuery library. The javascript You may store under _layouts path on server. Every field in the form has its own tr (row) You could to each row attach some custom css class like- class="forServerProd allFields" and then in js You could listen onChange event of Your list and show or hide fields with $(".allFields").css('dispaly','none'); // first hide all
$(".forServerProd ").css('dispaly','table-row'); // then show only relevant

How to update cache for a Sitecore Web Api output upon the index update

I am implementing Sitecore 8 Web Api. To be exact, i am using ServiceApiController in Sitecore Services Infrastructre. I wonder how can I cache the JSON output from this controller in such a way that it gets updated only if the lucene index which I am fetching data from, gets rebuilt?
I have not registered this controller as controller rendering because apparently we don't need to do that and it just works out-of-box. I just read the JSON output by an ajax call through jQuery and the javascript code and HTML markup is inside a MVC view rendering. I guess it doesn't make sense to setup cache on the view rendering. Isn't it?
What should i do?
The best option would be to use the HtmlCache and store the data there. This cache gets completed cleared on a publish, so it would make sense to use it.
You can add an entry into the cache by using the SetHtml method:
var cache = Sitecore.Caching.CacheManager.GetHtmlCache(Sitecore.Context.Site);
var json = cache.GetHtml("mycachekey");
if (string.IsNullOrWhiteSpace(json))
{
var json = // build your json output here
cache.SetHtml("mycachekey", jsonValue);
}
return json;

EmberJs: Update the Data Store Schema

I'm currently developing an Ember application and I've come across a blocker...
I am loading my data from a RESTful api and this was working a treat, but I have now updated one of my models with 2 new fields. The server is returning the new json format and it includes the new field. DS.Model consumed by the ember application also contains the new fields but when I view the Data in the chrome plugin, the schema does not seem to reflect the changes to the model. I have tried clearing the cache in the browser but it does not seem to force the schema to update.
Any pointers?
Ok I have done a bit more digging and it seems to be an issue with the Chrome plugin
The datagrid view does not display the new columns but if you drill into the rows then the attributes ARE being shown, this has at least pointed me in the correct direction.

django or extjs , encode another site post

i am working with openlayers, extjs , django
is there any way taking another site post and do sth. with django or extjs...
for exam. from another site you click button it sends xy coordinate and my main site will catch the data and add the xy data ...
when i click the link http://www.ppp.com/frmOL=OL&Point&x=36.555&y=33.665 will be create , i will cath the data ,encode and than add the data to map
thanks for your help
Just get the data from the query string, process it and add it to your database.