AjaxControlToolkit ReorderList stopped working - ajaxcontroltoolkit

I am using the AjaxControlToolkit reorderlist. all was working well. then i upgraded the website to .net 4 and visual studio 2010. Now the reorder is no longer working. I did some searching and it was suggested to upgrade to the latest version of ajaxtoolcontrol toolkit. I've put the dll into and it's version 4.1.40412.2. I've checked the references for the website and it reads that is is version 4.1.40412.0. When i run the page, i am not able to drag the icon for the row. Was hoping someone could point me in the right direction.
<cc1:ReorderList ID="roTask" runat="server" DataKeyField="CJASI_TaskID" SortOrderField="QuestionNo"
PostBackOnReorder="false" DragHandleAlignment="Left" Width="97%">
<ItemTemplate>
<div class="Reorderlist_ItemTemplate">
<asp:Label ID="lblQuestion" runat="server" Text='<%#databinder.eval(container.dataitem,"Question") %>' />
<asp:HyperLink ID="hlTaskQuestion" runat="server" NavigateUrl='<%#"AddEditTask.aspx?ClassID=" & databinder.eval(container.dataitem,"CJASI_ClassificationID") & "&TaskID=" & databinder.eval(container.dataitem,"CJASI_TaskID") & "&CatID=" & request.querystring("CatID") %>'
Text="[Edit]" />
</div>
</ItemTemplate>
<DragHandleTemplate>
<div class="Reorderlist_DragHandleTemplate">
<asp:Image ID="imgMove" runat="server" ImageUrl="~/Images/imgMove.gif" />
</div>
</DragHandleTemplate>
<ReorderTemplate>
<asp:Panel ID="Panel1" runat="server">
</asp:Panel>
</ReorderTemplate>
</cc1:ReorderList>

I had the same problem with ajax control toolkit 3.5 and visual studio 2010.
Just adding ClientIDMode="AutoID" solved the problem.

Related

Custom Header is not displayed in DOM content when using Enzyme or React Testing Library

We are using custom headers in ag-grid community version. We have written unit tests in both Enzyme and React testing Library.
Till ag-grid-community version "21.2.2", we are able to see the below customheader in DOM content.
<div class="ag-react-container">
<div>
<div class="customHeaderLabel">SanMake</div>
</div>
</div>
From version "22.1.0", we are unable to see the above DOM content in the unit tests. Could you please help with the solution. As we are having several unit tests written for custom headers, all the unit tests are failing - when we try to upgrade version to "22.1.0".

How to set up RSS feed with a Jekyll site?

