You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Muneer Malik <tu...@gmail.com> on 2011/09/08 23:53:52 UTC

MutableTilesContainer

Is there an example how to create a Mutable tiles Container?

I am trying to create a definition on a fly at run-time, Is there an example
how to do this?

In my web.xml I have;

<listener>

<listener-class>net.polymorphic.emr.common.listener.CustomTilesListener</listener-class>
</listener>
which is correctly loading all the tiles.xml

but I am confused how to go about creating tiles definition at run time? at
what point this code is rendered, do I need implement or extend any class?

help would be appreciated.

Thanks
Muneer


-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
HEY STOP you are opening too many threads!
Please ask one question per thread, I'm starting to get mad :-D

Thanks
Antonio

2011/9/10 Muneer Malik <tu...@gmail.com>

> I think if put the code for changing attributes in the viewPreparer - Is is
> too late since
> by this time Struts already know where it is going?
>
> I can see the attributeContext object correctly in viewPrepare
> implementation
> but cannot see via the container object.
>
> Your help would be appreciated.
>
> Thanks
>
>
> On Fri, Sep 9, 2011 at 4:52 PM, Muneer Malik <tu...@gmail.com> wrote:
>
>> also noticed in the
>>
>> public class MenuViewPreparer implements ViewPreparer{
>>
>> have a method:
>>
>> public void execute(TilesRequestContext tilesContext,AttributeContext
>> attributeContext) {
>>  log.info("Tiles Preparer called .......");
>>
>>
>>
>> in this I can see my tiles definition etc.
>>
>> is it ok to put the code for modifying the attributeContext in
>> MenuViewPreparer?
>>
>> Is there any other interface where I can get the attribute context?
>>
>> Thanks
>>
>>
>>
>> On Fri, Sep 9, 2011 at 4:09 PM, Muneer Malik <tu...@gmail.com> wrote:
>>
>>> For the following code:
>>>
>>> ServletContext servletContext = ServletActionContext.getServletContext();
>>> TilesContainer container = TilesAccess.getContainer(servletContext);
>>>  AttributeContext attributeContext =
>>> container.getAttributeContext(request,response);
>>>
>>>
>>> my attribute context is null,  I don't see any current tiles definitions
>>>
>>> would you know why?
>>>
>>> also at this time, viewPreparer has not been called but variable location
>>> has the correct tiles name.
>>>
>>> Thanks
>>>
>>> On Fri, Sep 9, 2011 at 2:41 PM, Muneer Malik <tu...@gmail.com> wrote:
>>>
>>>> ok - I was not sure if they were updated
>>>> since the webpages are not updated as well.
>>>>
>>>> ok - I will look at the java docs.
>>>>
>>>> I appreciate all your help here.
>>>>
>>>>  Thanking You,
>>>> Muneer
>>>>
>>>>
>>>> On Fri, Sep 9, 2011 at 2:27 PM, Antonio Petrelli <
>>>> antonio.petrelli@gmail.com> wrote:
>>>>
>>>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>>>
>>>>>> what is the difference between
>>>>>>
>>>>>> putAttribute and setTemplateAttribute?
>>>>>>
>>>>>
>>>>> Please, before asking such simple questions, read javadocs:
>>>>>
>>>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)
>>>>>
>>>>>
>>>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
>>>>> org.apache.tiles.Attribute)
>>>>>
>>>>> Antonio
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Confidentiality Notice
>>>> -------------------------------
>>>>
>>>>
>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>
>>>>
>>>> THANK YOU.
>>>>
>>>
>>>
>>>
>>> --
>>> Confidentiality Notice
>>> -------------------------------
>>>
>>>
>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>
>>>
>>> THANK YOU.
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
I think if put the code for changing attributes in the viewPreparer - Is is
too late since
by this time Struts already know where it is going?

I can see the attributeContext object correctly in viewPrepare
implementation
but cannot see via the container object.

Your help would be appreciated.

Thanks

On Fri, Sep 9, 2011 at 4:52 PM, Muneer Malik <tu...@gmail.com> wrote:

> also noticed in the
>
> public class MenuViewPreparer implements ViewPreparer{
>
> have a method:
>
> public void execute(TilesRequestContext tilesContext,AttributeContext
> attributeContext) {
>  log.info("Tiles Preparer called .......");
>
>
>
> in this I can see my tiles definition etc.
>
> is it ok to put the code for modifying the attributeContext in
> MenuViewPreparer?
>
> Is there any other interface where I can get the attribute context?
>
> Thanks
>
>
>
> On Fri, Sep 9, 2011 at 4:09 PM, Muneer Malik <tu...@gmail.com> wrote:
>
>> For the following code:
>>
>> ServletContext servletContext = ServletActionContext.getServletContext();
>> TilesContainer container = TilesAccess.getContainer(servletContext);
>>  AttributeContext attributeContext =
>> container.getAttributeContext(request,response);
>>
>>
>> my attribute context is null,  I don't see any current tiles definitions
>>
>> would you know why?
>>
>> also at this time, viewPreparer has not been called but variable location
>> has the correct tiles name.
>>
>> Thanks
>>
>> On Fri, Sep 9, 2011 at 2:41 PM, Muneer Malik <tu...@gmail.com> wrote:
>>
>>> ok - I was not sure if they were updated
>>> since the webpages are not updated as well.
>>>
>>> ok - I will look at the java docs.
>>>
>>> I appreciate all your help here.
>>>
>>>  Thanking You,
>>> Muneer
>>>
>>>
>>> On Fri, Sep 9, 2011 at 2:27 PM, Antonio Petrelli <
>>> antonio.petrelli@gmail.com> wrote:
>>>
>>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>>
>>>>> what is the difference between
>>>>>
>>>>> putAttribute and setTemplateAttribute?
>>>>>
>>>>
>>>> Please, before asking such simple questions, read javadocs:
>>>>
>>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)
>>>>
>>>>
>>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
>>>> org.apache.tiles.Attribute)
>>>>
>>>> Antonio
>>>>
>>>
>>>
>>>
>>> --
>>> Confidentiality Notice
>>> -------------------------------
>>>
>>>
>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>
>>>
>>> THANK YOU.
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
also noticed in the

