JSF 2 f:subview not seeing my changes reflected in the UI - jsf-2

Update It appears I have to rebuild/redeploy the app to see the changes. Anyone know why I have to do this? It's a static .xhtml page. Coming back to update, looks like I just have to stop/restart the server, not a rebuild. I was dumb and didn't try that first, mostly because I have to rebuild/deploy often anyways.
I'm working on a JSF 2 app that uses f:subviews. I'm on one subview where my changes aren't reflected in the UI when I refresh the browser. I've worked on other subviews where I don't have this problem.
I have a batch script which copies my .xhtml files into my installed apps folder. The batch script reports the file is copied over. It's business as usual... If I drill down into this particular installed app, I see my change in the file. Again, seems like business as usual. The change is not reflected in the UI when I refresh, however.
These are simple text changes I'm making, but not seeing.
The problematic subview doesn't appear to be anything special, it's just a p:datatable that's included via a ui:include with a couple of parameters for the data and to give it a unique id. If I replace the p:datatable with just simple text, the "old" table still shows up in the UI when I refresh. I just can't get any changes in this subview to be reflected in the UI.
Console doesn't throw any errors.
I'm using WebSphere 7.0.
Never encountered this problem before. It isn't a browser caching issue as I can edit other subviews and see those changes when I refresh the page.
Anyone have any ideas?

Related

UI5 UploadCollection Issue

I have an UploadCollection in my XML view bound to a JSONModel. When I add / delete files in the collection all works good initially. When I save the required data to the database and then refresh the JSONModel from the database I get the attached error. It is as if the elements are not being removed from the DOM, however, when I look at the entire process via the Chrome debgugger the elements are indeed gone in between. I am currently using OpenUI5 v1.78.1 but the same issue occurs with the latest (v1.86.3). The UploadCollection fails to work again from then on and I need to destroy it in my view before the data will be displayed again.
Has anyone seen this or have advice on how it may be corrected?
I figured it out. It appears that when I was calling UploadCollection.removeItem(item); it did not unregister the element somewhere and held onto the idea that the HTML elements still existed. Using item.destroy(); instead solved the issue.

Changing a subarray in document will not rerender with proper order

I am using jQuery UI sortable to update the order of an array stored in a container document. When the sort fires the "stop" method, it rebuilds the array and orders it based on the new DOM layout. It all works fine and the updated document reflects the proper order. HOWEVER, the dom reloads and the order is back to what it was.
When I physically refresh the page it actually shows the proper order. It's just that on-the-fly changing of the array won't just re-render itself properly.
Interestingly enough, this problem has only cropped up in 0.9.4, so it may be a bug with meteor, just not sure if there was a change that would affect what I'm trying to accomplish.
I'd provide code examples if needed, but since the code itself seems to be working properly and the each not updating to reflect the order, i'm not sure it'll help at all.
Thanks!
UPDATE
I've put together a standalone demo of the problem, listed out in my comment below:
Ok, here's a crazy example of the issue:
demo: app-9ryym2m2.meteorpad.com
source: meteorpad.com/pad/uQ42DRH95JcHtKnb9
Try doing some sorting of items to see part1 of the issue. Next, after sorting, try hitting the togglers a few times, especially within the list of items you sorted. That's part2 of the issue. Now, if you refresh the page, everything gets caught up. Wat.
Double Update
Thanks to aldeed over at Github, I've got a solution: https://github.com/meteor/meteor/issues/2944
By changing my sub-document reference key from 'id' to '_id', Blaze seems to pick up on the changes to sorting no problem!
I confess that I haven't dug into your code, but the way it is updating indicates that you are picking up the previous state rather than the updated state. Wherever you drag, the final state reflects the last place you dragged to (even though it was probably in the wrong place when you started). Perhaps an order-of-execution/async bug?
Have you seen the drag and drop demo that was put together for blaze by Avital Oliver (Meteor core dev) when the blaze rendering engine came out? You can watch a video and check out the repo. If you try the demo and it fails on the current version of Meteor, you can submit an issue there and get some support from the pros :)

What causes the asp.net Cannot create/shadow copy error?

