Problem in Edit Section

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/21/2012 6:36:49 AM
Gravatar
Total Posts 18

Problem in Edit Section

Hello joe,

I have seen mojoportal training videos and working on it same as you are telling in videos .uptil now everything is going good but when the edit section came all the design page of GuestBook disappear.

In training video for developer no -16 (Dev series 15 from Layout)you are saying styleshout -refresh so its not there ,instead of that what to use please tell me.

6/21/2012 11:23:27 AM
Gravatar
Total Posts 18439

Re: Problem in Edit Section

You can use any skin, it doesn't matter what skin you use. styleshout-refresh is an older skin but it is still available in the extraskins.zip available on our codeplex download page.

6/27/2012 1:59:13 AM
Gravatar
Total Posts 18

Re: Problem in Edit Section

This is my Edit page of GuestBook.  i want to know where the problem is?In video there is no feature Guid in this page so what to do with feature Guid?

using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Globalization;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using mojoPortal.Web;
using mojoPortal.Web.Framework;
using mojoPortal.Web.UI;
//using log4net;
using acme.Business;
using mojoPortal.Business.WebHelpers;
using Resources;

namespace acme.Web.UI
{

    public partial class GuestBookEditPage : mojoBasePage
    {
        private int pageId = -1;
        private int moduleId = -1;
        private Guid ItemGuid = Guid.Empty;
        private GuestBookRespository respositry = new GuestBookRespository();
        private GuestBook guestBook = null;
        // replace this with your own feature guid or make a static property on one of your business objects
        // like MyFeature.FeatureGuid, then you can use that instead of this variable
        private Guid featureGuid = Guid.Empty;

        protected void Page_Load(object sender, EventArgs e)
        {
            LoadParams();

            if (!UserCanEditModule(moduleId, featureGuid))
            {
                SiteUtils.RedirectToAccessDeniedPage(this);
                return;
            }

            LoadSettings();
            if (guestBook == null)
            {

                SiteUtils.RedirectToAccessDeniedPage();
                return;
            }
            PopulateLabels();
            PopulateControls();

        }

        private void PopulateControls()
        {
           
                if (guestBook == null) { return; }
                txtEmailAddress.Text =guestBook.EmailAddress;
                txtLocation.Text = guestBook.Location;
                txtName.Text = guestBook.Name;
                txtWebsiteUrl.Text = guestBook.WebSiteUrl;
                edComment.Text = guestBook.Comment;

            }

            void btnSave_Click(object sender, EventArgs e)
        {
            if (guestBook == null) { return; }
         
            guestBook.Name = txtName.Text;
            guestBook.EmailAddress = txtEmailAddress.Text;
            guestBook.Location = txtLocation.Text;
            guestBook.WebSiteUrl = txtWebsiteUrl.Text;
            guestBook.Comment = edComment.Text;

            respositry.Save(guestBook);
            WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
        }

        void btnDelete_Click(object sender, EventArgs e)
        {


            if (guestBook == null) { return; }
            WebUtils.SetupRedirect(this, SiteUtils.GetCurrentPageUrl());
        }

        private void PopulateLabels()
        {
            btnSave.Text = GuestBookResources.SaveButton;
            btnDelete.Text = GuestBookResources.DeleteButton;
            UIHelper.AddConfirmationDialog(btnDelete, GuestBookResources.DeleteConfirmationWarning);
        }

        private void LoadSettings()
        {
            edComment.WebEditor.ToolBar = mojoPortal.Web.Editor.ToolBar.AnonymousUser;
            edComment.WebEditor.Height = Unit.Pixel(250);
            edComment.WebEditor.Width = Unit.Pixel(400);
            guestBook = respositry.Fetch(ItemGuid);

            if (guestBook != null)
            {
                if (guestBook.ModuleId != moduleId)
                {
                    guestBook = null;
                }
            }

        }

        private void LoadParams()
        {
            pageId = WebUtils.ParseInt32FromQueryString("pageid", pageId);
            moduleId = WebUtils.ParseInt32FromQueryString("mid", moduleId);
              ItemGuid = WebUtils.ParseGuidFromQueryString("item", ItemGuid);
        }


        #region OnInit

        override protected void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.Load += new EventHandler(this.Page_Load);


        }

        #endregion
    }
}

6/27/2012 4:50:24 AM
Gravatar
Total Posts 18

Re: Problem in Edit Section

I get the Solution.Thanks for your help.

You must sign in to post in the forums. This thread is closed to new posts.