public class MenuViewPreparer implements ViewPreparer{

have a method:

public void execute(TilesRequestContext tilesContext,AttributeContext
attributeContext) {
log.info("Tiles Preparer called .......");



in this I can see my tiles definition etc.

is it ok to put the code for modifying the attributeContext in
MenuViewPreparer?

Is there any other interface where I can get the attribute context?

Thanks



On Fri, Sep 9, 2011 at 4:09 PM, Muneer Malik <tu...@gmail.com> wrote:

> For the following code:
>
> ServletContext servletContext = ServletActionContext.getServletContext();
> TilesContainer container = TilesAccess.getContainer(servletContext);
>  AttributeContext attributeContext =
> container.getAttributeContext(request,response);
>
>
> my attribute context is null,  I don't see any current tiles definitions
>
> would you know why?
>
> also at this time, viewPreparer has not been called but variable location
> has the correct tiles name.
>
> Thanks
>
> On Fri, Sep 9, 2011 at 2:41 PM, Muneer Malik <tu...@gmail.com> wrote:
>
>> ok - I was not sure if they were updated
>> since the webpages are not updated as well.
>>
>> ok - I will look at the java docs.
>>
>> I appreciate all your help here.
>>
>>  Thanking You,
>> Muneer
>>
>>
>> On Fri, Sep 9, 2011 at 2:27 PM, Antonio Petrelli <
>> antonio.petrelli@gmail.com> wrote:
>>
>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>
>>>> what is the difference between
>>>>
>>>> putAttribute and setTemplateAttribute?
>>>>
>>>
>>> Please, before asking such simple questions, read javadocs:
>>>
>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)
>>>
>>>
>>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
>>> org.apache.tiles.Attribute)
>>>
>>> Antonio
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
For the following code:

ServletContext servletContext = ServletActionContext.getServletContext();
TilesContainer container = TilesAccess.getContainer(servletContext);
 AttributeContext attributeContext =
container.getAttributeContext(request,response);


my attribute context is null,  I don't see any current tiles definitions

would you know why?

also at this time, viewPreparer has not been called but variable location
has the correct tiles name.

Thanks

On Fri, Sep 9, 2011 at 2:41 PM, Muneer Malik <tu...@gmail.com> wrote:

> ok - I was not sure if they were updated
> since the webpages are not updated as well.
>
> ok - I will look at the java docs.
>
> I appreciate all your help here.
>
> Thanking You,
> Muneer
>
>
> On Fri, Sep 9, 2011 at 2:27 PM, Antonio Petrelli <
> antonio.petrelli@gmail.com> wrote:
>
>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>
>>> what is the difference between
>>>
>>> putAttribute and setTemplateAttribute?
>>>
>>
>> Please, before asking such simple questions, read javadocs:
>>
>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)
>>
>>
>> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
>> org.apache.tiles.Attribute)
>>
>> Antonio
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
ok - I was not sure if they were updated
since the webpages are not updated as well.

ok - I will look at the java docs.

I appreciate all your help here.

Thanking You,
Muneer

On Fri, Sep 9, 2011 at 2:27 PM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> what is the difference between
>>
>> putAttribute and setTemplateAttribute?
>>
>
> Please, before asking such simple questions, read javadocs:
>
> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)
>
>
> http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
> org.apache.tiles.Attribute)
>
> Antonio
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> what is the difference between
>
> putAttribute and setTemplateAttribute?
>

Please, before asking such simple questions, read javadocs:
http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#setTemplateAttribute(org.apache.tiles.Attribute)

http://tiles.apache.org/2.2/framework/apidocs/org/apache/tiles/BasicAttributeContext.html#putAttribute(java.lang.String,
org.apache.tiles.Attribute)

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
what is the difference between

putAttribute and setTemplateAttribute?

Thanks

On Fri, Sep 9, 2011 at 1:53 PM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> ok - thanks
>>
>> I had to extend the ServletDispatcherResult and everything seems to be
>> working including the MutableTiles Container
>>
>> now for the below code:
>>
>>
>> MutableTilesContainer container = TilesAccess.getContainer(
>>         request.getSession().getServletContext());
>> Definition definition = new Definition();
>> definition.setTemplate("/layouts/my_layout.jsp");
>> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
>> container.register(definition, request, response);
>>
>>
>> do I need the container.render as well,since I get a blank page for the above?
>>
>>
> You forgot to call "setName" with the name of the definition, after that,
> since you are using a Tiles result in Struts, be sure that the Tiles result
> has the same name as the definition you have set.
>
>
>
>> Also Can a MutabletilesContainer and
>>
>>
>> TilesContainer container = TilesAccess.getContainer(servletContext);
>>
>>
>> reside together?
>>
>>
> A MutableTilesContainer is a TilesContainer.
>
> Antonio
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> ok - thanks
>
> I had to extend the ServletDispatcherResult and everything seems to be
> working including the MutableTiles Container
>
> now for the below code:
>
>
> MutableTilesContainer container = TilesAccess.getContainer(
>         request.getSession().getServletContext());
> Definition definition = new Definition();
> definition.setTemplate("/layouts/my_layout.jsp");
> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
> container.register(definition, request, response);
>
>
> do I need the container.render as well,since I get a blank page for the above?
>
>
You forgot to call "setName" with the name of the definition, after that,
since you are using a Tiles result in Struts, be sure that the Tiles result
has the same name as the definition you have set.



