Repeater User Control and Viewstate - asp.net-3.5

I maintain an ASP.NET Web Forms application on framework 3.5. Essentially it is a list of items and a checkbox to signify the state of the item. The users can sort the items by any of a number of columns. New items are added and removed between postbacks. This list is hosted in a Repeater and the item template is a usercontrol. The page has no master page as it is an application that was upgraded from framework 1.0 to 1.1 to 2.0 to 3.5. The application does this if it is hosted by IIS6.1 and 7.5, 32 bit and 64 bit. It is in it's own application pool and the pool has 4 threads.
Now the problem: If a checkbox is checked in the thrid row and the item in position 1 is removed in the database, then it should move up to position 2. It does move up, but the checked check box stays in position 3. If the rows are sorted, then all the checked checkboxes stay in their position, but the rest of the information is sorted and displayed correctly, including the title on the parent tag.
Viewstate is disabled on the user control, and on the checkbox within the user control. Caching of the page is disabled in a page directive. The repeater is bound in page load.
I've checked the state of the controls in the repeater that should be checked right after repeater.DataBind and the state of the check boxes is correct. This is the last line in the page load event. Using fiddler I have verified that the rendered HTML is not correct. So it seems that the problem is somewhere in the render.
This is as far as I've been able to take this. The application is mission critical, yet this bug has existed for a very long time. Obviously the state of this checkbox wasn't that important, but due to evolving business requirements it is becoming an issue.
No searches come up with any bugs. I can post the code, but it is extremely long since it is part of a large applicaon, so I have not.
It appears that viewstate is being loaded between Page_Load and LoadComplete. Checking the values after databinding and LoadComplete shows this. What would cause viewstate to load at the wrong time like this. Feels like a bug. It only affects one page in the applicaon. I know that viewstate is populated after init and that all controls should be loaded during OnInit, but I don't want viewstate so it is ok that this doesn't function.
It has nothing to do with the type of control. I just exchanged the asp:checkbox for a htmlinputcheckbox and the behavior persisted.
EDIT: Would control state have anything to do with this? It can't be disabled so far as I know.

After removing the asp:checkbox for an HtmlInputCheckBox and suffering the same problem. I determined that the probelm is with the check box in particular and exchanged it for an asp:ImageButton with fake check box image.
I believe, though I do not know for sure, that the check box state is a part of conrol state and not view state. Seems like a Microsoft Bug to me, but perhaps that is the way this control was designed.

Related

Is there a way in Angular2 to display all validations once the entire form is traversed?

I am using Angular2 (2.2.1) for building my web app. I am facing a challenge here. I have multiple dynamic forms in my SPA and in all of them, I am keeping my Sumbit button disabled till all the mandatory fields are filled (I cannot change this behavior because of some restrictions).
My errors are displayed once the field is dirty (and of course if there are errors). However I would like to show that the user has missed some field completely once he has reached the end of the form. I thought of keeping the check on the last field of the form, ie. once it's touched, the validations for all the missing fields will be shown. However there is a major flaw in my logic here as it assumes no user will ever miss the last field which may not be the case.
So, is there any way this can be done in Angular2?

Content merging AEM

We're looking for a solution on how to best deal with the situation where multiple authors are working on the same page. If the first author pushes in the content, the second should have a way to merge it when he tries to publish. Launches appears to be a way to take care of this but it doesn't seem to be handling content merging. Is there any way an author can view the diff(and or do merge) of the content that might have been pushed by another author while they were working concurrently ?
Please help with any pointers.
Page modifications happen in real time to the underlying structure. They also happen at as small a level as possible.i.e. If you go into a text area and modify the text there, the text node is changed on the server, you aren't saving the entire page.
The only way that person A could interfere with what person B is doing is if they were working on the exact same area of the page. Which, honestly is a process issue. I say this because the answer to your question is that there is nothing out of the box to handle this type of scenario and if you are on 6.0 or higher and looking at the JCR3. JCR3 handles this far worse than the older version did. Last time I checked it didn't support nodes at all
Adding to what Bailey said, AEM OOB allow multiple users to edit same page in real time, though if multiple users are working on same node will be a reason of conflict. Such cases can be managed by defining a process like:
1. Take a lock of page and edit page or
2. Create versions of page and publish versions