Several times a day I receive this error while running my asp.net mvc4 project. I am not asking what that means, or how to fix it, but what am I doing to cause it? It is really starting to bug me, and if I can cause it to go away by altering my workflow I will.
Cannot create/shadow copy '< assembly >' when that file already exists.
As I mentioned above the project is an MVC4 application. My workflow is typically.
Make a change (code or html)
If it was code, rebuild the project (using keyboard shortcut CTRL+SHIFT+B)
refresh the page
see annoying error
clean the solution
rebuild solution
refresh page
verify change
goto 10
(I get the error with/without the debugger attached.) I will be eternally grateful to anyone who can inform me on how to avoid this error, and will promptly tweet your praises
I find this annoying too. It seems to happen when you try to refresh the page in a browser before the build is fully complete. Try counting to three-one-thousand after build is complete and then refresh in the browser. Create/shadow copy should be done by that point.
I also don't think you should need to "clean solution". I believe a rebuild is a clean + build, so you may be cleaning twice.
After a bit of research, I also found this pre-build event which seems to be popular. (this workaround does not seem to work, perhaps it did in previous versions of VS / .NET framework)
Update: alternate solution
Another way to get by this is, when you see the YSOD, just type in a different URL in the browser and load it instead. Then click the back button and refresh to get to the page you were trying to reload in the first place.
What's causing this error seems to be doing the shadow copy (stating the obvious...), ie generating a file in one folder and then reading it to copy it elsewhere. I think what's causing the issue is generating or not that first file, and when/how it's copied, regardless of what your actions are. Does this first file (that will be shadow copied) needs regenerating, and therefore re-shadow copied?
This post says:
By default shadow copy is enabled on every appdomain created by ASP.NET. Assemblies loaded will be copied to a shadow copy cache directory, and will be used from there. So that the original file is not locked and can be modified.
And their fix is to prevent shadow copy. But I don't personnally fully understand what shadow copy does in the asp.net context, maybe someone can clarify if there are any bad side effect to disabling it:
<configuration>
<system.web>
<hostingEnvironment shadowCopyBinAssemblies="false" />
</system.web>
</configuration>
This post talks about disabling indexing and/or antivirus, which would suggest that building the project generates new files, and the antivirus (or indexing service) accesses them and locks them, just when the shadow copy is trying to copy that exact same file.
I get his error regularly and never found what specific action I do causes the error. I make a code change, press F5 (Run/ Play button), get the error in the web browser, close the web browser, press F5 again. It now works. I don't clean, I don't rebuild. However, with the second F5/Run, I believe VS detects there's been no code change, and therefore, maybe the shadow copy is not redone? Or maybe this time the shadow copy is timed slightly differently and it works.
I received this error after adding a new image to my web project.
In VS, each image has a property entitled "Copy to Output Directory". I chose "Copy Always", then I got the message.
I changed it to "Do Not Copy" - now it is happy.
Hope that helps someone.

Umbraco says it's saved changes to templates but the changes are lost

Each time I make a change to an Umbraco template and press Save, I get the confirmation popup saying:
Template saved
Template saved without any errors!
However, when I return to that template (click on another template and then back again), the changes have been lost.
I've ensured that the user account running my IIS application pool has Full Control over the \Views folder containing the .cshtml files (i.e. the Umbraco templates).
Strangely this just started happening, after it had been letting me make template changes with no problems. I can manually edit the .cshtml files on disk, but this seems ridiculous.
Any ideas?
A couple of things:
1) Have you checked that the following Windows accounts have full permissions for all folders "IUSR", "IIS_IUSRS", "NETWORK SERVICE" ?
2) Probably not but I have had problems in the past with caching. Have you disabled (set from True to False) caching properties in /config/umbracoSettings.config ? This should always be done during development.
OK, I'll provide an answer for others' future reference (although the reasons are unclear to me). It appears the change I was making to my Template must've been deemed invalid by Umbraco - when I strip the template text down to just a single, empty div and save it, the change is persisted successfully.
The confusing thing is that Umbraco provides no feedback as to why it's not saving - in fact it tells you that it HAS saved successfully.
Bizarre and confusing.
Just been editing my templates and got this problem. Fixed it by doing the following:
sign out of umbraco
clear your browsing data
sign back into umbraco
always be sure to copy and paste your code somewhere to keep it safe, and it can be easily pasted back in. Seems like a bug to me... but it saved after I did that.
(Using Umbraco 7)

dhtmlxScheduler using ASP.NET MVC Refresh Error

I am getting an error about incorrect html when I return from the Save view which means the displayed scheduler is not being refreshed to fix the last set of data. Having made a change or addition, it is displayed correctly if I close the website and open it again, so the update has been saved in the table. It is just the refreshing of the currennt view that I am having problems with. Does anybody have any suggestions as to where I might look?
As usual, this was my mistake. I had created a new project and copied the Save.aspx view from another project. The Inherits="System.Web.Mvc.ViewPage<RLSBCWebSite.Controllers.CalendarActionResponseModel>" still referred to the old project.
Make sure you create a new page in your project and copy just the contenets from old projects!

Resources