t5components - Window

View: New views
9 Messages — Rating Filter:   Alert me  

t5components - Window

by Petros Petrou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to use the Window component as demonstrated here http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to work.
Does anyone have a code example I could use ? Is it possible to download the source code for the demo ?

Furthermore, I added this dependency to my pom.xml and it fails to download. Can I manually download it from anywhere ?

<dependency>
      <groupId>org.apache.tapestry</groupId>
      <artifactId>t5c-demo</artifactId>
      <version>0.5.13</version>
</dependency>

Petros

Re: t5components - Window

by Martijn Brinkers (List)-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Demo code can be found here:

http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/

Martijn

On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:

> I am trying to use the Window component as demonstrated here
> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to work.
> Does anyone have a code example I could use ? Is it possible to download the
> source code for the demo ?
>
> Furthermore, I added this dependency to my pom.xml and it fails to download.
> Can I manually download it from anywhere ?
>
> <dependency>
>       <groupId>org.apache.tapestry</groupId>
>       <artifactId>t5c-demo</artifactId>
>       <version>0.5.13</version>
> </dependency>
>
> Petros


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: t5components - Window

by Petros Petrou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The demo source code uses this code in the WindowPage.tml

    function showWindow2()
    {
        ${window2.componentResources.id}.setTitle("This is Window 2")
        ${window2.componentResources.id}.setHTMLContent("... here come some senseless content ...")
        ${window2.componentResources.id}.showCenter()
    }


Is there anyway we can do the above, but within the WindowPage.java ?
I want to force a modal pop up window components to appear when an ActionLink is clicked by adding some code in my method

    @OnEvent(value = "action", component = "openWindowActionLink")
    Object onActionFromOpenWindowActionLink(){}


Is this possible ?

Petros


Martijn Brinkers (List)-2 wrote:
Demo code can be found here:

http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/

Martijn

On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> I am trying to use the Window component as demonstrated here
> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to work.
> Does anyone have a code example I could use ? Is it possible to download the
> source code for the demo ?
>
> Furthermore, I added this dependency to my pom.xml and it fails to download.
> Can I manually download it from anywhere ?
>
> <dependency>
>       <groupId>org.apache.tapestry</groupId>
>       <artifactId>t5c-demo</artifactId>
>       <version>0.5.13</version>
> </dependency>
>
> Petros


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

Re: t5components - Window

by Sven Homburg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

extends the window class, its a simple overideable component class

2008/7/18 Petros Petrou <petros@...>:

>
> The demo source code uses this code in the WindowPage.tml
>
>    function showWindow2()
>    {
>        ${window2.componentResources.id}.setTitle("This is Window 2")
>        ${window2.componentResources.id}.setHTMLContent("... here come some
> senseless content ...")
>        ${window2.componentResources.id}.showCenter()
>    }
>
>
> Is there anyway we can do the above, but within the WindowPage.java ?
> I want to force a modal pop up window components to appear when an
> ActionLink is clicked by adding some code in my method
>
>    @OnEvent(value = "action", component = "openWindowActionLink")
>    Object onActionFromOpenWindowActionLink(){}
>
>
> Is this possible ?
>
> Petros
>
>
>
> Martijn Brinkers (List)-2 wrote:
> >
> > Demo code can be found here:
> >
> >
> http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/
> >
> > Martijn
> >
> > On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> >> I am trying to use the Window component as demonstrated here
> >> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to
> >> work.
> >> Does anyone have a code example I could use ? Is it possible to download
> >> the
> >> source code for the demo ?
> >>
> >> Furthermore, I added this dependency to my pom.xml and it fails to
> >> download.
> >> Can I manually download it from anywhere ?
> >>
> >> <dependency>
> >>       <groupId>org.apache.tapestry</groupId>
> >>       <artifactId>t5c-demo</artifactId>
> >>       <version>0.5.13</version>
> >> </dependency>
> >>
> >> Petros
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@...
> > For additional commands, e-mail: users-help@...
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5components---Window-tp18087605p18530717.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com
best regards
Sven

Re: t5components - Window

by Petros Petrou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sven,

I tried to extend the GoogleWindow component from the demo and I added the following method
   
public void show()
{
getPageRenderSupport().addScript("%s.show%s(%s);", getClientId(), isCenter() ? "Center" : "", isModal());
}

I am calling this method from an ActionLink method that uses this component and I am trying to use it as a confirmation dialog box but I am getting this exception
No object of type org.apache.tapestry5.RenderSupport is available from the Environment. Available types are org.apache.tapestry5.services.ComponentEventResultProcessor.

Any ideas ?

Petros


Sven Homburg wrote:
extends the window class, its a simple overideable component class

2008/7/18 Petros Petrou <petros@cypoz.com>:

>
> The demo source code uses this code in the WindowPage.tml
>
>    function showWindow2()
>    {
>        ${window2.componentResources.id}.setTitle("This is Window 2")
>        ${window2.componentResources.id}.setHTMLContent("... here come some
> senseless content ...")
>        ${window2.componentResources.id}.showCenter()
>    }
>
>
> Is there anyway we can do the above, but within the WindowPage.java ?
> I want to force a modal pop up window components to appear when an
> ActionLink is clicked by adding some code in my method
>
>    @OnEvent(value = "action", component = "openWindowActionLink")
>    Object onActionFromOpenWindowActionLink(){}
>
>
> Is this possible ?
>
> Petros
>
>
>
> Martijn Brinkers (List)-2 wrote:
> >
> > Demo code can be found here:
> >
> >
> http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/
> >
> > Martijn
> >
> > On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> >> I am trying to use the Window component as demonstrated here
> >> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to
> >> work.
> >> Does anyone have a code example I could use ? Is it possible to download
> >> the
> >> source code for the demo ?
> >>
> >> Furthermore, I added this dependency to my pom.xml and it fails to
> >> download.
> >> Can I manually download it from anywhere ?
> >>
> >> <dependency>
> >>       <groupId>org.apache.tapestry</groupId>
> >>       <artifactId>t5c-demo</artifactId>
> >>       <version>0.5.13</version>
> >> </dependency>
> >>
> >> Petros
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5components---Window-tp18087605p18530717.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


-----
best regards
Sven

Re: t5components - Window

by Sven Homburg :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

try to add the RenderSupport to your own class

@Environmental
private RenderSupport renderSupport;

public void show()
{
  renderSupport.addScript("%s.show%s(%s);", getClientId(), isCenter() ?
"Center" : "", isModal());
}

i hope its helps you

2008/7/22 Petros Petrou <petros@...>:

>
> Hi Sven,
>
> I tried to extend the GoogleWindow component from the demo and I added the
> following method
>
> public void show()
> {
> getPageRenderSupport().addScript("%s.show%s(%s);", getClientId(),
> isCenter()
> ? "Center" : "", isModal());
> }
>
> I am calling this method from an ActionLink method that uses this component
> and I am trying to use it as a confirmation dialog box but I am getting
> this
> exception
> No object of type org.apache.tapestry5.RenderSupport is available from the
> Environment. Available types are
> org.apache.tapestry5.services.ComponentEventResultProcessor.
>
> Any ideas ?
>
> Petros
>
>
>
> Sven Homburg wrote:
> >
> > extends the window class, its a simple overideable component class
> >
> > 2008/7/18 Petros Petrou <petros@...>:
> >
> >>
> >> The demo source code uses this code in the WindowPage.tml
> >>
> >>    function showWindow2()
> >>    {
> >>        ${window2.componentResources.id}.setTitle("This is Window 2")
> >>        ${window2.componentResources.id}.setHTMLContent("... here come
> >> some
> >> senseless content ...")
> >>        ${window2.componentResources.id}.showCenter()
> >>    }
> >>
> >>
> >> Is there anyway we can do the above, but within the WindowPage.java ?
> >> I want to force a modal pop up window components to appear when an
> >> ActionLink is clicked by adding some code in my method
> >>
> >>    @OnEvent(value = "action", component = "openWindowActionLink")
> >>    Object onActionFromOpenWindowActionLink(){}
> >>
> >>
> >> Is this possible ?
> >>
> >> Petros
> >>
> >>
> >>
> >> Martijn Brinkers (List)-2 wrote:
> >> >
> >> > Demo code can be found here:
> >> >
> >> >
> >>
> http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/
> >> >
> >> > Martijn
> >> >
> >> > On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> >> >> I am trying to use the Window component as demonstrated here
> >> >> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to
> >> >> work.
> >> >> Does anyone have a code example I could use ? Is it possible to
> >> download
> >> >> the
> >> >> source code for the demo ?
> >> >>
> >> >> Furthermore, I added this dependency to my pom.xml and it fails to
> >> >> download.
> >> >> Can I manually download it from anywhere ?
> >> >>
> >> >> <dependency>
> >> >>       <groupId>org.apache.tapestry</groupId>
> >> >>       <artifactId>t5c-demo</artifactId>
> >> >>       <version>0.5.13</version>
> >> >> </dependency>
> >> >>
> >> >> Petros
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@...
> >> > For additional commands, e-mail: users-help@...
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/t5components---Window-tp18087605p18530717.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@...
> >> For additional commands, e-mail: users-help@...
> >>
> >>
> >
> >
> > --
> > with regards
> > Sven Homburg
> > http://tapestry5-components.googlecode.com
> > http://chenillekit.googlecode.com
> >
> >
> > -----
> > best regards
> > Sven
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5components---Window-tp18087605p18585022.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com
best regards
Sven

Re: t5components - Window

by Petros Petrou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sven,

I had already tried this and is the same problem. However, I just realized that I am getting this exception whenever I use @Environment even without using the Window component. I don't know why. I'll post another message specific to that problem.

Thanks,
Petros



Sven Homburg wrote:
try to add the RenderSupport to your own class

@Environmental
private RenderSupport renderSupport;

public void show()
{
  renderSupport.addScript("%s.show%s(%s);", getClientId(), isCenter() ?
"Center" : "", isModal());
}

i hope its helps you

2008/7/22 Petros Petrou <petros@cypoz.com>:

>
> Hi Sven,
>
> I tried to extend the GoogleWindow component from the demo and I added the
> following method
>
> public void show()
> {
> getPageRenderSupport().addScript("%s.show%s(%s);", getClientId(),
> isCenter()
> ? "Center" : "", isModal());
> }
>
> I am calling this method from an ActionLink method that uses this component
> and I am trying to use it as a confirmation dialog box but I am getting
> this
> exception
> No object of type org.apache.tapestry5.RenderSupport is available from the
> Environment. Available types are
> org.apache.tapestry5.services.ComponentEventResultProcessor.
>
> Any ideas ?
>
> Petros
>
>
>
> Sven Homburg wrote:
> >
> > extends the window class, its a simple overideable component class
> >
> > 2008/7/18 Petros Petrou <petros@cypoz.com>:
> >
> >>
> >> The demo source code uses this code in the WindowPage.tml
> >>
> >>    function showWindow2()
> >>    {
> >>        ${window2.componentResources.id}.setTitle("This is Window 2")
> >>        ${window2.componentResources.id}.setHTMLContent("... here come
> >> some
> >> senseless content ...")
> >>        ${window2.componentResources.id}.showCenter()
> >>    }
> >>
> >>
> >> Is there anyway we can do the above, but within the WindowPage.java ?
> >> I want to force a modal pop up window components to appear when an
> >> ActionLink is clicked by adding some code in my method
> >>
> >>    @OnEvent(value = "action", component = "openWindowActionLink")
> >>    Object onActionFromOpenWindowActionLink(){}
> >>
> >>
> >> Is this possible ?
> >>
> >> Petros
> >>
> >>
> >>
> >> Martijn Brinkers (List)-2 wrote:
> >> >
> >> > Demo code can be found here:
> >> >
> >> >
> >>
> http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/
> >> >
> >> > Martijn
> >> >
> >> > On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> >> >> I am trying to use the Window component as demonstrated here
> >> >> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to
> >> >> work.
> >> >> Does anyone have a code example I could use ? Is it possible to
> >> download
> >> >> the
> >> >> source code for the demo ?
> >> >>
> >> >> Furthermore, I added this dependency to my pom.xml and it fails to
> >> >> download.
> >> >> Can I manually download it from anywhere ?
> >> >>
> >> >> <dependency>
> >> >>       <groupId>org.apache.tapestry</groupId>
> >> >>       <artifactId>t5c-demo</artifactId>
> >> >>       <version>0.5.13</version>
> >> >> </dependency>
> >> >>
> >> >> Petros
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> > For additional commands, e-mail: users-help@tapestry.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/t5components---Window-tp18087605p18530717.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > with regards
> > Sven Homburg
> > http://tapestry5-components.googlecode.com
> > http://chenillekit.googlecode.com
> >
> >
> > -----
> > best regards
> > Sven
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5components---Window-tp18087605p18585022.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


-----
best regards
Sven

Re: t5components - Window

by jgn :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maybe this would work:

You can use the t5componens/OnEvent mixin on a button or, maybe, on an action link (I only have test this component on a textfield with the blur event). Then, this mixin has a parameter called: onCompleteCallback, which will call a javascript function when the ajax response finish. So, in this javascript function you could open the window.

I mean, this would work if the idea is just to call a function on the server side before open the window.

Hope this helps.

Re: t5components - Window

by 9902468 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Might be because environmentals can't be used during Ajax requests, at least I have banged my head to wall many times because of that.

If Sven has plenty of time in his hands could I request a window that takes it's contents as a block? =)

 - 99


Hi Sven,

I had already tried this and is the same problem. However, I just realized that I am getting this exception whenever I use @Environment even without using the Window component. I don't know why. I'll post another message specific to that problem.

Thanks,
Petros



Sven Homburg wrote:
try to add the RenderSupport to your own class

@Environmental
private RenderSupport renderSupport;

public void show()
{
  renderSupport.addScript("%s.show%s(%s);", getClientId(), isCenter() ?
"Center" : "", isModal());
}

i hope its helps you

2008/7/22 Petros Petrou <petros@cypoz.com>:

>
> Hi Sven,
>
> I tried to extend the GoogleWindow component from the demo and I added the
> following method
>
> public void show()
> {
> getPageRenderSupport().addScript("%s.show%s(%s);", getClientId(),
> isCenter()
> ? "Center" : "", isModal());
> }
>
> I am calling this method from an ActionLink method that uses this component
> and I am trying to use it as a confirmation dialog box but I am getting
> this
> exception
> No object of type org.apache.tapestry5.RenderSupport is available from the
> Environment. Available types are
> org.apache.tapestry5.services.ComponentEventResultProcessor.
>
> Any ideas ?
>
> Petros
>
>
>
> Sven Homburg wrote:
> >
> > extends the window class, its a simple overideable component class
> >
> > 2008/7/18 Petros Petrou <petros@cypoz.com>:
> >
> >>
> >> The demo source code uses this code in the WindowPage.tml
> >>
> >>    function showWindow2()
> >>    {
> >>        ${window2.componentResources.id}.setTitle("This is Window 2")
> >>        ${window2.componentResources.id}.setHTMLContent("... here come
> >> some
> >> senseless content ...")
> >>        ${window2.componentResources.id}.showCenter()
> >>    }
> >>
> >>
> >> Is there anyway we can do the above, but within the WindowPage.java ?
> >> I want to force a modal pop up window components to appear when an
> >> ActionLink is clicked by adding some code in my method
> >>
> >>    @OnEvent(value = "action", component = "openWindowActionLink")
> >>    Object onActionFromOpenWindowActionLink(){}
> >>
> >>
> >> Is this possible ?
> >>
> >> Petros
> >>
> >>
> >>
> >> Martijn Brinkers (List)-2 wrote:
> >> >
> >> > Demo code can be found here:
> >> >
> >> >
> >>
> http://87.193.218.134:8080/t5components/maven-repository/org/apache/tapestry/t5c-demo/0.5.13/
> >> >
> >> > Martijn
> >> >
> >> > On Tue, 2008-06-24 at 02:48 -0700, Petros Petrou wrote:
> >> >> I am trying to use the Window component as demonstrated here
> >> >> http://87.193.218.134:8080/t5c-demo/windowpage but I can't get it to
> >> >> work.
> >> >> Does anyone have a code example I could use ? Is it possible to
> >> download
> >> >> the
> >> >> source code for the demo ?
> >> >>
> >> >> Furthermore, I added this dependency to my pom.xml and it fails to
> >> >> download.
> >> >> Can I manually download it from anywhere ?
> >> >>
> >> >> <dependency>
> >> >>       <groupId>org.apache.tapestry</groupId>
> >> >>       <artifactId>t5c-demo</artifactId>
> >> >>       <version>0.5.13</version>
> >> >> </dependency>
> >> >>
> >> >> Petros
> >> >
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> > For additional commands, e-mail: users-help@tapestry.apache.org
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/t5components---Window-tp18087605p18530717.html
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > with regards
> > Sven Homburg
> > http://tapestry5-components.googlecode.com
> > http://chenillekit.googlecode.com
> >
> >
> > -----
> > best regards
> > Sven
> >
>
> --
> View this message in context:
> http://www.nabble.com/t5components---Window-tp18087605p18585022.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--
with regards
Sven Homburg
http://tapestry5-components.googlecode.com
http://chenillekit.googlecode.com


-----
best regards
Sven