Smart Form changes not reflecting in site. #Ektron

I have edited my existing smart form in smart form configurations in settings menu.
Then I have published and updated the smart form in contents folder properties.
Now I went to particular content which is using that particular smart form in CMS 400 editor and I can see the changes.
But when I go through the page in browser it still shows the old smart form.Unable to reflect changes in browser. please help me.
Thanks in advance
It would help to know what version you're running. That being said, there are a few things that could be going on here...
Caching
FrameworkAPI caching might be turned on, in which case you'd have to wait for the cache expiration or recycle the app pool in order to see updated content. Caching is enabled in web.config by changing the defaultContainer property in this section to Cache.
<ektron.framework.services>
<unity configSource="ektron.cms.framework.unity.config"/>
<framework defaultContainer="Default" childContainer="BusinessObjects"/>
</ektron.framework.services>
Republish the content
Changes to a smart form definition won't immediately trickle down to all content blocks using that particular smart form. If you add a field (for instance), that field won't exist on any content blocks unless you open up that content block in edit mode and republish it. It will automatically be added to the content block when you click Edit, but that change won't be saved until you click publish.

Setting active page when Zend_Navigation is cached?

Update - Please see update below.
I'm attempting to improve the performance of our ZF based CMS, and am trying out caching the Zend_Navigation object I create with the menu structure. Caching the object means I can't set the current page to active, or I'll have a copy of the menu in the cache for every page.
To allow caching of the structure, regardless of current page, I've moved highlighting of the current page in the menu to jQuery, which is working well. Then I noticed that the Breadcrumb_Helper (which uses the same Zend_Navigation object as the menu) wasn't displaying anything - obviously because I haven't got a page set to active.
Given I know the id of the page, is there a way to get inside the Zend_Navigation object to set that particular one to active?
Ideally I'd like to do something like:
$nav->findOneBy("id", $currentPageId)->setActive(true);
But there doesn't seem to be a way to access the pages in the object like this. Looking at the code, using findOneBy to get the current page, then removePage to remove it, then setting the collected one to active, and using addPage to put the collected, updated one back in might be an option, but rather convoluted.
The other option is just to cache the array I use to construct the Zend_Navigation object, which would be easier to set the current page to active, after getting the base array from the cache.
(I should point out that all the pages in the cms just have urls like /privacy, /about-us, and are routed to a default frontend module, controller and action, so there is no controllrt/action in the url to allow ZF to work out where it is.)
Update:
Ahem.... Seems like the code I suggested did actually work, and can actually be done slightly more simply using the magic finder methods...:
$nav->findOneById($currentPageId)->setActive(true);
As noted above, this does indeed work:
$nav->findOneById($currentPageId)->setActive(true);

Pattern for Spring-MVC stateful interaction

Today I was doing this thing with Spring:
Have a page with a form and a chance to choose one item related to the form.
If you push "Choose item" the app will save somehow what you typed in the form, go to another page, let you choose the thing.
When you are back to the form it's filled with what you wrote before going to the other page, plus the item chosen.
Seems easy, but you have to take into account that for some stupid reason the user could open the page where you choose the item (maybe because of a bookmark, or because he pressed the back button 10 times to play). You know what I mean. I tried many ways, mainly based on HttpSession... I don't like any of those. None of them seems elegant. I was even thinking of using a hidden form in the other page, but given that it is not unique to this "flow" (I mean you can go to the item choose page from others as well), I will have to worry about conflicts and so on.
So what would be the preferred way for you? Suggestions?
Go around the problem instead of solving it. You can use a modal javascript div popup where the user can pick the item she wants. The contents of this div can be loaded via ajax (separate Spring MVC controller called with Http GET). Once the selection has been made, you close the popup (hide the div) and copy the value into the original form. Done.
No need to store the state anywhere.
I suggest Spring Web Flow.
Spring Web Flow compliments the Spring MVC.
Here is link to Spring Web Flow Demo