I am in the process of setting up a blog with GitHub Pages and jekyll on linux. I am using the included "minima" theme, which includes a "Subscribe vie RSS" link at the bottom of the page. When I click this link, I get a message saying:
This XML file does not appear to have any style information associated with it. The document tree is shown below. and a whole lot of xml below it. I am not quite sure how an RSS feed works, but I am pretty sure that it's not supposed to work like this. My xml file is as follows:
<feed>
<generator uri="https://jekyllrb.com/" version="3.8.5">Jekyll</generator>
<link href="https://gaetgu.github.io/feed.xml" rel="self" type="application/atom+xml"/>
<link href="https://gaetgu.github.io/" rel="alternate" type="text/html"/>
<updated>2020-02-03T16:52:33+00:00</updated>
<id>https://gaetgu.github.io/feed.xml</id>
<title type="html">Gaetgu</title>
<subtitle>Copyright© 2020 Gabriel Gutiérrez</subtitle>
<entry>
<title type="html">site launched</title>
<link href="https://gaetgu.github.io/blog/site-launched" rel="alternate" type="text/html" title="site launched"/>
<published>2020-01-28T00:00:00+00:00</published>
<updated>2020-01-28T00:00:00+00:00</updated>
<id>https://gaetgu.github.io/blog/site-launched</id>
<content type="html" xml:base="https://gaetgu.github.io/blog/site-launched">
<h2 id="hello-world-this-is-the-first-post-of-the-gaetgu-ae-website">Hello, World! This is the first post of the Gaetgu AE website!!!</h2> <p>This blog will contain AE content etc.</p>
</content>
<author>
<name>Gaetgu</name>
</author>
<summary type="html">
Hello, World! This is the first post of the Gaetgu AE website!!!
</summary>
</entry>
<entry>
<title type="html">TVC on Model Rockets</title>
<link href="https://gaetgu.github.io/blog/model-rockets" rel="alternate" type="text/html" title="TVC on Model Rockets"/>
<published>2020-01-28T00:00:00+00:00</published>
<updated>2020-01-28T00:00:00+00:00</updated>
<id>https://gaetgu.github.io/blog/model-rockets</id>
<content type="html" xml:base="https://gaetgu.github.io/blog/model-rockets">
<h3 id="thrust-vectoring-control">Thrust Vectoring Control</h3> <p>TVC is an acronymn for <strong>T</strong>hrust <strong>V</strong>ectoring <strong>C</strong>ontrol. TVC works by gimballing the motor in the base of a model rocket, changing the angle of thrust and therefore changing the velocity.</p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/7/7a/En_Gimbaled_thrust_diagram.svg" alt="TVC Diagram" /></p> <p>This is done actively, changing the course of the rocket and stabilizing it from outside factors such as wind. This concept is what allows SpaceX to land their rockets.</p> <p><img src="https://upload.wikimedia.org/wikipedia/commons/6/6e/Gimbaled_thrust_animation.gif" alt="TVC Animation" /></p> <p>Up until fairly recently, the idea of equipping a model rocket with TVC seemed an out-of-reach concept. Once the 3d printer was made affordable and small, people were suddenly able to create their own parts, without having to have access to a machine shop or spend insane amounts of money to get it custom-built and shipped to your location. The PLA used to print parts is also lighter than acrylic and metal, while still being fairly strong, allowing its use in flight vehicles. As for as I know, there is currently only one company, BPS, who is selling a kit to create your own TVC system, though you could create your own gimbal with a personal 3d printer. The main downside to trying to DUY instead of buying a kit is that you also have to create your own flight computer.</p> <h3 id="building-a-tvc-equipped-rocket-through-kit">Building a TVC-equipped Rocket (through kit)</h3> <p>The kit sold by BPS currently costs $349, and is out of stock until sometime spring 2020. The motor gimbal and avionics mount fit inside a 74mm airframe. The airframes can be bought here. You must use a MicroSD card to program the main avionics, which can be bought here. And you must buy either a rechargeable LiPo battery or a 9-volt, the LiPos can be found here. And finally, you must buy motor tubes to fit the motor into the housing, you can buy two of these. A beginner rocket, the Electron, can be built along with BPS’s YouTube™ series, as seen below.</p> <p><img src="https://i.ytimg.com/vi/1BQkMYj6Kps/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLCZ49T8hDn5S7x3LKA17FYI2S4r3g" alt="Build TVC Series" /></p>
</content>
<author>
<name>Gaetgu</name>
</author>
<summary type="html">Thrust Vectoring Control</summary>
</entry>
</feed>
I am using the jekyll-feed plugin. This content is actually not found in my github repo, so I assume it's auto-generated and hidden by the plugin. The repo can be found here and the website affiliated with it here Any help is appreciated. Thanks!
Although it looks a bit off, it is working correctly.
You'd add the link to that file in your RSS reader, then that XML file is periodically read to build a feed.

OmniFaces <o:tagAttribute> not working under some circumstances

