[jbosstools-issues] [JBoss JIRA] Commented: (JBDS-420) RHDS GSG

OLga Chikvina (JIRA) jira-events at lists.jboss.org
Tue Sep 23 08:10:21 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBDS-420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12430767#action_12430767 ] 

OLga Chikvina commented on JBDS-420:
------------------------------------

Shaun,
You seem to use our stable docs that are supplied with the last release of JBDS (currently 1.1.0 GA). It's a bit out of date for now. You can find  the last  builds of JBoss Tools/JBDS documentation here http://download.jboss.org/jbosstools/nightly-docs/. 
Sorry for the inconvenience. However, here are some comments:  

> sect 1.2.1 the note does not match up with the script.
> The script states -
> export PATH=$PATH:$JAVA_HOME/bin
> The note states -

> When you add $JAVA_HOME/bin to $PATH, you should add it before the old $PATH not after it. This way, the machine will pick up the new JVM first. 
> You only need to run "alternative" as a safe guard for the right JVM. 

You're right. The note is a bit incorrect. It should state the next:

Note:
    If you have JDK already installed and added in your system path, 
    you should add $JAVA_HOME/bin before the old $PATH(not after it) so that the new version of JDK can be found first, i. e. 
			export PATH=$JAVA_HOME/bin:$PATH 
    This way, the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM. 

> If you follow the sections of the guide through sequentially 
>	The sect 3.5 doesn't work as the method public String hello() is never called

To make the method public String hello() work you should call it from simpleAction() method, I. e.

	public void simpleAction()
	{
		//implement your business logic here
		log.info("simpleAction.simpleAction() action called with: #{simpleAction.value}");
		facesMessages.add("simpleAction #{simpleAction.value}");
		hello();
	}
and then not forget to put the next snippet of code to the form in simpleAction.xhtml:

	<h:selectBooleanCheckbox title="convertToCap" 	value="#{simpleAction.convertToCap}" /> 

	Capitalize the input?
		
	<p><b>Hello, #{simpleAction.value}</b></p> 

> Also it is not possible to produce the result shown in Fig 3.17 as the value input must have a surname and lastname as enforced by the validator > introduced in sect 3.4.

To produce the result shown in Fig 3.17 you just need to remove or comment out the annotations:
	@NotNull

	@Pattern(regex="^[a-zA-Z.-]+ [a-zA-Z.-]+", message="Need a firstname and a lastname")

> Sect 3.5 I tried following this section as it is written but I could not secure the pages. Either the are some steps missing or this section assumes > the readers know much about the seam security framework (which I don't yet!).

Here, to secure the action on the button press, you should add the annotation
	@Restrict("#{identity.isLoggedIn(false)}")
to the public void simpleAction() method.

After re-deploying the application and trying the action button, the login page asking for login credentials will appear.
To secure the web page you need to put the following line into the pages.xml:

		<page view-id="/simpleAction.xhtml" login-required="true"/>

Please find more examples on Declarative Security in our latest documentation: 
http://download.jboss.org/jbosstools/nightly-docs/en/GettingStartedGuide/html_single/index.html#declarative_security.

Thank you for the feedback and sorry for the inaccurate information in the documentation.


> RHDS GSG
> --------
>
>                 Key: JBDS-420
>                 URL: https://jira.jboss.org/jira/browse/JBDS-420
>             Project: Developer Studio
>          Issue Type: Task
>          Components: Doc - RHDS GSG
>    Affects Versions: 1.1.0.GA
>         Environment: n/a
>            Reporter: Shaun Appleton
>            Assignee: OLga Chikvina
>
> I have run through the RHDS GSG and have the following comments -
> sect 1.2.1 the note does not match up with the script.
> The script states - 
> export PATH=$PATH:$JAVA_HOME/bin
> The note states - 
> When you add $JAVA_HOME/bin to $PATH, you should add it before the old $PATH not after it. This way, the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM.
> It might be better if script stated - 
> export PATH=$JAVA_HOME/bin:$PATH
> and note
> Note:
> $JAVA_HOME/bin is added after the $PATH to ensure the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM.
> If you follow the sections of the guide through sequentially
> The sect 3.5 doesn't work as the method public String hello() is never called
> if getValue() is changed to 
> 	public String getValue()
> 	{
>         if (convertToCap) {
>             value = value.toUpperCase ();
>           }
> 		return value;
> 	}
> Then it works.
> Also it is not possible to produce the result shown in Fig 3.17 as the value input must have a surname and lastname as enforced by the validator introduced in sect 3.4.
> Sect 3.5 I tried following this section as it is written but I could not secure the pages. Either the are some steps missing or this section assumes the readers know much about the seam secruity framework (which I don't yet!).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list