> Also Can a MutabletilesContainer and
>
>
> TilesContainer container = TilesAccess.getContainer(servletContext);
>
>
> reside together?
>
>
A MutableTilesContainer is a TilesContainer.

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
ok - thanks

I had to extend the ServletDispatcherResult and everything seems to be
working including the MutableTiles Container

now for the below code:


MutableTilesContainer container = TilesAccess.getContainer(
        request.getSession().getServletContext());
Definition definition = new Definition();
definition.setTemplate("/layouts/my_layout.jsp");
definition.putAttribute("body", new Attribute("/tiles/body.jsp");
container.register(definition, request, response);


do I need the container.render as well,since I get a blank page for the above?



Also Can a MutabletilesContainer and


TilesContainer container = TilesAccess.getContainer(servletContext);


reside together?


Thanks



On Fri, Sep 9, 2011 at 1:47 PM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> I found out ..
>>
>> for :
>>
>> TilesAttributeContext attributeContext = container.startContext(request,
>>         response);
>>
>>
>> it is AttributeContext not TilesAttributeContext, believe this is incorrect on the webpage.
>>
>>
>> Did you see the screenshot? still researching why I would get a type mismatch?
>>
>>
> The docs seem to be outdated, however the AttributeContext class is the
> right substitute.
>
> Antonio
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> I found out ..
>
> for :
>
> TilesAttributeContext attributeContext = container.startContext(request,
>         response);
>
>
> it is AttributeContext not TilesAttributeContext, believe this is incorrect on the webpage.
>
>
> Did you see the screenshot? still researching why I would get a type mismatch?
>
>
The docs seem to be outdated, however the AttributeContext class is the
right substitute.

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
I found out ..

for :

TilesAttributeContext attributeContext = container.startContext(request,
        response);


it is AttributeContext not TilesAttributeContext, believe this is
incorrect on the webpage.


Did you see the screenshot? still researching why I would get a type mismatch?


Best,

Muneer



On Fri, Sep 9, 2011 at 1:14 PM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> The name is "/layouts/my_layout.jsp"
> About the rest, probably you have some compilation/runtime problem. You are
> not mixing Tiles versions, aren't you?
>
> Antonio
>
> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> I cannot resolve the following:
>>
>> TilesAttributeContext attributeContext = container.getAttributeContext(request,
>>         response);
>>
>>
>> it cannot find the TilesAttributeContext
>>
>>
>
>>

> from the tiles 2.2.2 (GA)
>>
>>
>> Thanks
>>
>>
>> On Fri, Sep 9, 2011 at 11:40 AM, Muneer Malik <tu...@gmail.com> wrote:
>>
>>> I am also getting the following error, please see attached image.
>>>
>>> can you please give some suggestion, it seems the method is deprecated.
>>>
>>>
>>> I also get the following error;
>>>
>>> for the below code;
>>> MutableTilesContainer container = (MutableTilesContainer)
>>> TilesAccess.getContainer(
>>>         request.getSession().getServletContext());
>>>  Definition definition = new Definition();
>>> definition.setTemplate("/layouts/my_layout.jsp");
>>>  definition.putAttribute("body", new Attribute("/tiles/body.jsp"));
>>> container.register(definition, request, response);
>>>
>>>
>>> java.lang.Error: Unresolved compilation problem:
>>> 	Type mismatch: cannot convert from TilesContainer to MutableTilesContainer
>>>
>>> 	net.polymorphic.emr.login.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:70)
>>> 	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>>> 	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>>> 	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
>>> 	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>>> 	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
>>>
>>>
>>> Help would be appreciated.
>>>
>>> Thanks
>>>
>>>
>>> On Fri, Sep 9, 2011 at 11:29 AM, Muneer Malik <tu...@gmail.com>wrote:
>>>
>>>> what is the name of the definition?
>>>>
>>>> in the below code:
>>>>
>>>> Definition mobile = new Definition();
>>>> mobile.setName("/layouts/my_layout.jsp");
>>>>  mobile.putAttribute("body", new Attribute("/tiles/body.jsp"));
>>>> container.register(mobile, request, response);
>>>>
>>>> the definition would be mobile, Is that correct?
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  On Fri, Sep 9, 2011 at 10:14 AM, Antonio Petrelli <
>>>> antonio.petrelli@gmail.com> wrote:
>>>>
>>>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>>>
>>>>>> it will overwrite the
>>>>>>
>>>>>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>>>>>> addHeparinMedication.tiles??
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>> No, it will overwrite the possible definition that has the same name of
>>>>> the created one.
>>>>> Probably what you want to accomplish is Struts-related, not Tiles'. For
>>>>> example, adding another result.
>>>>>
>>>>> Antonio
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Confidentiality Notice
>>>> -------------------------------
>>>>
>>>>
>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>
>>>>
>>>> THANK YOU.
>>>>
>>>
>>>
>>>
>>> --
>>> Confidentiality Notice
>>> -------------------------------
>>>
>>>
>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>
>>>
>>> THANK YOU.
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>