I have a project where OmniFaces 2.6.8 is used. In this project I have some facelets tag files, which use OmniFaces' <o:tagAttribute>. For some of my tagfiles I noticed strange behavior, which means, the <o:tagAttribute> seems not to be working and I get
IllegalStateException: Duplicate component ID 'myForm:outer' found in view.
as a result, because the id-attribute of my outer tag is not cleared and thus reused in the inner tag (just as demonstrated in OmniFaces' show-case).
I could reproduce the problem with two very simple tag-files. Here is how I use those tag-files first:
<h:form id="myForm">
<my:outer id="outer">
<my:inner />
</my:outer>
</h:form>
And here is the complete code of the tag-files.
outer.xhtml:
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:o="http://omnifaces.org/ui">
<o:tagAttribute name="id" />
<h:panelGroup id="#{id}">
<ui:insert/>
</h:panelGroup>
</ui:composition>
inner.xhtml:
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:o="http://omnifaces.org/ui">
<o:tagAttribute name="id" />
<h:inputText id="#{id}">
<ui:insert/>
</h:inputText>
</ui:composition>
I noticed, that the problem does not arise, as soon as I change inner.xhtml to use <h:outputText> instead of <h:inputText>. It also disappears, when I add a value-attribute to the <h:inputText>.
Is this a bug in OmniFaces, or am I doing something wrong?
(Update: I created an issue in the OmniFaces bugtracker.)
My environment
OmniFaces 2.6.8
Mojarra 2.2.15
Wildfly 10.1.0.Final
This was a bug in OmniFaces 2.6.8, which was fixed (but not mentioned in the changelog) in OmniFaces 2.6.9. Exchanging the dependency version of OmniFaces is enough to solve the described problem.
Update: Note, that there is also a related issue, which was fixed in 2.7.1.

How to use Material-UI in asp.net mvc project

Is there a way of using Material-UI without having to go through installing all of the dependencies using NodeJS. I would love to use this in an ASP.NET Project but dont know where to begin as per installing dependencies and all of that.
Technically using Material UI without any frontend infrastructure is possible, but it's not recommended.
If you really don't want to use npm and other JS build/bundling tools you can use the UMD distribution of Material UI.
The Getting started (#CDN) page should help.
In short, you can add React, Babel, and Material UI using plain old script tags in your HTML:
<head>
<script
src="https://unpkg.com/react#latest/umd/react.development.js"
crossorigin="anonymous"
></script>
<script src="https://unpkg.com/react-dom#latest/umd/react-dom.development.js"></script>
<script
src="https://unpkg.com/#mui/material#latest/umd/material-ui.development.js"
crossorigin="anonymous"
></script>
<script
src="https://unpkg.com/babel-standalone#latest/babel.min.js"
crossorigin="anonymous"
></script>
<!-- Fonts to support Material Design -->
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap"
/>
<!-- Icons to support Material Design -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
</head>
then write your JS in a <script type="text/babel"> tag:
<script type="text/babel">
const {
Button,
ThemeProvider,
createTheme
} = MaterialUI;
const theme = createTheme();
function App() {
return (
<Button>Hello, world</Button>
);
}
ReactDOM.render(
<ThemeProvider theme={theme}>
<App />
</ThemeProvider>,
document.querySelector('#root'),
);
</script>
<div id="root"></div>
See https://github.com/mui/material-ui/tree/master/examples/cdn for a working example.
This solution is great for prototyping, but not suitable for production apps. The primary reason for this is low performance. Browsers must download the whole library (including the parts you don't use in your application) and Babel must compile your React app on the fly.
A much better approach is to have an ASP.NET API application and a separate frontend application using React and Material UI that is built using JS tools.
it's very easy.. Follow the below steps.
Commit all the existing changes to your source control or backup existing code.
delete or comment twitter bootstrap bundles in bundle config.
using NPN .. install material design lite package.
add all the .css and .js references to bundles.
add new bundles you added to the layout page.
Remember to change all the class that uses twitter bootstrap to material design lite.
useful sources:
Learning Material Design
MDL Website

Mapping ui:field in GWT to generated code

I'm trying to get some automated UI testing going on a GWT application and I'm having trouble finding a way to track UI elements.
For example, I have the following:
<g:Button text="Submit" ui:field="submitButton" enabled="true" />
which generates:
<button class="gwt-Button" type="button">Submit</button>
Its a compiler error to set both ui:field and id (id is considered deprecated anyway) so the problem is that I have no easy way to select my submit button using something like selenium.
Is anyone aware of a way I can map the
ui:field="sumbitButton"
to the generated HTML?
After further investigation I've discovered that you can enable debugIds which are ment for testing purposes. If you add:
<inherits name="com.google.gwt.user.Debug"/>
to your *.gwt.xml file you can then set debugId on your ui elements as such:
<g:Button text="Submit" ui:field="submitButton" enabled="true" debugId="submitButton"/>
and also in the codebehind by using the ensure debug id method
submitButton.ensureDebugId("submitButton");