You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Johannes Geppert <jo...@apache.org> on 2012/10/11 22:13:12 UTC

Twitter Bootstrap for the REST Showcase

Hi folk,

before giving some love to the Main Showcase I have made a test with the
REST Showcase and Twitter Bootstrap.
What do you think about the result?

http://struts.jgeppert.com/struts2-rest-showcase/
<http://struts.jgeppert.com/struts2-rest-showcase/>  

Johannes



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Frans Thamura <fr...@meruvian.org>.
yes, after click it ;)


F


On Fri, Oct 12, 2012 at 3:28 AM, Johannes Geppert <jo...@apache.org> wrote:
> No, this is the existing Struts2 REST Showcase for the Struts2 REST Plugin.
>
> Johannes
>
>
>
> -----
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710776.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
No, this is the existing Struts2 REST Showcase for the Struts2 REST Plugin.

Johannes



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710776.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Frans Thamura <fr...@meruvian.org>.
do u use our s2restplugins?

F


On Fri, Oct 12, 2012 at 3:13 AM, Johannes Geppert <jo...@apache.org> wrote:
> Hi folk,
>
> before giving some love to the Main Showcase I have made a test with the
> REST Showcase and Twitter Bootstrap.
> What do you think about the result?
>
> http://struts.jgeppert.com/struts2-rest-showcase/
> <http://struts.jgeppert.com/struts2-rest-showcase/>
>
> Johannes
>
>
>
> -----
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/13 Johannes Geppert <jo...@apache.org>:
> With REST Plugin Fixes from Łukasz it works.
>
> See:
> http://struts.jgeppert.com/struts2-rest-showcase/
>
> Łukasz
> Is this a Showstopper for version 2.3.5 ?

Mhm.... I think yes :/ I'll prepare a new version, 2.3.6 but let
finish refactoring of the validators.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
With REST Plugin Fixes from Łukasz it works.

See:
http://struts.jgeppert.com/struts2-rest-showcase/

Łukasz  
Is this a Showstopper for version 2.3.5 ?

Johannes



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710797.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/12 Johannes Geppert <jo...@apache.org>:
> So there is no change necessary in the REST Showcase?

Correct, bug is in the REST Plugin

> If there is no objection I would like to commit the updated REST Showcase.

+1 from my side, but please create a task for that


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
So there is no change necessary in the REST Showcase?

If there is no objection I would like to commit the updated REST Showcase.



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710793.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/12 Johannes Geppert <jo...@apache.org>:
> Thanks for the fast feedback Maurizio.
>
> I changed the Results Definition in the OrdersController from
>
> @Results({
>     @Result(name="success", type="redirectAction", params = {"actionName" ,
> "orders"})
> })
>
> to
>
> @Results({
>     @Result(name="success", type="redirectAction", params = {"actionName" ,
> "orders"}),
>     @Result(name="default-error", location = "orders-editNew.jsp")
> })
>
> but I got always the blank page. :-(

There is a bug in DefaultContentTypeHandlerManager, already solved,
just need to write a test case and will commit it soon.


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
Thanks for the fast feedback Maurizio.

I changed the Results Definition in the OrdersController from

@Results({
    @Result(name="success", type="redirectAction", params = {"actionName" ,
"orders"})
})

to

@Results({
    @Result(name="success", type="redirectAction", params = {"actionName" ,
"orders"}),
    @Result(name="default-error", location = "orders-editNew.jsp")
})

but I got always the blank page. :-(



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710790.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Maurizio Cucchiara <mc...@apache.org>.
Hi Johannes,
If I recall correctly S2 Rest plugin allows to define a default-error location.

@Results({
        @Result(name = "default-error", location = "error.jsp")
})

Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara
VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara

Maurizio Cucchiara


On 12 October 2012 19:01, Johannes Geppert <jo...@apache.org> wrote:
> How to define Validation when using REST Plugin.
>
> The REST Showcase produces following LOG Messages:
>
> 2012-10-12 18:42:52,596 DEBUG
> (org.apache.struts2.rest.RestWorkflowInterceptor:68) - Errors on action
> org.demo.rest.example.OrdersController@475b32ea, returning result name
> 'input'
> 2012-10-12 18:42:52,598 DEBUG
> (org.apache.struts2.interceptor.MessageStoreInterceptor:68) - exit executing
> MessageStoreInterceptor
> 2012-10-12 18:42:52,598 DEBUG
> (org.apache.struts2.rest.RestActionInvocation:68) - No result returned for
> action org.demo.rest.example.OrdersController at null
>
> I have try to define an additional Result
>
>     @Result(name="input", location = "orders-editNew.jsp")
>
> but it has no effect.
>
> Sorry I never worked with REST Plugin in real world. :-)
>
> Johannes
>
>
>
> -----
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710788.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
How to define Validation when using REST Plugin.

The REST Showcase produces following LOG Messages:

2012-10-12 18:42:52,596 DEBUG
(org.apache.struts2.rest.RestWorkflowInterceptor:68) - Errors on action
org.demo.rest.example.OrdersController@475b32ea, returning result name
'input'
2012-10-12 18:42:52,598 DEBUG
(org.apache.struts2.interceptor.MessageStoreInterceptor:68) - exit executing
MessageStoreInterceptor
2012-10-12 18:42:52,598 DEBUG
(org.apache.struts2.rest.RestActionInvocation:68) - No result returned for
action org.demo.rest.example.OrdersController at null

I have try to define an additional Result

    @Result(name="input", location = "orders-editNew.jsp")

but it has no effect.

Sorry I never worked with REST Plugin in real world. :-)