-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
The name is "/layouts/my_layout.jsp"
About the rest, probably you have some compilation/runtime problem. You are
not mixing Tiles versions, aren't you?

Antonio

2011/9/9 Muneer Malik <tu...@gmail.com>

> I cannot resolve the following:
>
> TilesAttributeContext attributeContext = container.getAttributeContext(request,
>         response);
>
>
> it cannot find the TilesAttributeContext
>
>

> from the tiles 2.2.2 (GA)
>
>
> Thanks
>
>
> On Fri, Sep 9, 2011 at 11:40 AM, Muneer Malik <tu...@gmail.com> wrote:
>
>> I am also getting the following error, please see attached image.
>>
>> can you please give some suggestion, it seems the method is deprecated.
>>
>>
>> I also get the following error;
>>
>> for the below code;
>> MutableTilesContainer container = (MutableTilesContainer)
>> TilesAccess.getContainer(
>>         request.getSession().getServletContext());
>>  Definition definition = new Definition();
>> definition.setTemplate("/layouts/my_layout.jsp");
>>  definition.putAttribute("body", new Attribute("/tiles/body.jsp"));
>> container.register(definition, request, response);
>>
>>
>> java.lang.Error: Unresolved compilation problem:
>> 	Type mismatch: cannot convert from TilesContainer to MutableTilesContainer
>>
>> 	net.polymorphic.emr.login.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:70)
>> 	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
>> 	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
>> 	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
>> 	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>> 	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
>>
>>
>> Help would be appreciated.
>>
>> Thanks
>>
>>
>> On Fri, Sep 9, 2011 at 11:29 AM, Muneer Malik <tu...@gmail.com> wrote:
>>
>>> what is the name of the definition?
>>>
>>> in the below code:
>>>
>>> Definition mobile = new Definition();
>>> mobile.setName("/layouts/my_layout.jsp");
>>>  mobile.putAttribute("body", new Attribute("/tiles/body.jsp"));
>>> container.register(mobile, request, response);
>>>
>>> the definition would be mobile, Is that correct?
>>>
>>>
>>> Thanks
>>>
>>>
>>>  On Fri, Sep 9, 2011 at 10:14 AM, Antonio Petrelli <
>>> antonio.petrelli@gmail.com> wrote:
>>>
>>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>>
>>>>> it will overwrite the
>>>>>
>>>>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>>>>> addHeparinMedication.tiles??
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>> No, it will overwrite the possible definition that has the same name of
>>>> the created one.
>>>> Probably what you want to accomplish is Struts-related, not Tiles'. For
>>>> example, adding another result.
>>>>
>>>> Antonio
>>>>
>>>
>>>
>>>
>>> --
>>> Confidentiality Notice
>>> -------------------------------
>>>
>>>
>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>
>>>
>>> THANK YOU.
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
I cannot resolve the following:

TilesAttributeContext attributeContext = container.getAttributeContext(request,
        response);


it cannot find the TilesAttributeContext

from the tiles 2.2.2 (GA)


Thanks


On Fri, Sep 9, 2011 at 11:40 AM, Muneer Malik <tu...@gmail.com> wrote:

> I am also getting the following error, please see attached image.
>
> can you please give some suggestion, it seems the method is deprecated.
>
>
> I also get the following error;
>
> for the below code;
> MutableTilesContainer container = (MutableTilesContainer)
> TilesAccess.getContainer(
>         request.getSession().getServletContext());
>  Definition definition = new Definition();
> definition.setTemplate("/layouts/my_layout.jsp");
>  definition.putAttribute("body", new Attribute("/tiles/body.jsp"));
> container.register(definition, request, response);
>
>
> java.lang.Error: Unresolved compilation problem:
> 	Type mismatch: cannot convert from TilesContainer to MutableTilesContainer
>
> 	net.polymorphic.emr.login.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:70)
> 	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
> 	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
> 	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
> 	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
> 	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
>
>
> Help would be appreciated.
>
> Thanks
>
>
> On Fri, Sep 9, 2011 at 11:29 AM, Muneer Malik <tu...@gmail.com> wrote:
>
>> what is the name of the definition?
>>
>> in the below code:
>>
>> Definition mobile = new Definition();
>> mobile.setName("/layouts/my_layout.jsp");
>>  mobile.putAttribute("body", new Attribute("/tiles/body.jsp"));
>> container.register(mobile, request, response);
>>
>> the definition would be mobile, Is that correct?
>>
>>
>> Thanks
>>
>>
>>  On Fri, Sep 9, 2011 at 10:14 AM, Antonio Petrelli <
>> antonio.petrelli@gmail.com> wrote:
>>
>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>
>>>> it will overwrite the
>>>>
>>>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>>>> addHeparinMedication.tiles??
>>>>
>>>> Thanks
>>>>
>>>>
>>> No, it will overwrite the possible definition that has the same name of
>>> the created one.
>>> Probably what you want to accomplish is Struts-related, not Tiles'. For
>>> example, adding another result.
>>>
>>> Antonio
>>>
>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
I am also getting the following error, please see attached image.

can you please give some suggestion, it seems the method is deprecated.


