Discuss anything related to web development but no technical support questions


Post by mfrancia »

hi mats

i was trying to implement the editor, i take the example (http://ext-scheduler.com/examples/event ... ditor.html) and customize the plugin, and i add this jsonstore

var hol = new Ext.data.JsonStore(
{
api: {
read: '../webservice/WSBaseScheduler.asmx/GetHolidays'
},
root: 'd.data',
autoLoad: true,
idProperty: 'HolidayId',
sortInfo: { field: 'HolidayId', direction: "ASC" },

fields: [
{ name: 'HolidayId', type: 'int' },
{ name: 'DayID', type: 'int' },
{ name: 'CountryCode', type: 'string' },
{ name: 'HolidayDay', type: 'Date', dateFormat: 'M$' }
]
});
and give this error: System.InvalidOperationException: There was an error generating the XML document. ---> System.InvalidOperationException: <>f__AnonymousType0`1[Terremark.Common.Scheduler.Holiday[]] cannot be serialized because it does not have a parameterless constructor.
also made get not post
Get:https://localhost/OssToolSet/webservice/ ... 1393575872

but the same jsonsotre work ok in another page the diferrence is that in this page i use schedulerpanel (i post a demo of this)

so i dont understand whats happened

any idea?

thanks

Post by mfrancia »

hi

i found the problem i use sch.override.js when i comment the web service works, so what version of overrides could i use?

thanks

Post by mats »

What did you comment out in sch-overrides.js?

Post by mfrancia »

ok well

first i comment statement in my page the script tag
<%-- <script src="../scripts/sch.overrides.js" type="text/javascript" ></script>--%>

but now i change this
<%-- <script type="text/javascript" src="../scripts/ext-base-debug.cache.js"></script>
<script type="text/javascript" src="../scripts/ext-all-debug.cache.js"></script>--%>
for this
<script type="text/javascript" src="https://extjs.cachefly.net/ext-3.1.1/ada ... "></script>
<script type="text/javascript" src="https://extjs.cachefly.net/ext-3.1.1/ext ... "></script>

and this is the error (i attached and image)
Attachments
error.PNG
error.PNG (22.73 KiB) Viewed 6324 times

Post by mats »

You'll have debug what's being sent to your server. Inspect the requests using Firebug

Post by mfrancia »

hi

i have this declarations in my page

<!--Ext lib and UX components-->
<script type="text/javascript" src="../scripts/ext-base-debug.cache.js"></script>
<script type="text/javascript" src="../scripts/ext-all-debug.cache.js"></script>


<!--Application includes-->
<script src="../scripts/Overrides.js" type="text/javascript" ></script>
<script src="../scripts/sch.lazyresizable.js" type="text/javascript" ></script>
<script src="../scripts/sch.columnfactory.js" type="text/javascript"></script>
<script src="../scripts/sch.schedulerview.js" type="text/javascript"></script>
<script src="../scripts/sch.schedulerpanel.js" type="text/javascript"></script>
<script src="../scripts/sch.editorschedulerpanel.js" type="text/javascript"></script>
<script src="../scripts/sch.viewbehaviour.base.js" type="text/javascript"></script>
<script src="../scripts/sch.viewbehaviour.hourview.js" type="text/javascript"></script>
<script src="../scripts/sch.viewbehaviour.dayview.js" type="text/javascript"></script>
<script src="../scripts/sch.viewbehaviour.weekview.js" type="text/javascript"></script>
<script src="../scripts/sch.plugins.dragdrop.js" type="text/javascript"></script>
<script src="../scripts/sch.plugins.resize.js" type="text/javascript"></script>
<script src="../scripts/sch.plugins.dragcreator.js" type="text/javascript"></script>
<script src="../scripts/sch.plugins.eventeditor.js" type="text/javascript"></script>
<script src="../scripts/sch.eventselectionmodel.js" type="text/javascript"></script>
<script type="text/javascript"
src="../scripts/Spinner.js"></script>

<script type="text/javascript"
src="../scripts/SpinnerField.js"></script>
<script type="text/javascript" src="../scripts/editor.js"></script>


and this is my firebug view

as you can see i replace the sch.override.js for Overrides.js and the post of the web service works, but the problem here is that the schedule dont work
Attachments
error1.PNG
error1.PNG (22.2 KiB) Viewed 6324 times

Post by mfrancia »

hi mats

ok i solve mi problem i call sch_all.js at the end, delete the sch.schedulerview.js declaration and change the sch.overrides.js for Overrides.js

i have a new requeriment of my user, i need a calendar popup, maybe place in the header to search for a specifc date in my schedule, so the user can point to a specifc day. is this possible.

thanks

Post by mats »

Please start new threads for new issues/questions :)

Post Reply