Custom module backend insert view doesn't show the toolbar - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

Custom module backend insert view doesn't show the toolbar

  • Custom module backend insert view doesn't show the toolbar
  • 250557_Module-Item-Add.jpg
    Hi,

    I have created a custom module called "Employees" based on the products module. I implemented everything in the same way as in the products module. However when I go to create a new item scree (attached), it is not showing the complete toolbar containing Publish, Draft buttons and More Action link is not poping up. When i enter this page I get two allerts with only "undifined" as the text. Can someone please tell me what I have done wrong?

    The sample module project is uploded to sendspace.com and can be downloaded using the link below.

    http://www.sendspace.com/file/vfxea4

    Thanks!
    Duneel
  • Hi Duneel,

    I got the same error as you. This bug is caused by workflows, the workflow is not found. You can see this using firefug and firecookie. I resolve this rebuilding my custom module because I don'k know where exactly to search the bug.

    Hope it helps you!

    Jocelyn
  • Hi Joeclyn,

    Could you please tell me the steps you followed to fix this workflow issue?

    Thanks!
    Duneel
  • Hi,

    I create my module again using one module which works. I don't know exactly what was my error, maybe in the name I gave to the workflow file or anywhere in the module where the workflow is references.

    I'm sorry not to tell more.

    How custom modules work are still strange to me regardings some features...

    Jocelyn
  • Thanks Joeclyn!

    Can Ivan or Radoslav please help us to get over this workflow issues we are facing with custom modules?

    Thanks,
    Duneel
  • 251310_EmployeesWorkflow.zip
    Hello Duneel,

    We examined the project you provided us and we found that your EmployeesWorkflow.xamlx is incorrect. There are a few unescaped quotes in the markup around the word ContentType:
    <p1:Variable x:TypeArguments="tsfa:IAnyDraftFacade" Default="[App.Prepare().SetContentProvider(providerName).WorkWith().AnyContentItem(contextBag("ContentType"), itemId)]" Name="masterFluent" />

    A xamlx file with fixed markup is attached.

    Greetings,
    Ivan Pelovski
    the Telerik team
  • Hi Ivan,

    Thanks for examining the module project and locating the error. Wow the module works like charm with the new workflow file. So then it was a problem with the workflow.

    Thanks,
    Duneel
  • Hi Ivan,

    Just a quick thing. I changed my custom module and got-rid-of the Title field. And now I cannot publish the new items. A validation with the URL field fails everytimes I hit on publish since now I dont have the Title input field on create new form. How do I fix this issue? Is it a must to have a Title field in every module?

    Thanks,
    Duneel
  • Hello Duneel,

    The problem you have described comes from the fact that the field control for UrlName is MirrorTextField which mirrored field is Title. Here is the code:
    var urlName = new MirrorTextFieldElement(moreOptionsSection.Fields)
        Title = Res.Get<EmployeesResources>().UrlName,
        ID = "urlName",
        MirroredControlId = titleField.ID,
        DataFieldName = "UrlName",
        DisplayMode = displayMode,
        RegularExpressionFilter = DefinitionsHelper.UrlRegularExpressionFilter,
        WrapperTag = HtmlTextWriterTag.Li,
        ReplaceWith = "-"
    ;
    To fix this you have to set the MirroredControlId property to the id of the field control you want to be used for generating the UrlName of the employee. Or you can use another field control for UrlName like TextField.

    Best wishes,
    Ivan Pelovski
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  • Thanks Ivan P! It resolved the my issue. I set the MirroredControlId to another field in my module.
  • Hi Ivan,

    Along the same lines, is there a way to use two fields and still automatically mirror for the URL field? For instance, we have a firstname and lastname field and it would be great if the url field was automatically created like firstname-lastname.
  • Hi Kmac,

    Our MirrorTextField supports only one mirrored field. You will have to implement a custom field if you want such functionality but it's not so difficult. Your field will have to listen for the JavaScript events of several fields and will need some sort of pattern or format for populating its value.

    All the best,
    Ivan Pelovski
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  • Thanks Ivan,

    Do you happen to have some sample code to get started? I'm not sure where to begin.
  • 299463_multi-mirror-field.zip
    Hi Kmac,

    Here is a sample you can use for your development. It is based on the MirrorTextField and overwrites several methods in order to support more than one mirrored text field.

    Best wishes,
    Ivan Pelovski
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>