Johannes



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710788.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Johannes Geppert <jo...@apache.org>.
In the OrdersController a validate function is defined.

    public void validate() {
        if (model.getClientName() == null || model.getClientName().length()
==0) {
            addFieldError("clientName", "The client name is empty");
        }
    }

But It looks like the input action mapping is missing.

@Results({
    @Result(name="success", type="redirectAction", params = {"actionName" ,
"orders"})
})

Johannes



-----
web: http://www.jgeppert.com
twitter: http://twitter.com/jogep
--
View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774p5710786.html
Sent from the Struts - Dev mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/12 Maurizio Cucchiara <ma...@gmail.com>:
> Even if you don't specify any value for order field?
> I have experienced the same issue that mentioned Matt on my mobile phone.

Right, if I submit form with no value, blank page appears


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Maurizio Cucchiara <ma...@gmail.com>.
Even if you don't specify any value for order field?
I have experienced the same issue that mentioned Matt on my mobile phone.

Sent from my mobile device, so please excuse typos and brevity.

Maurizio Cucchiara
Il giorno 12/ott/2012 08.27, "Łukasz Lenart" <lu...@gmail.com> ha
scritto:

> 2012/10/11 Matt Raible <ma...@raibledesigns.com>:
> > I like it!
> >
> > Not sure if it's a Struts issue or now, but when you create a new order
> and don't fill anything in, you get a blank screen. Here's the URL:
> >
> > http://struts.jgeppert.com/struts2-rest-showcase/orders/new
>
> Osm :-) And I don't see any problems, everything works like a charm :-)
>
>
> Regards
> --
> Łukasz
> mobile +48 606 323 122 http://www.lenart.org.pl/
> Warszawa JUG conference - Confitura http://confitura.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>

Re: Twitter Bootstrap for the REST Showcase

Posted by Lukasz Lenart <lu...@apache.org>.
2012/10/12 Łukasz Lenart <lu...@gmail.com>:
> 2012/10/11 Matt Raible <ma...@raibledesigns.com>:
>> I like it!
>>
>> Not sure if it's a Struts issue or now, but when you create a new order and don't fill anything in, you get a blank screen. Here's the URL:
>>
>> http://struts.jgeppert.com/struts2-rest-showcase/orders/new
>
> Osm :-) And I don't see any problems, everything works like a charm :-)

I cannot wait when we could launch it on struts showcase app server :-)

https://issues.apache.org/jira/browse/INFRA-4907


Kind regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Łukasz Lenart <lu...@gmail.com>.
2012/10/11 Matt Raible <ma...@raibledesigns.com>:
> I like it!
>
> Not sure if it's a Struts issue or now, but when you create a new order and don't fill anything in, you get a blank screen. Here's the URL:
>
> http://struts.jgeppert.com/struts2-rest-showcase/orders/new

Osm :-) And I don't see any problems, everything works like a charm :-)


Regards
-- 
Łukasz
mobile +48 606 323 122 http://www.lenart.org.pl/
Warszawa JUG conference - Confitura http://confitura.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Twitter Bootstrap for the REST Showcase

Posted by Matt Raible <ma...@raibledesigns.com>.
I like it! 

Not sure if it's a Struts issue or now, but when you create a new order and don't fill anything in, you get a blank screen. Here's the URL:

http://struts.jgeppert.com/struts2-rest-showcase/orders/new

On Oct 11, 2012, at 2:13 PM, Johannes Geppert wrote:

> Hi folk,
> 
> before giving some love to the Main Showcase I have made a test with the
> REST Showcase and Twitter Bootstrap.
> What do you think about the result?
> 
> http://struts.jgeppert.com/struts2-rest-showcase/
> <http://struts.jgeppert.com/struts2-rest-showcase/>  
> 
> Johannes
> 
> 
> 
> -----
> web: http://www.jgeppert.com
> twitter: http://twitter.com/jogep
> --
> View this message in context: http://struts.1045723.n5.nabble.com/Twitter-Bootstrap-for-the-REST-Showcase-tp5710774.html
> Sent from the Struts - Dev mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org