How can I set the modifed date of certain content? - alfresco

I need to change the date that Alfresco shows in the content detail. Every time I change something about properties or tags, the modified date updates to that time. That is great so far.
Problem: I need to make some changes on some uploaded files without updating that date. Some of them have their modified date changed already.
If I could set in mysql the date I wanted, then everything would be great, but if I set the audit_created and audit_modified fields in alf_node table, the change seems to affect only to the list view, but it does not changes dates in the detail view.
I've tried several workarounds of my own, but none of them has worked. Could somebody give me a hint on how to get this done?
Thanks.
Alfresco Community - v3.2.0

Not sure about version 3.2 (caugh), but I guess
behaviourFilter.disableBehaviour(nodeRef, ContentModel.ASPECT_AUDITABLE);
should do the trick. Also not quite sure at what event the behavior fires. Call this method right before you change properties.

Thanks to you all. Rebuilding the index is what actually worked for me. #Lista, I would accept your comment as answer if I knew how to do it.

Related

Perforce P4Report plugin Truncates text

I gave this plugin (P4Report) a go as recommended here and it works beautifully, I set up ODBC Data Sources properly and its bringing all the right fields across.
My main problem seems to be it not properly importing a "Description" string field and shortening it to less than 50 characters making the whole table pointless as the change descriptions are not being shown fully.
Tried importing into both Access and Excel 2013, both have the same issue.
Doubled checked and got my colleague to look with me that I had setup everything correctly and still wont fully show the description column.
Would be really nice having this working to help create patch notes.
Thanks in advance!
When you set up your query, under "changes" add "p4options". For p4options, add equals "longdesc" to add the long description.
The query will take longer to load, but it will pull over a longer description.

Different header in MigraDoc

I have been looking around and I cant find a way to do this as I want.
I have MigraDoc creating a PDF that can be one page or more, the header on the first page I would like to be different to every other page. E.g. First page has a logo and all others do NOT. So I need more then one header. This is something that I have found to do using
Section.PageSetup.DifferentFirstPageHeaderFooter = True
The problem that I have is that this also means that the footer (that will not change at all) does not show up on the first page. For the Footer I am using a table Section.Footers.Primary.AddTable.
I could use a "quick fix" by just copying the table (footer) and pasting it with it changed to section.Footers.FirstPage.AddTable but then I would have a ton of code that is just messy and not needed as the footer does not change, is there a way around this?
Any help would be great. I will continue to look around to see if i can find anything more on this.
You could also use
section.Footers.FirstPage = Section.Footers.Primary.Clone()
after calling AddTable().
Maybe it would be enough to just all section.Footers.FirstPage.AddTable - IIRC the first page footer will be used for all pages if you do not assign a special primary footer (but I could be wrong about this; I'll check this Wednesday or Thursday).
Well, as no one else can answer this the best way I found to "solve" this problem is to create a function that creates the table. Then I call the function and use it as Section.Footers.Primary and section.Footers.FirstPage
If anyone does have a better way please do feel free to give a comment or something.

How to dynamically load rows in enyo when using the Repeater kind?

I was able to add a load more section on the bottom row and successfully have a load more working using setCount. Except it reloads everything (as its suppose to) with no way of maintaining the state of where you were before load more was clicked. So I tried using renderRow, but that does not work because it only refreshes rows that already exists (in my case the rows to be loaded have not been loaded into memory yet). I don't see anything immediately useful in the docs. Anyone encountered this problem or have an idea of how to solve it. Thanks.
I'll try to update this answer with something more complete but what you need to do is find the index of the topmost row before you add your new content and then scroll that row back into view after you update. Something like that should do what you want. I think there were some discussions back on the old developer.palm.com forums from Enyo 1 days that discuss the technique. Should still be applicable to Enyo 2.

How to use jQuery to show a different page in ASP.NET

I am trying to set up functionality similar to Netflix. Where if you mouseover a movie - you are presented with a window of movie details (all client-side).
At high level, can someone in this forum help by telling me how this should be implemented? I.E., one or more .aspx pages, what would go in code-behind, and .js file, css, etc. Just trying to get an idea on how this would be set up to work.
Basically, when I hover over an item, I need to query for details that belongs for that record being moused-over and display it in the window or div. I also need to have some functionality in that window (i.e. a textbox and button which will end up needing to get saved in a database).
Thanks for any tips and suggestions -
You would want to add an AJAX call to the hover event of the image, that pulls from a webservice/web method.
Here is a good example, you would change some things. However, it should get you started.
http://www.mikesdotnetting.com/Article/96/Handling-JSON-Arrays-returned-from-ASP.NET-Web-Services-with-jQuery
If I understood your question correctly, you should try this excelent jQuery plugin:
http://www.sohtanaka.com/web-design/css-on-hover-image-captions/
Look at the demo here:
http://www.sohtanaka.com/web-design/examples/image-hover/
easy to install and configure and very slick!
Good luck
EDIT: sorry wrong lik the first time
There are certainly many jQuery plugins that will do this for you. jQuery UI may also be of benefit.
Here is one that appears to do something like you are describing:
http://plugins.jquery.com/project/VisualLightbox

Automatic GridView Controls

In my project i have several GridViews, all of which have somehow automatically put in edit, cancel and paging functionality that i have been able to add to if i wished. However on one of them none of the buttons link up. always comes out with a Not Handled Exception.
I sorted this out earlier in the week, but due to source control it reverted back and is now not recoverable. I can't remember what i changed to get it working and have had no joy in finding out from google etc, so thought i'd post it and try and find out if anyone else knows.
Thanks in advance for any help anyone can offer.
Have you checked to make sure that the CellContentClick event is being handled on that grid?

Resources