I also get the following error;

for the below code;
MutableTilesContainer container = (MutableTilesContainer)
TilesAccess.getContainer(
        request.getSession().getServletContext());
Definition definition = new Definition();
definition.setTemplate("/layouts/my_layout.jsp");
definition.putAttribute("body", new Attribute("/tiles/body.jsp"));
container.register(definition, request, response);


java.lang.Error: Unresolved compilation problem:
	Type mismatch: cannot convert from TilesContainer to MutableTilesContainer

	net.polymorphic.emr.login.AuthenticationInterceptor.intercept(AuthenticationInterceptor.java:70)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:498)
	org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
	org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)


Help would be appreciated.

Thanks

On Fri, Sep 9, 2011 at 11:29 AM, Muneer Malik <tu...@gmail.com> wrote:

> what is the name of the definition?
>
> in the below code:
>
> Definition mobile = new Definition();
> mobile.setName("/layouts/my_layout.jsp");
>  mobile.putAttribute("body", new Attribute("/tiles/body.jsp"));
> container.register(mobile, request, response);
>
> the definition would be mobile, Is that correct?
>
>
> Thanks
>
>
> On Fri, Sep 9, 2011 at 10:14 AM, Antonio Petrelli <
> antonio.petrelli@gmail.com> wrote:
>
>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>
>>> it will overwrite the
>>>
>>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>>> addHeparinMedication.tiles??
>>>
>>> Thanks
>>>
>>>
>> No, it will overwrite the possible definition that has the same name of
>> the created one.
>> Probably what you want to accomplish is Struts-related, not Tiles'. For
>> example, adding another result.
>>
>> Antonio
>>
>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
what is the name of the definition?

in the below code:

Definition mobile = new Definition();
mobile.setName("/layouts/my_layout.jsp");
mobile.putAttribute("body", new Attribute("/tiles/body.jsp"));
container.register(mobile, request, response);

the definition would be mobile, Is that correct?


Thanks


On Fri, Sep 9, 2011 at 10:14 AM, Antonio Petrelli <
antonio.petrelli@gmail.com> wrote:

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> it will overwrite the
>>
>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>> addHeparinMedication.tiles??
>>
>> Thanks
>>
>>
> No, it will overwrite the possible definition that has the same name of the
> created one.
> Probably what you want to accomplish is Struts-related, not Tiles'. For
> example, adding another result.
>
> Antonio
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> it will overwrite the
>
> <result type="tiles" name="input">addHeparinMedication.tiles</result>
> addHeparinMedication.tiles??
>
> Thanks
>
>
No, it will overwrite the possible definition that has the same name of the
created one.
Probably what you want to accomplish is Struts-related, not Tiles'. For
example, adding another result.

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
it will overwrite the

<result type="tiles" name="input">addHeparinMedication.tiles</result>
addHeparinMedication.tiles??

Thanks


On Fri, Sep 9, 2011 at 10:07 AM, Antonio Petrelli <
antonio.petrelli@gmail.com> wrote:

>
>
> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> For example at the end of a servlet call.
>> If you use a framework, then you can do it at the end of an
>> action/command/whatever, wherever you have access to the request/response
>> pair.
>>
>> Antonio
>>
>> For your above comment, I cannot put the code in the action since after
>> the action is completed
>> the Struts2 looks at the tiles destination and forwards the request.
>>
>> For example:
>> <action name="submitHeparinMedication"
>>  class="net.polymorphic.emr.heparinmedication.action.submitHeparinMedication">
>> <interceptor-ref name="patientProfileInterceptor"></interceptor-ref>
>>  <interceptor-ref name="secureStack"></interceptor-ref>
>> <result name="success" type="tiles">submitHeparinMedication.tiles</result>
>>  <result type="redirect" name="error">/welcome.action</result>
>> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>>  </action>
>>
>> so are you suggesting may be the code has to go somewhere in the struts2
>> tiles plugin?
>>
>
> No, I suggest to put that code at the end of your
> "SubmiteHeparinMedication" execution. The new definition will last for the
> entire request and then it is wiped.
>
> Antonio
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> For example at the end of a servlet call.
> If you use a framework, then you can do it at the end of an
> action/command/whatever, wherever you have access to the request/response
> pair.
>
> Antonio
>
> For your above comment, I cannot put the code in the action since after the
> action is completed
> the Struts2 looks at the tiles destination and forwards the request.
>
> For example:
> <action name="submitHeparinMedication"
>  class="net.polymorphic.emr.heparinmedication.action.submitHeparinMedication">
> <interceptor-ref name="patientProfileInterceptor"></interceptor-ref>
>  <interceptor-ref name="secureStack"></interceptor-ref>
> <result name="success" type="tiles">submitHeparinMedication.tiles</result>
>  <result type="redirect" name="error">/welcome.action</result>
> <result type="tiles" name="input">addHeparinMedication.tiles</result>
>  </action>
>
> so are you suggesting may be the code has to go somewhere in the struts2
> tiles plugin?
>

No, I suggest to put that code at the end of your "SubmiteHeparinMedication"
execution. The new definition will last for the entire request and then it
is wiped.

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
For example at the end of a servlet call.
If you use a framework, then you can do it at the end of an
action/command/whatever, wherever you have access to the request/response
pair.

Antonio

For your above comment, I cannot put the code in the action since after the
action is completed
the Struts2 looks at the tiles destination and forwards the request.

