Custom List Template is not being pulled by SPSite.GetCustomListTemplates() - sharepoint-2010

I am adding custom lists programmaticaly from a custom template. I check to see if the custom list template exists, and if not I create the list template by creating a list and then saving it as a template using the SPList.SaveAsTemplate() method. However, during the same timer job, I try to get the list template, but it doesn't show in the SPSite.GetCustomListTemplates() method. It does however show in the UI under the List Template Gallery. Any idea as to why it would show in the UI but not be returned in the method call?

Read my answer to this question. With that you should get a result from GetCustomListTemplates instead of just an empty list.

Related

sitefinity form populate dropdownlist from API

I would like to create a form and add a dropdown list widget that will pull its choices from an API. I don't see any setting for that where would I call the API? what I was able to find is from 2014 so I think its outdated.
https://www.progress.com/blogs/sitefinity-custom-form-widget-with-dependent-dropdowns
It's cake... just use a regular input, then on the page use a Javascript widget and wire it up into a dropdown.
https://demos.telerik.com/kendo-ui/dropdownlist/remotedatasource
Use whatever JS component you want
Just a note though, give your input a cssclass name that will let you easily find it with the javascript.
I have a post on this https://www.sitefinitysteve.com/blog/binding-sitefinity-form-field-to-remote-data

how to add autocomplete function to a column in oracle apex tabular form report

i want to add an autocomplete function to work in one of my column suppose name.It is easy to do using items.but how can i do it in the report.
Since a report doesn't contain Apex items, you can't do this with the built in features. Ignoring any possible plugins that may already be available, you can do this with jQuery UI, specifically the Autocomplete widget. Apex already includes some of the jQuery UI suite, but you may need to download the Autocomplete widget from the jQuery website.
This will need some custom work on your end. This really isn't that hard if you know how to use jQuery.
Download the jQuery UI Autocomplete widget and include it on your page. You can put just the .js file for that in your Application Shared Items. I have the whole jQuery UI library in a separate place on the webserver because I use different parts for different projects.
Source in that widget in the page properties.
You'll need to create text items with apex_item.text in your report.
You'll need an On Page Load dynamic action to attach the Autocomplete widget to your text items.
For the autocomplete source, if it's short, you can just use a Javascript variable that you put on the Apex page. If it's longer or you need to find the list at run time, you can use a function that calls apex.server.process.
If your report has Partial Page Refresh turned on, make sure the DA in step 4 has Dynamic scope, not Static.

Sitefinity displaying child items in an external widget template file

I've successfully followed the Sitefinity documentation about how to use an external widget template file and now I would like to use a repeater in the external widget template file to display the child items as described in the Sitefinity documentation about how to display child items in the widget template
Moving this to a external widget template file fails on the Repeater attribute DataSource as it is not a valid attribute.
I know how I would approach iterating the child items
IQueryable<DynamicContent> childItems = parentItem.GetValue("ChildItems") as IQueryable<DynamicContent>;
But I am unsure how I would get the selected parent on PageLoad. Any suggestions?
It's hard to be very precise with the limited example you gave. But if you get this this template from a listing of stab mic content you could grab the last part of the URL which is the urlname of the dynamic item and use
The manager to look it up the. Get the children. Or if your widget has a Guid property use thunder to create a
Designer to selected the parent item to display.

Jive 7: How to change profile data / action?

I am writing a plugin for Jive (SBS) 7 and want to add more data to the template for the user profile Overview page (i.e. /people/admin ). In Jive 6 I did overwrite the profile path in struts and added my own ViewProfile action. But this action seems to be called no more.
I also cannot even figure out where the templates I changed get their data from (soy/people/profile/{userProfile, header, head}.soy) or what action is responsible for.
So how can I add another property to the soy file that gets a custom property for the targetUser? (custom property = property saved in the database table jiveuserprop)
You need to create a plugin and then use the option. Then, you simply use jquery to add the extra stuff.
you can create an action that takes in information using getters or post and throw it into the user's extended properties. You can create another action that'll retrieve that info in json.
then, simply use jquery's getJson to grab the info and use selectors to show the data in the user profile.
Don't forget to use the $j(document).ready(function(){ // your code here }); to show the info
simple example:
<scipt>
$j(document).ready(function(){
$j("div#j-profile-header-details").append("<p>hello World</p>");
});
</script>
will append "hello world" under the user's email address / job title.
hope this helps. feel free to ask more questions if it doesn't make sense. here's a good link on writing the javascript part of the plugin: http://docs.jivesoftware.com/jive/7.0/community_admin/index.jsp?topic=/com.jivesoftware.help.sbs.online/developer/PluginXMLReference.html
I got an answer in the Jive Developer community:
profile is an action in Struts2. /people/username is a URL Mapper permutation
https://community.jivesoftware.com/thread/263660

jQuery Mobile does not process elements in Partial View

I'm converting my site from using jQueryUI to jQuery Mobile, and I'm having some trouble.
I have a page that lets users add new timesheet entries. They click the "Add" button and it retrieves a Partial View from the server right onto the page.
The problem is that jQuery Mobile is not applying to any of the elements in the Partial View.
How can I force jQuery Mobile to process my elements after they've been inserted into the page?
The short answer is that you can just trigger the create method on the parent element of where you inserting your partial view.
For example $('#container').trigger( "create" );
Alternatively most widgets can be manually initialized by calling them on the element, for example for a listview: $('#myListview').listview(). This can be useful if you have only a few elements that need to be enhaced and you don't want to traverse all the child elements of the container. You should also know that for many widgets there is also a refresh method which you can call if you add elements to it after it has already been initialized for example $('#myListview').listview('refresh).
Also have a look at the following Q & A from the JQM docs which deals with this issue and for an explanation as to why it is necessary to call these methods.
Question: Content injected into a page is not enhanced.
Answer:
jQuery Mobile has no way to know when you have injected content into a
page. To let jQuery Mobile know you have injected content that must be
enhanced, you need to either make sure the plugins are called to
enhance the new elements or trigger("create") on the parent container
so you don't have to call each plugin manually.