You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Mikhail Ryagin (JIRA)" <de...@myfaces.apache.org> on 2007/05/22 11:29:16 UTC

[jira] Created: (TOMAHAWK-1005) ReducedHTMLParser.java reports invalid line numbers

ReducedHTMLParser.java reports invalid line numbers
---------------------------------------------------

                 Key: TOMAHAWK-1005
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1005
             Project: MyFaces Tomahawk
          Issue Type: Bug
    Affects Versions: 1.1.6-SNAPSHOT
            Reporter: Mikhail Ryagin
            Priority: Minor


Method consumeExcept() increments field _lineNumber twice for each end-of-line it sees

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1005) ReducedHTMLParser.java reports invalid line numbers

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12606951#action_12606951 ] 

Leonardo Uribe commented on TOMAHAWK-1005:
------------------------------------------

Checking some tomahawk issues, this is duplicate of TOMAHAWK-1129. The solution proposed is the same, and checking again the code there exists a duplication of code. Each line is counted twice.

> ReducedHTMLParser.java reports invalid line numbers
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-1005
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1005
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.7-SNAPSHOT
>            Reporter: Mikhail Ryagin
>            Priority: Minor
>         Attachments: ReducedHTMLParser-TOMAHAWK-1005.patch
>
>
> Method consumeExcept() increments field _lineNumber twice for each end-of-line it sees

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: Needs help for creating a new JSF component

Posted by Manfred Geiler <ma...@gmail.com>.
Questions like this on the users@myfaces.apache.org list please.
Thanks,
Manfred

On 5/22/07, Stephane.CLINCKART@ext.ec.europa.eu
<St...@ext.ec.europa.eu> wrote:
>
>
>
> Hi,
>
> I have to develop a new JSF component (component, tag and renderer).
>
> The goal of this new component is easy... Put together severals input zone
> in one single component.
>
> I have done somethink that works... But i'm not sure I did everything
> correctly. (in the State of Art)
> --> Should be great if I can get a link to a complete tutorial or full
> sample.
>
> I create some code I don't like:
> --> I have to "hardcoded" in the backingbean the "id" of my component and
> then cast it to my component.
> In my backingbean, the code looks like this:
> UIComponent temp =
> FacesContext.getCurrentInstance().getViewRoot().findComponent("dialog:dialog-body:mltext");
> UIMltext myComponent = (UIMltext) temp;
>
> During reading documentation I have found it is possible to "add" component
> in the JSF tree dynamicly with code like this:
> public void addControls(ActionEvent actionEvent)
> {
>         Application application =
> FacesContext.getCurrentInstance().getApplication();
> //Question: how to get controlPanel ???
>         List children = controlPanel.getChildren();
>         children.clear();
>         for (int count = 0; count < numControls; count++)
>         {
>                 HtmlOutputText output =
> (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
>                 output.setValue(" " + count + " ");
>                 output.setStyle("color: blue");
>                 children.add(output);
>         }
> }
>
> Is it necessary in my component. What is the goal of adding component in the
> tree?
>
> I can now do: "MyValue myValues = myComponent.getValue()"
>
> Then I have to do somethink like:
>
> backingBean.setValue1(myValues.getValue1());
> backingBean.setValue2(myValues.getValue2());
> ...
> backingBean.setValuex(myValues.getValuex());
>
> Is it correct? I should prefer the setter are called by JSF layer. Is it
> possible?
>
> Thanks a lot.
>
> Stéphane


-- 
http://www.irian.at
Your JSF powerhouse - JSF Consulting,
Development and Courses in English and
German

Professional Support for Apache MyFaces

Needs help for creating a new JSF component

Posted by St...@ext.ec.europa.eu.
Hi,

I have to develop a new JSF component (component, tag and renderer).

The goal of this new component is easy... Put together severals input zone in one single component.

I have done somethink that works... But i'm not sure I did everything correctly. (in the State of Art)
--> Should be great if I can get a link to a complete tutorial or full sample.

I create some code I don't like:
--> I have to "hardcoded" in the backingbean the "id" of my component and then cast it to my component.
In my backingbean, the code looks like this:
UIComponent temp =  FacesContext.getCurrentInstance().getViewRoot().findComponent("dialog:dialog-body:mltext");
UIMltext myComponent = (UIMltext) temp;

During reading documentation I have found it is possible to "add" component in the JSF tree dynamicly with code like this:
public void addControls(ActionEvent actionEvent)
{
        Application application = FacesContext.getCurrentInstance().getApplication();
//Question: how to get controlPanel ???
        List children = controlPanel.getChildren();
        children.clear();
        for (int count = 0; count < numControls; count++)
        {
                HtmlOutputText output = (HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
                output.setValue(" " + count + " ");
                output.setStyle("color: blue");
                children.add(output);
        }
}

Is it necessary in my component. What is the goal of adding component in the tree?

I can now do: "MyValue myValues = myComponent.getValue()"

Then I have to do somethink like:

backingBean.setValue1(myValues.getValue1());
backingBean.setValue2(myValues.getValue2());
...
backingBean.setValuex(myValues.getValuex());

Is it correct? I should prefer the setter are called by JSF layer. Is it possible?

Thanks a lot. 

Stéphane


[jira] Updated: (TOMAHAWK-1005) ReducedHTMLParser.java reports invalid line numbers

Posted by "Mikhail Ryagin (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/TOMAHAWK-1005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikhail Ryagin updated TOMAHAWK-1005:
-------------------------------------

    Status: Patch Available  (was: Open)

> ReducedHTMLParser.java reports invalid line numbers
> ---------------------------------------------------
>
>                 Key: TOMAHAWK-1005
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1005
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.6-SNAPSHOT
>            Reporter: Mikhail Ryagin
>            Priority: Minor
>
> Method consumeExcept() increments field _lineNumber twice for each end-of-line it sees

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.