Forum

HomeHomeCoreCoreGeneralGeneralCreating installable Module From OWS ConfigurationCreating installable Module From OWS Configuration
Previous
 
Next
New Post
6/6/2014 12:44 AM
 

Has someone a working example how to do that or can explain?

 

http://www.openwebstudio.com/topic/Creating_A_PA_Module_From_OWS_Configuration.aspx

In the above thread, i'am missing some info.

 

I can build the module and use a configuration ID like so:

 

<%@ Control Language="vb" AutoEventWireup="false" Inherits="r2i.OWS.Wrapper.DNN.Module" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register Assembly="r2i.OWS.Wrapper.DotNetNuke" Namespace="r2i.OWS.Wrapper.DNN" TagPrefix="cc1" %>

<cc1:OpenControl id="ows" ConfigurationID="12191580-9578-5a83-6be1-b133324625c6" runat="server">
</cc1:OpenControl>

 

But i hope there is another way.

I need that for this OpenSource project

https://github.com/MattOpen/RSEHtmlMo...

 

every support is appreciated

thanks, richard

New Post
6/6/2014 5:01 AM
 

There is a similar approach to doing this, but allowing you to use the resource file to store the configuration rather than rely on the database for the configuration. Obviously the Wiki article mentions this, but Paul linked all the content he created here from his Advologix domain, and the images and downloads appear to be no longer available :( In any case,  instead of providing the "ConfigurationID" attribute for the OpenControl, you need to provide "resourcekey". In your ascx file it would look something like this:

<cc1:OpenControl id="ows" resourcekey="Module.Text" runat="server">
</cc1:OpenControl>

You would need to include your resx file for the ascx file using the standard logic (same file name including .ascx with .resx tacked at the end).  


Using an resx editor (preferably) you can set up the configuration as needed. I recommend using the resx editor from here (http://sourceforge.net/projects/resx/...) rather than the Visual Studio version. Within the older Visual Studio releases there was a character limit imposed by the editor. Within the resx, you need to add the resource key matching the one you have identified above. The name of the data resource will match the resourcekey. You simply export the configuration from within the OWS Administration Inteface, copy the configuration and paste it into the new resource key. Within the resx xml you will have a block which looks something like this:


<data name="Module.Text" xml:space="preserve">
    <value>{"Name":"OWS.Sample","ConfigurationID":"77131291-9083-6cee-92b9-8627e6ccb3b6",.........</value>
</data>


It is important to note that you can also just use a text editor for this purpose, however - you need to encode all non valid XML characters within the configuration after exporting it otherwise it will break the resource file. This is why the resource editor is recommended.





Kevin M Schreiner
Open Web Studio
PayPal - The safer, easier way to pay online!
New Post
6/6/2014 8:45 AM
 

thank you for your response.

got it :)

 

thank you, richard

New Post
6/8/2014 4:16 AM
 

is that possible too, to use a second configuration and load it the same way? Maybe like so:

 

cc1:OpenControl id="ows" resourcekey="Module.Text" runat="server"></cc1:OpenControl>
cc1:OpenControl id="ows1" resourcekey="RSEHtmlModuleMaster" runat="server"></cc1:OpenControl>

 

and create a second string in the resx file like so:


    {"Name":"RSEHtmlModuleMaster","recordsPerPage":"0","enableAlphaFilter":"false","enablePageSelection":"false","enable....."}

 

and then use it with a goto ?

It works for me when the second configuration is installed in ows

 

I#ve tried it and get the following error:

"The file '/de-de/IM.aspx' does not exist."
 

so i hope, it's only a syntax problem.

Greetings, richard

New Post
6/9/2014 5:31 AM
 
Hmm. Good questions! I'm actually not entirely certain but will look into the code to determine what would need to happen for that to work as anticipated.

Kevin M Schreiner
Open Web Studio
PayPal - The safer, easier way to pay online!
Previous
 
Next
HomeHomeCoreCoreGeneralGeneralCreating installable Module From OWS ConfigurationCreating installable Module From OWS Configuration


 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seattle, WA • info@openwebstudio.com

Bookmark & Share Bookmark and Share