For example:
<action name="submitHeparinMedication"
 class="net.polymorphic.emr.heparinmedication.action.submitHeparinMedication">
<interceptor-ref name="patientProfileInterceptor"></interceptor-ref>
<interceptor-ref name="secureStack"></interceptor-ref>
<result name="success" type="tiles">submitHeparinMedication.tiles</result>
<result type="redirect" name="error">/welcome.action</result>
<result type="tiles" name="input">addHeparinMedication.tiles</result>
</action>

so are you suggesting may be the code has to go somewhere in the struts2
tiles plugin?

Thanks

On Fri, Sep 9, 2011 at 9:47 AM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>>  2011/9/9 Muneer Malik <tu...@gmail.com>
>>>
>>>> public class CustomTilesContainerFactory extends
>>>> BasicTilesContainerFactory {
>>>> ...
>>>>
>>>> do you want me to add the following in the above class;
>>>>
>>>> @Override121 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#121>     *protected* BasicTilesContainer instantiateContainer(122 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#122>             TilesApplicationContext applicationContext) {123 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#123>         *return* *new* CachingTilesContainer();124 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#124>     }
>>>>
>>>>
>>>>
> Exactly.
>
>
>>
>>>> and if I want to use Tiles API
>>>>
>>>> where that java code should go, in the same above class or a seperate class.
>>>>
>>>>
>>>> I see the link which you suggested:
>>>>
>>>>
>>>> MutableTilesContainer container = TilesAccess.getContainer(
>>>>         request.getSession().getServletContext());
>>>> Definition definition = new Definition();
>>>> definition.setTemplate("/layouts/my_layout.jsp");
>>>> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
>>>> container.register(definition, request, response);
>>>>
>>>>
>>>>
>>>> where the above code should go?
>>>>
>>>>
> For example at the end of a servlet call.
> If you use a framework, then you can do it at the end of an
> action/command/whatever, wherever you have access to the request/response
> pair.
>
> Antonio
>
>


-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/9 Muneer Malik <tu...@gmail.com>

> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>
>>> public class CustomTilesContainerFactory extends
>>> BasicTilesContainerFactory {
>>> ...
>>>
>>> do you want me to add the following in the above class;
>>>
>>> @Override121 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#121>     *protected* BasicTilesContainer instantiateContainer(122 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#122>             TilesApplicationContext applicationContext) {123 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#123>         *return* *new* CachingTilesContainer();124 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#124>     }
>>>
>>>
>>>
Exactly.


>
>>> and if I want to use Tiles API
>>>
>>> where that java code should go, in the same above class or a seperate class.
>>>
>>>
>>> I see the link which you suggested:
>>>
>>>
>>> MutableTilesContainer container = TilesAccess.getContainer(
>>>         request.getSession().getServletContext());
>>> Definition definition = new Definition();
>>> definition.setTemplate("/layouts/my_layout.jsp");
>>> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
>>> container.register(definition, request, response);
>>>
>>>
>>>
>>> where the above code should go?
>>>
>>>
For example at the end of a servlet call.
If you use a framework, then you can do it at the end of an
action/command/whatever, wherever you have access to the request/response
pair.

Antonio

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
I am not receiving emails on the tiles users email, please add my personal
email when replying.

tutti786@gmail.com

Thanks



On Fri, Sep 9, 2011 at 9:40 AM, Muneer Malik <tu...@gmail.com> wrote:

> sending it again
>
>
> On Fri, Sep 9, 2011 at 9:39 AM, Antonio Petrelli <
> antonio.petrelli@gmail.com> wrote:
>
>> I sent an email directly to use simply because you did not notice it.
>> Please continue the thread in the mailing list.
>>
>> Antonio
>>
>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>
>>> yeah - I did not see your earlier email.
>>>
>>> public class CustomTilesInitializer extends AbstractTilesInitializer {
>>>
>>>     /** {@inheritDoc} */
>>>     @Override
>>>     protected AbstractTilesContainerFactory createContainerFactory(
>>>             TilesApplicationContext context) {
>>>         return new CustomTilesContainerFactory();
>>>     }
>>> }
>>>
>>>
>>>
>>> public class CustomTilesContainerFactory extends
>>> BasicTilesContainerFactory {
>>>
>>>   /** {@inheritDoc} */
>>>
>>>
>>>     protected List<URL> getSourceURLs(TilesApplicationContext
>>> applicationContext,
>>>             TilesRequestContextFactory contextFactory) {
>>>         try {
>>>
>>>         List<URL> tilesUrls = new ArrayList<URL>();
>>>
>>>         System.out.println("*************Preparing to load tiles
>>> configuration*******************");
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-default.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-center-medication.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-heparin-medication.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-home-medication.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-patient.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-physician.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-standing.xml"));
>>>
>>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-workflow.xml"));
>>>
>>>             Iterator it = null;
>>>             it = tilesUrls.iterator();
>>>
>>>             while (it.hasNext()) {
>>>             URL url = (URL) it.next();
>>>             System.out.println(url.getPath());
>>>             }
>>>             System.out.println("***********Completed loading tiles
>>> configuration*****************");
>>>
>>>
>>>
>>>             return tilesUrls;
>>>
>>>
>>>         } catch (IOException e) {
>>>             throw new DefinitionsFactoryException(
>>>                     "Cannot load definition URLs", e);
>>>         }
>>>
>>>
>>> }
>>>
>>>
>>>
>>> do you want me to add the following in the above class;
>>>
>>> @Override121 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#121>     *protected* BasicTilesContainer instantiateContainer(122 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#122>             TilesApplicationContext applicationContext) {123 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#123>         *return* *new* CachingTilesContainer();124 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#124>     }
>>>
>>>
>>>
>>> and if I want to use Tiles API
>>>
>>> where that java code should go, in the same above class or a seperate class.
>>>
>>>
>>> I see the link which you suggested:
>>>
>>>
>>> MutableTilesContainer container = TilesAccess.getContainer(
>>>         request.getSession().getServletContext());
>>> Definition definition = new Definition();
>>> definition.setTemplate("/layouts/my_layout.jsp");
>>> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
>>> container.register(definition, request, response);
>>>
>>>
>>>
>>> where the above code should go?
>>>
>>>
>>> I am little confused .. Thanks
>>>
>>>
>>>
>>>
>>> On Fri, Sep 9, 2011 at 8:56 AM, Antonio Petrelli <
>>> antonio.petrelli@gmail.com> wrote:
>>>
>>>> Didn't you read my email?
>>>> http://tiles.markmail.org/message/rszguawulkm7ojfp
>>>> If not probably you're not correctly subscribed to the mailing list.
>>>>
>>>> Antonio
>>>>
>>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>>
>>>>> can someone help?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> On Thu, Sep 8, 2011 at 4:53 PM, Muneer Malik <tu...@gmail.com>wrote:
>>>>>
>>>>>> Is there an example how to create a Mutable tiles Container?
>>>>>>
>>>>>> I am trying to create a definition on a fly at run-time, Is there an
>>>>>> example how to do this?
>>>>>>
>>>>>> In my web.xml I have;
>>>>>>
>>>>>> <listener>
>>>>>>
>>>>>> <listener-class>net.polymorphic.emr.common.listener.CustomTilesListener</listener-class>
>>>>>>  </listener>
>>>>>> which is correctly loading all the tiles.xml
>>>>>>
>>>>>> but I am confused how to go about creating tiles definition at run
>>>>>> time? at what point this code is rendered, do I need implement or extend any
>>>>>> class?
>>>>>>
>>>>>> help would be appreciated.
>>>>>>
>>>>>> Thanks
>>>>>> Muneer
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Confidentiality Notice
>>>>>> -------------------------------
>>>>>>
>>>>>>
>>>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>>>
>>>>>>
>>>>>> THANK YOU.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Confidentiality Notice
>>>>> -------------------------------
>>>>>
>>>>>
>>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>>
>>>>>
>>>>> THANK YOU.
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Confidentiality Notice
>>> -------------------------------
>>>
>>>
>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>
>>>
>>> THANK YOU.
>>>
>>
>>
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
sending it again


On Fri, Sep 9, 2011 at 9:39 AM, Antonio Petrelli <antonio.petrelli@gmail.com
> wrote:

> I sent an email directly to use simply because you did not notice it.
> Please continue the thread in the mailing list.
>
> Antonio
>
> 2011/9/9 Muneer Malik <tu...@gmail.com>
>
>> yeah - I did not see your earlier email.
>>
>> public class CustomTilesInitializer extends AbstractTilesInitializer {
>>
>>     /** {@inheritDoc} */
>>     @Override
>>     protected AbstractTilesContainerFactory createContainerFactory(
>>             TilesApplicationContext context) {
>>         return new CustomTilesContainerFactory();
>>     }
>> }
>>
>>
>>
>> public class CustomTilesContainerFactory extends
>> BasicTilesContainerFactory {
>>
>>   /** {@inheritDoc} */
>>
>>
>>     protected List<URL> getSourceURLs(TilesApplicationContext
>> applicationContext,
>>             TilesRequestContextFactory contextFactory) {
>>         try {
>>
>>         List<URL> tilesUrls = new ArrayList<URL>();
>>
>>         System.out.println("*************Preparing to load tiles
>> configuration*******************");
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-default.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-center-medication.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-heparin-medication.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-home-medication.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-patient.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-physician.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-standing.xml"));
>>
>> tilesUrls.add(applicationContext.getResource("/WEB-INF/classes/tiles-default/tiles-workflow.xml"));
>>
>>             Iterator it = null;
>>             it = tilesUrls.iterator();
>>
>>             while (it.hasNext()) {
>>             URL url = (URL) it.next();
>>             System.out.println(url.getPath());
>>             }
>>             System.out.println("***********Completed loading tiles
>> configuration*****************");
>>
>>
>>
>>             return tilesUrls;
>>
>>
>>         } catch (IOException e) {
>>             throw new DefinitionsFactoryException(
>>                     "Cannot load definition URLs", e);
>>         }
>>
>>
>> }
>>
>>
>>
>> do you want me to add the following in the above class;
>>
>> @Override121 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#121>     *protected* BasicTilesContainer instantiateContainer(122 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#122>             TilesApplicationContext applicationContext) {123 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#123>         *return* *new* CachingTilesContainer();124 <http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#124>     }
>>
>>
>>
>> and if I want to use Tiles API
>>
>> where that java code should go, in the same above class or a seperate class.
>>
>>
>> I see the link which you suggested:
>>
>>
>> MutableTilesContainer container = TilesAccess.getContainer(
>>         request.getSession().getServletContext());
>> Definition definition = new Definition();
>> definition.setTemplate("/layouts/my_layout.jsp");
>> definition.putAttribute("body", new Attribute("/tiles/body.jsp");
>> container.register(definition, request, response);
>>
>>
>>
>> where the above code should go?
>>
>>
>> I am little confused .. Thanks
>>
>>
>>
>>
>> On Fri, Sep 9, 2011 at 8:56 AM, Antonio Petrelli <
>> antonio.petrelli@gmail.com> wrote:
>>
>>> Didn't you read my email?
>>> http://tiles.markmail.org/message/rszguawulkm7ojfp
>>> If not probably you're not correctly subscribed to the mailing list.
>>>
>>> Antonio
>>>
>>> 2011/9/9 Muneer Malik <tu...@gmail.com>
>>>
>>>> can someone help?
>>>>
>>>> Thanks
>>>>
>>>>
>>>> On Thu, Sep 8, 2011 at 4:53 PM, Muneer Malik <tu...@gmail.com>wrote:
>>>>
>>>>> Is there an example how to create a Mutable tiles Container?
>>>>>
>>>>> I am trying to create a definition on a fly at run-time, Is there an
>>>>> example how to do this?
>>>>>
>>>>> In my web.xml I have;
>>>>>
>>>>> <listener>
>>>>>
>>>>> <listener-class>net.polymorphic.emr.common.listener.CustomTilesListener</listener-class>
>>>>>  </listener>
>>>>> which is correctly loading all the tiles.xml
>>>>>
>>>>> but I am confused how to go about creating tiles definition at run
>>>>> time? at what point this code is rendered, do I need implement or extend any
>>>>> class?
>>>>>
>>>>> help would be appreciated.
>>>>>
>>>>> Thanks
>>>>> Muneer
>>>>>
>>>>>
>>>>> --
>>>>> Confidentiality Notice
>>>>> -------------------------------
>>>>>
>>>>>
>>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>>
>>>>>
>>>>> THANK YOU.
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Confidentiality Notice
>>>> -------------------------------
>>>>
>>>>
>>>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>>>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>>>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>>>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>>>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>>>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>>>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>>>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>>>
>>>>
>>>> THANK YOU.
>>>>
>>>
>>>
>>
>>
>> --
>> Confidentiality Notice
>> -------------------------------
>>
>>
>> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
>> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
>> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
>> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
>> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
>> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
>> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
>> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>>
>>
>> THANK YOU.
>>
>
>


-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Muneer Malik <tu...@gmail.com>.
can someone help?

Thanks

On Thu, Sep 8, 2011 at 4:53 PM, Muneer Malik <tu...@gmail.com> wrote:

> Is there an example how to create a Mutable tiles Container?
>
> I am trying to create a definition on a fly at run-time, Is there an
> example how to do this?
>
> In my web.xml I have;
>
> <listener>
>
> <listener-class>net.polymorphic.emr.common.listener.CustomTilesListener</listener-class>
>  </listener>
> which is correctly loading all the tiles.xml
>
> but I am confused how to go about creating tiles definition at run time? at
> what point this code is rendered, do I need implement or extend any class?
>
> help would be appreciated.
>
> Thanks
> Muneer
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>



-- 
Confidentiality Notice
-------------------------------


THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF YOU
HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.


THANK YOU.

Re: MutableTilesContainer

Posted by Antonio Petrelli <an...@gmail.com>.
2011/9/8 Muneer Malik <tu...@gmail.com>

> Is there an example how to create a Mutable tiles Container?
>
> I am trying to create a definition on a fly at run-time, Is there an
> example
> how to do this?
>
> In my web.xml I have;
>
> <listener>
>
>
> <listener-class>net.polymorphic.emr.common.listener.CustomTilesListener</listener-class>
> </listener>
> which is correctly loading all the tiles.xml
>
> but I am confused how to go about creating tiles definition at run time? at
> what point this code is rendered, do I need implement or extend any class?
>

In fact now I notice that the docs are a bit lacking about this aspect.
Anyway, you need eithet to use CompleteAutoloadTilesContainerFactory
(tiles-extras module) or create your own TilesContainerFactory that extends
BasicTilesContainerFactory and override "instantiateContainer" like here:
http://tiles.apache.org/2.2/framework/tiles-extras/xref/org/apache/tiles/extras/complete/CompleteAutoloadTilesContainerFactory.html#119
After that, you can create definitions either by using the API or using
taglibs. You can find the docs here:
http://tiles.apache.org/2.2/framework/tutorial/advanced/runtime.html

HTH
Antonio

>
> help would be appreciated.
>
> Thanks
> Muneer
>
>
> --
> Confidentiality Notice
> -------------------------------
>
>
> THIS INFORMATION IS INTENDED ONLY FOR THE USE OF THE ADDRESSEE AND MAY
> CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM
> DISCLOSURE UNDER APPLICABLE LAW.  IF YOU ARE NOT THE INTENDED RECIPIENT, OR
> THE EMPLOYEE OR AGENT RESPONSIBLE FOR DELIVERING THIS MESSAGE TO THE
> INTENDED RECIPIENT, YOU ARE HEREBY NOTIFIED THAT ANY DISSEMINATION,
> DISTRIBUTION OR COPYING OF THE COMMUNICATION IS STRICTLY PROHIBITED.  IF
> YOU
> HAVE RECEIVED THIS COMMUNICATION IN ERROR, PLEASE NOTIFY IMMEDIATELY AT
> tutti786@gmail.com OR BY TELEPHONE AT 817-458-1764.
>
>
> THANK YOU.
>